[coreboot] ACPI S3

Feng, Libo Libo.Feng at amd.com
Wed Nov 12 09:55:02 CET 2008

Hi, all,

I am trying to implement the ACPI S3 on coreboot. I have some questions:

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.

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:

#include <linux/linkage.h>
#include <asm/segment.h>
#include <asm/page.h>
#include <asm/msr.h>
# Copyright 2003 Pavel Machek <pavel at suse.cz>, distribute under GPLv2
# wakeup_code runs in real mode, and at unknown address (determined at run-time).
# Therefore it must only use relative jumps/calls. 
# Do we need to deal with A20? It is okay: ACPI specs says A20 must be enabled
# If physical address of wakeup_code is 0x12345, BIOS should call us with
# cs = 0x1234, eip = 0x05
        .align  16
       wakeup_code_start = .

# Running in *copy* of this code, somewhere in low 1MB.

        movb    $0xa1, %al      ;  outb %al, $0x80
        # setup data segment
        movw    %cs, %ax
       movw    %ax, %ds                                        # Make ds:0 point to wakeup_start
        movw    %ax, %ss
        mov     $(wakeup_stack - wakeup_code), %sp              # Private stack is needed for ASUS board

        pushl   $0                                              # Kill any dangerous flags

Any comments are appreciated.

Best Regards

丰立波 Feng Libo @ AMD  Ext: 20906
Mobile Phone: 13683249071
Office Phone: 0086-010-62801406

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20081112/34e41854/attachment.html>

More information about the coreboot mailing list