Newer
Older
AMI-Aptio-BIOS-Reversed / MdeModulePkg / Library / SmmLockBoxLib / SmmLockBoxPeiLib.c / SmbiosPeim / README.md
@Ajax Dong Ajax Dong 2 days ago 2 KB Restructure the repo

SmbiosPeim

Field Value
Index 385
Module SmbiosPeim
Size 6048 bytes (0x17A0)
Phase PEI
Format PE32
Machine x86 (0x014C)
Sections .text, .rdata, .data, .reloc
Entry Point 0x320

Overview

SmbiosPeim is a PEI module responsible for installing SMBIOS (System Management BIOS) tables and managing platform configuration data during the PEI phase. It restores SMBIOS data from an SMM communication lockbox, configures PAM (Programmable Attribute Map) registers for legacy memory region access, and initializes the PCIe segment bus table using board-specific data.

This module bridges firmware-level platform configuration data forward to the DXE phase, ensuring SMBIOS information and PCI segment routing are available before the boot device selection.

Key Functions

  • ModuleEntryPoint -- Main entry; reads PCDs, checks boot mode, configures PAM registers, restores lockbox context.
  • ConfigurePamRegisters -- Programs PCI PAM registers for shadowed BIOS regions.
  • RestoreLockBox -- Retrieves SMBIOS data from SMM lockbox.
  • GetSmmLockBoxContext -- Locates SMM communication PPI for cross-phase data transfer.
  • AmiUpdatePcieSegmentBusTable -- Updates the PCIe segment-to-bus mapping table.
  • InitPcieSegBusTable -- Initializes PCIe segment routing tables.
  • GetBootMode -- Reads the current boot mode for path selection.

Dependencies

  • SMM Communication PPI
  • SMBIOS lockbox (SMRAM-backed)
  • PCD database (PcdGetPtr, PcdGetSize, PcdSet64)
  • PEI services (PPI location, HOB traversal)
  • PCI MMIO configuration access

Platform

Intel Purley platform, 32-bit PEI phase.