lkml.org 
[lkml]   [2015]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86_64/efi: Mapping Boot and Runtime EFI memory regions to different starting virtual address
On Thu, 30 Jul, at 09:39:47PM, joeyli wrote:
>
> OK, understood! Thanks for your suggestion!
>
> But, I have a question about mapping Boot Code/Data to -4G area. I understand
> we need Runtime regions, and 1:1 mapping is the workaround of some buggy BIOS.
> But why should kernel mapping Boot regions to -4G area?

We map the Boot Service regions in the -4G area for simplicity, i.e.
it's easier to iterate through the EFI memory map in order, and map
things starting at -4G and working down to lower addresses, than it
would be to make different mapping decisions based on the region type.

As for why we map the Boot Service regions *at all*, that's also a bug
workaround, see commit 916f676f8dc0 ("x86, efi: Retain boot service code
until after switching to virtual mode"). We setup the mappings before we
call efi_free_boot_services().

--
Matt Fleming, Intel Open Source Technology Center


\
 
 \ /
  Last update: 2015-07-30 18:21    [W:0.085 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site