AMI-Aptio-BIOS-Reversed / TrEEPei /
@Ajax Dong Ajax Dong authored 7 days ago
..
README.md Init 7 days ago
TrEEPei.c Init 7 days ago
TrEEPei.h Init 7 days ago
TrEEPei.md Init 7 days ago
addr_batch_0.json Init 7 days ago
addr_batch_1.json Init 7 days ago
addr_batch_2.json Init 7 days ago
addr_batch_3.json Init 7 days ago
all_decompiled.json Init 7 days ago
all_funcs.json Init 7 days ago
export_batch_0.json Init 7 days ago
export_batch_0b.json Init 7 days ago
export_batch_1.json Init 7 days ago
export_batch_2.json Init 7 days ago
export_batch_3.json Init 7 days ago
func_list.json Init 7 days ago
func_list_final.json Init 7 days ago
key_funcs.json Init 7 days ago
named_funcs.json Init 7 days ago
survey.txt Init 7 days ago
unnamed_funcs.json Init 7 days ago
README.md

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

Platform

IA32 PEI module from AmiModulePkg/TCG2, built for Lenovo HR650X. Supports TIS and CRB TPM interfaces.