Allow QEMU, Xen, CSM, and Coreboot to all be enabled (or any subset) at the same time.
Signed-off-by: Kevin O'Connor kevin@koconnor.net --- src/Kconfig | 23 ++++++++++------------- src/esp-scsi.c | 3 ++- src/lsi-scsi.c | 3 ++- 3 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/src/Kconfig b/src/Kconfig index 55396c6..5b7b21a 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -4,28 +4,18 @@ mainmenu "SeaBIOS Configuration"
menu "General Features"
-choice - prompt "Build Target" - default QEMU - config COREBOOT + default n bool "Build for coreboot" help Configure as a coreboot payload.
config QEMU + default y bool "Build for QEMU" help Configure as QEMU bios.
- config CSM - bool "Build as Compatibilty Support Module for EFI BIOS" - help - Configure to be used by EFI firmware as Compatibility Support - module (CSM) to provide legacy BIOS services. - -endchoice - config XEN depends on QEMU bool "Build for Xen HVM" @@ -33,6 +23,13 @@ endchoice help Configure to be used by xen hvmloader, for a HVM guest.
+ config CSM + default n + bool "Build as Compatibilty Support Module for EFI BIOS" + help + Configure to be used by EFI firmware as Compatibility Support + module (CSM) to provide legacy BIOS services. + config THREADS bool "Parallelize hardware init" default y @@ -399,7 +396,7 @@ menu "Debugging" Base port for serial - generally 0x3f8, 0x2f8, 0x3e8, or 0x2e8.
config DEBUG_IO - depends on QEMU && DEBUG_LEVEL != 0 + depends on QEMU && !COREBOOT && !CSM && DEBUG_LEVEL != 0 bool "Special IO port debugging" default y help diff --git a/src/esp-scsi.c b/src/esp-scsi.c index 4d1f7d2..f3c3423 100644 --- a/src/esp-scsi.c +++ b/src/esp-scsi.c @@ -19,6 +19,7 @@ #include "boot.h" // bootprio_find_scsi_device #include "blockcmd.h" // scsi_drive_setup #include "disk.h" +#include "paravirt.h" // runningOnQEMU()
#define ESP_TCLO 0x00 #define ESP_TCMID 0x04 @@ -218,7 +219,7 @@ void esp_scsi_setup(void) { ASSERT32FLAT(); - if (!CONFIG_ESP_SCSI) + if (!CONFIG_ESP_SCSI || !runningOnQEMU()) return;
dprintf(3, "init esp\n"); diff --git a/src/lsi-scsi.c b/src/lsi-scsi.c index 76e9d1d..707cb3f 100644 --- a/src/lsi-scsi.c +++ b/src/lsi-scsi.c @@ -19,6 +19,7 @@ #include "boot.h" // bootprio_find_scsi_device #include "blockcmd.h" // scsi_drive_setup #include "disk.h" +#include "paravirt.h" // runningOnQEMU()
#define LSI_REG_DSTAT 0x0c #define LSI_REG_ISTAT0 0x14 @@ -197,7 +198,7 @@ void lsi_scsi_setup(void) { ASSERT32FLAT(); - if (!CONFIG_LSI_SCSI) + if (!CONFIG_LSI_SCSI || !runningOnQEMU()) return;
dprintf(3, "init lsi53c895a\n");