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