AMI-Aptio-BIOS-Reversed / LenovoServerPkg / SetupDefaults / SetupDefaultLoad /
@Ajax Dong Ajax Dong authored 7 days ago
..
ModuleEntryPoint.txt Restructure the repo 7 days ago
README.md Restructure the repo 7 days ago
SetupDefaultLoad.c Restructure the repo 7 days ago
SetupDefaultLoad.h Restructure the repo 7 days ago
SetupDefaultLoad.md Restructure the repo 7 days ago
sub_101C.txt Restructure the repo 7 days ago
sub_121C.txt Restructure the repo 7 days ago
sub_1914.txt Restructure the repo 7 days ago
sub_19FC.txt Restructure the repo 7 days ago
sub_1AA8.txt Restructure the repo 7 days ago
sub_1E38.txt Restructure the repo 7 days ago
sub_2a0.txt Restructure the repo 7 days ago
sub_300.txt Restructure the repo 7 days ago
sub_310.txt Restructure the repo 7 days ago
sub_320.txt Restructure the repo 7 days ago
sub_330.txt Restructure the repo 7 days ago
sub_340.txt Restructure the repo 7 days ago
sub_350.txt Restructure the repo 7 days ago
sub_3FC.txt Restructure the repo 7 days ago
sub_5358.txt Restructure the repo 7 days ago
sub_5388.txt Restructure the repo 7 days ago
sub_5408.txt Restructure the repo 7 days ago
sub_5450.txt Restructure the repo 7 days ago
sub_5490.txt Restructure the repo 7 days ago
sub_54e0.txt Restructure the repo 7 days ago
sub_55a4.txt Restructure the repo 7 days ago
sub_55d4.txt Restructure the repo 7 days ago
sub_5658.txt Restructure the repo 7 days ago
sub_5694.txt Restructure the repo 7 days ago
sub_5710.txt Restructure the repo 7 days ago
sub_5768.txt Restructure the repo 7 days ago
sub_57C4.txt Restructure the repo 7 days ago
sub_5a28.txt Restructure the repo 7 days ago
sub_5b28.txt Restructure the repo 7 days ago
sub_5b84.txt Restructure the repo 7 days ago
sub_5c64.txt Restructure the repo 7 days ago
sub_5cfc.txt Restructure the repo 7 days ago
sub_5d3c.txt Restructure the repo 7 days ago
sub_5d6c.txt Restructure the repo 7 days ago
sub_5da0.txt Restructure the repo 7 days ago
sub_5df0.txt Restructure the repo 7 days ago
sub_5e7c.txt Restructure the repo 7 days ago
sub_5eac.txt Restructure the repo 7 days ago
sub_5f54.txt Restructure the repo 7 days ago
sub_5fbc.txt Restructure the repo 7 days ago
sub_6060.txt Restructure the repo 7 days ago
sub_60a0.txt Restructure the repo 7 days ago
sub_6100.txt Restructure the repo 7 days ago
sub_7CC.txt Restructure the repo 7 days ago
sub_868.txt Restructure the repo 7 days ago
sub_90C.txt Restructure the repo 7 days ago
sub_9A4.txt Restructure the repo 7 days ago
sub_A6C.txt Restructure the repo 7 days ago
README.md

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