summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_hibernate.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* spacingderaadt2013-11-061-7/+5
|
* return the known error, instead of EIOderaadt2013-11-061-11/+6
|
* shorten dev_t in hib_infoderaadt2013-11-061-15/+15
|
* shorten variable name for the hibernate info struct, throughout. Muchderaadt2013-11-061-119/+119
| | | | | easier to read now. ok mlarkin
* use DEV_BSIZE instead of "secsize"deraadt2013-11-061-19/+17
| | | | ok mlarkin
* teach the side-effect free drivers about the partition they are dealingderaadt2013-11-061-16/+13
| | | | | | | by passing a start/length in the HIB_INIT op. Then rebase all hibernate-time block offsets to be relative to the start of that partition. This simplifies things a lot. ok mlarkin
* Errant assignment that snuck in long ago. Pointed out by deraadt@mlarkin2013-11-061-3/+1
|
* Change an #if 0 surrounding a debug printf into a DPRINTF instead.mlarkin2013-11-051-4/+2
|
* new function uvm_hibswap() finds a the largest free zone in swap, whichderaadt2013-11-051-15/+21
| | | | | hibernate can use place the data. ok mlarkin
* Replace direct references to p_size, p_offset and d_secperunit withkrw2013-11-051-6/+6
| | | | | | DL_[GET|SET]PSIZE(), DL_[GET|SET]POFFSET(), DL_[GET|SET]DSIZE() in order to get|set correct value that includes the high bits of the value.
* Informational message on unpack startmlarkin2013-10-201-1/+3
|
* Provide more debugging aids when failing to read the packed image from diskmlarkin2013-10-201-2/+3
| | | | | | during hibernate resume. requested by deraadt
* DPRINTFs for various failure cases, disabled by default (uncommentmlarkin2013-10-201-4/+16
| | | | HIB_DEBUG to see these)
* Flush the cache after bouncing the inflate page to the piglet.mlarkin2013-10-201-1/+5
| | | | | Fixes resume time stream corruption seen on x230 with large (16GB) unhibernation
* Use a second inflate page for stream finalize, since it is possiblemlarkin2013-10-201-5/+7
| | | | | | | | | (though unlikely) for the end of stream marker to overflow from one page. This should fix a few (but not all) spurious failure-to-hibernate errors. Also remove an unnecessary cache flush during deflate. ok deraadt
* Adds DPRINTF/DNPRINTF macros to hibernate, and adds invocation of saidmlarkin2013-10-031-33/+56
| | | | | | | | macros in various places to assist in debugging "failure to hibernate" errors. Macros are disabled by default - Uncomment #define HIB_DEBUG if you want more verbose messages during hibernate.
* Print out the compressed image size during unhibernate, for diagnosticmlarkin2013-09-291-3/+5
| | | | | purposes and to give the user an idea as to how much is going to be read in.
* Work around stack smash protector getting confused because we switchedmlarkin2013-06-011-18/+22
| | | | stacks by not returning (ever) from hibernate_unpack_image.
* Change return codes in various hibernate functions to be able to latermlarkin2013-06-011-12/+21
| | | | | | distinguish one failure path from another. Comment the same. Also removed some extraneous comments regarding pmap_activate.
* We need to halt the APs on MP hibernate resume or else they will bemlarkin2013-05-311-1/+5
| | | | | | | | | | | executing code possibly causing side effects during the image unpack operation. But before we can halt the APs, we need to complete their init (as they will be hatched but idling, possibly with interrupts off). Introduces MD function hibernate_quiesce_cpus to do this, called from the MI hibernate resume code. ok deraadt
* Make interrupt handling in hibernate resume MI by providing MD-specificmlarkin2013-05-301-3/+3
| | | | | | | functions to enable and disable interrupts, if needed. If a platform doesnt need interrupt handling in this way, the MD function can be a no-op. discussed with pirofti and deraadt
* Comment a KASSERT whose purpose wasn't immediately apparentmlarkin2013-05-301-1/+3
|
* Add a magic number to the head of the signature block. Check for magicmlarkin2013-04-091-9/+51
| | | | | | | | | | | | | | | | number match during signature block read during speculative unhibernate on boot. If the magic number matches but we have otherwise chosen to not unhibernate (due to kernel/memory mismatch), clear the signature block early to avoid accidentally trying to unhibernate on subsequent boots. This prevents accidental unhibernates and endless unhibernate/reboot cycles. Add a define for HIBERNATE_DEBUG for various debugging printfs (disabled by default). Finally, change some KASSERTs to warning printfs (they probably shouldn't have been KASSERTs in the first place). "looks good" deraadt@
* sys/param.h gets you sys/types.h automaticallyderaadt2013-03-281-2/+1
|
* Reword some wrong comments and some improperly formatted comments and addmlarkin2013-03-071-27/+65
| | | | information about piglet memory layout. No functional changes.
* Fix a bad comparison when calculating the size of the hibernate signaturemlarkin2013-03-061-2/+2
| | | | | | block ok deraadt@
* Style, no functional changes.pirofti2013-01-171-23/+43
| | | | Discussed with mlarkin@.
* Add a hibernate HIB_DONE op. After the memory-side-effect driver finishesderaadt2013-01-171-1/+6
| | | | | | 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
* increase the number of pages used to hold the chunk ordering map and changemlarkin2013-01-171-9/+8
| | | | | the index type from int to short. Allows amd64 to hibernate with up to 64GB phys memory
* fix an error in the amd64 asm unhibernate code and a slight adjustment tomlarkin2013-01-171-38/+63
| | | | the MI hibernate code to handle 64 bit archs
* say that we are unhibernating..deraadt2012-07-191-1/+3
|
* Back out my workaround from r1.43 now that jsing has committed a better fix.stsp2012-07-161-5/+3
|
* Make sure we have a swap partition before trying to read or writejsing2012-07-161-1/+6
| | | | | | hibernate info. ok mlarkin@ stsp@
* Don't panic in hibernate resume if no swap partition exists on the root disk.stsp2012-07-151-3/+5
| | | | ok mlarkin
* Temporarily don't do RLE page encoding in hibernate to fix some unpackingmlarkin2012-07-121-101/+12
| | | | | corruption seen earlier. This makes hibernate much slower but seems to fix the corruption problems seen on all machines we've tested on.
* Enable the swap checker for hibernatemlarkin2012-07-111-2/+13
|
* DVACT_SUSPEND must be done at cold with interrupts disabled. Failurederaadt2012-07-091-9/+15
| | | | | to read a hibernate image should restore the spl ok mlarkin
* Quiesce and suspend devices in the resuming kernel for hibernate.mlarkin2012-07-081-1/+7
| | | | ok deraadt@
* Make hibernate_free() safe to be called even if hibernate areasderaadt2012-07-081-7/+20
| | | | | allocation failed ok mlarkin
* Reorganize some hibernate functions for easier readability.mlarkin2012-07-081-90/+114
| | | | | | Fix some incorrect/old comments. ok deraadt@
* use regular i/o functions in the hibernate resume path. ahci(4) hibernatejmatthew2012-06-211-34/+36
| | | | | | | i/o will not mix with regular i/o so it can only be used in the hibernate path. ok deraadt@ mlarkin@
* Fix some hibernate issues on machines with > 3.5GB phys memmlarkin2012-06-201-46/+79
| | | | ok deraadt@
* hibernate: fix lock/unlock mismatchariane2012-04-121-2/+2
| | | | | Unlock missed an 'f', which caused it to unlock the in-use pageqs, rather than the free pageqs as it was supposed to.
* Fix an integer math error when using the result of uvm_page_rle, andmlarkin2012-03-261-13/+12
| | | | | | | | | | 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
* ready this for big-endian support later onderaadt2011-11-291-23/+22
| | | | ok mlarkin
* Only free the piglet on hibernate fail if we are suspending.mlarkin2011-11-291-2/+4
|
* clamp uvm_page_rle() to 255 pages at a timederaadt2011-11-231-4/+5
| | | | ok mlarkin
* Ensure we are unpacking the right source address after skipping a range ofmlarkin2011-11-221-23/+37
| | | | | | RLE pages in hibernate. ok deraadt@
* no need to zero all the free pages since we will be skipping them withmlarkin2011-11-181-4/+1
| | | | | | rle. noticed by jasper
* - fix a few trailing whitespaces and a spellojasper2011-11-181-10/+10
| | | | | | - panic strings already get printed with a '\n', so remove the extra ones ok mlarkin@