TrEEPei
Index: 0387 | Size: 38.2 KB | Phase: PEI | Arch: IA32
Overview
PEI-phase TPM 2.0 driver (TrEE -- TCG Resource Extended Environment) that handles TPM discovery, initialization, and basic trusted boot operations before memory is fully available. Detects the TPM interface type (TIS at 0xFED40000 or CRB at 0xFED40000), performs TPM2 startup and self-test, provides hashing (SHA-1, SHA-256, SHA-384, SHA-512) and PCR extend capabilities, and creates the TCG event log HOB for the DXE phase. Implements the TrEE PEI PPI (PEIM-to-PEIM Interface) for TPM command transmission.
Key Functions
- TrEEPeiEntry / TrEEPeiInstallPpi: PEI module entry and PPI installation
- SelectAndLockInterface: Detects and selects TPM interface (TIS FIFO or CRB memory-mapped)
- TrEECRBTransmit / TrEETisTransmit: TPM command transmission over CRB or TIS transport layers
- TrEEHashSequenceExtend: Hash sequence operations (start, update, complete) with PCR extend
- Tpm2Startup / Tpm2SelfTest / Tpm2HierarchyControl: TPM2 initialization commands
- Sha1Init/Update/Final, Sha256Hash, Sha384/512 hashing functions
- TrEECreateTcgHob: Creates the TCG event log HOB for consumption by Tcg2Dxe
Protocols/Dependencies
- TrEE PEI PPI (TREE_PEI_PPI) for interface info, transmit, and hash-sequence-extend
- PEI Services (LocatePpi, InstallPpi), HOB creation services
- TPM CRB/TIS hardware registers at 0xFED40000
- Source: AmiModulePkg/TCG2/Common/TcgPei/TrEEPei.c + Tpm20CRBLib.c
IA32 PEI module from AmiModulePkg/TCG2, built for Lenovo HR650X. Supports TIS and CRB TPM interfaces.