aboutsummaryrefslogtreecommitdiff
path: root/hw/multiboot.c
diff options
context:
space:
mode:
authorKevin Wolf <mail@kevin-wolf.de>2011-01-04 14:03:30 +0100
committerAurelien Jarno <aurelien@aurel32.net>2011-01-23 22:44:13 +0100
commit0bfe006c5380c5f8a485a55ded3329fbbc224396 (patch)
tree1b6a8529a95efe70d9668a607ff9c62c656b0373 /hw/multiboot.c
parent64b85a8f2359ca3a995499afaf3c87d8e036e030 (diff)
multiboot: Fix upper memory size in multiboot info
The upper memory size field should exclude the first MB of RAM. Signed-off-by: Kevin Wolf <mail@kevin-wolf.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw/multiboot.c')
-rw-r--r--hw/multiboot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/multiboot.c b/hw/multiboot.c
index 7cc3055359..0d2bfb4973 100644
--- a/hw/multiboot.c
+++ b/hw/multiboot.c
@@ -306,7 +306,7 @@ int load_multiboot(void *fw_cfg,
| MULTIBOOT_FLAGS_MODULES
| MULTIBOOT_FLAGS_MMAP);
stl_p(bootinfo + MBI_MEM_LOWER, 640);
- stl_p(bootinfo + MBI_MEM_UPPER, ram_size / 1024);
+ stl_p(bootinfo + MBI_MEM_UPPER, (ram_size / 1024) - 1024);
stl_p(bootinfo + MBI_BOOT_DEVICE, 0x8001ffff); /* XXX: use the -boot switch? */
stl_p(bootinfo + MBI_MMAP_ADDR, ADDR_E820_MAP);