Firstly, you need download two patchs:the Kevin's for
using Seabios as payload, and Rudolf's for s3.
http://www.coreboot.org/pipermail/coreboot/2008-September/038551.html
www.coreboot.org/pipermail/coreboot/2008-January/028787.html
Then there are two steps to do (Rudolf gave me much
advice on IRC J , he is
a good teacher)
#1 Since OS put some realmode code to the s3 resume
vector before it demands the mainboard to enter sleep,
we need to backup the resume code before coreboot using
real memory(may destroy the resume code) and recovery it before Coreboot jumps
into the resume vector.
In the main()of cache_as_ram_auto.c, just before the
stack switching code, add this:
if(
(bootmode == 3){
print_debug("copy
memory to high memory to protect s3 wakeup vector code \r\n");
memcpy((unsigned
char *)(highmem_bakaddress),(unsigned char *)0,
0x100000);//highmem_bakaddress=
}
In the acpi_jump_wake() of wakeup.c, add this:
memcpy((unsigned char *)(resumevector), (unsigned char
*)(highmem_bakaddress+resumevector), 0x1000);
//(ubuntu's vector=0x2000, XP's =0x
#2 Since when resume from S3, coreboot do not go into
payload, so in vga driver codes need be added to do vga init after it judged
that this is a boot waked from s3.
if(acpi_sleep_type==3)
{printk_debug("Enable
VGA console\n");
vga_enable_console();}
if(acpi_sleep_type==3)
{xxxxxx}
if(acpi_sleep_type==3)
{xxxxxx}