33 IN UINT8 SetupTpmDevice
48 if (BootMode == BOOT_ON_S3_RESUME) {
49 DEBUG ((DEBUG_INFO,
"DetectTpmDevice: S3 mode\n"));
55 ZeroMem (&Tcg2DeviceDetection,
sizeof (Tcg2DeviceDetection));
56 Status = VariablePpi->GetVariable (
58 TCG2_DEVICE_DETECTION_NAME,
59 &gTcg2ConfigFormSetGuid,
64 if (!EFI_ERROR (Status) &&
65 (Tcg2DeviceDetection.TpmDeviceDetected >= TPM_DEVICE_MIN) &&
66 (Tcg2DeviceDetection.TpmDeviceDetected <= TPM_DEVICE_MAX))
68 DEBUG ((DEBUG_ERROR,
"TpmDevice from DeviceDetection: %x\n", Tcg2DeviceDetection.TpmDeviceDetected));
69 return Tcg2DeviceDetection.TpmDeviceDetected;
73 DEBUG ((DEBUG_INFO,
"DetectTpmDevice:\n"));
80 if (EFI_ERROR (Status)) {
84 return TPM_DEVICE_NULL;
87 if (BootMode == BOOT_ON_S3_RESUME) {
93 if (EFI_ERROR (Status)) {
94 return TPM_DEVICE_2_0_DTPM;
98 Status =
PcdSet8S (PcdTpmInitializationPolicy, 0);
100 return TPM_DEVICE_1_2;
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
EFI_STATUS EFIAPI PeiServicesGetBootMode(OUT EFI_BOOT_MODE *BootMode)
EFI_STATUS EFIAPI PeiServicesLocatePpi(IN CONST EFI_GUID *Guid, IN UINTN Instance, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, IN OUT VOID **Ppi)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
#define PcdSet8S(TokenName, Value)
#define TPM_ST_STATE
The TPM is starting up from a saved state.
#define TPM_ST_CLEAR
The TPM is starting up from a clean state.
EFI_STATUS EFIAPI Tpm12Startup(IN TPM_STARTUP_TYPE TpmSt)
EFI_STATUS EFIAPI Tpm12RequestUseTpm(VOID)
UINT8 DetectTpmDevice(IN UINT8 SetupTpmDevice)