@Ajax Dong Ajax Dong authored on 6 Jun
117828F1-DA7D-4BC1-8B58-9A954FED5121 Init 1 month ago
217828C1-DA75-5BC1-7B58-91954FED0101 Init 1 month ago
224D6EB4-307F-45BA-9DC3-FE9FC6B38148 Init 1 month ago
4A43824B-4AA0-4F7F-9A4B-0C2102191361 Init 1 month ago
5038E34E-0774-47A0-A5EF-4B94AF1A43DA Init 1 month ago
5038F34E-0774-47A0-A5EF-4B94AF1A43DA Init 1 month ago
794E15D9-BF1B-4568-99AC-DCE207C022E4 Init 1 month ago
AMITSE Init 1 month ago
AcpiPlatform Init 1 month ago
AcpiVTD Init 1 month ago
AhciSmm Init 1 month ago
Aint13 Init 1 month ago
AmiCRBPkg Restructure the repo 1 month ago
AmiChipsetModulePkg/Library/AmiCspLib/ PciTableInit Restructure the repo 1 month ago
AmiCompatibilityPkg Restructure the repo 1 month ago
AmiCryptoPkg Restructure the repo 1 month ago
AmiErrorHandlerMain Init 1 month ago
AmiIntelCpuPkg/Microcode/ MicrocodeUpdate Restructure the repo 1 month ago
AmiIpmiPkg/ Ipmi Restructure the repo 1 month ago
AmiModulePkg Restructure the repo 1 month ago
AmiNetworkPkg Restructure the repo 1 month ago
AmiRedFishApi Init 1 month ago
AmiTcgNvflagSample Init 1 month ago
BmcLanConfig Init 1 month ago
BmcRequestNmi Restructure the repo 1 month ago
BootScriptExecutorDxe Init 1 month ago
Build Restructure the repo 1 month ago
C9352CC3-A354-44E5-8776-B2ED8DD781EC Init 1 month ago
CRBSmm Init 1 month ago
CapsulePei Init 1 month ago
CapsuleRuntimeDxe Init 1 month ago
ConSplitter Init 1 month ago
CpPlatPkg/ Whea Restructure the repo 1 month ago
CpRcPkg Restructure the repo 1 month ago
CpuArchDxe Init 1 month ago
CpuIo2Smm Init 1 month ago
CpuIoPei Init 1 month ago
CryptoPPI Init 1 month ago
CsmDxe Init 1 month ago
CsmVideo Init 1 month ago
DdrtErrorHandler Init 1 month ago
DefaultData Init 1 month ago
DevicePathDxe Init 1 month ago
DxeFrb Init 1 month ago
DxeIpl Init 1 month ago
DxeIpmiLan Init 1 month ago
DxeIpmiUsb Init 1 month ago
DxeSelStatusCode Init 1 month ago
EarlyVideoPei Init 1 month ago
EmcaErrorLog Init 1 month ago
F0E9D620-3E9F-4F6B-8F26-6214FEAB6690 Init 1 month ago
Fat Init 1 month ago
FlashDriverSmm Init 1 month ago
FpgaSocketSetup Init 1 month ago
FpkSetup Restructure the repo 1 month ago
FullShell Init 1 month ago
FwKeyHobPei Init 1 month ago
GetCpuInfo Init 1 month ago
GpioInit Init 1 month ago
GraphicsConsole Init 1 month ago
HeciInit Init 1 month ago
HeciInitDxe Init 1 month ago
HiiInfoEmbedded Init 1 month ago
HttpBootDxe Init 1 month ago
HttpUtilitiesDxe Init 1 month ago
IioCfgUpdateDxeCLX64L Init 1 month ago
IioCfgUpdateDxeLightningRidgeEXECB3 Init 1 month ago
IioCfgUpdateDxeLightningRidgeEXECB4 Init 1 month ago
IioCfgUpdateDxeNeonCityEPECB Init 1 month ago
IioCfgUpdateDxeNeonCityEPRP Init 1 month ago
IntelFrameworkModulePkg/Universal/CpuIoDxe/ CpuIoDxe Restructure the repo 1 month ago
InventoryApp Init 1 month ago
Ip6BmcLanConfig Init 1 month ago
IsPlatformSupportWhea Init 1 month ago
JedecNvDimmSMM Init 1 month ago
LegacyInterrupt Init 1 month ago
LegacySmmSredir Restructure the repo 1 month ago
LenovoServerPkg Restructure the repo 1 month ago
LnvDriverPei Init 1 month ago
LnvDriverSmm Init 1 month ago
LnvPurleyDriverPei Init 1 month ago
LnvPurleyDriverSmm Init 1 month ago
MainErrorHandler Restructure the repo 1 month ago
MdeModulePkg Restructure the repo 1 month ago
MdePkg/ Library Restructure the repo 1 month ago
MeInitPei Init 1 month ago
MePolicyInitDxe Init 1 month ago
MemRas Init 1 month ago
MemorySubClass Init 1 month ago
NvdimmCommon Init 1 month ago
NvramSm/ mm Init 1 month ago
OemErrorLogDxe Init 1 month ago
OemPlatformEarlyPhasePei Init 1 month ago
OemReadyToBootDxe Init 1 month ago
OemSaveSmbiosDxe Init 1 month ago
Ofbd Restructure the repo 1 month ago
OpaPlatCfg Init 1 month ago
OpromUpdateDxeCLX64L Init 1 month ago
OpromUpdateDxeLightningRidgeEXECB1 Init 1 month ago
OpromUpdateDxeLightningRidgeEXECB2 Init 1 month ago
OpromUpdateDxeLightningRidgeEXECB4 Init 1 month ago
OpromUpdateDxeNeonCityEPECB Init 1 month ago
OpromUpdateDxeNeonCityEPRP Init 1 month ago
POSTDataTransfer Init 1 month ago
PartialMirrorHandler Init 1 month ago
PcAtChipsetPkg/PcatRealTimeClockSmm/ PcatRealTimeClockSmm Restructure the repo 1 month ago
PcRtc Init 1 month ago
PchGpioUnlockSmm Init 1 month ago
PchInitDxe Init 1 month ago
PchSerialGpio Init 1 month ago
PchSmbusDxe Init 1 month ago
PciDxeInit Init 1 month ago
PciOutOfResourceSetupPage Init 1 month ago
PciPlatform Init 1 month ago
PcieErrorHandler Init 1 month ago
PerfMonApp Init 1 month ago
PerformanceMeasurementSmm Init 1 month ago
PlatformCpuPolicy Init 1 month ago
PlatformEarlyDxe Restructure the repo 1 month ago
PlatformErrorHandler Restructure the repo 1 month ago
PlatformType Restructure the repo 1 month ago
PpmInitialize Init 1 month ago
PurleyPlatPkg Restructure the repo 1 month ago
PurleyRpPkg Restructure the repo 1 month ago
PurleySktPkg Restructure the repo 1 month ago
RamDiskDxe Init 1 month ago
ReFlashSmm Restructure the repo 1 month ago
RegAccessDxe Init 1 month ago
RegAccessSMM Init 1 month ago
RuntimeDxe Init 1 month ago
RuntimeMemoryHole Restructure the repo 1 month ago
S3NvramSave Init 1 month ago
S3SaveStateDxe Init 1 month ago
SBDXE Init 1 month ago
SaInitPei Init 1 month ago
SataController Init 1 month ago
ScsiBus Init 1 month ago
ScsiDisk Init 1 month ago
SecFlashUpdDXE Init 1 month ago
SecSMIFlash Restructure the repo 1 month ago
SecVariableControl Init 1 month ago
SecureBootDXE Init 1 month ago
SecurityStubDxe Init 1 month ago
SerialMuxControl Init 1 month ago
ServerCommonPkg/Universal/ GetSec Restructure the repo 1 month ago
ServerMgmtSetup Init 1 month ago
Setup Init 1 month ago
SetupConfigUpdateDxeCLX64L Init 1 month ago
SetupConfigUpdateDxeLightningRidgeEXECB1 Init 1 month ago
SetupConfigUpdateDxeLightningRidgeEXECB4 Init 1 month ago
SetupConfigUpdateDxeLightningRidgeEXRP Init 1 month ago
SetupConfigUpdateDxeNeonCityEPECB Init 1 month ago
SetupConfigUpdateDxeNeonCityEPRP Init 1 month ago
SetupConfigUpdateDxeNeonCityFPGA Init 1 month ago
SioDxeInit Init 1 month ago
SlotDataUpdateDxeLightningRidgeEXECB1 Init 1 month ago
SlotDataUpdateDxeLightningRidgeEXECB2 Init 1 month ago
SlotDataUpdateDxeLightningRidgeEXECB3 Init 1 month ago
SlotDataUpdateDxeLightningRidgeEXECB4 Init 1 month ago
SlotDataUpdateDxeLightningRidgeEXRP Init 1 month ago
SlotDataUpdateDxeNeonCityEPECB Init 1 month ago
SlotDataUpdateDxeNeonCityEPRP Init 1 month ago
SlotDataUpdateDxeNeonCityFPGA Init 1 month ago
SmartTimer Init 1 month ago
SmbiosDataUpdateDxeLightningRidgeEXECB2 Init 1 month ago
SmbiosDataUpdateDxeLightningRidgeEXECB3 Init 1 month ago
SmbiosDataUpdateDxeLightningRidgeEXECB4 Init 1 month ago
SmbiosDataUpdateDxeNeonCityEPECB Init 1 month ago
SmbiosDmiEdit Init 1 month ago
SmbiosRpTable Init 1 month ago
SmbiosType39 Init 1 month ago
SmiFlash Restructure the repo 1 month ago
SmiFlashDxe Init 1 month ago
SmmControl Init 1 month ago
SmmHddSecurity Init 1 month ago
SmmLockBox Init 1 month ago
SmmS3SaveState Init 1 month ago
SmmTcgStorageSec Init 1 month ago
SocketSetup Init 1 month ago
SpsAcpiHooks Init 1 month ago
SpsDxe Init 1 month ago
StaticSkuDataDxeCLX64L Init 1 month ago
StaticSkuDataDxeLightningRidgeEXECB1 Init 1 month ago
StaticSkuDataDxeLightningRidgeEXECB3 Init 1 month ago
StaticSkuDataDxeLightningRidgeEXECB4 Init 1 month ago
StaticSkuDataDxeLightningRidgeEXRP Init 1 month ago
StaticSkuDataDxeNeonCityEPECB Init 1 month ago
StaticSkuDataDxeNeonCityEPRP Init 1 month ago
StatusCodeSmm Init 1 month ago
SystemBoardDxe Init 1 month ago
TCMDXE Init 1 month ago
TCMPEI Init 1 month ago
TcgDxe Init 1 month ago
TcgDxeplatform Init 1 month ago
TcgLegacy Init 1 month ago
TcgPeiplatform Init 1 month ago
TcgPlatformSetupPolicy Init 1 month ago
TcgSmm Restructure the repo 1 month ago
TcgStorageSecurity Init 1 month ago
TcoSmi Restructure the repo 1 month ago
TcpDxe Init 1 month ago
TerminalSrc Init 1 month ago
TimestampDxe Init 1 month ago
TlsAuthConfigDxe Init 1 month ago
Tpm20Acpi Init 1 month ago
TpmClearOnRollbackSmm Restructure the repo 1 month ago
TpmNvmeSupport Init 1 month ago
UbaConfigDatabasePei Init 1 month ago
UbaMainPeim Init 1 month ago
Udp4Dxe Init 1 month ago
Udp6Dxe Init 1 month ago
UefiCpuPkg Restructure the repo 1 month ago
UefiPxeBcDxe Init 1 month ago
Uhcd Init 1 month ago
UsbOcUpdateDxeCLX64L Init 1 month ago
UsbOcUpdateDxeLightningRidgeEXECB1 Init 1 month ago
UsbOcUpdateDxeLightningRidgeEXECB3 Init 1 month ago
UsbOcUpdateDxeLightningRidgeEXRP Init 1 month ago
UsbOcUpdateDxeNeonCityEPECB Init 1 month ago
UsbOcUpdateDxeNeonCityEPRP Init 1 month ago
UsbOcUpdateDxeNeonCityFPGA Init 1 month ago
UsbRtSmm Init 1 month ago
VerifyFwBootGuard Restructure the repo 1 month ago
WatchdogTimer Init 1 month ago
WheaErrorInj Restructure the repo 1 month ago
WheaErrorLog Restructure the repo 1 month ago
docs Init 1 month ago
tools Init 1 month ago
uefi_headers Init 1 month ago
README.md Init 1 month ago
SystemInventory_funcs.json Init 1 month ago
SystemInventory_funcs_full.json Init 1 month ago
README.md

