Subject: CVS commit: [jmcneill-pm] src/sys/arch/amd64/acpi
To: None <source-changes@NetBSD.org>
From: Joerg Sonnenberger <joerg@netbsd.org>
List: source-changes
Date: 11/11/2007 18:16:25
Module Name:	src
Committed By:	joerg
Date:		Sun Nov 11 18:16:25 UTC 2007

Modified Files:
	src/sys/arch/amd64/acpi [jmcneill-pm]: acpi_wakeup.c acpi_wakeup_low.S

Log Message:
Change code flow below acpi_md_sleep.

Before:
- acpi_md_sleep calls acpi_savecpu
- acpi_savecpu saves registers and returns with -1
- acpi_md_sleep now patches the wakecode and calls AcpiEnterSleepState
- on resume, acpi_restorecpu restores registers and returns at the same
place as acpi_savecpu did with 0.

After:
- acpi_md_sleep calls acpi_md_sleep_prepare
- acpi_md_sleep_prepare saves registers and calls acpi_md_sleep_enter
- acpi_md_sleep_enter patches the wakecode and calls
AcpiEnterSleepState. It only returns on error.
- on resume, acpi_md_sleep_exit gets called, restores the registers and
returns as acpi_md_sleep_prepare with 0.


To generate a diff of this commit:
cvs rdiff -r1.3.48.20 -r1.3.48.21 src/sys/arch/amd64/acpi/acpi_wakeup.c
cvs rdiff -r1.1.2.8 -r1.1.2.9 src/sys/arch/amd64/acpi/acpi_wakeup_low.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.