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).
diff --git a/src/config.h b/src/config.h
index 5ed61ae..a77fe0c 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 9769bc2..24fc4c3 100644
--- a/src/optionroms.c
+++ b/src/optionroms.c
@@ -438,3 +438,14 @@
     // 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 76a8c50..cfe26cd 100644
--- a/src/resume.c
+++ b/src/resume.c
@@ -104,6 +104,8 @@
 
     smm_init();
 
+    s3_resume_vga_init();
+
     make_bios_readonly();
 
     u32 s3_resume_vector = find_resume_vector();
diff --git a/src/util.h b/src/util.h
index 654cf31..b32a517 100644
--- a/src/util.h
+++ b/src/util.h
@@ -217,6 +217,7 @@
 void call_bcv(u16 seg, u16 ip);
 void optionrom_setup();
 void vga_setup();
+void s3_resume_vga_init();
 
 // resume.c
 void init_dma();