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
ACPI S3 suspend/resume on my Lenovo G580 laptop
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 4457 Build 4508: arc lint + arc unit
Event Timeline
sys/x86/acpica/acpi_wakeup.c | ||
---|---|---|
348 | For this to work, you should clear all pages in array before doing contigmalloc() loop. |
sys/x86/acpica/acpi_wakeup.c | ||
---|---|---|
348 | Yikes, thanks. This array was static in an earlier revision, so I didn't bother. |
WAKECODE_PADDR() and WAKECODE_VADDR() macros do nothing now. Please replace them with sc->acpi_wakephys and sc->acpi_wakeaddr.
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
I am not sure the page tables are correct. I'll take a closer look when I find some free time today.
So both Pass 1.0 and 1.1 have this errata. Is Cavium really going to market with Pass 1.1? that likely means we'd have to keep this around for a long time. If that's just the first wave and there will be a Pass 2.0 which fixes this, that would be better.