Decompiled AMI UEFI BIOS Source

This tree is a cleaned extraction of Lenovo HR650X / Intel Purley AMI UEFI BIOS
modules. It is not a normal vendor source checkout: most directories are
recovered firmware modules with decompiled C, reconstructed headers, IDA
metadata, and analyst-written notes.

Repository Layout

The top level is intentionally flat. Each module directory usually contains:

Artifact Meaning
<Module>.c Decompiled implementation, often with synthetic names such as sub_1234.
<Module>.h Reconstructed types, globals, GUIDs, structures, and prototypes.
<Module>.md Module-specific notes or decompiler output notes.
README.md Human summary of phase, purpose, key functions, dependencies, and platform context.
*.i64, *.idb, *.id0, *.id1, *.id2, *.nam, *.til IDA database artifacts. Keep these with the module that generated them.
*.json, *.csv, *.txt Function inventories, manifests, or analysis sidecars.

Common UEFI phase and role markers in directory names:

  • Pei / PEI: Pre-EFI Initialization modules.
  • Dxe / DXE: Driver Execution Environment modules.
  • Smm / SMM: System Management Mode modules.
  • Ppi: PEI-to-PEI interfaces.
  • Setup, Sku, Slot, Oprom, UsbOc, IioCfg, SmbiosDataUpdate: board,
    SKU, setup-page, option-ROM, or platform-configuration update modules.
  • GUID-named directories: modules where the original symbolic name was missing
    or less useful than the firmware GUID during extraction.

