• Yinghai Lu's avatar
    x86/efi: Only load initrd above 4g on second try · 47226ad4
    Yinghai Lu authored
    Mantas found that after commit 4bf7111f ("x86/efi: Support initrd
    loaded above 4G"), the kernel freezes at the earliest possible moment
    when trying to boot via UEFI on Asus laptop.
    
    Revert to old way to load initrd under 4G on first try, second try will
    use above 4G buffer when initrd is too big and does not fit under 4G.
    
    [ The cause of the freeze appears to be a firmware bug when reading
      file data into buffers above 4GB, though the exact reason is unknown.
      Mantas reports that the hang can be avoid if the file size is a
      multiple of 512 bytes, but I've seen some ASUS firmware simply
      corrupting the file data rather than freezing.
    
      Laszlo fixed an issue in the upstream EDK2 DiskIO code in Aug 2013
      which may possibly be related, commit 4e39b75e ("MdeModulePkg/DiskIoDxe:
      fix source/destination pointer of overrun transfer").
    
      Whatever the cause, it's unlikely that a fix will be forthcoming
      from the vendor, hence the workaround - Matt ]
    
    Cc: Laszlo Ersek <lersek@redhat.com>
    Reported-by: default avatarMantas Mikulėnas <grawity@gmail.com>
    Reported-by: default avatarHarald Hoyer <harald@redhat.com>
    Tested-by: default avatarAnders Darander <anders@chargestorm.se>
    Tested-by: default avatarCalvin Walton <calvin.walton@kepstin.ca>
    Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
    Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
    47226ad4
eboot.c 35.8 KB