Add option (default disabled) that allows the vga rom to run while
hardware init is still in progress.
// Support running hardware initialization in parallel
#define CONFIG_THREADS 1
+// Allow hardware init to run in parallel with optionrom execution
+#define CONFIG_THREAD_OPTIONROMS 0
// Support int13 disk/floppy drive functions
#define CONFIG_DRIVES 1
// Support floppy drive access
#define DEBUG_ISR_hwpic2 5
#define DEBUG_HDL_pnp 1
#define DEBUG_HDL_pmm 1
-#define DEBUG_thread 1
+#define DEBUG_thread 2
#endif // config.h
pci_setup();
smm_init();
- // Run vga option rom.
+ // Setup interfaces that option roms may need
pmm_setup();
pnp_setup();
- vga_setup();
+ init_bios_tables();
+
+ // Run vga option rom (if running synchronously)
+ if (!CONFIG_THREADS || !CONFIG_THREAD_OPTIONROMS)
+ vga_setup();
// Initialize hardware devices
usb_setup();
ata_setup();
ramdisk_setup();
- // Run option roms (non vga)
- init_bios_tables();
+ // Run option roms
+ if (CONFIG_THREADS && CONFIG_THREAD_OPTIONROMS)
+ // Run vga option rom (if running asynchronously)
+ vga_setup();
wait_threads();
optionrom_setup();