diff options
author | Markus Armbruster <armbru@redhat.com> | 2013-08-16 13:13:50 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2013-08-28 10:16:47 +0300 |
commit | c16547326988cc321c9bff43ed91cbe753e52892 (patch) | |
tree | cb1365697706891bb2d6c9dc30cf225f370fd362 /hw/sparc64 | |
parent | 3bf4dfdd1110de84ca0cecff0679cf7da90bfbfe (diff) |
hw: Clean up bogus default boot order
We set default boot order "cad" in every single machine definition
except "pseries" and "moxiesim", even though very few boards actually
care for boot order, and "cad" makes sense for even fewer.
Machines that care:
* pc and its variants
Accept up to three letters 'a', 'b' (undocumented alias for 'a'),
'c', 'd' and 'n'. Reject all others (fatal with -boot).
* nseries (n800, n810)
Check whether order starts with 'n'. Silently ignored otherwise.
* prep, g3beige, mac99
Extract the first character the machine understands (subset of
'a'..'f'). Silently ignored otherwise.
* spapr
Accept an arbitrary string (vl.c restricts it to contain only
'a'..'p', no duplicates).
* sun4[mdc]
Use the first character. Silently ignored otherwise.
Strip characters these machines ignore from their default boot order.
For all other machines, remove the unused default boot order
alltogether.
Note that my rename of QEMUMachine member boot_order to
default_boot_order and QEMUMachineInitArgs member boot_device to
boot_order has a welcome side effect: it makes every use of boot
orders visible in this patch, for easy review.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/sparc64')
-rw-r--r-- | hw/sparc64/sun4u.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 8bd7fb9bce..e7a489387c 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -881,7 +881,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem, &kernel_addr, &kernel_entry); sun4u_NVRAM_set_params(nvram, NVRAM_SIZE, "Sun4u", args->ram_size, - args->boot_device, + args->boot_order, kernel_addr, kernel_size, args->kernel_cmdline, initrd_addr, initrd_size, @@ -906,7 +906,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem, } fw_cfg_add_i64(fw_cfg, FW_CFG_INITRD_ADDR, initrd_addr); fw_cfg_add_i64(fw_cfg, FW_CFG_INITRD_SIZE, initrd_size); - fw_cfg_add_i16(fw_cfg, FW_CFG_BOOT_DEVICE, args->boot_device[0]); + fw_cfg_add_i16(fw_cfg, FW_CFG_BOOT_DEVICE, args->boot_order[0]); fw_cfg_add_i16(fw_cfg, FW_CFG_SPARC64_WIDTH, graphic_width); fw_cfg_add_i16(fw_cfg, FW_CFG_SPARC64_HEIGHT, graphic_height); @@ -969,7 +969,7 @@ static QEMUMachine sun4u_machine = { .init = sun4u_init, .max_cpus = 1, // XXX for now .is_default = 1, - DEFAULT_MACHINE_OPTIONS, + .default_boot_order = "c", }; static QEMUMachine sun4v_machine = { @@ -977,7 +977,7 @@ static QEMUMachine sun4v_machine = { .desc = "Sun4v platform", .init = sun4v_init, .max_cpus = 1, // XXX for now - DEFAULT_MACHINE_OPTIONS, + .default_boot_order = "c", }; static QEMUMachine niagara_machine = { @@ -985,7 +985,7 @@ static QEMUMachine niagara_machine = { .desc = "Sun4v platform, Niagara", .init = niagara_init, .max_cpus = 1, // XXX for now - DEFAULT_MACHINE_OPTIONS, + .default_boot_order = "c", }; static void sun4u_register_types(void) |