From 51d703ff2e03285be7ba0433d814a688c923b1ea Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 11 Dec 2014 02:17:03 +0100 Subject: linuxboot: fix loading old kernels Old kernels that used high memory only allowed the initrd to be in the first 896MB of memory. If you load the initrd above, they complain that "initrd extends beyond end of memory". In order to fix this, while not breaking machines with small amounts of memory fixed by cdebec5 (linuxboot: compute initrd loading address, 2014-10-06), we need to distinguish two cases. If pc.c placed the initrd at end of memory, use the new algorithm based on the e801 memory map. If instead pc.c placed the initrd at the maximum address specified by the bzImage, leave it there. The only interesting part is that the low-memory info block is now loaded very early, in real mode, and thus the 32-bit address has to be converted into a real mode segment. The initrd address is also patched in the info block before entering real mode, it is simpler that way. This fixes booting the RHEL4.8 32-bit installation image with 1GB of RAM. Cc: qemu-stable@nongnu.org Cc: mst@redhat.com Cc: jsnow@redhat.com Signed-off-by: Paolo Bonzini (cherry picked from commit 269e2358492b674c50160553d037702e916b9f1b) Signed-off-by: Michael Roth --- pc-bios/linuxboot.bin | Bin 1024 -> 1024 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'pc-bios/linuxboot.bin') diff --git a/pc-bios/linuxboot.bin b/pc-bios/linuxboot.bin index 130103fb73..923d1796fb 100644 Binary files a/pc-bios/linuxboot.bin and b/pc-bios/linuxboot.bin differ -- cgit v1.2.3