diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2009-07-04 04:10:32 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2009-07-04 04:10:32 -0400 |
commit | d282af77b61af2172608b893a7a31fb686ec4643 (patch) | |
tree | 769980323e8c946af5dc0616aead19f0be2a2129 | |
parent | e8f00eeca8cd5f463bc8f3b866078b1bf0cadbd0 (diff) | |
download | seabios-d282af77b61af2172608b893a7a31fb686ec4643.tar.gz |
Add option for running vga rom during s3 resume.
Add support for running the vga rom when the option
CONFIG_S3_RESUME_VGA_INIT is set (default is off).
-rw-r--r-- | src/config.h | 2 | ||||
-rw-r--r-- | src/optionroms.c | 11 | ||||
-rw-r--r-- | src/resume.c | 2 | ||||
-rw-r--r-- | src/util.h | 1 |
4 files changed, 16 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h index 5ed61ae1..a77fe0c1 100644 --- a/src/config.h +++ b/src/config.h @@ -90,6 +90,8 @@ #define CONFIG_VGAHOOKS 0 // Support S3 resume handler. #define CONFIG_S3_RESUME 1 +// Run the vga rom during S3 resume. +#define CONFIG_S3_RESUME_VGA_INIT 0 // define it if the (emulated) hardware supports SMM mode #define CONFIG_USE_SMM 1 // Maximum number of map entries in the e820 map diff --git a/src/optionroms.c b/src/optionroms.c index 9769bc28..24fc4c3c 100644 --- a/src/optionroms.c +++ b/src/optionroms.c @@ -438,3 +438,14 @@ vga_setup() // Write to screen. printf("Starting SeaBIOS\n\n"); } + +void +s3_resume_vga_init() +{ + if (!CONFIG_S3_RESUME_VGA_INIT) + return; + struct rom_header *rom = (void*)OPTION_ROM_START; + if (! is_valid_rom(rom)) + return; + callrom(rom, 0); +} diff --git a/src/resume.c b/src/resume.c index 76a8c50d..cfe26cda 100644 --- a/src/resume.c +++ b/src/resume.c @@ -104,6 +104,8 @@ s3_resume() smm_init(); + s3_resume_vga_init(); + make_bios_readonly(); u32 s3_resume_vector = find_resume_vector(); @@ -217,6 +217,7 @@ void handle_155f(); void call_bcv(u16 seg, u16 ip); void optionrom_setup(); void vga_setup(); +void s3_resume_vga_init(); // resume.c void init_dma(); |