diff options
-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(); |