* [PATCH] SecurityPkg: Tcg2ConfigDxe: Display TPM2 HID in Tcg2Config
@ 2016-12-29 8:35 Zhang, Chao B
0 siblings, 0 replies; 4+ messages in thread
From: Zhang, Chao B @ 2016-12-29 8:35 UTC (permalink / raw)
To: edk2-devel; +Cc: jiewen.yao, star.zeng, Chao Zhang
Display TPM2 HID from TPM2 ACPI device object in Tcg2Config UI
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
---
SecurityPkg/SecurityPkg.dec | 6 +++++-
SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr | 7 ++++++
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf | 1 +
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c | 27 +++++++++++++++++++++++-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni | 4 ++++
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 7 +++++-
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf | 1 +
7 files changed, 50 insertions(+), 3 deletions(-)
diff --git a/SecurityPkg/SecurityPkg.dec b/SecurityPkg/SecurityPkg.dec
index 9840311..f2efac3 100644
--- a/SecurityPkg/SecurityPkg.dec
+++ b/SecurityPkg/SecurityPkg.dec
@@ -455,6 +455,10 @@
# So this PCD is final value of how many hash algo is extended to PCR.
# @Prompt Hash Algorithm bitmap.
gEfiSecurityPkgTokenSpaceGuid.PcdTcg2HashAlgorithmBitmap|0xFFFFFFFF|UINT32|0x00010016
-
+
+ ## This PCD provides TPM2 ACPI device object HID info
+ # @Prompt HID info of TPM2 ACPI device object
+ gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiHid|{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}|VOID*|0x0001001C
+
[UserExtensions.TianoCore."ExtraFiles"]
SecurityPkgExtra.uni
diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr b/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
index a805d53..5155acf 100644
--- a/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
+++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
@@ -59,6 +59,13 @@ formset
suppressif ideqvallist TCG2_CONFIGURATION.TpmDevice == TPM_DEVICE_NULL TPM_DEVICE_1_2;
+ subtitle text = STRING_TOKEN(STR_NULL);
+
+ text
+ help = STRING_TOKEN(STR_TPM2_ACPI_HID_HELP),
+ text = STRING_TOKEN(STR_TPM2_ACPI_HID_PROMPT),
+ text = STRING_TOKEN(STR_TPM2_ACPI_HID_CONTENT);
+
oneof varid = TCG2_CONFIGURATION_NV_INFO.TpmAcpiTableRev,
questionid = KEY_TPM_ACPI_REVISION,
prompt = STRING_TOKEN(STR_TCG2_ACPI_REVISION_PROMPT),
diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf
index 02cb1a4..ea7b117 100644
--- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf
+++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf
@@ -78,6 +78,7 @@
gEfiSecurityPkgTokenSpaceGuid.PcdTcg2HashAlgorithmBitmap ## CONSUMES
gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress ## CONSUMES
gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableRev ## CONSUMES
+ gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiHid ## CONSUMES
[Depex]
gEfiTcg2ProtocolGuid AND
diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
index afba42c..000eb01 100644
--- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
+++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
@@ -461,12 +461,37 @@ Tcg2Callback (
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
)
{
- EFI_INPUT_KEY Key;
+ EFI_INPUT_KEY Key;
+ CHAR8 *Hid;
+ CHAR16 UnHid[16];
+ TCG2_CONFIG_PRIVATE_DATA *Private;
if ((This == NULL) || (Value == NULL) || (ActionRequest == NULL)) {
return EFI_INVALID_PARAMETER;
}
+ Private = TCG2_CONFIG_PRIVATE_DATA_FROM_THIS (This);
+
+ if (Action == EFI_BROWSER_ACTION_FORM_OPEN) {
+ //
+ // Update TPM2 HID info
+ //
+ if (QuestionId == KEY_TPM_DEVICE) {
+ Hid = (CHAR8 *)PcdGetPtr(PcdTpm2AcpiHid);
+
+ if (AsciiStrLen(Hid) != 7 && AsciiStrLen(Hid) != 8) {
+ //
+ // HID must be PNP ("AAA####") or ACPI ID ("NNNN####")
+ //
+ HiiSetString (Private->HiiHandle, STRING_TOKEN (STR_TPM2_ACPI_HID_CONTENT), L"Unkown", NULL);
+ } else {
+ AsciiStrToUnicodeStr(Hid, UnHid);
+ HiiSetString (Private->HiiHandle, STRING_TOKEN (STR_TPM2_ACPI_HID_CONTENT), UnHid, NULL);
+ }
+ }
+ return EFI_SUCCESS;
+ }
+
if (Action == EFI_BROWSER_ACTION_CHANGING) {
if (QuestionId == KEY_TPM_DEVICE_INTERFACE) {
EFI_STATUS Status;
diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni
index 7c63f99..57c9dbe 100644
--- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni
+++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni
@@ -29,6 +29,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#string STR_TCG2_ACPI_REVISION_HELP #language en-US "Rev 3 or Rev 4 (Rev 4 is defined in TCG ACPI Spec 00.37)"
#string STR_TCG2_ACPI_REVISION_CONTENT #language en-US ""
+#string STR_TPM2_ACPI_HID_PROMPT #language en-US "HID from TPM2 ACPI Table"
+#string STR_TPM2_ACPI_HID_HELP #language en-US "HID from TPM2 ACPI Table: ManfacturerID + FirmwareVersion_1"
+#string STR_TPM2_ACPI_HID_CONTENT #language en-US ""
+
#string STR_TCG2_DEVICE_INTERFACE_STATE_PROMPT #language en-US "Current TPM Device Interface"
#string STR_TCG2_DEVICE_INTERFACE_STATE_HELP #language en-US "Current TPM Device Interface: TIS, PTP FIFO, PTP CRB"
#string STR_TCG2_DEVICE_INTERFACE_STATE_CONTENT #language en-US ""
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
index 8b03d98..5a31a87 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
@@ -323,6 +323,7 @@ UpdateHID (
UINT32 FirmwareVersion1;
UINT32 FirmwareVersion2;
BOOLEAN PnpHID;
+ UINTN Size;
PnpHID = TRUE;
@@ -390,13 +391,17 @@ UpdateHID (
if (AsciiStrCmp((CHAR8 *)DataPtr, TPM_HID_TAG) == 0) {
if (PnpHID) {
CopyMem(DataPtr, HID, TPM_HID_PNP_SIZE);
+ Size = TPM_HID_PNP_SIZE;
} else {
//
// NOOP will be patched to '\0'
//
CopyMem(DataPtr, HID, TPM_HID_ACPI_SIZE);
+ Size = TPM_HID_ACPI_SIZE;
}
- DEBUG((EFI_D_INFO, "TPM2 ACPI _HID updated to %a\n", HID));
+ PcdSetPtrS(PcdTpm2AcpiHid, &Size, DataPtr);
+ DEBUG((DEBUG_INFO, "TPM2 ACPI _HID is patched to %a\n", DataPtr));
+
return Status;
}
}
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
index b3c5d92..4abb941 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
@@ -74,6 +74,7 @@
gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress ## CONSUMES
gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer ## CONSUMES
gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableRev ## CONSUMES
+ gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiHid ## PRODUCES
[Depex]
gEfiAcpiTableProtocolGuid AND
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] SecurityPkg: Tcg2ConfigDxe: Display TPM2 HID in Tcg2Config
@ 2017-01-04 7:19 Zhang, Chao B
2017-01-04 7:50 ` Long, Qin
2017-01-05 1:04 ` Yao, Jiewen
0 siblings, 2 replies; 4+ messages in thread
From: Zhang, Chao B @ 2017-01-04 7:19 UTC (permalink / raw)
To: edk2-devel; +Cc: qin.long, jiewen.yao, Chao Zhang
Display TPM2 HID from TPM2 ACPI device object in Tcg2Config UI
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
---
SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr | 9 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c | 107 ++++++++++++++++++++++-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h | 4 +-
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni | 6 +-
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 3 +-
5 files changed, 123 insertions(+), 6 deletions(-)
diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr b/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
index a805d53..ed833c6 100644
--- a/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
+++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
@@ -1,7 +1,7 @@
/** @file
VFR file used by the TCG2 configuration component.
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -59,6 +59,13 @@ formset
suppressif ideqvallist TCG2_CONFIGURATION.TpmDevice == TPM_DEVICE_NULL TPM_DEVICE_1_2;
+ subtitle text = STRING_TOKEN(STR_NULL);
+
+ text
+ help = STRING_TOKEN(STR_TPM2_ACPI_HID_HELP),
+ text = STRING_TOKEN(STR_TPM2_ACPI_HID_PROMPT),
+ text = STRING_TOKEN(STR_TPM2_ACPI_HID_CONTENT);
+
oneof varid = TCG2_CONFIGURATION_NV_INFO.TpmAcpiTableRev,
questionid = KEY_TPM_ACPI_REVISION,
prompt = STRING_TOKEN(STR_TCG2_ACPI_REVISION_PROMPT),
diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
index afba42c..013caf8 100644
--- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
+++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
@@ -2,7 +2,7 @@
HII Config Access protocol implementation of TCG2 configuration module.
NOTE: This module is only for reference only, each platform should have its own setup page.
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -429,6 +429,83 @@ Tcg2RouteConfig (
}
/**
+ Get HID string of TPM2 ACPI device object
+
+ @param[in] HID Points to HID String Buffer.
+ @param[in] Size HID String size in bytes. Must >= TPM_HID_ACPI_SIZE
+
+ @return HID String get status.
+
+**/
+EFI_STATUS
+GetTpm2HID(
+ CHAR8 *HID,
+ UINTN Size
+ )
+{
+ EFI_STATUS Status;
+ UINT32 ManufacturerID;
+ UINT32 FirmwareVersion1;
+ UINT32 FirmwareVersion2;
+ BOOLEAN PnpHID;
+
+ PnpHID = TRUE;
+
+ ZeroMem(HID, Size);
+
+ //
+ // Get Manufacturer ID
+ //
+ Status = Tpm2GetCapabilityManufactureID(&ManufacturerID);
+ if (!EFI_ERROR(Status)) {
+ DEBUG((DEBUG_INFO, "TPM_PT_MANUFACTURER 0x%08x\n", ManufacturerID));
+ //
+ // ManfacturerID defined in TCG Vendor ID Registry
+ // may tailed with 0x00 or 0x20
+ //
+ if ((ManufacturerID >> 24) == 0x00 || ((ManufacturerID >> 24) == 0x20)) {
+ //
+ // HID containing PNP ID "NNN####"
+ // NNN is uppercase letter for Vendor ID specified by manufacturer
+ //
+ CopyMem(HID, &ManufacturerID, 3);
+ } else {
+ //
+ // HID containing ACP ID "NNNN####"
+ // NNNN is uppercase letter for Vendor ID specified by manufacturer
+ //
+ CopyMem(HID, &ManufacturerID, 4);
+ PnpHID = FALSE;
+ }
+ } else {
+ DEBUG ((DEBUG_ERROR, "Get TPM_PT_MANUFACTURER failed %x!\n", Status));
+ ASSERT(FALSE);
+ return Status;
+ }
+
+ Status = Tpm2GetCapabilityFirmwareVersion(&FirmwareVersion1, &FirmwareVersion2);
+ if (!EFI_ERROR(Status)) {
+ DEBUG((DEBUG_INFO, "TPM_PT_FIRMWARE_VERSION_1 0x%x\n", FirmwareVersion1));
+ DEBUG((DEBUG_INFO, "TPM_PT_FIRMWARE_VERSION_2 0x%x\n", FirmwareVersion2));
+ //
+ // #### is Firmware Version 1
+ //
+ if (PnpHID) {
+ AsciiSPrint(HID + 3, TPM_HID_PNP_SIZE - 3, "%02d%02d", ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF));
+ } else {
+ AsciiSPrint(HID + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d", ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF));
+ }
+
+ } else {
+ DEBUG ((DEBUG_ERROR, "Get TPM_PT_FIRMWARE_VERSION_X failed %x!\n", Status));
+ ASSERT(FALSE);
+ return Status;
+ }
+
+ return EFI_SUCCESS;
+}
+
+/**
This function processes the results of changes in configuration.
@param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
@@ -461,12 +538,38 @@ Tcg2Callback (
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
)
{
- EFI_INPUT_KEY Key;
+ EFI_STATUS Status;
+ EFI_INPUT_KEY Key;
+ CHAR8 HidStr[16];
+ CHAR16 UnHidStr[16];
+ TCG2_CONFIG_PRIVATE_DATA *Private;
if ((This == NULL) || (Value == NULL) || (ActionRequest == NULL)) {
return EFI_INVALID_PARAMETER;
}
+ Private = TCG2_CONFIG_PRIVATE_DATA_FROM_THIS (This);
+
+ if (Action == EFI_BROWSER_ACTION_FORM_OPEN) {
+ //
+ // Update TPM2 HID info
+ //
+ if (QuestionId == KEY_TPM_DEVICE) {
+ Status = GetTpm2HID(HidStr, 16);
+
+ if (EFI_ERROR(Status)) {
+ //
+ // Fail to get TPM2 HID
+ //
+ HiiSetString (Private->HiiHandle, STRING_TOKEN (STR_TPM2_ACPI_HID_CONTENT), L"Unknown", NULL);
+ } else {
+ AsciiStrToUnicodeStrS(HidStr, UnHidStr, 16);
+ HiiSetString (Private->HiiHandle, STRING_TOKEN (STR_TPM2_ACPI_HID_CONTENT), UnHidStr, NULL);
+ }
+ }
+ return EFI_SUCCESS;
+ }
+
if (Action == EFI_BROWSER_ACTION_CHANGING) {
if (QuestionId == KEY_TPM_DEVICE_INTERFACE) {
EFI_STATUS Status;
diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h
index 1b9a845..91d0c27 100644
--- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h
+++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h
@@ -2,7 +2,7 @@
The header file of HII Config Access protocol implementation of TCG2
configuration module.
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -73,6 +73,8 @@ extern TCG2_CONFIG_PRIVATE_DATA *mTcg2ConfigPrivateDate;
#define TCG2_CONFIG_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'r', 'E', 'D')
#define TCG2_CONFIG_PRIVATE_DATA_FROM_THIS(a) CR (a, TCG2_CONFIG_PRIVATE_DATA, ConfigAccess, TCG2_CONFIG_PRIVATE_DATA_SIGNATURE)
+#define TPM_HID_PNP_SIZE 8
+#define TPM_HID_ACPI_SIZE 9
/**
This function publish the TCG2 configuration Form for TPM device.
diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni
index 7c63f99..64208e0 100644
--- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni
+++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni
@@ -1,7 +1,7 @@
/** @file
String definitions for TCG2 configuration form.
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -29,6 +29,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#string STR_TCG2_ACPI_REVISION_HELP #language en-US "Rev 3 or Rev 4 (Rev 4 is defined in TCG ACPI Spec 00.37)"
#string STR_TCG2_ACPI_REVISION_CONTENT #language en-US ""
+#string STR_TPM2_ACPI_HID_PROMPT #language en-US "HID from TPM2 ACPI Table"
+#string STR_TPM2_ACPI_HID_HELP #language en-US "HID from TPM2 ACPI Table: ManfacturerID + FirmwareVersion_1"
+#string STR_TPM2_ACPI_HID_CONTENT #language en-US ""
+
#string STR_TCG2_DEVICE_INTERFACE_STATE_PROMPT #language en-US "Current TPM Device Interface"
#string STR_TCG2_DEVICE_INTERFACE_STATE_HELP #language en-US "Current TPM Device Interface: TIS, PTP FIFO, PTP CRB"
#string STR_TCG2_DEVICE_INTERFACE_STATE_CONTENT #language en-US ""
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
index 4c6cd6d..aff8cb1 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
@@ -397,7 +397,8 @@ UpdateHID (
CopyMem(DataPtr, HID, TPM_HID_ACPI_SIZE);
}
- DEBUG((EFI_D_INFO, "TPM2 ACPI _HID updated to %a\n", HID));
+ DEBUG((DEBUG_INFO, "TPM2 ACPI _HID is patched to %a\n", DataPtr));
+
return Status;
}
}
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] SecurityPkg: Tcg2ConfigDxe: Display TPM2 HID in Tcg2Config
2017-01-04 7:19 Zhang, Chao B
@ 2017-01-04 7:50 ` Long, Qin
2017-01-05 1:04 ` Yao, Jiewen
1 sibling, 0 replies; 4+ messages in thread
From: Long, Qin @ 2017-01-04 7:50 UTC (permalink / raw)
To: Zhang, Chao B, edk2-devel@lists.01.org; +Cc: Yao, Jiewen
Reviewed-by: Qin Long <qin.long@intel.com>
> -----Original Message-----
> From: Zhang, Chao B
> Sent: Wednesday, January 04, 2017 3:19 PM
> To: edk2-devel@lists.01.org
> Cc: Long, Qin; Yao, Jiewen; Zhang, Chao B
> Subject: [PATCH] SecurityPkg: Tcg2ConfigDxe: Display TPM2 HID in
> Tcg2Config
>
> Display TPM2 HID from TPM2 ACPI device object in Tcg2Config UI
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
> ---
> SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr | 9 +-
> SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c | 107
> ++++++++++++++++++++++-
> SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h | 4 +-
> SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni | 6 +-
> SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 3 +-
> 5 files changed, 123 insertions(+), 6 deletions(-)
>
> diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
> b/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
> index a805d53..ed833c6 100644
> --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
> +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
> @@ -1,7 +1,7 @@
> /** @file
> VFR file used by the TCG2 configuration component.
>
> -Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials are licensed and made
> available under the terms and conditions of the BSD License which
> accompanies this distribution. The full text of the license may be found at
> @@ -59,6 +59,13 @@ formset
>
> suppressif ideqvallist TCG2_CONFIGURATION.TpmDevice ==
> TPM_DEVICE_NULL TPM_DEVICE_1_2;
>
> + subtitle text = STRING_TOKEN(STR_NULL);
> +
> + text
> + help = STRING_TOKEN(STR_TPM2_ACPI_HID_HELP),
> + text = STRING_TOKEN(STR_TPM2_ACPI_HID_PROMPT),
> + text = STRING_TOKEN(STR_TPM2_ACPI_HID_CONTENT);
> +
> oneof varid = TCG2_CONFIGURATION_NV_INFO.TpmAcpiTableRev,
> questionid = KEY_TPM_ACPI_REVISION,
> prompt = STRING_TOKEN(STR_TCG2_ACPI_REVISION_PROMPT),
> diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
> b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
> index afba42c..013caf8 100644
> --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
> +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
> @@ -2,7 +2,7 @@
> HII Config Access protocol implementation of TCG2 configuration module.
> NOTE: This module is only for reference only, each platform should have its
> own setup page.
>
> -Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials are licensed and made
> available under the terms and conditions of the BSD License which
> accompanies this distribution. The full text of the license may be found at
> @@ -429,6 +429,83 @@ Tcg2RouteConfig ( }
>
> /**
> + Get HID string of TPM2 ACPI device object
> +
> + @param[in] HID Points to HID String Buffer.
> + @param[in] Size HID String size in bytes. Must >=
> TPM_HID_ACPI_SIZE
> +
> + @return HID String get status.
> +
> +**/
> +EFI_STATUS
> +GetTpm2HID(
> + CHAR8 *HID,
> + UINTN Size
> + )
> +{
> + EFI_STATUS Status;
> + UINT32 ManufacturerID;
> + UINT32 FirmwareVersion1;
> + UINT32 FirmwareVersion2;
> + BOOLEAN PnpHID;
> +
> + PnpHID = TRUE;
> +
> + ZeroMem(HID, Size);
> +
> + //
> + // Get Manufacturer ID
> + //
> + Status = Tpm2GetCapabilityManufactureID(&ManufacturerID);
> + if (!EFI_ERROR(Status)) {
> + DEBUG((DEBUG_INFO, "TPM_PT_MANUFACTURER 0x%08x\n",
> ManufacturerID));
> + //
> + // ManfacturerID defined in TCG Vendor ID Registry
> + // may tailed with 0x00 or 0x20
> + //
> + if ((ManufacturerID >> 24) == 0x00 || ((ManufacturerID >> 24) == 0x20)) {
> + //
> + // HID containing PNP ID "NNN####"
> + // NNN is uppercase letter for Vendor ID specified by manufacturer
> + //
> + CopyMem(HID, &ManufacturerID, 3);
> + } else {
> + //
> + // HID containing ACP ID "NNNN####"
> + // NNNN is uppercase letter for Vendor ID specified by manufacturer
> + //
> + CopyMem(HID, &ManufacturerID, 4);
> + PnpHID = FALSE;
> + }
> + } else {
> + DEBUG ((DEBUG_ERROR, "Get TPM_PT_MANUFACTURER failed %x!\n",
> Status));
> + ASSERT(FALSE);
> + return Status;
> + }
> +
> + Status = Tpm2GetCapabilityFirmwareVersion(&FirmwareVersion1,
> + &FirmwareVersion2); if (!EFI_ERROR(Status)) {
> + DEBUG((DEBUG_INFO, "TPM_PT_FIRMWARE_VERSION_1 0x%x\n",
> FirmwareVersion1));
> + DEBUG((DEBUG_INFO, "TPM_PT_FIRMWARE_VERSION_2 0x%x\n",
> FirmwareVersion2));
> + //
> + // #### is Firmware Version 1
> + //
> + if (PnpHID) {
> + AsciiSPrint(HID + 3, TPM_HID_PNP_SIZE - 3, "%02d%02d",
> ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 &&
> 0x0000FFFF));
> + } else {
> + AsciiSPrint(HID + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d",
> ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 &&
> 0x0000FFFF));
> + }
> +
> + } else {
> + DEBUG ((DEBUG_ERROR, "Get TPM_PT_FIRMWARE_VERSION_X
> failed %x!\n", Status));
> + ASSERT(FALSE);
> + return Status;
> + }
> +
> + return EFI_SUCCESS;
> +}
> +
> +/**
> This function processes the results of changes in configuration.
>
> @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
> @@ -461,12 +538,38 @@ Tcg2Callback (
> OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
> )
> {
> - EFI_INPUT_KEY Key;
> + EFI_STATUS Status;
> + EFI_INPUT_KEY Key;
> + CHAR8 HidStr[16];
> + CHAR16 UnHidStr[16];
> + TCG2_CONFIG_PRIVATE_DATA *Private;
>
> if ((This == NULL) || (Value == NULL) || (ActionRequest == NULL)) {
> return EFI_INVALID_PARAMETER;
> }
>
> + Private = TCG2_CONFIG_PRIVATE_DATA_FROM_THIS (This);
> +
> + if (Action == EFI_BROWSER_ACTION_FORM_OPEN) {
> + //
> + // Update TPM2 HID info
> + //
> + if (QuestionId == KEY_TPM_DEVICE) {
> + Status = GetTpm2HID(HidStr, 16);
> +
> + if (EFI_ERROR(Status)) {
> + //
> + // Fail to get TPM2 HID
> + //
> + HiiSetString (Private->HiiHandle, STRING_TOKEN
> (STR_TPM2_ACPI_HID_CONTENT), L"Unknown", NULL);
> + } else {
> + AsciiStrToUnicodeStrS(HidStr, UnHidStr, 16);
> + HiiSetString (Private->HiiHandle, STRING_TOKEN
> (STR_TPM2_ACPI_HID_CONTENT), UnHidStr, NULL);
> + }
> + }
> + return EFI_SUCCESS;
> + }
> +
> if (Action == EFI_BROWSER_ACTION_CHANGING) {
> if (QuestionId == KEY_TPM_DEVICE_INTERFACE) {
> EFI_STATUS Status;
> diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h
> b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h
> index 1b9a845..91d0c27 100644
> --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h
> +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h
> @@ -2,7 +2,7 @@
> The header file of HII Config Access protocol implementation of TCG2
> configuration module.
>
> -Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials are licensed and made
> available under the terms and conditions of the BSD License which
> accompanies this distribution. The full text of the license may be found at
> @@ -73,6 +73,8 @@ extern TCG2_CONFIG_PRIVATE_DATA
> *mTcg2ConfigPrivateDate;
> #define TCG2_CONFIG_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T',
> 'r', 'E', 'D')
> #define TCG2_CONFIG_PRIVATE_DATA_FROM_THIS(a) CR (a,
> TCG2_CONFIG_PRIVATE_DATA, ConfigAccess,
> TCG2_CONFIG_PRIVATE_DATA_SIGNATURE)
>
> +#define TPM_HID_PNP_SIZE 8
> +#define TPM_HID_ACPI_SIZE 9
>
> /**
> This function publish the TCG2 configuration Form for TPM device.
> diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni
> b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni
> index 7c63f99..64208e0 100644
> --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni
> +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni
> @@ -1,7 +1,7 @@
> /** @file
> String definitions for TCG2 configuration form.
>
> -Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials are licensed and made
> available under the terms and conditions of the BSD License which
> accompanies this distribution. The full text of the license may be found at
> @@ -29,6 +29,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY
> KIND, EITHER EXPRESS OR IMPLIED.
> #string STR_TCG2_ACPI_REVISION_HELP #language en-US "Rev 3
> or Rev 4 (Rev 4 is defined in TCG ACPI Spec 00.37)"
> #string STR_TCG2_ACPI_REVISION_CONTENT #language en-US ""
>
> +#string STR_TPM2_ACPI_HID_PROMPT #language en-US "HID from
> TPM2 ACPI Table"
> +#string STR_TPM2_ACPI_HID_HELP #language en-US "HID from
> TPM2 ACPI Table: ManfacturerID + FirmwareVersion_1"
> +#string STR_TPM2_ACPI_HID_CONTENT #language en-US ""
> +
> #string STR_TCG2_DEVICE_INTERFACE_STATE_PROMPT #language en-
> US "Current TPM Device Interface"
> #string STR_TCG2_DEVICE_INTERFACE_STATE_HELP #language en-US
> "Current TPM Device Interface: TIS, PTP FIFO, PTP CRB"
> #string STR_TCG2_DEVICE_INTERFACE_STATE_CONTENT #language en-
> US ""
> diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
> b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
> index 4c6cd6d..aff8cb1 100644
> --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
> +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
> @@ -397,7 +397,8 @@ UpdateHID (
>
> CopyMem(DataPtr, HID, TPM_HID_ACPI_SIZE);
> }
> - DEBUG((EFI_D_INFO, "TPM2 ACPI _HID updated to %a\n", HID));
> + DEBUG((DEBUG_INFO, "TPM2 ACPI _HID is patched to %a\n",
> + DataPtr));
> +
> return Status;
> }
> }
> --
> 1.9.5.msysgit.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] SecurityPkg: Tcg2ConfigDxe: Display TPM2 HID in Tcg2Config
2017-01-04 7:19 Zhang, Chao B
2017-01-04 7:50 ` Long, Qin
@ 2017-01-05 1:04 ` Yao, Jiewen
1 sibling, 0 replies; 4+ messages in thread
From: Yao, Jiewen @ 2017-01-05 1:04 UTC (permalink / raw)
To: Zhang, Chao B, edk2-devel@lists.01.org; +Cc: Long, Qin
Reviewed-by: jiewen.yao@intel.com
> -----Original Message-----
> From: Zhang, Chao B
> Sent: Wednesday, January 4, 2017 3:19 PM
> To: edk2-devel@lists.01.org
> Cc: Long, Qin <qin.long@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Zhang,
> Chao B <chao.b.zhang@intel.com>
> Subject: [PATCH] SecurityPkg: Tcg2ConfigDxe: Display TPM2 HID in Tcg2Config
>
> Display TPM2 HID from TPM2 ACPI device object in Tcg2Config UI
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
> ---
> SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr | 9 +-
> SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c | 107
> ++++++++++++++++++++++-
> SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h | 4 +-
> SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni | 6 +-
> SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 3 +-
> 5 files changed, 123 insertions(+), 6 deletions(-)
>
> diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
> b/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
> index a805d53..ed833c6 100644
> --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
> +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
> @@ -1,7 +1,7 @@
> /** @file
> VFR file used by the TCG2 configuration component.
>
> -Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials
> are licensed and made available under the terms and conditions of the BSD
> License
> which accompanies this distribution. The full text of the license may be found
> at
> @@ -59,6 +59,13 @@ formset
>
> suppressif ideqvallist TCG2_CONFIGURATION.TpmDevice ==
> TPM_DEVICE_NULL TPM_DEVICE_1_2;
>
> + subtitle text = STRING_TOKEN(STR_NULL);
> +
> + text
> + help = STRING_TOKEN(STR_TPM2_ACPI_HID_HELP),
> + text = STRING_TOKEN(STR_TPM2_ACPI_HID_PROMPT),
> + text = STRING_TOKEN(STR_TPM2_ACPI_HID_CONTENT);
> +
> oneof varid = TCG2_CONFIGURATION_NV_INFO.TpmAcpiTableRev,
> questionid = KEY_TPM_ACPI_REVISION,
> prompt = STRING_TOKEN(STR_TCG2_ACPI_REVISION_PROMPT),
> diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
> b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
> index afba42c..013caf8 100644
> --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
> +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
> @@ -2,7 +2,7 @@
> HII Config Access protocol implementation of TCG2 configuration module.
> NOTE: This module is only for reference only, each platform should have its
> own setup page.
>
> -Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials
> are licensed and made available under the terms and conditions of the BSD
> License
> which accompanies this distribution. The full text of the license may be found
> at
> @@ -429,6 +429,83 @@ Tcg2RouteConfig (
> }
>
> /**
> + Get HID string of TPM2 ACPI device object
> +
> + @param[in] HID Points to HID String Buffer.
> + @param[in] Size HID String size in bytes. Must >=
> TPM_HID_ACPI_SIZE
> +
> + @return HID String get status.
> +
> +**/
> +EFI_STATUS
> +GetTpm2HID(
> + CHAR8 *HID,
> + UINTN Size
> + )
> +{
> + EFI_STATUS Status;
> + UINT32 ManufacturerID;
> + UINT32 FirmwareVersion1;
> + UINT32 FirmwareVersion2;
> + BOOLEAN PnpHID;
> +
> + PnpHID = TRUE;
> +
> + ZeroMem(HID, Size);
> +
> + //
> + // Get Manufacturer ID
> + //
> + Status = Tpm2GetCapabilityManufactureID(&ManufacturerID);
> + if (!EFI_ERROR(Status)) {
> + DEBUG((DEBUG_INFO, "TPM_PT_MANUFACTURER 0x%08x\n",
> ManufacturerID));
> + //
> + // ManfacturerID defined in TCG Vendor ID Registry
> + // may tailed with 0x00 or 0x20
> + //
> + if ((ManufacturerID >> 24) == 0x00 || ((ManufacturerID >> 24) == 0x20)) {
> + //
> + // HID containing PNP ID "NNN####"
> + // NNN is uppercase letter for Vendor ID specified by manufacturer
> + //
> + CopyMem(HID, &ManufacturerID, 3);
> + } else {
> + //
> + // HID containing ACP ID "NNNN####"
> + // NNNN is uppercase letter for Vendor ID specified by manufacturer
> + //
> + CopyMem(HID, &ManufacturerID, 4);
> + PnpHID = FALSE;
> + }
> + } else {
> + DEBUG ((DEBUG_ERROR, "Get TPM_PT_MANUFACTURER failed %x!\n",
> Status));
> + ASSERT(FALSE);
> + return Status;
> + }
> +
> + Status = Tpm2GetCapabilityFirmwareVersion(&FirmwareVersion1,
> &FirmwareVersion2);
> + if (!EFI_ERROR(Status)) {
> + DEBUG((DEBUG_INFO, "TPM_PT_FIRMWARE_VERSION_1 0x%x\n",
> FirmwareVersion1));
> + DEBUG((DEBUG_INFO, "TPM_PT_FIRMWARE_VERSION_2 0x%x\n",
> FirmwareVersion2));
> + //
> + // #### is Firmware Version 1
> + //
> + if (PnpHID) {
> + AsciiSPrint(HID + 3, TPM_HID_PNP_SIZE - 3, "%02d%02d",
> ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF));
> + } else {
> + AsciiSPrint(HID + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d",
> ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF));
> + }
> +
> + } else {
> + DEBUG ((DEBUG_ERROR, "Get TPM_PT_FIRMWARE_VERSION_X
> failed %x!\n", Status));
> + ASSERT(FALSE);
> + return Status;
> + }
> +
> + return EFI_SUCCESS;
> +}
> +
> +/**
> This function processes the results of changes in configuration.
>
> @param[in] This Points to the
> EFI_HII_CONFIG_ACCESS_PROTOCOL.
> @@ -461,12 +538,38 @@ Tcg2Callback (
> OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
> )
> {
> - EFI_INPUT_KEY Key;
> + EFI_STATUS Status;
> + EFI_INPUT_KEY Key;
> + CHAR8 HidStr[16];
> + CHAR16 UnHidStr[16];
> + TCG2_CONFIG_PRIVATE_DATA *Private;
>
> if ((This == NULL) || (Value == NULL) || (ActionRequest == NULL)) {
> return EFI_INVALID_PARAMETER;
> }
>
> + Private = TCG2_CONFIG_PRIVATE_DATA_FROM_THIS (This);
> +
> + if (Action == EFI_BROWSER_ACTION_FORM_OPEN) {
> + //
> + // Update TPM2 HID info
> + //
> + if (QuestionId == KEY_TPM_DEVICE) {
> + Status = GetTpm2HID(HidStr, 16);
> +
> + if (EFI_ERROR(Status)) {
> + //
> + // Fail to get TPM2 HID
> + //
> + HiiSetString (Private->HiiHandle, STRING_TOKEN
> (STR_TPM2_ACPI_HID_CONTENT), L"Unknown", NULL);
> + } else {
> + AsciiStrToUnicodeStrS(HidStr, UnHidStr, 16);
> + HiiSetString (Private->HiiHandle, STRING_TOKEN
> (STR_TPM2_ACPI_HID_CONTENT), UnHidStr, NULL);
> + }
> + }
> + return EFI_SUCCESS;
> + }
> +
> if (Action == EFI_BROWSER_ACTION_CHANGING) {
> if (QuestionId == KEY_TPM_DEVICE_INTERFACE) {
> EFI_STATUS Status;
> diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h
> b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h
> index 1b9a845..91d0c27 100644
> --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h
> +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h
> @@ -2,7 +2,7 @@
> The header file of HII Config Access protocol implementation of TCG2
> configuration module.
>
> -Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials
> are licensed and made available under the terms and conditions of the BSD
> License
> which accompanies this distribution. The full text of the license may be found
> at
> @@ -73,6 +73,8 @@ extern TCG2_CONFIG_PRIVATE_DATA
> *mTcg2ConfigPrivateDate;
> #define TCG2_CONFIG_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'r',
> 'E', 'D')
> #define TCG2_CONFIG_PRIVATE_DATA_FROM_THIS(a) CR (a,
> TCG2_CONFIG_PRIVATE_DATA, ConfigAccess,
> TCG2_CONFIG_PRIVATE_DATA_SIGNATURE)
>
> +#define TPM_HID_PNP_SIZE 8
> +#define TPM_HID_ACPI_SIZE 9
>
> /**
> This function publish the TCG2 configuration Form for TPM device.
> diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni
> b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni
> index 7c63f99..64208e0 100644
> --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni
> +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni
> @@ -1,7 +1,7 @@
> /** @file
> String definitions for TCG2 configuration form.
>
> -Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials
> are licensed and made available under the terms and conditions of the BSD
> License
> which accompanies this distribution. The full text of the license may be found
> at
> @@ -29,6 +29,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY
> KIND, EITHER EXPRESS OR IMPLIED.
> #string STR_TCG2_ACPI_REVISION_HELP #language
> en-US "Rev 3 or Rev 4 (Rev 4 is defined in TCG ACPI Spec 00.37)"
> #string STR_TCG2_ACPI_REVISION_CONTENT #language
> en-US ""
>
> +#string STR_TPM2_ACPI_HID_PROMPT #language en-US
> "HID from TPM2 ACPI Table"
> +#string STR_TPM2_ACPI_HID_HELP #language en-US
> "HID from TPM2 ACPI Table: ManfacturerID + FirmwareVersion_1"
> +#string STR_TPM2_ACPI_HID_CONTENT #language en-US ""
> +
> #string STR_TCG2_DEVICE_INTERFACE_STATE_PROMPT #language
> en-US "Current TPM Device Interface"
> #string STR_TCG2_DEVICE_INTERFACE_STATE_HELP #language
> en-US "Current TPM Device Interface: TIS, PTP FIFO, PTP CRB"
> #string STR_TCG2_DEVICE_INTERFACE_STATE_CONTENT #language
> en-US ""
> diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
> b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
> index 4c6cd6d..aff8cb1 100644
> --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
> +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
> @@ -397,7 +397,8 @@ UpdateHID (
>
> CopyMem(DataPtr, HID, TPM_HID_ACPI_SIZE);
> }
> - DEBUG((EFI_D_INFO, "TPM2 ACPI _HID updated to %a\n", HID));
> + DEBUG((DEBUG_INFO, "TPM2 ACPI _HID is patched to %a\n", DataPtr));
> +
> return Status;
> }
> }
> --
> 1.9.5.msysgit.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-05 1:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-29 8:35 [PATCH] SecurityPkg: Tcg2ConfigDxe: Display TPM2 HID in Tcg2Config Zhang, Chao B
-- strict thread matches above, loose matches on Subject: below --
2017-01-04 7:19 Zhang, Chao B
2017-01-04 7:50 ` Long, Qin
2017-01-05 1:04 ` Yao, Jiewen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox