Commit 1d108d9734f0734e2c6638c873fcd54ff8aa3ddf

Authored by Alexander Graf
Committed by Anthony Liguori
1 parent 6c0d7ee8

Change bochs bios init order

For multiboot support, we need bochs_bios_init to happen before
load_linux, so we get the fw_cfg device.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing 1 changed file with 6 additions and 6 deletions
... ... @@ -967,6 +967,12 @@ static void pc_init1(ram_addr_t ram_size,
967 967 if (oprom_area_size < 0x8000)
968 968 oprom_area_size = 0x8000;
969 969  
  970 + /* map all the bios at the top of memory */
  971 + cpu_register_physical_memory((uint32_t)(-bios_size),
  972 + bios_size, bios_offset | IO_MEM_ROM);
  973 +
  974 + bochs_bios_init();
  975 +
970 976 if (linux_boot) {
971 977 load_linux(0xc0000 + oprom_area_size,
972 978 kernel_filename, initrd_filename, kernel_cmdline, below_4g_mem_size);
... ... @@ -993,12 +999,6 @@ static void pc_init1(ram_addr_t ram_size,
993 999 0xe0000);
994 1000 }
995 1001  
996   - /* map all the bios at the top of memory */
997   - cpu_register_physical_memory((uint32_t)(-bios_size),
998   - bios_size, bios_offset | IO_MEM_ROM);
999   -
1000   - bochs_bios_init();
1001   -
1002 1002 cpu_irq = qemu_allocate_irqs(pic_irq_request, NULL, 1);
1003 1003 i8259 = i8259_init(cpu_irq[0]);
1004 1004 ferr_irq = i8259[13];
... ...