TcgLegacy
Index: 0071 | Size: 8128 bytes | Arch: x64 | Phase: DXE
Overview
This DXE driver implements TCG Legacy BIOS support for TPM 1.2 on UEFI systems. It bridges the EFI TCG protocol with legacy BIOS INT hooks, providing TPM functionality to legacy option ROMs and non-UEFI boot paths. The driver locates the Legacy BIOS Protocol, loads firmware volume files (LEGX16 16-bit thunk layer, TPM32 legacy driver, and optional MPTPM), installs callbacks, and registers a LegacyBoot event to unlink the TPM driver when the OS boots.
Key Functions
- ModuleEntryPoint -- Saves UEFI boot service globals and calls InitTCGLegacyInterface()
- InitTCGLegacyInterface -- Locates Legacy BIOS Protocol and TCG2 Protocol, loads LEGX16/TPM32/MPTPM firmware volumes, allocates TPM code space, installs callbacks, and patches the BFI marker
- LocateFirmwareVolumeFile -- Finds and loads a firmware volume file by GUID from the firmware volumes
- LinkTPM32Driver -- Copies the TPM32 legacy driver to a page-aligned region and sets up the thunk interface
- LegacyBootEventNotify -- Unlinks the TPM driver on OS boot via CreateEventEx
Protocols / Dependencies
- Legacy BIOS Protocol (EFI_LEGACY_BIOS_PROTOCOL)
- TCG Protocol (EFI_TCG_PROTOCOL / TCG2 Protocol)
- Firmware Volume Protocol (for loading LEGX16, TPM32, MPTPM files)
HR650X (AMI BIOS, AmiModulePkg/TCG2/Common/TcgLegacy)