summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/hibernate_machdep.c4
-rw-r--r--sys/arch/i386/i386/hibernate_machdep.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/hibernate_machdep.c b/sys/arch/amd64/amd64/hibernate_machdep.c
index 1c14d0de895..4e789ba7522 100644
--- a/sys/arch/amd64/amd64/hibernate_machdep.c
+++ b/sys/arch/amd64/amd64/hibernate_machdep.c
@@ -296,7 +296,9 @@ hibernate_populate_resume_pt(union hibernate_info *hib_info,
*/
kern_start_2m_va = (paddr_t)&start & ~(PAGE_MASK_2M);
kern_end_2m_va = (paddr_t)&end & ~(PAGE_MASK_2M);
- phys_page_number = 0;
+
+ /* amd64 kernels load at 16MB phys (on the 8th 2mb page) */
+ phys_page_number = 8;
for (page = kern_start_2m_va; page <= kern_end_2m_va;
page += NBPD_L2, phys_page_number++) {
diff --git a/sys/arch/i386/i386/hibernate_machdep.c b/sys/arch/i386/i386/hibernate_machdep.c
index 1d37f9d5206..db31e28cec0 100644
--- a/sys/arch/i386/i386/hibernate_machdep.c
+++ b/sys/arch/i386/i386/hibernate_machdep.c
@@ -229,6 +229,8 @@ hibernate_populate_resume_pt(union hibernate_info *hib_info,
*/
kern_start_4m_va = (paddr_t)&start & ~(PAGE_MASK_4M);
kern_end_4m_va = (paddr_t)&end & ~(PAGE_MASK_4M);
+
+ /* i386 kernels load at 2MB phys (on the 0th 4mb page) */
phys_page_number = 0;
for (page = kern_start_4m_va; page <= kern_end_4m_va;