Newer
Older
AMI-Aptio-BIOS-Reversed / AmiModulePkg / AmiStatusCode / StatusCodeSmm / README.md
@Ajax Dong Ajax Dong 2 days ago 1 KB Full restructure

StatusCodeSmm

Index Module Size Phase
0255 StatusCodeSmm 21,728 bytes DXE (SMM Driver)

StatusCodeSmm provides status code reporting infrastructure within System Management Mode (SMM). It intercepts SMI events triggered by status code writes and routes them to configurable output channels (serial output, Port 80 POST codes) and registered callback handlers. The module includes an error code lookup table for CPU/memory thermal and ECC events, reentrancy-guarded dispatch, and a 2KB serial output buffer.

Key Functions

  • ModuleEntryPoint -- SMM driver entry point; initializes SMM status code infrastructure
  • SmmStatusCodeDriverInit -- Allocates SMRAM buffers and registers SMI handlers
  • SmmStatusCodeRegisterProtocols -- Publishes SMM status code protocols
  • SmmStatusCodeRegisterCallback -- Registers callback handlers for status code events (up to 10)
  • SmmStatusCodeUnregisterCallback -- Removes a registered callback
  • SmmStatusCodeDispatchCallbacks -- Dispatches status code events to all registered callbacks
  • SmmStatusCodeHandler -- Main SMI handler for status code interrupts
  • SmmStatusCodeAssertHandler -- Handles ASSERT() conditions in SMM context

Dependencies

  • UEFI Boot Services (gBS)
  • UEFI Runtime Services (gRT)
  • SMM System Table 2 (gSmst)
  • SMM Base2 Protocol
  • SMM Status Code Protocol
  • SMRAM descriptor table
  • PCI Express MMIO base address

Platform

  • Format: PE32+
  • Machine: x86-64
  • Subsystem: EFI Boot Service Driver (0x0B)
  • Sections: .text, .rdata, .data, section_3, .xdata, .reloc
  • Source: AmiModulePkg\AmiStatusCode\StatusCodeSmm.c
  • Image Size: 0x54E0 (21.7 KB)