summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2013-03-07 01:26:55 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2013-03-07 01:26:55 +0000
commit54a7f9dfe3bd48161cd4f0674f8d0ddd9613c81b (patch)
tree41d10b29b822dab863de9c31b699f2544862b10c /sys/arch/i386
parent9635ceead18f0a401ccee8fc1d325a5ec9301464 (diff)
Reword some wrong comments and some improperly formatted comments and add
information about piglet memory layout. No functional changes.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/hibernate_machdep.c33
1 files changed, 9 insertions, 24 deletions
diff --git a/sys/arch/i386/i386/hibernate_machdep.c b/sys/arch/i386/i386/hibernate_machdep.c
index 699dd615e85..8b8d2dd79a4 100644
--- a/sys/arch/i386/i386/hibernate_machdep.c
+++ b/sys/arch/i386/i386/hibernate_machdep.c
@@ -62,6 +62,8 @@ extern struct hibernate_state *hibernate_state;
/*
* i386 MD Hibernate functions
+ *
+ * see i386 hibernate.h for lowmem layout used during hibernate
*/
/*
@@ -266,21 +268,6 @@ hibernate_populate_resume_pt(union hibernate_info *hib_info,
/*
* MD-specific resume preparation (creating resume time pagetables,
* stacks, etc).
- *
- * On i386, we use the piglet whose address is contained in hib_info
- * as per the following layout:
- *
- * offset from piglet base use
- * ----------------------- --------------------
- * 0 i/o allocation area
- * PAGE_SIZE i/o read area
- * 2*PAGE_SIZE temp/scratch page
- * 5*PAGE_SIZE resume stack
- * 6*PAGE_SIZE hiballoc arena
- * 7*PAGE_SIZE to 87*PAGE_SIZE zlib inflate area
- * ...
- * HIBERNATE_CHUNK_SIZE chunk table
- * 2*HIBERNATE_CHUNK_SIZE bounce/copy area
*/
void
hibernate_prepare_resume_machdep(union hibernate_info *hib_info)
@@ -289,15 +276,13 @@ hibernate_prepare_resume_machdep(union hibernate_info *hib_info)
vaddr_t va;
/*
- * At this point, we are sure that the piglet's phys
- * space is going to have been unused by the suspending
- * kernel, but the vaddrs used by the suspending kernel
- * may or may not be available to us here in the
- * resuming kernel, so we allocate a new range of VAs
- * for the piglet. Those VAs will be temporary and will
- * cease to exist as soon as we switch to the resume
- * PT, so we need to ensure that any VAs required during
- * inflate are also entered into that map.
+ * At this point, we are sure that the piglet's phys space is going to
+ * have been unused by the suspending kernel, but the vaddrs used by
+ * the suspending kernel may or may not be available to us here in the
+ * resuming kernel, so we allocate a new range of VAs for the piglet.
+ * Those VAs will be temporary and will cease to exist as soon as we
+ * switch to the resume PT, so we need to ensure that any VAs required
+ * during inflate are also entered into that map.
*/
hib_info->piglet_va = (vaddr_t)km_alloc(HIBERNATE_CHUNK_SIZE*3,