summary refs log tree commit diff stats
path: root/hw/ppc/prep.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ppc/prep.c')
-rw-r--r--hw/ppc/prep.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index 4a0cb434a6..c6b9d1ddcb 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -237,6 +237,7 @@ static int prep_set_cmos_checksum(DeviceState *dev, void *opaque)
 
 static void ibm_40p_init(MachineState *machine)
 {
+    const char *bios_name = machine->firmware ?: "openbios-ppc";
     CPUPPCState *env = NULL;
     uint16_t cmos_checksum;
     PowerPCCPU *cpu;
@@ -271,9 +272,6 @@ static void ibm_40p_init(MachineState *machine)
 
     /* PCI host */
     dev = qdev_new("raven-pcihost");
-    if (!bios_name) {
-        bios_name = "openbios-ppc";
-    }
     qdev_prop_set_string(dev, "bios-name", bios_name);
     qdev_prop_set_uint32(dev, "elf-machine", PPC_ELF_MACHINE);
     pcihost = SYS_BUS_DEVICE(dev);