From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web11.5995.1581599560694474269 for ; Thu, 13 Feb 2020 05:12:40 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GYnJIpMz; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: marcandre.lureau@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581599559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KlV4KFwIVJ9yRPAm34il498auDPAJWmDwqV0rIuedsc=; b=GYnJIpMzNxKkFmZ2jB19RE1qWHbxrwu9UkihKv/HtTnnvYrVB+53nycst+VKodaFSnzU8m OifAerap7vtl1cQoJF6lzYMhnlM5s/MeCG+AkiRsWN+182RlMBSIK3OcLdC96v0OIZDkEi syU9BQWBkughG8GlX2AeelQISYTCmZ8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-321-4qrIR0XjNGOgfTw-PbyLcg-1; Thu, 13 Feb 2020 08:12:37 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4C22513FA; Thu, 13 Feb 2020 13:12:36 +0000 (UTC) Received: from localhost (ovpn-112-66.ams2.redhat.com [10.36.112.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 319051001B07; Thu, 13 Feb 2020 13:12:32 +0000 (UTC) From: marcandre.lureau@redhat.com To: edk2-devel@lists.01.org, devel@edk2.groups.io Cc: stefanb@linux.ibm.com, lersek@redhat.com, simon.hardy@itdev.co.uk, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v2 2/3] SecurityPkg: export Tpm12GetPtpInterfaceType() Date: Thu, 13 Feb 2020 14:12:21 +0100 Message-Id: <20200213131222.157700-3-marcandre.lureau@redhat.com> In-Reply-To: <20200213131222.157700-1-marcandre.lureau@redhat.com> References: <20200213131222.157700-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: 4qrIR0XjNGOgfTw-PbyLcg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau --- SecurityPkg/Include/Library/Tpm12DeviceLib.h | 13 +++++++++++++ .../Library/Tpm12DeviceLibDTpm/Tpm12Tis.c | 17 ++++++++++------- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/SecurityPkg/Include/Library/Tpm12DeviceLib.h b/SecurityPkg/Inc= lude/Library/Tpm12DeviceLib.h index eac7885ca3d8..bcdfbdac76b5 100644 --- a/SecurityPkg/Include/Library/Tpm12DeviceLib.h +++ b/SecurityPkg/Include/Library/Tpm12DeviceLib.h @@ -11,6 +11,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20=0D #include =0D =20=0D +typedef enum {=0D + PtpInterfaceTis,=0D + PtpInterfaceFifo,=0D + PtpInterfaceCrb,=0D + PtpInterfaceMax,=0D +} PTP_INTERFACE_TYPE;=0D +=0D /**=0D This service enables the sending of commands to the TPM12.=0D =20=0D @@ -45,4 +52,10 @@ Tpm12RequestUseTpm ( VOID=0D );=0D =20=0D +EFIAPI=0D +PTP_INTERFACE_TYPE=0D +Tpm12GetPtpInterfaceType (=0D + VOID=0D + );=0D +=0D #endif=0D diff --git a/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c b/SecurityPk= g/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c index 1caa076203ba..381915130b7f 100644 --- a/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c +++ b/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c @@ -15,18 +15,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include =0D #include =0D #include =0D +#include =0D #include =0D =20=0D #include =0D #include =0D =20=0D -typedef enum {=0D - PtpInterfaceTis,=0D - PtpInterfaceFifo,=0D - PtpInterfaceCrb,=0D - PtpInterfaceMax,=0D -} PTP_INTERFACE_TYPE;=0D -=0D //=0D // Max TPM command/reponse length=0D //=0D @@ -542,3 +536,12 @@ Tpm12RequestUseTpm ( return EFI_NOT_FOUND;=0D }=0D }=0D +=0D +EFIAPI=0D +PTP_INTERFACE_TYPE=0D +Tpm12GetPtpInterfaceType (=0D + VOID=0D + )=0D +{=0D + return Tpm12GetPtpInterface ((VOID *) (UINTN) PcdGet64 (PcdTpmBaseAddres= s));=0D +}=0D --=20 2.25.0.rc2.1.g09a9a1a997