aboutsummaryrefslogtreecommitdiff
path: root/hw/pc.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2010-12-08 13:35:07 +0200
committerBlue Swirl <blauwirbel@gmail.com>2010-12-11 21:32:47 +0000
commit2e55e84282c545aeab8f5c9dd52a8073deaf3dbc (patch)
tree7fdff0cb2027337a402dfb2f1687840c552a8e76 /hw/pc.c
parentde1f34cb6351c028ebcc61fea9fa78008ca1a529 (diff)
downloadqemu-2e55e84282c545aeab8f5c9dd52a8073deaf3dbc.zip
qemu-2e55e84282c545aeab8f5c9dd52a8073deaf3dbc.tar.gz
qemu-2e55e84282c545aeab8f5c9dd52a8073deaf3dbc.tar.bz2
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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/pc.c b/hw/pc.c
index 119c110..e1b2667 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -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);
}
}