Newer
Older
AMI-Aptio-BIOS-Reversed / Build / GuidArtifacts / 5038F34E-0774-47A0-A5EF-4B94AF1A43DA / 5038F34E-0774-47A0-A5EF-4B94AF1A43DA.md
@Ajax Dong Ajax Dong 2 days ago 6 KB Full restructure

5038F34E-0774-47A0-A5EF-4B94AF1A43DA

Function Table

Address Name Description
_ModuleEntryPoint
DcpmmDriverInit
DcpmmDriverMain
DcpmmDriverStartThunk
DcpmmDriverStart
DcpmmDriverSupported
DcpmmDriverStop
NvdimmFwCommand
DcpmmFirmwareCommandDispatch
DcpmmGetDeviceInfo
DcpmmGetHealth
DcpmmSmbusAcquire
DcpmmSmbusRelease
DcpmmGetNvdimmConfig
DcpmmSetNvdimmConfig
DcpmmEnumerateNvdimmHandles
DcpmmCheckNamespaceSupport
DcpmmCheckSmbusSupport
UtilFreePool
UtilDebugPrint
0x33348 EFI_BOOT_SERVICES *gBootServices = NULL; // 0x33350
0x33358 DCPMM_DRIVER_GLOBAL *gDcpmmDriver = NULL; // qword_33308
DCPMM protocol
DCPMM config protocol
DCPMM health protocol
SMBus HC protocol
NVDIMM PassThru protocol
SMBus arbitration protocol
Unknown located protocol
Device path utilities
Device path protocol GUID
NVDIMM Firmware Interface Table protocol
Namespace protocol instance
Driver Binding protocol GUID
NVDIMM device path instance
Protocol dispatch tables (defined externally in .data section)
Protocol function table
Configuration protocol table
Firmware interface table
Step 1: Early initialization (serial port, protocol locations)
Step 2: Install driver binding protocol
Set the Start handler will be called when controller is found
Step 3: Complete initialization
Serial port (COM1) initialization via I/O ports 0x3F8-0x3FD.
DCPMM driver uses the serial port for debug logging.
COM1 registers:
0x3F8 - Data register / Divisor Latch Low (DLAB=1)
0x3F9 - Interrupt Enable / Divisor Latch High (DLAB=1)
0x3FA - FIFO Control / Interrupt ID
0x3FB - Line Control Register
0x3FC - Modem Control Register
0x3FD - Line Status Register
Save UEFI table pointers
Locate dependent protocols needed by this driver
Parse SMBIOS Type 17 to find NVDIMM presence
Walk SMBIOS entries looking for NVDIMM (Type 17 with NVDIMM flag)
Process SMBIOS entry looking for:
or Type 0x7F with NVDIMM characteristics
Save image handle
gImageHandle = (UINT64)ImageHandle;
Allocate driver global context (592 bytes = 0x250)
gDcpmmDriver = UtilAllocateZeroPool(592);
Initialize global state
Initialize linked lists within the context
Install all DCPMM protocols on the image handle
FW interface protocol
Enumerate all NVDIMM handles present in the system
Install all protocols again on the image handle
Then set up the driver binding protocol Start handler
Status = gBootServices->InstallProtocolInterface(
Open device path protocol on each cached NVDIMM handle
if (gNvdimmHandleCount > 0 && gNvdimmHandles) {
Clear cached handles and re-enumerate
gNvdimmHandleCount = 0;
Locate controller handles that support the NVDIMM FIT protocol
Install DCPMM protocols on each controller handle
Check namespace and SMBUS support
Install all remaining protocols on the controller handle
Walk NVDIMM linked list to see if this controller is known
Also check if controller supports NVDIMM FIT protocol
Status = gBootServices->OpenProtocol(
Close all protocols opened by this driver on the controller
Close SMBUS protocol
Uninstall all protocol interfaces
Build NVDIMM firmware command packet
Structure per ACPI NVDIMM FW spec for passthrough:
Command + Input/Output buffer sizes + payload
Transmit via SMBUS to the NVDIMM device address.
return EFI_SUCCESS;
Dispatch firmware command via the NFIT-defined function table
Status = FwIf->ExecuteCommand(
Walk the NVDIMM device list and collect info:
Queries NVDIMM via firmware command for health info
Acquire SMBUS ownership for the NVDIMM memory controller:
Debug messages format:
Release SMBUS ownership:
Read NVDIMM namespace label data:
Write NVDIMM namespace label data with full validation.
Handles page alignment, BTT/PFN translation, and error recovery.
Uses UtilDebugPrint for status logging.
If handles are already cached, return success
if (gNvdimmHandles && gNvdimmHandleCount > 0) {
Free any previously allocated handle buffer
if (gNvdimmHandles) {
Locate all handles with the NVDIMM Firmware Interface protocol
Status = gBootServices->LocateHandleBuffer(
Allocate handle cache
gNvdimmHandleCount = HandleCount;
Install device path on each handle and cache the handle
for (Index = 0; Index < HandleCount; Index++) {
DCPMM debug output format:
All messages use this prefix format for log identification.
Messages observed:
DCPMM driver acquired SMBUS access
DCPMM driver waiting %d ms for smbus access
DCPMM driver failed to acquire SMBUS access
DCPMM driver releasing SMBUS access
DCPMM driver released SMBUS access. Rc %d
DCPMM driver inconsistent state found! ...
DCPMM driver failed to release SMBUS access! Exiting
DCPMM driver starting to acquire SMBUS access. Window: 0 ms
DCPMM driver starting to acquire SMBUS access. Window: %d - %d ms

Generated by HR650X BIOS Decompilation Project