lkml.org 
[lkml]   [2013]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v2] EFI: Runtime services virtual mapping
On Mon, Sep 23, 2013 at 01:47:41PM +0800, Dave Young wrote:
> > + unsigned long size = md->num_pages << PAGE_SHIFT;
> > +
> > + efi_va -= size;
> > + if (efi_va < EFI_VA_END) {
> > + pr_warning(FW_WARN "VA address range overflow!\n");
> > + return;
> > + }
> > +
> > + /* Do the 1:1 map */
> > + __map_region(md, md->phys_addr);
> > +
> > + /* Do the VA map */
> > + __map_region(md, efi_va);
>
>
> Could you add comment for above code? It's hard to understand the
> twice mapping if one did not follow the old thread.

Does that suffice:

/*
* Make sure the 1:1 mappings are present as a catch-all for b0rked firmware
* which doesn't update all internal pointers after switching to virtual mode
* and would otherwise crap on us.
*/

?

Btw, when you reply to a mail, please remove that quoted portion of it
which you're not replying to - I had to scroll a bunch of screens down
and I almost missed your reply. :)

Thanks.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--


\
 
 \ /
  Last update: 2013-09-23 08:41    [W:0.194 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site