Re: [PATCH] x86: only load initrd above 4g on second try

From: Yinghai Lu
Date: Tue Aug 26 2014 - 18:05:56 EST

On Tue, Aug 26, 2014 at 2:53 PM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> On 08/26/2014 02:45 PM, 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.
> This makes absolutely zero sense. Please explain what the actual
> problem is here.

The firmware has bug and can use buffer above 4G to read files.
and if the file size is 512 bytes alignment, then reading could go through.

>From Mantas:
On Wed, Aug 20, 2014 at 12:05 PM, Mantas MikulÄnas <grawity@xxxxxxxxx> wrote:
> I experimented with some things (like setting chunk size to a few kB
> to see if it hangs earlier or only at the very end; etc.), and finally
> found out that it stops freezing if I pad the initrd file to a
> multiple of 512 bytes :/ That is, 5684268 bytes will freeze, 5684736
> bytes will not.
> ...In other words, seems like it cannot read chunks that aren't
> multiples of 512 into a location above 4 GB. Or something like that..

>From Matt:
> OK, we're out of options here. Yinghai, we're going to have to revert
> your patch, 4bf7111f5016 ("x86/efi: Support initrd loaded above 4G")
> We could conceivably add a boot parameter option to attempt loading
> inirds above 4G, but we can't turn the feature on by default because of
> all these buggy EFI implementations - things must work out of the box.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at