[coreboot] 2 keypoints to use coreboot+seabios to achieve WINDOWS-XP's s3 sleep/resume

JasonZhao at viatech.com.cn JasonZhao at viatech.com.cn
Wed Nov 19 04:56:34 CET 2008


Firstly, you need download two patchs:the Kevin's for using Seabios as
payload, and Rudolf's for s3.




Then there are two steps to do (Rudolf gave me much advice on IRC :-) ,
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,



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 =0x1c000, but you should just get this
from the FACS table as in Kevin's patch, even he move the FACS to the
highend memory)


#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.



         {printk_debug("Enable VGA console\n");







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20081119/8ea7fb7a/attachment.html>

More information about the coreboot mailing list