diff options
-rw-r--r-- | docs/Runtime_config.md | 1 | ||||
-rw-r--r-- | src/optionroms.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/docs/Runtime_config.md b/docs/Runtime_config.md index a7c159b..bb8ebed 100644 --- a/docs/Runtime_config.md +++ b/docs/Runtime_config.md @@ -181,6 +181,7 @@ There are several additional configuration options available in the | extra-pci-roots | If the target machine has multiple independent root buses set this to a positive value. The SeaBIOS PCI probe will then search for the given number of extra root buses. | ps2-keyboard-spinup | Some laptops that emulate PS2 keyboards don't respond to keyboard commands immediately after powering on. One may specify the amount of time (in milliseconds) here to allow as additional time for the keyboard to become responsive. When this field is set, SeaBIOS will repeatedly attempt to detect the keyboard until the keyboard is found or the specified timeout is reached. | optionroms-checksum | Option ROMs are required to have correct checksums. However, some option ROMs in the wild don't correctly follow the specifications and have bad checksums. Set this to a zero value to allow SeaBIOS to execute them anyways. +| pci-optionrom-exec | Controls option ROM execution for roms found on PCI devices. Valid values are 0: Execute no ROMs, 1: Execute only VGA ROMs, 2: Execute all ROMs. The default is 2 (execute all ROMs). | s3-resume-vga-init | Set this to a non-zero value to instruct SeaBIOS to run the vga rom on an S3 resume. | screen-and-debug | Set this to a zero value to instruct SeaBIOS to not write characters it sends to the screen to the debug ports. This can be useful when using sgabios. | advertise-serial-debug-port | If using a serial debug port, one can set this file to a zero value to prevent SeaBIOS from listing that serial port as available for operating system use. This can be useful when running old DOS programs that are known to reset the baud rate of all advertised serial ports. diff --git a/src/optionroms.c b/src/optionroms.c index 93d9d2f..f6047e6 100644 --- a/src/optionroms.c +++ b/src/optionroms.c @@ -20,6 +20,8 @@ #include "string.h" // memset #include "util.h" // get_pnp_offset +static int EnforceChecksum, S3ResumeVga, RunPCIroms; + /**************************************************************** * Helper functions @@ -60,8 +62,6 @@ call_bcv(u16 seg, u16 ip) __callrom(MAKE_FLATPTR(seg, 0), ip, 0); } -static int EnforceChecksum; - // Verify that an option rom looks valid static int is_valid_rom(struct rom_header *rom) @@ -329,7 +329,7 @@ init_pcirom(struct pci_device *pci, int isvga, u64 *sources) , pci_bdf_to_bus(bdf), pci_bdf_to_dev(bdf), pci_bdf_to_fn(bdf) , pci->vendor, pci->device); struct rom_header *rom = lookup_hardcode(pci); - if (! rom) + if (!rom && ((RunPCIroms > 1) || ((RunPCIroms == 1) && isvga))) rom = map_pcirom(pci); if (! rom) // No ROM present. @@ -416,7 +416,6 @@ optionrom_setup(void) * VGA init ****************************************************************/ -static int S3ResumeVga; int ScreenAndDebug; struct rom_header *VgaROM; @@ -432,6 +431,7 @@ vgarom_setup(void) // Load some config settings that impact VGA. EnforceChecksum = romfile_loadint("etc/optionroms-checksum", 1); S3ResumeVga = romfile_loadint("etc/s3-resume-vga-init", CONFIG_QEMU); + RunPCIroms = romfile_loadint("etc/pci-optionrom-exec", 2); ScreenAndDebug = romfile_loadint("etc/screen-and-debug", 1); if (CONFIG_OPTIONROMS_DEPLOYED) { |