Files
system76-edk2/OvmfPkg/Tcg/Tcg2Config/Tpm12Support.h
Laszlo Ersek fc72a6ceaa OvmfPkg/Tcg2ConfigPei: factor out InternalTpm12Detect()
Move the calls to the Tpm12RequestUseTpm() and Tpm12SubmitCommand()
Tpm12DeviceLib functions to a separate C file, so that we can override
these actions in a subsequent patch.

This code movement requires moving the TPM_RSP_GET_TICKS / TestTpm12()
helper structure / function too.

While at it, give the TestTpm12() function @retval / @return
documentation, plus wrap an overlong line in it.

Functionally, this patch is a no-op.

Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Eric Auger <eric.auger@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Simon Hardy <simon.hardy@itdev.co.uk>
Cc: Stefan Berger <stefanb@linux.ibm.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2728
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20200520225841.17793-3-lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-05-21 12:23:37 +00:00

31 lines
797 B
C

/** @file
Declare the InternalTpm12Detect() function, hiding the TPM-1.2 detection
internals.
Copyright (C) 2020, Red Hat, Inc.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef TPM12_SUPPORT_H_
#define TPM12_SUPPORT_H_
#include <Uefi/UefiBaseType.h>
/**
Detect the presence of a TPM with interface version 1.2.
@retval EFI_SUCCESS TPM-1.2 available. The Tpm12RequestUseTpm() and
Tpm12SubmitCommand(TPM_ORD_GetTicks) operations
(from the Tpm12DeviceLib class) have succeeded.
@return Error codes propagated from Tpm12RequestUseTpm() and
Tpm12SubmitCommand().
**/
EFI_STATUS
InternalTpm12Detect (
VOID
);
#endif // TPM12_SUPPORT_H_