summaryrefslogtreecommitdiff
path: root/hw/i386/multiboot.c
diff options
context:
space:
mode:
authorKevin Wolf <mail@kevin-wolf.de>2013-06-23 22:07:45 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2013-06-28 14:01:52 -0500
commit26a8ec07616df8eeb7ae5e76a4eade6809c426e3 (patch)
tree23953b1d7a5120432ce1d446d9ea63b4971a54c7 /hw/i386/multiboot.c
parent390fb6b47144adbad453cdf95c130854728c56f8 (diff)
downloadqemu-26a8ec07616df8eeb7ae5e76a4eade6809c426e3.tar.gz
multiboot: Calculate upper_mem in the ROM
The upper_mem field of the Multiboot information struct doesn't really contain the RAM size - 1 MB like we used to calculate it, but only the memory from 1 MB up to the first (upper) memory hole. In order to correctly retrieve this information, the multiboot ROM now looks at the mmap it creates anyway and tries to find the size of contiguous usable memory from 1 MB. Drop the multiboot.c definition of lower_mem and upper_mem because both are queried at runtime now. Signed-off-by: Kevin Wolf <mail@kevin-wolf.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1372018066-21822-3-git-send-email-mail@kevin-wolf.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/i386/multiboot.c')
-rw-r--r--hw/i386/multiboot.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c
index 09211e0534..985ca1ed84 100644
--- a/hw/i386/multiboot.c
+++ b/hw/i386/multiboot.c
@@ -315,8 +315,6 @@ int load_multiboot(FWCfgState *fw_cfg,
| MULTIBOOT_FLAGS_CMDLINE
| MULTIBOOT_FLAGS_MODULES
| MULTIBOOT_FLAGS_MMAP);
- stl_p(bootinfo + MBI_MEM_LOWER, 640);
- stl_p(bootinfo + MBI_MEM_UPPER, (ram_size / 1024) - 1024);
stl_p(bootinfo + MBI_BOOT_DEVICE, 0x8000ffff); /* XXX: use the -boot switch? */
stl_p(bootinfo + MBI_MMAP_ADDR, ADDR_E820_MAP);