From: Kevin O'Connor Date: Thu, 10 Dec 2009 01:18:31 +0000 (-0500) Subject: Add experimental feature to run vga optionrom in parallel with init. X-Git-Tag: rel-0.5.0~17 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=980328091d8c9670f1fc0fd6a3c5330414192c2a;p=seabios.git 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. --- 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();