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