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:

.text
#include <linux/linkage.h>
#include <asm/segment.h>
#include <asm/page.h>
#include <asm/msr.h>
# Copyright 2003 Pavel Machek <[EMAIL PROTECTED]>, 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
        .align  16
ENTRY(wakeup_start)
wakeup_code:
       wakeup_code_start = .
        .code16

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

        movb    $0xa1, %al      ;  outb %al, $0x80
        cli
        cld
        # 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
        popfl
=================================================================

Any comments are appreciated.


Best Regards

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

--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to