aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2009-12-09 20:18:31 -0500
committerKevin O'Connor <kevin@koconnor.net>2009-12-09 20:18:31 -0500
commit980328091d8c9670f1fc0fd6a3c5330414192c2a (patch)
treeb826290921071393d9bd7f90444567afa6204c52
parente9a67bf3871f232324107e8a5390a4e769ba42fc (diff)
downloadseabios-hppa-980328091d8c9670f1fc0fd6a3c5330414192c2a.zip
seabios-hppa-980328091d8c9670f1fc0fd6a3c5330414192c2a.tar.gz
seabios-hppa-980328091d8c9670f1fc0fd6a3c5330414192c2a.tar.bz2
Add experimental feature to run vga optionrom in parallel with init.
Add option (default disabled) that allows the vga rom to run while hardware init is still in progress.
-rw-r--r--src/config.h4
-rw-r--r--src/post.c14
2 files changed, 13 insertions, 5 deletions
diff --git a/src/config.h b/src/config.h
index 05f3942..9c7c504 100644
--- a/src/config.h
+++ b/src/config.h
@@ -24,6 +24,8 @@
// 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
@@ -187,6 +189,6 @@
#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
diff --git a/src/post.c b/src/post.c
index 085fb91..fd60236 100644
--- a/src/post.c
+++ b/src/post.c
@@ -182,10 +182,14 @@ post()
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();
@@ -201,8 +205,10 @@ post()
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();