Newer
Older
AMI-Aptio-BIOS-Reversed / LenovoServerPkg / SetupDefaults / SetupDefaultLoad / README.md
@Ajax Dong Ajax Dong 2 days ago 3 KB Restructure the repo

SetupDefaultLoad

  • Module: 0093
  • File: SetupDefaultLoad.efi
  • Size: 32960 bytes (0x80C0)
  • Phase: DXE (Driver Execution Environment)
  • Source package: LenovoServerPkg
  • Build: VS2015, X64, DEBUG (HR6N0XMLK build)
  • Source path: e:\hs\LenovoServerPkg\SetupDefaults\SetupDefaultLoad\SetupDefaultLoad.c

Overview

UEFI setup defaults loading and configuration management module. Iterates through UEFI setup variables, compares current values against factory defaults, and applies default values when needed. Handles NVRAM storage initialization, PCI segment bus configuration, VMD (Volume Management Device) NVMe slot information collection, and BMC communication for VMD setup. The driver locates multiple protocols (MM PCI USRA, HII services, HII Config Routing, HII Config Access, DXE services) and processes setup configuration data including SocketIioConfig and other setup variable domains.

Key Functions

Function Description
ModuleEntryPoint UEFI driver entry point; initializes globals then calls SetupDefaultLoadDriverEntry
SetupDefaultLoadDriverEntry Main driver entry; initializes NVRAM storage, locates protocols (MM PCI USRA, HII services, HII Config Routing, HII Config Access), and performs initial setup configuration
SetupDefaultLoadMain Iterates through setup variables, compares against factory defaults, and applies them. Processes VMD setup defaults
ProcessSetupDefaults Processes setup default values; compares each setup option against its factory default and queues updates. Handles NVMe VMD slot information
InitDefaultConfigData Initializes default configuration data buffer; allocates memory and populates with factory default settings
GetConfigAccess Retrieves the UEFI Setup configuration access protocol
ValidateInputParameters Validates setup input parameters via the config access protocol
ProcessSetupConfig Processes a single setup configuration item
UpdateSetupData Updates a setup data value in the configuration store
CopySetupBuffer Copies setup buffer data to the configuration protocol
GetBootOptionValue Maps boot option IDs to their corresponding byte values
ProcessSetupMenuOption Processes setup menu options with nesting support
GetSetupVariableData Retrieves setup variable data from UEFI variables via GetVariable
GetNvStorageData Gets NVRAM storage data pointer from system configuration table

Protocols/Dependencies

  • MmPciUsra Protocol - MMIO PCI USRA access for PCI config space
  • HII Config Access Protocol - Setup configuration access
  • HII Config Routing Protocol - HII configuration routing
  • HII Services - HII package list and string access
  • DXE Services Table - DXE services for NVRAM
  • PCD Protocol - Platform Configuration Database
  • SMM Communication - SMM-related setup operations
  • Setup variables: SocketIioConfig, and other UEFI setup domains
  • VMD (Volume Management Device) NVMe slot configuration
  • BMC communication for VMD setup notification

Platform

Lenovo ThinkSystem HR650X (Purley platform) - Setup defaults and VMD NVMe configuration