optionroms: Drop support for CONFIG_OPTIONROMS_DEPLOYED

No modern software uses this option and it complicates the code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
diff --git a/src/Kconfig b/src/Kconfig
index de39b38..e767be1 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -395,14 +395,6 @@
         default y
         help
             Support finding and running option roms during POST.
-    config OPTIONROMS_DEPLOYED
-        depends on OPTIONROMS && QEMU
-        bool "Option roms are already at 0xc0000-0xf0000"
-        default n
-        help
-            Select this if option ROMs are already copied to
-            0xc0000-0xf0000.  This must only be selected when using
-            Bochs or QEMU versions older than 0.12.
     config PMM
         depends on OPTIONROMS
         bool "PMM interface"
diff --git a/src/config.h b/src/config.h
index 6c47f16..baca029 100644
--- a/src/config.h
+++ b/src/config.h
@@ -39,8 +39,6 @@
 #define BUILD_BIOS_ADDR           0xf0000
 #define BUILD_BIOS_SIZE           0x10000
 #define BUILD_EXTRA_STACK_SIZE    0x800
-// 32KB for shadow ram copying (works around emulator deficiencies)
-#define BUILD_BIOS_TMP_ADDR       0x30000
 #define BUILD_SMM_INIT_ADDR       0x30000
 #define BUILD_SMM_ADDR            0xa0000
 
diff --git a/src/fw/shadow.c b/src/fw/shadow.c
index bdb5c5b..f766bb5 100644
--- a/src/fw/shadow.c
+++ b/src/fw/shadow.c
@@ -26,24 +26,11 @@
 __make_bios_writable_intel(u16 bdf, u32 pam0)
 {
     // Make ram from 0xc0000-0xf0000 writable
-    int clear = 0;
     int i;
     for (i=0; i<6; i++) {
         u32 pam = pam0 + 1 + i;
-        int reg = pci_config_readb(bdf, pam);
-        if (CONFIG_OPTIONROMS_DEPLOYED && (reg & 0x11) != 0x11) {
-            // Need to copy optionroms to work around qemu implementation
-            void *mem = (void*)(BUILD_ROM_START + i * 32*1024);
-            memcpy((void*)BUILD_BIOS_TMP_ADDR, mem, 32*1024);
-            pci_config_writeb(bdf, pam, 0x33);
-            memcpy(mem, (void*)BUILD_BIOS_TMP_ADDR, 32*1024);
-            clear = 1;
-        } else {
-            pci_config_writeb(bdf, pam, 0x33);
-        }
+        pci_config_writeb(bdf, pam, 0x33);
     }
-    if (clear)
-        memset((void*)BUILD_BIOS_TMP_ADDR, 0, 32*1024);
 
     // Make ram from 0xf0000-0x100000 writable
     int reg = pci_config_readb(bdf, pam0);
diff --git a/src/optionroms.c b/src/optionroms.c
index 9897753..65f7fe0 100644
--- a/src/optionroms.c
+++ b/src/optionroms.c
@@ -347,28 +347,16 @@
     memset(sources, 0, sizeof(sources));
     u32 post_vga = rom_get_last();
 
-    if (CONFIG_OPTIONROMS_DEPLOYED) {
-        // Option roms are already deployed on the system.
-        u32 pos = post_vga;
-        while (pos < rom_get_max()) {
-            int ret = init_optionrom((void*)pos, 0, 0);
-            if (ret)
-                pos += OPTION_ROM_ALIGN;
-            else
-                pos = rom_get_last();
-        }
-    } else {
-        // Find and deploy PCI roms.
-        struct pci_device *pci;
-        foreachpci(pci) {
-            if (pci->class == PCI_CLASS_DISPLAY_VGA || pci->have_driver)
-                continue;
-            init_pcirom(pci, 0, sources);
-        }
-
-        // Find and deploy CBFS roms not associated with a device.
-        run_file_roms("genroms/", 0, sources);
+    // Find and deploy PCI roms.
+    struct pci_device *pci;
+    foreachpci(pci) {
+        if (pci->class == PCI_CLASS_DISPLAY_VGA || pci->have_driver)
+            continue;
+        init_pcirom(pci, 0, sources);
     }
+
+    // Find and deploy CBFS roms not associated with a device.
+    run_file_roms("genroms/", 0, sources);
     rom_reserve(0);
 
     // All option roms found and deployed - now build BEV/BCV vectors.
@@ -427,26 +415,21 @@
     RunPCIroms = romfile_loadint("etc/pci-optionrom-exec", 2);
     ScreenAndDebug = romfile_loadint("etc/screen-and-debug", 1);
 
-    if (CONFIG_OPTIONROMS_DEPLOYED) {
-        // Option roms are already deployed on the system.
-        init_optionrom((void*)BUILD_ROM_START, 0, 1);
-    } else {
-        // Clear option rom memory
-        memset((void*)BUILD_ROM_START, 0, rom_get_max() - BUILD_ROM_START);
+    // Clear option rom memory
+    memset((void*)BUILD_ROM_START, 0, rom_get_max() - BUILD_ROM_START);
 
-        // Find and deploy PCI VGA rom.
-        struct pci_device *pci;
-        foreachpci(pci) {
-            if (!is_pci_vga(pci))
-                continue;
-            vgahook_setup(pci);
-            init_pcirom(pci, 1, NULL);
-            break;
-        }
-
-        // Find and deploy CBFS vga-style roms not associated with a device.
-        run_file_roms("vgaroms/", 1, NULL);
+    // Find and deploy PCI VGA rom.
+    struct pci_device *pci;
+    foreachpci(pci) {
+        if (!is_pci_vga(pci))
+            continue;
+        vgahook_setup(pci);
+        init_pcirom(pci, 1, NULL);
+        break;
     }
+
+    // Find and deploy CBFS vga-style roms not associated with a device.
+    run_file_roms("vgaroms/", 1, NULL);
     rom_reserve(0);
 
     if (rom_get_last() == BUILD_ROM_START)