summaryrefslogtreecommitdiff
path: root/sys/kern/subr_hibernate.c
AgeCommit message (Collapse)Author
2013-03-07Reword some wrong comments and some improperly formatted comments and addMike Larkin
information about piglet memory layout. No functional changes.
2013-03-06Fix a bad comparison when calculating the size of the hibernate signatureMike Larkin
block ok deraadt@
2013-01-17Style, no functional changes.Paul Irofti
Discussed with mlarkin@.
2013-01-17Add a hibernate HIB_DONE op. After the memory-side-effect driver finishesTheo de Raadt
IO to the disk, DVACT_RESUME the controller back to normal operation. That allows us to do the full DVACT_POWERDOWN sequence afterwards. ok mlarkin
2013-01-17increase the number of pages used to hold the chunk ordering map and changeMike Larkin
the index type from int to short. Allows amd64 to hibernate with up to 64GB phys memory
2013-01-17fix an error in the amd64 asm unhibernate code and a slight adjustment toMike Larkin
the MI hibernate code to handle 64 bit archs
2012-07-19say that we are unhibernating..Theo de Raadt
2012-07-16Back out my workaround from r1.43 now that jsing has committed a better fix.Stefan Sperling
2012-07-16Make sure we have a swap partition before trying to read or writeJoel Sing
hibernate info. ok mlarkin@ stsp@
2012-07-15Don't panic in hibernate resume if no swap partition exists on the root disk.Stefan Sperling
ok mlarkin
2012-07-12Temporarily don't do RLE page encoding in hibernate to fix some unpackingMike Larkin
corruption seen earlier. This makes hibernate much slower but seems to fix the corruption problems seen on all machines we've tested on.
2012-07-11Enable the swap checker for hibernateMike Larkin
2012-07-09DVACT_SUSPEND must be done at cold with interrupts disabled. FailureTheo de Raadt
to read a hibernate image should restore the spl ok mlarkin
2012-07-08Quiesce and suspend devices in the resuming kernel for hibernate.Mike Larkin
ok deraadt@
2012-07-08Make hibernate_free() safe to be called even if hibernate areasTheo de Raadt
allocation failed ok mlarkin
2012-07-08Reorganize some hibernate functions for easier readability.Mike Larkin
Fix some incorrect/old comments. ok deraadt@
2012-06-21use regular i/o functions in the hibernate resume path. ahci(4) hibernateJonathan Matthew
i/o will not mix with regular i/o so it can only be used in the hibernate path. ok deraadt@ mlarkin@
2012-06-20Fix some hibernate issues on machines with > 3.5GB phys memMike Larkin
ok deraadt@
2012-04-12hibernate: fix lock/unlock mismatchAriane van der Steldt
Unlock missed an 'f', which caused it to unlock the in-use pageqs, rather than the free pageqs as it was supposed to.
2012-03-26Fix an integer math error when using the result of uvm_page_rle, andMike Larkin
at the same time increase said function's max RLE page count return value. Add hooks in the right places to call the hibernate suspend and resume routines, so that we can enable hibernation with a HIBERNATE option line in GENERIC and appropriate acpi.c goo. discussed on and off with deraadt@ over the past few months
2011-11-29ready this for big-endian support later onTheo de Raadt
ok mlarkin
2011-11-29Only free the piglet on hibernate fail if we are suspending.Mike Larkin
2011-11-23clamp uvm_page_rle() to 255 pages at a timeTheo de Raadt
ok mlarkin
2011-11-22Ensure we are unpacking the right source address after skipping a range ofMike Larkin
RLE pages in hibernate. ok deraadt@
2011-11-18no need to zero all the free pages since we will be skipping them withMike Larkin
rle. noticed by jasper
2011-11-18- fix a few trailing whitespaces and a spelloJasper Lievisse Adriaanse
- panic strings already get printed with a '\n', so remove the extra ones ok mlarkin@
2011-11-18fix a corner case in rle processing where the rle byte was the last byteMike Larkin
being written to an output buffer
2011-11-17physmem run length encoding (rle) for hibernate - don't compress or writeMike Larkin
pages that are free
2011-11-16Reduce use of globals in hibernate code.Mike Larkin
discussed with deraadt@
2011-11-15on failure, hibernate io functions return an errno. not 1.Theo de Raadt
2011-11-14Use a fixed io_page for all hibernate I/O, which is needed forMike Larkin
ahci_hibernate_io, a skeleton of which is also provided in this diff. This code is from deraadt@. Tested on a few wd machines to ensure it works there as well.
2011-11-13Add some #defines for the various hibernate I/O modes, some of theMike Larkin
groundwork for *_hibernate_io functions other than wd_hibernate_io These changes were sent to me by deraadt@
2011-11-13In hibernate resume, free the piglet and other VAs we allocated duringMike Larkin
suspend. ok pirofti@
2011-11-13Fix a handful of bugs that were causing reboots and other bad behaviorMike Larkin
during hibernate resumes.
2011-09-22KNF of mlarkin's code, requested by him. Some improvements to the interfaceTheo de Raadt
for talking to the disk driver snuck in. ok mlarkin
2011-09-21Cleanup page calculation for final memory chunk ordering list forMike Larkin
hibernate resume.
2011-09-21Perform most of the remaining refactoring of hibernate code intoMike Larkin
MI/MD parts. This also introduces a chunk placement routine that was originally developed at c2k11 with help from drahn and ariane. There are still a few more things to do for hibernate, but those can be worked on in-tree. This code is disabled by default, and not yet called. ok deraadt@ (and deraadt@ said kettenis@ also ok'ed it :) )
2011-07-18Allocations fit if [the end of free space] >= [the end of allocated space].Ariane van der Steldt
Change > in comparison to >=.
2011-07-18Fix uvm_pmr_alloc_piglet.Ariane van der Steldt
A wrong check could cause the piglet allocator to attempt to extract memory from a range in which the alignment caused it not to fit.
2011-07-11Add hibernate_read_block and fix a couple of typos in the previous commit.Mike Larkin
2011-07-09Call (temporarily, until we have RLE page encoding) uvm_pmr_zero_everythingMike Larkin
on suspend to ensure we get good zlib compression. Add MI signature block (hibernate_info) comparison routine
2011-07-09Extract hibernate_write_signature and hibernate_clear_signature to the MIMike Larkin
hibernate code, and add chunk range overlap checking.
2011-07-09Extract MI pmap function hibernate_enter_resume_mapping, refactor old i386Mike Larkin
resume pmap code to match. Add hibernate deflater and inflater and cache flush routines. Code is not presently called or automatically built.
2011-07-09Add zlib reset, alloc, and free functions for hibernate image compressionMike Larkin
2011-07-09Separate some MD and MI bits and a bit of refactoring to make subsequentMike Larkin
commits easier. Work in progress, hibernate will still not work for you. ok deraadt@
2011-07-08no reason to zero pages we are about to mark dirtyAriane van der Steldt
2011-07-08Ensure all pages in pmemrange can be marked as dirty.Ariane van der Steldt
It'd be a very bad idea to hand out dirty pages as zeroed, just because we came back from hibernate. No callers at the moment, will be called on hibernate resume path.
2011-07-08Put in RLE logic for hibernate compressor.Ariane van der Steldt
These have the potential to compress 1MB of physmem into 1 byte. This works by noting the page is not in use and therefor skipping it. Needed by mlarkin@ for hibernate. No callers yet.
2011-07-08Change pig allocator to a highest-address selection.Ariane van der Steldt
Add piglet allocator, which does a lowest-address selection. No callers yet, needed by mlarkin@ for hibernate voodoo.
2011-07-08Move uvm_pmr_alloc_pig to kern/subr_hibernate.cAriane van der Steldt
No callers, no functional change.