diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-12-08 13:35:07 +0200 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-12-11 21:32:47 +0000 |
commit | 2e55e84282c545aeab8f5c9dd52a8073deaf3dbc (patch) | |
tree | 7fdff0cb2027337a402dfb2f1687840c552a8e76 /hw/pc.c | |
parent | de1f34cb6351c028ebcc61fea9fa78008ca1a529 (diff) |
Add bootindex for option roms.
Extend -option-rom command to have additional parameter ,bootindex=.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/pc.c')
-rw-r--r-- | hw/pc.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -733,7 +733,8 @@ static void load_linux(void *fw_cfg, fw_cfg_add_i32(fw_cfg, FW_CFG_SETUP_SIZE, setup_size); fw_cfg_add_bytes(fw_cfg, FW_CFG_SETUP_DATA, setup, setup_size); - option_rom[nb_option_roms] = "linuxboot.bin"; + option_rom[nb_option_roms].name = "linuxboot.bin"; + option_rom[nb_option_roms].bootindex = 0; nb_option_roms++; } @@ -937,7 +938,7 @@ void pc_memory_init(ram_addr_t ram_size, goto bios_error; } bios_offset = qemu_ram_alloc(NULL, "pc.bios", bios_size); - ret = rom_add_file_fixed(bios_name, (uint32_t)(-bios_size)); + ret = rom_add_file_fixed(bios_name, (uint32_t)(-bios_size), -1); if (ret != 0) { bios_error: fprintf(stderr, "qemu: could not load PC BIOS '%s'\n", bios_name); @@ -969,7 +970,7 @@ void pc_memory_init(ram_addr_t ram_size, } for (i = 0; i < nb_option_roms; i++) { - rom_add_option(option_rom[i]); + rom_add_option(option_rom[i].name, option_rom[i].bootindex); } } |