ModuleName: AmiRedFishApi
Index: 0061
Size: 7680 bytes (PE32+)
Phase: DXE (Driver eXecution Environment)
Arch: x86-64
AMI Redfish API DXE driver that installs the AmiRedfishProtocolGuid protocol interface for managing Secure Boot-related UEFI runtime variables (PK, KEK, db, dbx, dbt, dbr). The driver reads and writes Secure Boot signature databases using raw firmware volume (FV) section data extracted via the UEFI Loaded Image Protocol and FFS section parsing. It also detects the current Secure Boot mode (Setup, Audit, Deployed) and performs variable size consistency checks to guard against corruption.
The driver caches the HOB list from the system configuration table and reads debug level configuration from CMOS (index 0x4B). It provides a debug reporting protocol abstraction for trace output and assertion handling.
| Function | Description |
|---|---|
AmiRedfishEntryPoint |
DXE driver entry point; caches UEFI system table pointers, initializes HOB list, installs protocol |
AmiRedfishProcessAllVariables |
Iterates all Secure Boot variables (dbx, dbt, dbr, db), extracts default images from FV, and writes them to NVRAM |
AmiRedfishSetVariable |
Writes a single Secure Boot variable with NV/BS/RT attributes and optional size-check guard |
AmiRedfishProcessPK |
Platform Key (PK) management entry point |
AmiRedfishGetSecureBootMode |
Reads SetupMode/AuditMode/DeployedMode variables to determine current Secure Boot state |
AmiRedfishGetSecureBoot |
Reads the SecureBoot UEFI variable |
AmiRedfishSetSecureBootSetup |
Sets the SecureBootSetup UEFI variable |
AmiRedfishGetRawImage |
Extracts raw image/section data from a firmware volume by GUID using Loaded Image Protocol |
AmiRedfishInitHobList |
Scans the system configuration table to locate and cache the HOB list pointer |
AmiRedfishGetDebugLevel |
Reads the debug log level from CMOS index 0x4B |
AmiRedfishDebugPrint |
Debug print via the debug reporting protocol |
AmiRedfishAssert |
Assertion handler via the debug reporting protocol |
AmiRedfishReadUnaligned64 |
Reads a 64-bit value from potentially unaligned memory |
AmiRedfishWriteUnaligned64 |
Writes a 64-bit value to potentially unaligned memory |
gEfiGenericVariableGuid; provides print and assertion service at known offsetsSetupMode, AuditMode, DeployedMode, SecureBoot, SecureBootSetup, dbx, dbt, dbr, db, PK, KEKgAmiRedfishHobGuid) for configuration dataHR650X (Purely-based platform), AMI BIOS. Uses AMI SecureBootDefault GUID for variable defaults. Debug level configurable via CMOS register 0x4B. Protocol version constant 17039617 (0x01040001) encodes version/attributes metadata.
mSecureBootVarNames[] -- Names of the four signature databases (dbx, dbt, dbr, db)mSecureBootDefaultNames[] -- Corresponding default-value variable names (dbxDefault, etc.)mSecureBootImageGuids[] -- Image GUIDs for extracting each variable's default content from FVgAmiRedfishProtocolGuid -- Protocol GUID installed by the entry pointgAmiSecureBootDefaultGuid -- GUID for Secure Boot default storage