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