linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Matt Fleming <matt.fleming@intel.com>,
	Kees Cook <keescook@chromium.org>,
	Junjie Mao <eternal.n08@gmail.com>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86, boot: Allow 64bit EFI kernel to be loaded above 4G
Date: Mon, 9 Feb 2015 12:23:15 -0800	[thread overview]
Message-ID: <CAE9FiQUFO4yfEVgGZ9U0Q-RaokFor1gMbKJ7As2vvqGVkqrDbw@mail.gmail.com> (raw)
In-Reply-To: <20150209182742.GQ6461@codeblueprint.co.uk>

On Mon, Feb 9, 2015 at 10:27 AM, Matt Fleming <matt@codeblueprint.co.uk> wrote:
> On Tue, 03 Feb, at 06:03:20PM, Yinghai Lu wrote:
>
> The first thing that comes to mind is the issues we experienced last
> year when adding support for loading initrds above 4GB to the EFI boot
> stub, c.f. commit 47226ad4f4cf ("x86/efi: Only load initrd above 4g on
> second try").
>
> Are things going to work correctly this time?

That should be addressed the grub2.

I was thinking that we may need to add mem_limit command together with
linuxefi and initrdefi.
or add linuxefi64/initrdefi64?

BTW, I tested loading kernel above grub2 on
virutalbox, qemu/kvm/OVMF, and real servers (ami ...) all work without problem.

wonder if we need have one black list for 64bit UEFI that does not
support access
memory above 4G.

>> @@ -1430,9 +1431,12 @@ struct boot_params *efi_main(struct efi_
>>        * If the kernel isn't already loaded at the preferred load
>>        * address, relocate it.
>>        */
>> -     if (hdr->pref_address != hdr->code32_start) {
>> -             unsigned long bzimage_addr = hdr->code32_start;
>> -             status = efi_relocate_kernel(sys_table, &bzimage_addr,
>> +     loaded_addr = hdr->code32_start;
>> +     loaded_addr |= (unsigned long)hdr->ext_code32_start << 32;
>
> Please compile this for CONFIG_X86_32 and fix any compiler warnings.

Ok.

>
>> @@ -738,6 +742,13 @@ Offset/size:     0x264/4
>>
>>    See EFI HANDOVER PROTOCOL below for more details.
>>
>> +Field name:  ext_code32_start
>> +Type:                modify (optional, reloc)
>> +Offset/size: 0x268/4
>> +Protocol:    2.14+
>> +
>> +  The address is used with code32_start to compare pref_address
>> +  to support EFI 64bit kernel get loaded above 4G.
>
> It would be good to mention that this new field contains the upper
> 32-bits of the 64-bit address.

ok. that is: upper 32bits of the 64bit address of startup_32 when kernel
loaded above 4G.

Thanks

Yinghai

  reply	other threads:[~2015-02-09 20:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-04  2:03 [PATCH] x86, boot: Allow 64bit EFI kernel to be loaded above 4G Yinghai Lu
2015-02-05  3:25 ` Dave Young
2015-02-05  5:25   ` Yinghai Lu
2015-02-05  6:09     ` Dave Young
2015-02-18  7:29       ` Yinghai Lu
2015-02-09 18:27 ` Matt Fleming
2015-02-09 20:23   ` Yinghai Lu [this message]
     [not found]     ` <CAE9FiQUFO4yfEVgGZ9U0Q-RaokFor1gMbKJ7As2vvqGVkqrDbw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-11 15:55       ` Matt Fleming
2015-02-11 16:29         ` Peter Jones
2015-02-12 14:59           ` Matt Fleming

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=CAE9FiQUFO4yfEVgGZ9U0Q-RaokFor1gMbKJ7As2vvqGVkqrDbw@mail.gmail.com \
    --to=yinghai@kernel.org \
    --cc=corbet@lwn.net \
    --cc=eternal.n08@gmail.com \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=matt@codeblueprint.co.uk \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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).