Newer
Older
AMI-Aptio-BIOS-Reversed / AmiModulePkg / NVRAM / NvramPei / README.md
@Ajax Dong Ajax Dong 2 days ago 1 KB Restructure the repo

NvramPei

Index: 0407 | Size: 16,704 bytes | Phase: PEI | Format: PE32 (Ia32)

Overview

NVRAM variable services PEIM that manages UEFI variable storage during the PEI phase. Provides NVRAM initialization (hardware bring-up, GPIO configuration), variable read services via both legacy (ReadOnlyVariable) and modern (ReadOnlyVariable2) PPIs, and internal variable store traversal (checksum verification, variable search by name/GUID, payload access).

Key Functions

  • ModuleEntryPoint -- EFI entry: calls PeiGetVariableAddressPpi to register variable access PPIs
  • NvramInitHardware -- Hardware NVRAM initialization: GPIO configuration, LPC bridge setup
  • NvramPollGppD1 -- Polls GPP_D1 hardware, reports progress status
  • PeiGetVariableCompat -- Legacy ReadOnlyVariable PPI getter (deprecated path)
  • PeiGetVariableCompat2 -- ReadOnlyVariable2 PPI getter (modern path)
  • NvramFunctionDispatch -- NVRAM operation dispatcher
  • NvramVariableServiceDispatch -- Variable service routing
  • NvramGetBaseAddresses -- Retrieves NVRAM flash base addresses
  • NvramFindDefaultsInFv -- Locates default variable store in firmware volume
  • NvramInitDefaults -- Initializes default variable storage
  • NvramFindVariable -- Searches variable store by name+GUID with checksum validation
  • NvramGetVariable / NvramGetVariableName / NvramGetVariablePayload -- Variable data extraction
  • NvramVerifyChecksum -- Store entry checksum verification
  • NvramCompareVariableName / NvramMatchVariableName -- Variable name comparison utilities

Dependencies

  • EFI_PEI_READ_ONLY_VARIABLE2_PPI -- Variable access PPI (installed)
  • EFI_PEI_READ_ONLY_VARIABLE_PPI -- Legacy variable access PPI (installed)
  • NVRAM flash hardware (GPIO, LPC/FWH)
  • PEI Services (PPI registration, HOB access)

Platform

Lenovo HR650X (Purley)
Source: AmiModulePkg/NVRAM/NvramPei/