linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Fleming <matt@codeblueprint.co.uk>
To: joeyli <jlee@suse.com>
Cc: Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
	"Lee, Chun-Yi" <joeyli.kernel@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, linux-efi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86_64/efi: Mapping Boot and Runtime EFI memory regions to different starting virtual address
Date: Thu, 30 Jul 2015 15:05:42 +0100	[thread overview]
Message-ID: <20150730140542.GI2725@codeblueprint.co.uk> (raw)
In-Reply-To: <20150730133947.GN15651@linux-rxt1.site>

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

  reply	other threads:[~2015-07-30 14:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30  4:32 [PATCH] x86_64/efi: Mapping Boot and Runtime EFI memory regions to different starting virtual address Lee, Chun-Yi
     [not found] ` <1438230757-30840-1-git-send-email-jlee-IBi9RG/b67k@public.gmane.org>
2015-07-30  7:53   ` H. Peter Anvin
     [not found]     ` <55B9D806.7030705-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2015-07-30  8:03       ` Borislav Petkov
     [not found]         ` <20150730080323.GD8984-K5JNixvcfoxupOikMc4+xw@public.gmane.org>
2015-07-30 10:11           ` Matt Fleming
     [not found]             ` <20150730101131.GB2725-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-07-30 11:09               ` joeyli
     [not found]                 ` <20150730110959.GJ15651-empE8CJ7fzk2xCFIczX1Fw@public.gmane.org>
2015-07-30 11:18                   ` joeyli
     [not found]                     ` <20150730111819.GK15651-empE8CJ7fzk2xCFIczX1Fw@public.gmane.org>
2015-07-30 12:09                       ` Matt Fleming
     [not found]                         ` <20150730120916.GD2725-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-07-30 12:31                           ` joeyli
2015-07-30 13:17                             ` Matt Fleming
     [not found]                               ` <20150730131723.GG2725-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-07-30 13:39                                 ` joeyli
2015-07-30 14:05                                   ` Matt Fleming [this message]
     [not found]                                     ` <20150730140542.GI2725-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-07-30 14:16                                       ` joeyli
2015-08-19 16:31                                         ` Matt Fleming
2015-08-20  1:05                                           ` joeyli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150730140542.GI2725@codeblueprint.co.uk \
    --to=matt@codeblueprint.co.uk \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jlee@suse.com \
    --cc=joeyli.kernel@gmail.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).