On Fri, Jul 03, 2009 at 03:53:58PM +0800, JasonZhao@viatech.com.cn wrote:
I work out some code to make seabios run vgabios when resuming from S3 (follow your advice on IRC, again :) ). And it is unbelievable easy, only 2 step:
Great!
Setp 1: In acpi.c
[...]
- //these two lines has same effect with the above two lines, and
I don know 8f or 0f which is better. cmos_read/write in coreboot do not set bit 7.
SeaBIOS sets bit 7 in order to disable the NMI - it shouldn't hurt to always set bit 7.
Step 2: in seabios->resume.c->s3_resume() smm_init();
- vga_setup(); make_bios_readonly(); u32 s3_resume_vector = find_resume_vector();
That should work, but it will recopy the rom - adding something like the following to optionroms.c is probably safer:
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, OPTION_ROM_INITVECTOR, 0); }
-Kevin