mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-07 05:51:36 +00:00
multiboot: Fix module loading and setting of mmap.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
dc61b0dc5a
commit
53ea95de52
2
hw/pc.c
2
hw/pc.c
@ -666,7 +666,7 @@ static int load_multiboot(void *fw_cfg,
|
|||||||
|
|
||||||
/* append module data at the end of last module */
|
/* append module data at the end of last module */
|
||||||
mb_kernel_data = qemu_realloc(mb_kernel_data,
|
mb_kernel_data = qemu_realloc(mb_kernel_data,
|
||||||
mh_load_addr - mb_mod_end);
|
mb_mod_end - mh_load_addr);
|
||||||
load_image(initrd_filename,
|
load_image(initrd_filename,
|
||||||
mb_kernel_data + mb_mod_start - mh_load_addr);
|
mb_kernel_data + mb_mod_start - mh_load_addr);
|
||||||
|
|
||||||
|
Binary file not shown.
@ -62,6 +62,9 @@ run_multiboot:
|
|||||||
add %eax, %ebx
|
add %eax, %ebx
|
||||||
movl %ebx, %gs:GS_GDT_DESC + 2
|
movl %ebx, %gs:GS_GDT_DESC + 2
|
||||||
|
|
||||||
|
xor %eax, %eax
|
||||||
|
mov %eax, %es
|
||||||
|
|
||||||
/* Read the bootinfo struct into RAM */
|
/* Read the bootinfo struct into RAM */
|
||||||
read_fw_blob(FW_CFG_INITRD)
|
read_fw_blob(FW_CFG_INITRD)
|
||||||
|
|
||||||
@ -71,7 +74,7 @@ run_multiboot:
|
|||||||
mov %ax, %fs
|
mov %ax, %fs
|
||||||
|
|
||||||
/* ES = mmap_addr */
|
/* ES = mmap_addr */
|
||||||
mov %eax, %fs:0x48
|
mov %fs:48, %eax
|
||||||
shr $4, %eax
|
shr $4, %eax
|
||||||
mov %ax, %es
|
mov %ax, %es
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user