Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1196071

Re: [PATCH] x86_64/efi: Mapping Boot and Runtime EFI memory regions to different starting virtual address

From joeyli <jlee@suse.com>
Newsgroups linux.kernel
Subject Re: [PATCH] x86_64/efi: Mapping Boot and Runtime EFI memory regions to different starting virtual address
Date 2015-07-30 16:20 +0200
Message-ID <pRWQF-Mx-3@gated-at.bofh.it> (permalink)
References (5 earlier) <pRUOT-6hb-33@gated-at.bofh.it> <pRVhU-6P7-9@gated-at.bofh.it> <pRVUB-7Sm-19@gated-at.bofh.it> <pRWnF-8qz-17@gated-at.bofh.it> <pRWGZ-Bf-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jul 30, 2015 at 03:05:42PM +0100, Matt Fleming wrote:
> 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

Thanks for your explanation.

For my issue, I will check if rewriting the VA of runtime services can fix issue.
If not, then I think need find a way to sync the mapping in EFI page table between
boot kernel and image kernel.


Thanks a lot!
Joey Lee
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86_64/efi: Mapping Boot and Runtime EFI memory regions to different starting virtual address "Lee, Chun-Yi" <joeyli.kernel@gmail.com> - 2015-07-30 06:40 +0200
  Re: [PATCH] x86_64/efi: Mapping Boot and Runtime EFI memory regions  to different starting virtual address "H. Peter Anvin" <hpa@zytor.com> - 2015-07-30 10:00 +0200
    Re: [PATCH] x86_64/efi: Mapping Boot and Runtime EFI memory regions  to different starting virtual address Borislav Petkov <bp@alien8.de> - 2015-07-30 10:10 +0200
      Re: [PATCH] x86_64/efi: Mapping Boot and Runtime EFI memory regions  to different starting virtual address Matt Fleming <matt@codeblueprint.co.uk> - 2015-07-30 12:20 +0200
        Re: [PATCH] x86_64/efi: Mapping Boot and Runtime EFI memory regions  to different starting virtual address joeyli <jlee@suse.com> - 2015-07-30 13:20 +0200
          Re: [PATCH] x86_64/efi: Mapping Boot and Runtime EFI memory regions  to different starting virtual address joeyli <jlee@suse.com> - 2015-07-30 16:20 +0200
        Re: [PATCH] x86_64/efi: Mapping Boot and Runtime EFI memory regions  to different starting virtual address joeyli <jlee@suse.com> - 2015-07-30 13:20 +0200

csiph-web