This implements the suggestion in D6945. With this change, we allocate
four pages. The first is used for the wakeup code, and on amd64 the last
three are used for page tables. This change makes it easier for the kernel
to satisfy the allocation request(s), without adding much complexity.
Details
Details
ACPI S3 suspend/resume on my Lenovo G580 laptop
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/x86/acpica/acpi_wakeup.c | ||
---|---|---|
346 ↗ | (On Diff #18216) | For this to work, you should clear all pages in array before doing contigmalloc() loop. |
sys/x86/acpica/acpi_wakeup.c | ||
---|---|---|
346 ↗ | (On Diff #18216) | Yikes, thanks. This array was static in an earlier revision, so I didn't bother. |
Comment Actions
WAKECODE_PADDR() and WAKECODE_VADDR() macros do nothing now. Please replace them with sc->acpi_wakephys and sc->acpi_wakeaddr.
Comment Actions
ACPI_PAGETABLES does nothing now. Please replace it with ACPI_WAKEPAGES, e.g.,
#ifdef __amd64__ #define ACPI_WAKEPAGES 4 #else #define ACPI_WAKEPAGES 1 #endif
Comment Actions
I am not sure the page tables are correct. I'll take a closer look when I find some free time today.