Qualcomm Exploring Bootloader-Based Hibernation For Linux

Written by Michael Larabel in Linux Kernel on 18 May 2022 at 05:25 AM EDT. 4 Comments
Qualcomm engineers are exploring bootloader-based hibernation in order to improve the user experience when restoring from a hibernated state.

Being motivated around requirements within automotive use-cases, Qualcomm is proposing bootloader-based hibernation as a means of more quickly restoring a Linux system after leaving the hibernated state with cutting down the time until there is a picture on the screen. This is another example of Linux being adapted for stringent requirements around automobiles such as the maximum time a system can boot before needing cameras activated.

Here's the meat of their proposed bootloader-based hibernation and initial Linux kernel patches sent out:
Automotive usecases require better boot KPIs, Hence we are proposing a bootloader based hibernation restore. Purpose of bootloader based hibernation is to improve the overall boot time till the first display frame is seen on the screen or a camera application can be launched from userspace after the power on reset key is pressed. This RFC patchset implements a slightly tweaked version of hibernation in which the restoration of an older snapshot into DDR is being carried out from the bootloader (ABL) itself, by doing this we are saving some time (1 second measured on msm-4.14 Kernel) by not running a temporary kernel and figuring out the hibernation image at late_init() In order to achieve the same bootloader checks for the hibernation image at a very early stage from swap partition, it parses the image and
loads it in the DDR instead of loading boot image form boot partition. Since we are not running the temporary kernel,which would have done some basic ARM related setup like, MMU enablement, EL2 setup, CPU setup etc, entry point into hibernation snapshot image directly from bootloader is different, on similar lines, all device drivers are now re-programming the IO-mapped registers as part of the restore callback (which is triggered from the hibernation framework) to bring back the HW/SW sync.

This patch series working out boot-loader based hibernation for Linux currently amounts to just over 200 lines of new kernel code. Currently this proposal is under a "request for comments" to see where it leads.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week