<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>ACPI S3</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<BR>

<P><FONT SIZE=2 FACE="Arial">Hi, all,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I am trying to implement the ACPI S3 on coreboot. I have some questions:</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">1. Where is the proper place to check the sleep type in the power register? Now I check it just prior to disabling the cache as RAM, for not ruining the RAM.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">2. How to jump into the wakeup_start in x86_64/kernel/acpi/wakeup.S? The code is in real mode, how does coreboot jump from the protected mode to the entry? In my case, the wakeup_start points to the physical address 0x2000, from there some real mode code reside. How to jump to the code. The below is the beginning part of wakeup_start:</FONT></P>

<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Simsun">.text<BR>
#include <linux/linkage.h><BR>
#include <asm/segment.h><BR>
#include <asm/page.h><BR>
#include <asm/msr.h><BR>
# Copyright 2003 Pavel Machek <pavel@suse.cz>, distribute under GPLv2<BR>
#<BR>
# wakeup_code runs in real mode, and at unknown address (determined at run-time).<BR>
# Therefore it must only use relative jumps/calls.<BR>
#<BR>
# Do we need to deal with A20? It is okay: ACPI specs says A20 must be enabled<BR>
#<BR>
# If physical address of wakeup_code is 0x12345, BIOS should call us with<BR>
# cs = 0x1234, eip = 0x05<BR>
#<BR>
ALIGN<BR>
        .align  16<BR>
ENTRY(wakeup_start)<BR>
wakeup_code:<BR>
       wakeup_code_start = .<BR>
        .code16<BR>
<BR>
# Running in *copy* of this code, somewhere in low 1MB.<BR>
<BR>
        movb    $0xa1, %al      ;  outb %al, $0x80<BR>
        cli<BR>
        cld<BR>
        # setup data segment<BR>
        movw    %cs, %ax<BR>
       movw    %ax, %ds                                        # Make ds:0 point to wakeup_start<BR>
        movw    %ax, %ss<BR>
        mov     $(wakeup_stack - wakeup_code), %sp              # Private stack is needed for ASUS board<BR>
<BR>
        pushl   $0                                              # Kill any dangerous flags<BR>
        popfl<BR>
</FONT><FONT SIZE=2 FACE="Simsun">=================================================================</FONT></SPAN>
<BR>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Simsun">Any comments are appreciated.</FONT></SPAN>
</P>
<BR>

<P><SPAN LANG="en-us"><FONT FACE="Arial">Best Regards</FONT></SPAN><SPAN LANG="zh-cn"></SPAN>
</P>

<P><SPAN LANG="zh-cn"><FONT FACE="宋体">丰立波</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Arial"> Feng Libo @ AMD  Ext</FONT></SPAN><SPAN LANG="zh-cn"><FONT FACE="Arial">:</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Arial"> 20906</FONT></SPAN>

<BR><SPAN LANG="zh-cn"><FONT FACE="Arial">Mobile Phone</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Arial">: 13683249071</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT FACE="Arial">Office Phone: 0086-010-</FONT><FONT FACE="Arial">62801406</FONT></SPAN><SPAN LANG="zh-cn"></SPAN>
</P>

</BODY>
</HTML>