[coreboot] Share my code of running vgabios(in CBFS) in seabios when rusume from s3.

Kevin O'Connor kevin at koconnor.net
Fri Jul 3 22:13:07 CEST 2009

On Fri, Jul 03, 2009 at 03:53:58PM +0800, JasonZhao at 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:


> 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:

    struct rom_header *rom = (void*)OPTION_ROM_START;
    if (! is_valid_rom(rom))
    callrom(rom, OPTION_ROM_INITVECTOR, 0);


More information about the coreboot mailing list