Manually Save and Load Snapshot Image Mode

Last modified by Microchip on 2026/08/17 15:51

Overview

Use this mode to manually manage snapshot creation and restore operations.

at91bootstrap uses the Backup Power Management (PM) mode to save the contents of the current Double Data Rate (DDR) (system state, kernel, applications, etc.) as a snapshot image to flash memory.

At each subsequent boot, all content is reloaded from this snapshot image into DDR, and all running applications are restored immediately, thereby bypassing most of the traditional boot sequence.

Applicable Scenarios

This mode is suitable for environments that require precise control over when snapshots are created, such as during initial debugging or specific maintenance tasks. This mode does not require any additional kernel patches.

Supported Devices and Prerequisites

  • Supported devices
    • SAMA5D2 (except SAMA5D2-SIP)
    • SAMA7G54
    • SAMA7D65
    • Not supported: SAM9X60 and SAM9X7
  • Hardware requirements
    • A power management Integrated Circuit (IC) is recommended (for example: MCP16501/2)
      • VBAT and VDDIODDR power supplies must be maintained
      • Backup with SDRAM in Self-Refresh (BSR)
  • Software requirements
    • PM mode support: Backup mode
    • Use the memmap module to obtain memory mapping parameters
    • Memory mapping parameters configuration in at91bootstrap KCONFIG

Snapshot Image Generation

A valid snapshot must be captured from a runtime-Linux® system and saved to Non-Volatile Memory (NVM) (like an SD™ card or NAND Flash) before Ultra-Fast Boot; this is done by at91bootstrap when put in a special mode.

Start the standard boot sequence from ROM boot.



Complete the standard boot sequence.


Enter BSR mode by typing “echo mem > /sys/power/state” (make sure that BSR was setup from U-Boot as an available power management mode).


DDR enters self-refresh mode.


Exit BSR mode by pressing the nSTART button.


Start the Read-Only Memory (ROM) boot sequence.


The ROM code is executed and loads the at91bootstrap into internal SRAM.

Exit DDR Self-Refresh.

Analyze MEM_MAP from kernel to identify a valid memory page.

Save the valid memory page (snapshot of DRAM) to NVM.


Power off the system.

Back to Top

Load Snapshot Image

If a valid snapshot is stored in NVM, the system can be restored quickly by loading the snapshot from NVM to DRAM.

Boot the Linux system.

at91bootstrap checks if a valid snapshot is stored in NVM. If yes:

  • Load snapshot image to DDR to recover entire DDR memory
  • Put system back in suspend state
  • Jump to Linux resume address

Exit Suspend mode in the kernel to resume system.

Back to Top

Demo

Ultra-Fast Boot demo on the SAMA7G54-EK board (manually load and save snapshot image mode). at91bootstrap uses the Backup PM mode to save the contents of the current DDR (system state, kernel, applications, etc.) as a snapshot image to flash memory.

At each subsequent boot, all content is reloaded from this snapshot image into DDR and all running applications are restored immediately, thereby bypassing most of the traditional boot sequence.

Back to Top