Important anchor modules include:

  • DxeCore/: DXE foundation, protocol database, dispatcher, memory services,
    event services, image loading, and firmware volume access.
  • PeiCore/ and DxeIpl/: early boot core and transition into DXE.
  • PiSmmCore/, PiSmmIpl/, and PiSmmCpuDxeSmm/: SMM infrastructure.
  • Setup/, AMITSE/, ServerMgmtSetup/, and related SetupConfigUpdate*
    modules: setup UI and setup-variable handling.
  • Platform*, Lnv*, SystemBoard*, Oem*, and Sps*: platform and vendor
    integration layers.
  • Tcg*, Tpm*, SecureBootDXE/, and BootGuardPei/: measured boot,
    TPM, secure boot, and Boot Guard related code.
  • Ip*, TcpDxe/, Udp*, Dhcp*, Http*, Tls*, MnpDxe/, SnpDxe/:
    UEFI network stack modules.

Safe Cleanup Workflow

Treat module source as reverse-engineering evidence. Prefer small, reversible
readability improvements and keep provenance visible.

  1. Read the module README.md, <Module>.md, and any sidecar inventories
    before editing code.
  2. Preserve decompiler evidence: do not delete original synthetic symbols,
    magic constants, GUIDs, comments, IDA databases, or extraction manifests
    unless there is a separately recorded replacement.
  3. Rename symbols only when the behavior is supported by local call sites,
    GUID/protocol references, strings, or known EDK II/AMI conventions.
  4. Keep phase boundaries clear. PEI, DXE, SMM, runtime, setup, and option-ROM
    modules often share names but have different execution contexts.
  5. Favor comments that explain firmware intent, protocol contracts, structure
    layouts, and side effects. Avoid comments that merely restate a line of C.
  6. For formatting, review diffs carefully. Decompiled C can contain unusual
    control flow, casts, volatile MMIO, and ABI-sensitive structures.
  7. Do not run broad automated rewrites across the tree. Work module-by-module
    and keep each diff auditable.

Readability Checklist

  • Module README has phase, purpose, platform, key functions, protocols, and
    externally visible variables or GUIDs.
  • Function names distinguish entry points, dispatch callbacks, protocol
    methods, helper routines, and error paths.
  • Header types are grouped by GUID/protocol, HOB, variable, MMIO/register, and
    local state structures.
  • Recovered constants are named after nearby strings, register fields, setup
    variables, or protocol fields when the evidence is clear.
  • Notes call out uncertainty explicitly, especially when behavior is inferred
    from partial decompilation.

Helper Tooling

Run the read-only tree audit from the repository root:

python3 tools/bios_tree_audit.py

The audit prints module counts, artifact counts, phase-name buckets, and modules
that are missing common sidecar files. It does not modify the tree.

Recover original source-layout hints from debug/assert/PDB/source paths:

python3 tools/recover_original_layout.py \
  --json-out docs/original_layout_evidence.json \
  --markdown-out docs/original_layout_recovery.md

The recovery report groups flat extracted modules by the best package paths
visible in DEBUG_VS2015, AutoGen.c, PDB, and source-file evidence. Use it
to guide module-by-module cleanup before attempting any physical tree moves.