summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
diff options
context:
space:
mode:
authorZhang, Chao B <chao.b.zhang@intel.com>2016-12-23 16:55:32 +0800
committerZhang, Chao B <chao.b.zhang@intel.com>2017-01-10 14:18:42 +0800
commitfca422890777a02c027061fbceee454c9f117870 (patch)
tree6f2e547133807eec47c254a4bf03f779590852a7 /SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
parent8f07a374b1d0497b6676491de8cbe2f08f4f7e9f (diff)
downloadedk2-fca422890777a02c027061fbceee454c9f117870.tar.gz
edk2-fca422890777a02c027061fbceee454c9f117870.tar.bz2
edk2-fca422890777a02c027061fbceee454c9f117870.zip
SecurityPkg: Tcg2Config: TPM2 ACPI Table Rev Option
Add TPM2 ACPI Table Rev Option in Tcg2Config UI. Rev 4 is defined in TCG ACPI Specification 00.37 Cc: Star Zeng <star.zeng@intel.com> Cc: Yao Jiewen <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Diffstat (limited to 'SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c')
-rw-r--r--SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
index f4a07c6420..a83000fda1 100644
--- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
+++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
@@ -481,6 +481,7 @@ Tcg2VersionInfoCallback (
{
EFI_INPUT_KEY Key;
UINT64 PcdTcg2PpiVersion;
+ UINT8 PcdTpm2AcpiTableRev;
ASSERT (Action == EFI_BROWSER_ACTION_SUBMITTED);
@@ -506,6 +507,24 @@ Tcg2VersionInfoCallback (
NULL
);
}
+ } else if (QuestionId == KEY_TPM2_ACPI_REVISION){
+ //
+ // Get the PCD value after EFI_BROWSER_ACTION_SUBMITTED,
+ // the SetVariable to TCG2_VERSION_NAME should have been done.
+ // If the PCD value is not equal to the value set to variable,
+ // the PCD is not DynamicHii type and does not map to the setup option.
+ //
+ PcdTpm2AcpiTableRev = PcdGet8 (PcdTpm2AcpiTableRev);
+
+ if (PcdTpm2AcpiTableRev != Value->u8) {
+ CreatePopUp (
+ EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
+ &Key,
+ L"WARNING: PcdTpm2AcpiTableRev is not DynamicHii type and does not map to this option!",
+ L"The Revision configuring by this setup option will not work!",
+ NULL
+ );
+ }
}
return EFI_SUCCESS;
@@ -607,7 +626,7 @@ Tcg2Callback (
}
if (Action == EFI_BROWSER_ACTION_SUBMITTED) {
- if (QuestionId == KEY_TCG2_PPI_VERSION) {
+ if (QuestionId == KEY_TCG2_PPI_VERSION || QuestionId == KEY_TPM2_ACPI_REVISION) {
return Tcg2VersionInfoCallback (Action, QuestionId, Type, Value);
}
}
@@ -971,6 +990,7 @@ InstallTcg2ConfigForm (
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Tcg2ConfigDriver: Fail to set TCG2_STORAGE_INFO_NAME\n"));
}
+
return EFI_SUCCESS;
}