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