qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/2] machine type dependant bios


From: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH 2/2] machine type dependant bios
Date: Mon, 30 Sep 2013 12:46:59 +0200

Signed-off-by: Gerd Hoffmann <address@hidden>
---
 hw/i386/pc_piix.c    | 1 +
 hw/i386/pc_q35.c     | 1 +
 hw/i386/pc_sysfw.c   | 4 ++--
 include/hw/i386/pc.h | 2 ++
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 907792b..35188a5 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -238,6 +238,7 @@ static void pc_init_pci(QEMUMachineInitArgs *args)
 
 static void pc_compat_1_6(QEMUMachineInitArgs *args)
 {
+    pc_default_bios_name = "bios-128k.bin";
     has_pci_info = false;
     rom_file_in_ram = false;
 }
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index ca84e1c..e8b0168 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -222,6 +222,7 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
 
 static void pc_compat_1_6(QEMUMachineInitArgs *args)
 {
+    pc_default_bios_name = "bios-128k.bin";
     has_pci_info = false;
     rom_file_in_ram = false;
 }
diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c
index e917c83..deb8869 100644
--- a/hw/i386/pc_sysfw.c
+++ b/hw/i386/pc_sysfw.c
@@ -34,7 +34,7 @@
 #include "hw/block/flash.h"
 #include "sysemu/kvm.h"
 
-#define BIOS_FILENAME "bios.bin"
+const char *pc_default_bios_name = "bios-256k.bin";
 
 typedef struct PcSysFwDevice {
     SysBusDevice busdev;
@@ -112,7 +112,7 @@ static void old_pc_system_rom_init(MemoryRegion 
*rom_memory, bool isapc_ram_fw)
 
     /* BIOS load */
     if (bios_name == NULL) {
-        bios_name = BIOS_FILENAME;
+        bios_name = pc_default_bios_name;
     }
     filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
     if (filename) {
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 9b2ddc4..cf9e47e 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -12,6 +12,8 @@
 
 /* PC-style peripherals (also used by other machines).  */
 
+extern const char *pc_default_bios_name;
+
 typedef struct PcPciInfo {
     Range w32;
     Range w64;
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]