Newer
Older
AMI-Aptio-BIOS-Reversed / StaticSkuDataDxeNeonCityEPECB / StaticSkuDataDxeNeonCityEPECB.md
@Ajax Dong Ajax Dong 2 days ago 8 KB Init

StaticSkuDataDxeNeonCityEPECB

Function Table

Address Name Description
InitializeUmpProtocol
ReadUnaligned64
IsHobMatchingGuid
AssertPrint
CheckEfiStatus
GetBoardTypeFromCmos
ModuleEntryPoint
Global UEFI Table Pointers
The image handle of this driver (set by ModuleEntryPoint).
EFI_HANDLE gImageHandle = NULL;
Pointer to the UEFI System Table (set by ModuleEntryPoint).
EFI_SYSTEM_TABLE *gSystemTable = NULL;
Pointer to the UEFI Boot Services Table (set by ModuleEntryPoint).
EFI_BOOT_SERVICES *gBootServices = NULL;
Pointer to the UEFI Runtime Services Table (set by ModuleEntryPoint).
EFI_RUNTIME_SERVICES *gRuntimeServices = NULL;
Pointer to the HOB (Hand-Off Block) list, initialized via DxeHobLib.GetBootModeHobList().
VOID *mHobList = NULL;
Protocol GUID definitions (stored in .data section at 0x4060-0x40E0)
Bytes at 0x4060-0x407F (32 bytes, first 16 = GUID, next 8 = name, next 8 = reserved/ptr)
This is a UEFI configuration table GUID used to locate platform-specific data.
GUID mUbaOemGuid1 = { 0x36292936, 0x0E76, 0x31C8, { 0xA1, 0x3A, 0x3A, 0xF2, 0xFC, 0x1C, 0x39, 0x32 } };
Identifies the UMPT protocol handler GUID.
GUID mUbaOemGuid2 = { 0x460D3EE0, 0x6352, 0x4548, { 0xB0, 0xA4, 0x58, 0xD5, 0x7B, 0x31, 0x77, 0xE2 } };
UMPT (UEFI Memory Protocol Table) GUID.
This GUID identifies the UMPT protocol. The protocol provides memory topology
and configuration data used by the board-specific SKU dispatch code.
EFI_GUID gUmpProtocolGuid = UMPT_PROTOCOL_GUID;
Name string "UMPT" stored alongside the GUID in the protocol registration entry.
CHAR8 mUmpProtocolName[4] = "UMPT";
PIRQ (PCI Interrupt Routing) protocol GUID.
This GUID identifies the PIRQ protocol, which provides PCI interrupt routing
configuration for the board.
EFI_GUID gPirqProtocolGuid = PIRQ_PROTOCOL_GUID;
Name string "PIRQ" stored alongside the GUID in the protocol registration entry.
CHAR8 mPirqProtocolName[4] = "PIRQ";
FIX protocol GUID.
This GUID identifies the FIX protocol, which provides board-specific fixup
configuration methods (FIX0-X, FIXV, FIXY, FIXW).
EFI_GUID gFixProtocolGuid = FIX_PROTOCOL_GUID;
ACPF (ACPI Path Format) protocol GUID.
This GUID identifies the ACPF protocol, which exposes the ACPI path format
table to UBA dispatch code.
EFI_GUID gAcpfProtocolGuid = ACPF_PROTOCOL_GUID;
NVDIMM ACPI Path Name Strings (stored in .rdata section)
The .rdata section contains ACPI path strings organized as:
CCT (Core Count Table) path strings: SB.CCT0 through SB.CCT8
These map CPU core count configurations per socket.
CFH (Core Frequency Header) path strings: SB.CFH0 through SB.CFH8
These map CPU frequency configuration headers per socket.
NVDIMM namespace: SB.NVDR
NVDIMM sub-namespace devices (N000 through N151, organized by socket/channel)
Each NVDIMM entry has ACPI methods:
FXCD - Function Code
FXST - Function Status
FXIN - Function Input
FXOU - Function Output
FXBS - Function Buffer Size
FXFH - Function File Handle
CENA - Command Enable
CFIS - Command Finish Status
PCIe Root Port FIX methods (per port):
MCTL - Management Control
FIX types:
FIX0 - Base FIX method (single entry)
FIXX - FIX Extension (0..8 per device) with type=0x5B80
FIXV - FIX Value (0..8 per device) with type=0x5B80
FIXY - NVDIMM FIX Y (per sub-instance) with type=0x0008
FIXW - NVDIMM FIX W (per sub-instance) with type=0x0008
ACPI Path Entry Table (stored in .data section at 0x40E0+)
This table is organized as arrays of 32-byte ACPI_PATH_ENTRY structures.
The table is anchored by the ACPI_PATH_FORMAT_TABLE header at 0x9000.
Entry sections:
Total entries: ~200+ entries covering all board-configurable ACPI paths
ACPI Path Format Table header at 0x9000
EntryTable pointer: 0x40E0 (gAcpiPathEntries)
ACPI_PATH_FORMAT_TABLE mAcpiPathFormatTable = {
Protocol registration handles (initialized by entry point)
UINT64 gUmpProtocolHandle = 0;
Forward Function Declarations
Function Implementations
Allocate a pool buffer using BootServices->AllocatePool (index 24 = 3 entries).
PoolSize = gBootServices->AllocatePool (31);
Locate the UMPT protocol configuration table entry.
Result = gBootServices->LocateProtocol (&gUmpOemGuid2, NULL, &CachedHandle);
Initialize search state.
EntryCount = 0;
Check if the SystemTable has a HOB list pointer at offset 104.
if ((UINT64 )((UINT8 *)gSystemTable + 104) != 0) {
Linear search through the HOB list.
for (CurrentEntry = EntryBase; ; CurrentEntry += 24) {
Found matching entry: extract the HOB pointer at offset +16.
HobList = *(VOID )(CurrentEntry + 16);**
No matching HOB entry found; trigger ASSERT.
CheckEfiStatus ((EFI_STATUS)(UINTN)0x800000000000000EULL);
SystemTable has no HOB list; trigger ASSERT.
Read both GUIDs via unaligned 64-bit reads.
GuidFirst = ReadUnaligned64 (Entry);
Dispatch assertion via the protocol's report function (at offset +8 in vtable).
Check if this is a HOB list pointer validation by examining
the SystemTable HOB count entry.
GetBootModeHobList ((UINT64)Status);
Get the UMP protocol handle for dispatch.
ProtocolHandle = InitializeUmpProtocol ();
Read CMOS index register 0x70, set index to 0x4B (preserving NMI enable bit).
CmosValue = IoRead8 (0x70);
Read the CMOS data register 0x71.
RawCmosResult = IoRead8 (0x71);
If the value is > 3, it may indicate a special configuration.
behavior preserved from the original binary.
if (RawCmosResult > 3) {
Map the CMOS result to a dispatch type.
Raw CMOS value >= 1 and <= 254: valid range (n3_1 - 1 <= 0xFD).
Value 1 -> DispatchType = 0x8000000C (NVDIMM path data dispatch)
Value 2..254 -> DispatchType = 0x80000006 (FIX/PCIe path data dispatch)
Raw CMOS value 0 or 255: out of range, no dispatch performed
returns default value of (RawCmosResult - 1).
if ((UINT8)(RawCmosResult - 1) <= 0xFD) {
If the dispatch type matches the input mask, call the protocol function.
if ((DispatchType & (UINT64)InputValue) != 0) {
Save the global UEFI table pointers.
gImageHandle = ImageHandle;
Initialize the HOB list for later use (DxeHobLib compatibility).
GetBootModeHobList ();
Locate the OEM configuration table entry (UMPT protocol GUID)
to obtain the protocol handle for subsequent registrations.
Register the ACPI path format table.
This installs the mAcpiPathFormatTable (containing "ACPF" signature
and pointer to the ACPI path entries) as the protocol interface.
Status = ((EFI_STATUS ()(UINT64, VOID , VOID *, UINTN)) \
Register the PIRQ protocol interface.
Register the FIX protocol interface.
return ((EFI_STATUS ()(UINT64, VOID , VOID *, UINTN)) \

Generated by HR650X BIOS Decompilation Project