49 Command.Hdr.tag =
SwapBytes16 (TPM_TAG_RQU_COMMAND);
50 Command.Hdr.paramSize =
SwapBytes32 (
sizeof (Command));
51 Command.Hdr.ordinal =
SwapBytes32 (TSC_ORD_PhysicalPresence);
52 Command.PhysicalPresence =
SwapBytes16 (PhysicalPresence);
53 Length =
sizeof (Response);
55 Status =
Tpm12SubmitCommand (
sizeof (Command), (UINT8 *)&Command, &Length, (UINT8 *)&Response);
56 if (EFI_ERROR (Status)) {
60 if (
SwapBytes32 (Response.returnCode) != TPM_SUCCESS) {
61 DEBUG ((DEBUG_ERROR,
"Tpm12PhysicalPresence: Response Code error! 0x%08x\r\n",
SwapBytes32 (Response.returnCode)));
62 return EFI_DEVICE_ERROR;
UINT16 EFIAPI SwapBytes16(IN UINT16 Value)
UINT32 EFIAPI SwapBytes32(IN UINT32 Value)
#define DEBUG(Expression)
UINT16 TPM_PHYSICAL_PRESENCE
EFI_STATUS EFIAPI Tpm12SubmitCommand(IN UINT32 InputParameterBlockSize, IN UINT8 *InputParameterBlock, IN OUT UINT32 *OutputParameterBlockSize, IN UINT8 *OutputParameterBlock)
EFI_STATUS EFIAPI Tpm12PhysicalPresence(IN TPM_PHYSICAL_PRESENCE PhysicalPresence)