What Is Snapshot Image
The snapshot image only needs valid memory pages to be loaded. Instead of storing the entire Dynamic Random-Access Memory (DRAM) as a snapshot image, the Ultra-Fast restore system analyzes memory maps in the kernel system and saves only the valid DRAM contents as a snapshot image to reduce the loading time, thus fastbooting the system to a fully booted state.
Snapshot Image Overview
- Once the system is suspended, we can capture the contents of memory (system kernel, drivers and applications)
- A snapshot image contains optimized and trimmed DRAM contents
- Reducing the snapshot image size helps shorten restore time
- The snapshot image is stored in an SD™ card or NAND flash
- Once it is restored to Double Data Rate (DDR), Linux® resumes normal operation
How Snapshot Image Is Optimized
Linux memory management is a complex subsystem responsible for virtual and physical memory implementation.
The memory management subsystem helps the Ultra-Fast Boot system analyze Linux memory and identify valid mapped pages:
- Drop free pages
- Exclude zero pages

Snapshot Image Features
- Securable
- Enable Secure Snapshot Image when you want snapshot handling to be part of a secure fast boot flow. Use this option together with the platform's secure boot process so that snapshot verification is included in the fast boot path.
- Programmable SD/MultiMediaCard (MMC) partition or offset to store snapshot
- CRC-32 code for snapshot image validation
- Storage media can be SD/MMC or NAND flash
- Snapshot image read/write performance
- embedded MultiMediaCard (eMMC) (HS400) > SD(UHS-I) > eMMC(DDR) > NAND(Mode 3) > SD(HS) > NAND
Supported NVMs for Snapshot Images
The current Non-Volatile Memories (NVMs) supported for snapshot images are SD/MMC and NAND Flash.
This table summarizes the different data rates that are available for SD/eMMC cards; the data rate has a direct impact on the boot speed itself. Note that not all combinations of data rate and capacity are defined, as described.
SD™ Card Support for Snapshot Image
| SD Card | High Speed (HS) | SDR50 | DDR50 | SDR104 |
|---|---|---|---|---|
| SAMA5D2 Support | Yes | No | No | No |
| SAMA7G5 Support | Yes | Yes | Yes | No |
| SAMA7D65 Support | Yes | Yes | Yes | Yes |
| Rate MB/s (Max) | 25 | 50 | 50 | 104 |
eMMC Card Support for Snapshot Image
| eMMC | HS | HS DDR | HS200 | HS400 |
|---|---|---|---|---|
| SAMA5D2 Support | Yes | No | No | No |
| SAMA7G5 Support | Yes | No | No | No |
| SAMA7D65 Support | Yes | Yes | Yes | Yes |
| Rate MB/s (Max) | 52 | 104 | 200 | 400 |
Using Memory Mapping to Optimize Snapshot Image
This approach significantly reduces the size of the image, shortens the time it takes to load the image and achieves the goal of booting in a few seconds or even within a second. To analyze memory usage at runtime, a module is used to obtain the information required to analyze the memory, including mem_map_address, mem_page_cnt, pag_type, etc.
- Memory mapping information can be obtained from Linux memory management
- A Linux memory mapping descriptor serves as a master dictionary for an entire address space, tracking everything from a process's virtual memory areas to its active page tables and memory usage.
- Linux kernel memory map page size: default is 4 KB
- The start physical address of Kernel page structures
- The maximum number of mapped pages
- The size of Page structure
- The offset of page_type in page structure
- The offset of private in page structure
- Memory map information tells at91bootstrap or the PC memmap tool which DRAM pages are valid and should be included in the snapshot image
How to Obtain Memory Mapping Information
- memmap module
- Once your Linux system is running, you can then load the memmap module, which will output the memory mapping parameters to the console
- For Manually Load and Save Snapshot Image mode only
- Secure RAM
- Once your Linux system enters Suspend mode, thanks to the Ultra-Fast Boot patch, the power manager routine saves all memory mapping parameters to secure RAM
- The at91bootstrap reads these parameters from secure RAM to analyze the memory mapping
- For Automatically Load and Save Snapshot Image mode only
- Ultra-Fast Boot kernel patch
- During the Linux kernel boot, these memory mapping parameters are printed to the console
- For Load Pre-saved Snapshot Image mode only
Get Memory Map Parameters With memmap Module
Ultra-Fast Boot provides a memmap module to obtain memory mapping parameters.

The at91bootstrap needs these parameters to be configured in KCONFIG for Fast Boot settings.

The at91bootstrap analyzes memory maps with these parameters and generates the snapshot image.
The module is used only in Manually Save and Load Snapshot Image Mode.
Get Memory Mapping Parameters From Linux Kernel Debug Output
A Linux kernel with the Ultra-Fast Boot patch applied will output memory mapping information.
