]> xenbits.xensource.com Git - seabios.git/commitdiff
config: Add toggle for bootdevice information
authorSam Eiderman <shmuel.eiderman@oracle.com>
Wed, 12 Jun 2019 09:37:03 +0000 (12:37 +0300)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 6 Nov 2019 09:56:00 +0000 (10:56 +0100)
Add the "BOOTDEVICES" toggle to remove boot device information received
through fw_cfg.

We will use this toggle in QEMU to reduce the size of the 128k SeaBIOS
rom, which is only used in old compat versions, where this boot device
information does not exist.

Reviewed-by: Karl Heubaum <karl.heubaum@oracle.com>
Reviewed-by: Arbel Moshe <arbel.moshe@oracle.com>
Signed-off-by: Sam Eiderman <shmuel.eiderman@oracle.com>
Message-Id: <20190612093704.47175-5-shmuel.eiderman@oracle.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
src/Kconfig
src/boot.c

index 55a87cb7f0ac96190f405f7bff414e7458b8627a..b3645b33e18dfe939b822920ef211af73b89ef52 100644 (file)
@@ -72,6 +72,13 @@ endchoice
         help
             Support controlling of the boot order via the fw_cfg/CBFS
             "bootorder" file.
+    config BOOTDEVICES
+        depends on BOOT
+        bool "Boot device information"
+        default y
+        help
+            Support boot device information via the fw_cfg/CBFS
+            "bootdevices" file.
 
     config COREBOOT_FLASH
         depends on COREBOOT
index 9248fab95a465a4dc37e02d3dd5f9bbf1702148f..e89b9238c17636824b6d073d8b0d4012a7232602 100644 (file)
@@ -95,6 +95,9 @@ static int BootDeviceCount;
 static void
 loadBootDevices(void)
 {
+    if (!CONFIG_BOOTDEVICES)
+        return;
+
     BootDeviceCount = 0;
     int fsize;
     char *f = romfile_loadfile("bootdevices", &fsize);
@@ -172,6 +175,8 @@ bootdevice_find(const char *glob)
 static BootDevice *
 bootdevice_find_pci_device(struct pci_device *pci)
 {
+    if (!CONFIG_BOOTDEVICES)
+        return NULL;
     // Find pci device - for example: /pci@i0cf8/ethernet@5
     char desc[256];
     build_pci_path(desc, sizeof(desc), "*", pci);
@@ -181,6 +186,8 @@ bootdevice_find_pci_device(struct pci_device *pci)
 static BootDevice *
 bootdevice_find_scsi_device(struct pci_device *pci, int target, int lun)
 {
+    if (!CONFIG_BOOTDEVICES)
+        return NULL;
     if (!pci)
         // support only pci machine for now
         return NULL;
@@ -194,6 +201,8 @@ bootdevice_find_scsi_device(struct pci_device *pci, int target, int lun)
 static BootDevice *
 bootdevice_find_ata_device(struct pci_device *pci, int chanid, int slave)
 {
+    if (!CONFIG_BOOTDEVICES)
+        return NULL;
     if (!pci)
         // support only pci machine for now
         return NULL;