/* Sending a TPM1.2 command to a TPM2 should return a TPM1.2 header (tag = 0xc4) and error code (TPM_BADTAG = 0x1e) */
STATIC EFI_STATUS TestTpm12()
/* Sending a TPM1.2 command to a TPM2 should return a TPM1.2 header (tag = 0xc4) and error code (TPM_BADTAG = 0x1e) */
STATIC EFI_STATUS TestTpm12()
{
  EFI_STATUS           Status;
  TPM_RQU_COMMAND_HDR  Command;
  TPM_RSP_GET_TICKS    Response;
  UINT32               Length;
  Command.tag       = SwapBytes16 (TPM_TAG_RQU_COMMAND);
  Command.paramSize = SwapBytes32 (sizeof (Command));
  Command.ordinal   = SwapBytes32 (TPM_ORD_GetTicks);
  Length = sizeof (Response);
  Status = Tpm12SubmitCommand (
             sizeof (Command),
             (UINT8 *)&Command,
             &Length,
             (UINT8 *)&Response
             );
  if (EFI_ERROR (Status)) {
    return Status;
  }
  return EFI_SUCCESS;
}