summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/pc.c2
-rw-r--r--pc-bios/multiboot.binbin512 -> 1024 bytes
-rw-r--r--pc-bios/optionrom/multiboot.S5
3 files changed, 5 insertions, 2 deletions
diff --git a/hw/pc.c b/hw/pc.c
index 97964b27eb..dac01ce575 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -666,7 +666,7 @@ static int load_multiboot(void *fw_cfg,
/* append module data at the end of last module */
mb_kernel_data = qemu_realloc(mb_kernel_data,
- mh_load_addr - mb_mod_end);
+ mb_mod_end - mh_load_addr);
load_image(initrd_filename,
mb_kernel_data + mb_mod_start - mh_load_addr);
diff --git a/pc-bios/multiboot.bin b/pc-bios/multiboot.bin
index 59737c3c67..d7da6e04ad 100644
--- a/pc-bios/multiboot.bin
+++ b/pc-bios/multiboot.bin
Binary files differ
diff --git a/pc-bios/optionrom/multiboot.S b/pc-bios/optionrom/multiboot.S
index be5c9fcf36..913183739c 100644
--- a/pc-bios/optionrom/multiboot.S
+++ b/pc-bios/optionrom/multiboot.S
@@ -62,6 +62,9 @@ run_multiboot:
add %eax, %ebx
movl %ebx, %gs:GS_GDT_DESC + 2
+ xor %eax, %eax
+ mov %eax, %es
+
/* Read the bootinfo struct into RAM */
read_fw_blob(FW_CFG_INITRD)
@@ -71,7 +74,7 @@ run_multiboot:
mov %ax, %fs
/* ES = mmap_addr */
- mov %eax, %fs:0x48
+ mov %fs:48, %eax
shr $4, %eax
mov %ax, %es