From: Matt Fleming <matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
To: Yinghai Lu <yinghai-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: "Matt Fleming"
<matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>,
"Mantas Mikulėnas"
<grawity-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Anders Darander"
<anders-7UjN0b3lYz2SbKU13Z4Etw@public.gmane.org>,
linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Ingo Molnar" <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Harald Hoyer" <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] x86: only load initrd above 4g on second try
Date: Wed, 27 Aug 2014 11:59:01 +0100 [thread overview]
Message-ID: <20140827105901.GC28116@console-pimps.org> (raw)
In-Reply-To: <1409089544-24221-1-git-send-email-yinghai-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
On Tue, 26 Aug, at 02:45:44PM, Yinghai Lu wrote:
> Mantas found that after commit 4bf7111f5016 ("x86/efi: Support initrd
> loaded above 4G"), the kernel freezes at the earliest possible moment
> when trying to boot via UEFI on Asus laptop.
>
> There are buggy EFI implementations: with EFI run time, kernel need
> to load file with 512bytes alignment when buffer is above 4G.
>
> So revert to old way to load initrd on first try,
> second try will use above 4G buffer when initrd is more than
> 2G and does not fit under 4G.
>
> Reported-by: Mantas Mikulėnas <grawity-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Tested-by: Anders Darander <anders-7UjN0b3lYz2SbKU13Z4Etw@public.gmane.org>
> Signed-off-by: Yinghai Lu <yinghai-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>
> ---
> arch/x86/boot/compressed/eboot.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
The reason I suggested introducing some kind of kernel parameter to
allow loading above 4G is because if Mantas loads a 5GB initrd with your
patch, his machine is still going to hang, with no indication of why it
hung.
At least with a kernel paramter, by default we can try to load under 4G,
and if that fails because the file is too big we can print something
along the lines of,
"initramfs file too large: try booting with efi=file-max"
No, it's not ideal, but I think it's a worthwhile compromise because
you're only going to run into this issue when loading a huge initramfs
with the EFI boot stub.
If instead you're using Grub or Syslinux (and the EFI handover protocol)
it's a non-issue because both of those boot loaders carry FAT drivers
and use EFI_BLOCK_IO_PROTOCOL which doesn't trigger the firmware bug.
It's only because we don't have a FAT driver in the EFI boot stub and
have to resort to using EFI_FILE_PROTOCOL that we've encountered this
problem at all.
--
Matt Fleming, Intel Open Source Technology Center
next prev parent reply other threads:[~2014-08-27 10:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 21:45 [PATCH] x86: only load initrd above 4g on second try Yinghai Lu
[not found] ` <1409089544-24221-1-git-send-email-yinghai-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-08-26 21:53 ` H. Peter Anvin
[not found] ` <53FD01D0.8020203-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2014-08-26 22:05 ` Yinghai Lu
[not found] ` <CAE9FiQUF4THLRfzbnhK61QHpM2zyox4E8LTmyzVF7PnPdpb7jQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-26 22:16 ` Mantas Mikulėnas
[not found] ` <CAPWNY8WG3E7oZdZDdYsrnGM5pG4kWAKkEq0Eh5Hc_uXJ_8zD5g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-26 22:58 ` Yinghai Lu
2014-08-27 17:49 ` H. Peter Anvin
[not found] ` <53FE1A2B.80204-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2014-08-27 18:50 ` Yinghai Lu
2014-08-27 10:59 ` Matt Fleming [this message]
[not found] ` <20140827105901.GC28116-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-08-27 17:13 ` Yinghai Lu
[not found] ` <CAE9FiQWrPtEe3tkJjgOzyJJPPzX=AtMYgR4c91pDHL3q3ZLLKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-30 11:24 ` Matt Fleming
[not found] ` <20140830112426.GA2911-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-09-02 6:57 ` Anders Darander
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=20140827105901.GC28116@console-pimps.org \
--to=matt-hnk1s37rvnbexh+ff434mdi2o/jbrioy@public.gmane.org \
--cc=anders-7UjN0b3lYz2SbKU13Z4Etw@public.gmane.org \
--cc=grawity-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=yinghai-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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