AMI-Aptio-BIOS-Reversed / TxtPei /
@Ajax Dong Ajax Dong authored 7 days ago
..
ApicGetBase.c Init 7 days ago
ApicGetBaseAddr.c Init 7 days ago
ApicWriteIcr.c Init 7 days ago
BiosAcmInvoke.c Init 7 days ago
BitFieldRead32.c Init 7 days ago
CacheEnable.c Init 7 days ago
CachePagingSetup.c Init 7 days ago
CacheRegionSetup.c Init 7 days ago
CheckFeature.c Init 7 days ago
CopyMem.c Init 7 days ago
CpuGetApicId.c Init 7 days ago
CpuGetVersion.c Init 7 days ago
CpuIdViaPeiService.c Init 7 days ago
CpuRegRead.c Init 7 days ago
DebugGetErrorLevel.c Init 7 days ago
DebugPrint.c Init 7 days ago
DebugPrintProtocol.c Init 7 days ago
DwrCheck.c Init 7 days ago
EndOfHobCheck.c Init 7 days ago
GetNextGuidHob.c Init 7 days ago
HobEndCheck.c Init 7 days ago
HobGetSize.c Init 7 days ago
HobGetType.c Init 7 days ago
HobStart.c Init 7 days ago
IoDelay.c Init 7 days ago
IoRead16.c Init 7 days ago
IoRead32.c Init 7 days ago
IoRead8.c Init 7 days ago
IoWrite16.c Init 7 days ago
IoWrite32.c Init 7 days ago
IoWrite8.c Init 7 days ago
LtPeiEnableMtrr.c Init 7 days ago
LtPeiGetTxtVersion.c Init 7 days ago
LtPeiLibInitialize.c Init 7 days ago
LtPeiLibLaunchBiosAcm.c Init 7 days ago
LtPeiLockConfig.c Init 7 days ago
LtPeiLockMsr.c Init 7 days ago
LtPeiWriteMsr.c Init 7 days ago
MmioRead16.c Init 7 days ago
MmioWrite16.c Init 7 days ago
PchIoWrite.c Init 7 days ago
PciCfgRead.c Init 7 days ago
PeiGetServiceFromIdt.c Init 7 days ago
PeiPcdGet.c Init 7 days ago
PeiServicesAssert.c Init 7 days ago
PeiServicesGet.c Init 7 days ago
PsfGrantCountConfig.c Init 7 days ago
PsfRegisterRead.c Init 7 days ago
PsfRegisterWrite.c Init 7 days ago
PsfTgtConfig.c Init 7 days ago
README.md Init 7 days ago
ReadMsr64.c Init 7 days ago
ReportProgressCode.c Init 7 days ago
ReportStatusCode.c Init 7 days ago
SetFeatureBit.c Init 7 days ago
TxtDebugPrintPolicy.c Init 7 days ago
TxtPei.c Init 7 days ago
TxtPei.h Init 7 days ago
TxtPei.md Init 7 days ago
TxtPeiInit.c Init 7 days ago
_ModuleEntryPoint.c Init 7 days ago
memset.c Init 7 days ago
memset32.c Init 7 days ago
setMem32.c Init 7 days ago
README.md

TxtPei

Field Value
Index 384
Module TxtPei
Size 11904 bytes (0x2E80)
Phase PEI
Format PE32
Machine x86 (0x014C)
Sections .text, .rdata, .data, .reloc
Entry Point 0x3A0
Functions 60

Overview

TxtPei implements Intel Trusted Execution Technology (TXT, formerly LaGrande Technology) initialization during the PEI phase. It configures cache-as-RAM (CAR), locks MSRs, launches the BIOS ACM (Authenticated Code Module), sets up MTRRs, manages page tables for SINIT, and coordinates the measured launch environment (MLE).

This module is critical for establishing a hardware root of trust at boot. It interacts with the TXT hardware registers, SINIT AC modules, and chipset PSF (Private Configuration Space) to prepare the platform for a measured launch before the DXE phase begins.

Key Functions

  • TxtPeiInit -- Main TXT initialization routine.
  • LtPeiLibLaunchBiosAcm -- Launches the BIOS ACM for SINIT verification.
  • LtPeiLibInitialize -- Initializes the TXT library and device memory.
  • CacheRegionSetup / CachePagingSetup -- Configures MTRRs and page tables for pre-memory execution.
  • BiosAcmInvoke -- Invokes the BIOS Authenticated Code Module.
  • LtPeiLockMsr / LtPeiLockConfig -- Locks sensitive MSRs and configuration registers.
  • LtPeiGetTxtVersion -- Reads the TXT hardware version capabilities.
  • DwrCheck -- Verifies DWR (Debug Warranty Register) status.

Dependencies

  • TXT hardware registers (TXTCR, TXTDPR)
  • SINIT AC module
  • PEI services (PPI lookup, HOB creation)
  • MSR and PCI/PSF configuration access
  • MTRR programming

Platform

Intel Purley platform with TXT support, 32-bit PEI phase, requires compatible SINIT ACM.