arm64: kernel: Add support for hibernate/suspend-to-disk
Add support for hibernate/suspend-to-disk. Suspend borrows code from cpu_suspend() to write cpu state onto the stack, before calling swsusp_save() to save the memory image. Restore creates a set of temporary page tables, covering only the linear map, copies the restore code to a 'safe' page, then uses the copy to restore the memory image. The copied code executes in the lower half of the address space, and once complete, restores the original kernel's page tables. It then calls into cpu_resume(), and follows the normal cpu_suspend() path back into the suspend code. To restore a kernel using KASLR, the address of the page tables, and cpu_resume() are stored in the hibernate arch-header and the el2 vectors are pivotted via the 'safe' page in low memory. Reviewed-by:Catalin Marinas <catalin.marinas@arm.com> Tested-by: Kevin Hilman <khilman@baylibre.com> # Tested on Juno R2 Signed-off-by:
James Morse <james.morse@arm.com> Signed-off-by:
Will Deacon <will.deacon@arm.com>
Loading
-
mentioned in commit 6e20e994
-
mentioned in commit 58bc563d
-
mentioned in commit ca81acdf
-
mentioned in commit 6eca6101
-
mentioned in commit 154ab45e
-
mentioned in commit 3709b27c
-
mentioned in commit 0e01941b
-
mentioned in commit fe8140e0
-
mentioned in commit 804206c7
-
mentioned in commit ecea9198
-
mentioned in commit 37fbe27d
-
mentioned in commit 1baa97d0
-
mentioned in commit d05ddf8b
-
mentioned in commit 56f895ca
-
mentioned in commit 5611fa25
-
mentioned in commit dd5ca144
-
mentioned in commit 7d3da3f3
-
mentioned in commit b670e979
-
mentioned in commit 607eb354
-
mentioned in commit 23922477
-
mentioned in commit 22a31dfb
Please sign in to comment