Compartir a través de


SNAP_HEADER (Compact 2013)

10/16/2014

This read-only structure contains information about the memory snapshot including checksums for the snapshot data, the size of the snapshot, and the physical location of the snapshot in memory.

Syntax

typedef struct _SNAP_HEADER {
    DWORD dwSig;
    DWORD dwOfstSnapTable;    DWORD dwOfstPageable; 
    DWORD cSnapPages; 
    DWORD cbCompressed; 
    DWORD cbPageable; 
    DWORD dwOemData; 
    DWORD dwHeaderAdjust; 
    DWORD dwTableChkSum; 
    DWORD dwSnapChkSum;
    DWORD dwPageableChkSum; 
    // CPU context follows this
} SNAP_HEADER, *PSNAP_HEADER;
typedef const SNAP_HEADER *PCSNAP_HEADER;

Members

  • dwSig
    Always equal to SSPL_SIG_HEADER, defined in snapboot.h.
  • dwOfstSnapTable
    Offset from the start of the SNAP_HEADER data to the table of physical addresses for the pages that the boot loader loads. The contents of the pages referenced by this table are located in the compressed snapshot data area, which follows the array of physical addresses. This address is aligned on a 4 KB address boundary.
  • dwOfstPageable
    Offset to the pageable area. This address is aligned on a 4 KB address boundary.
  • cSnapPages
    Number of uncompressed memory pages stored in the snapshot. The uncompressed size of the snapshot image is equal to the value of cSnapPages multiplied by 4096, which is the size of a page of virtual memory.
  • cbCompressed
    Total size in bytes of the compressed snapshot, excluding the size of the header and the snapshot page table.
  • cbPageable
    Total size in bytes of the uncompressed pageable snapshot.
  • dwOemData
    OEM-defined value that is obtained from the dwOemData field of the SnapshotSupport structure. This field provides a way to pass information to the bootloader, such as the compression algorithm used to compress the snapshot.
  • dwHeaderAdjust
    Checksum for only the snapshot header. The checksum is negative so that when it is added to the header checksum, the result is zero.
  • dwTableChkSum
    Checksum for snapshot boot page table.
  • dwSnapChkSum
    Checksum for snapshot boot image data.
  • dwPageableChkSum
    Checksum for snapshot boot image pageable area.

Remarks

The OS creates an instance of this structure and sets all of the values.

The following figure describes the memory layout of a snapshot boot image.

Snapshot boot memory organization

  • SNAP_HEADER
    The SNAP_HEADER is followed by 4 KB of filler so that the snapshot page table that follows is 4-KB aligned.
The checksum of this area, including the filler, will be zero. This area is never compressed.
  • Snapshot Page Table
    The boot loader loads the snapshot page table which contains an array of physical addresses for the pages in the snapshot. The number of entries in this array is stored in cSnapPages. The contents of the pages are stored in the Compressed Snapshot Data section.

    dwOfstSnapTable points at the beginning of this area. The checksum of this area, including the filler, is stored in dwTableChkSum.

  • Compressed Snapshot Data
    The size of the compressed snapshot data is stored in cbCompressed. The checksum of this area, including the filler, is stored in dwSnapChkSum.
  • Uncompressed Pageable Snapshot Data
    The boot loader should not load the uncompressed pageable snapshot data. Uncompressed pageable snapshot data is only present if you implement the OEMReadSnapshot function. The OS will load pages from this section on demand by using your function.

    dwOfstPageable points at the beginning of the uncompressed pageable snapshot data. The size of this uncompressed area is stored in cbPageable, and the checksum is stored in dwPageableChksum.

Requirements

Header

oemglobal.h

See Also

Reference

OAL Structures