* [PATCH V2 1/4] MdeModulePkg/dec: Add PcdTestKeyUsed PCD.
2016-10-10 7:18 [PATCH V2 0/4] Show test key info on front page Jiewen Yao
@ 2016-10-10 7:18 ` Jiewen Yao
2016-10-10 7:18 ` [PATCH V2 2/4] MdeModulePkg/UiApp: Show test key warning info in FrontPage Jiewen Yao
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jiewen Yao @ 2016-10-10 7:18 UTC (permalink / raw)
To: edk2-devel
Cc: Eric Dong, Ruiyu Ni, Feng Tian, Star Zeng, Michael D Kinney,
Liming Gao
This PCD can be set by platform to indicate if there is any
test key used in current BIOS, such as recovery key,
or capsule update key.
Then the generic UI may consume this PCD to show warning information.
Other platform driver may also consume this PCD to know such info,
and report it via platform specific way.
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
---
MdeModulePkg/MdeModulePkg.dec | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 76b4e1b..e13e97c 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -1703,6 +1703,10 @@
# @ValidList 0x80000001 | 0x0
gEfiMdeModulePkgTokenSpaceGuid.PcdIdentifyMappingPageTablePtr|0x0|UINT64|0x00030002
+ ## This dynamic PCD holds the information if there is any test key used by the platform.
+ # @Prompt If there is any test key used by the platform.
+ gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE|BOOLEAN|0x00030003
+
[PcdsDynamicEx]
## This dynamic PCD hold the FMP capsule monotonic count value for current
# system firmware. It is used to ensure freshness/no replay on firmware update.
--
2.7.4.windows.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH V2 2/4] MdeModulePkg/UiApp: Show test key warning info in FrontPage.
2016-10-10 7:18 [PATCH V2 0/4] Show test key info on front page Jiewen Yao
2016-10-10 7:18 ` [PATCH V2 1/4] MdeModulePkg/dec: Add PcdTestKeyUsed PCD Jiewen Yao
@ 2016-10-10 7:18 ` Jiewen Yao
2016-10-10 7:18 ` [PATCH V2 3/4] QuarkPlatformPkg/Bds: Produce PcdTestKeyUsed Jiewen Yao
2016-10-10 7:18 ` [PATCH V2 4/4] Vlv2TbleDevicePkg/Bds: " Jiewen Yao
3 siblings, 0 replies; 5+ messages in thread
From: Jiewen Yao @ 2016-10-10 7:18 UTC (permalink / raw)
To: edk2-devel
Cc: Eric Dong, Ruiyu Ni, Feng Tian, Star Zeng, Michael D Kinney,
Liming Gao
The UiApp is updated to consume PcdTestKeyUsed to know if there is any
test key used in current BIOS, such as recovery key,
or capsule update key.
Then UiApp show warning information in front page.
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
---
MdeModulePkg/Application/UiApp/FrontPageCustomizedUi.c | 13 +++++++++++++
MdeModulePkg/Application/UiApp/FrontPageStrings.uni | 4 +++-
MdeModulePkg/Application/UiApp/UiApp.inf | 3 ++-
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/MdeModulePkg/Application/UiApp/FrontPageCustomizedUi.c b/MdeModulePkg/Application/UiApp/FrontPageCustomizedUi.c
index 6e4f7b5..a9d2269 100644
--- a/MdeModulePkg/Application/UiApp/FrontPageCustomizedUi.c
+++ b/MdeModulePkg/Application/UiApp/FrontPageCustomizedUi.c
@@ -16,8 +16,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/HiiConfigAccess.h>
#include <Library/BaseLib.h>
#include <Library/MemoryAllocationLib.h>
+#include "FrontPage.h"
#include "FrontPageCustomizedUiSupport.h"
+extern FRONT_PAGE_CALLBACK_DATA gFrontPagePrivate;
+
/**
Customize menus in the page.
@@ -129,4 +132,14 @@ UiCustomizeFrontPageBanner (
IN OUT EFI_STRING *BannerStr
)
{
+ if ((LineIndex == 5) && LeftOrRight) {
+ // Update STR_CUSTOMIZE_BANNER_LINE5_LEFT
+ if (PcdGetBool(PcdTestKeyUsed)) {
+ if (BannerStr != NULL) {
+ FreePool(*BannerStr);
+ }
+ *BannerStr = HiiGetString(gFrontPagePrivate.HiiHandle, STRING_TOKEN(STR_TEST_KEY_USED), NULL);
+ }
+ }
+ return;
}
diff --git a/MdeModulePkg/Application/UiApp/FrontPageStrings.uni b/MdeModulePkg/Application/UiApp/FrontPageStrings.uni
index 71cb788..8080a20 100644
--- a/MdeModulePkg/Application/UiApp/FrontPageStrings.uni
+++ b/MdeModulePkg/Application/UiApp/FrontPageStrings.uni
@@ -2,7 +2,7 @@
//
// String definitions for BdsPlatform formset.
//
-// Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2004 - 2016, 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
@@ -68,5 +68,7 @@
#language fr-FR ""
#string STR_CUSTOMIZE_BANNER_LINE5_RIGHT #language en-US ""
#language fr-FR ""
+#string STR_TEST_KEY_USED #language en-US "WARNING: Test key detected."
+ #language fr-FR "WARNING: Test key detected."
#string STR_NULL_STRING #language en-US " "
#language fr-FR " "
diff --git a/MdeModulePkg/Application/UiApp/UiApp.inf b/MdeModulePkg/Application/UiApp/UiApp.inf
index 6df6e47..d144462 100644
--- a/MdeModulePkg/Application/UiApp/UiApp.inf
+++ b/MdeModulePkg/Application/UiApp/UiApp.inf
@@ -1,7 +1,7 @@
## @file
# UiApp module is driver for BDS phase.
#
-# Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2011 - 2016, 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
@@ -82,6 +82,7 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString ## CONSUMES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed ## CONSUMES
[UserExtensions.TianoCore."ExtraFiles"]
UiAppExtra.uni
--
2.7.4.windows.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH V2 3/4] QuarkPlatformPkg/Bds: Produce PcdTestKeyUsed.
2016-10-10 7:18 [PATCH V2 0/4] Show test key info on front page Jiewen Yao
2016-10-10 7:18 ` [PATCH V2 1/4] MdeModulePkg/dec: Add PcdTestKeyUsed PCD Jiewen Yao
2016-10-10 7:18 ` [PATCH V2 2/4] MdeModulePkg/UiApp: Show test key warning info in FrontPage Jiewen Yao
@ 2016-10-10 7:18 ` Jiewen Yao
2016-10-10 7:18 ` [PATCH V2 4/4] Vlv2TbleDevicePkg/Bds: " Jiewen Yao
3 siblings, 0 replies; 5+ messages in thread
From: Jiewen Yao @ 2016-10-10 7:18 UTC (permalink / raw)
To: edk2-devel
Cc: Michael D Kinney, Kelly Steele, Eric Dong, Ruiyu Ni, Feng Tian,
Star Zeng, Liming Gao
Update BDS to produce PcdTestKeyUsed to indicate if there is any
test key used in current BIOS, such as recovery key,
or capsule update key.
Then the generic UI may consume this PCD to show warning information.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
---
QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c | 2 ++
QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 1 +
2 files changed, 3 insertions(+)
diff --git a/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c b/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
index 77c1efc..f327c89 100644
--- a/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
+++ b/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
@@ -419,6 +419,7 @@ PlatformBootManagerAfterConsole (
if ((Size == PcdGetSize(PcdRsa2048Sha256PublicKeyBuffer)) &&
(CompareMem(Buffer, PcdGetPtr(PcdRsa2048Sha256PublicKeyBuffer), Size) == 0)) {
Print(L"WARNING: Recovery Test Key is used.\n");
+ PcdSetBoolS(PcdTestKeyUsed, TRUE);
}
FreePool(Buffer);
}
@@ -433,6 +434,7 @@ PlatformBootManagerAfterConsole (
if ((Size == PcdGetSize(PcdPkcs7CertBuffer)) &&
(CompareMem(Buffer, PcdGetPtr(PcdPkcs7CertBuffer), Size) == 0)) {
Print(L"WARNING: Capsule Test Key is used.\n");
+ PcdSetBoolS(PcdTestKeyUsed, TRUE);
}
FreePool(Buffer);
}
diff --git a/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
index 09a01d3..eadf1fe 100644
--- a/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+++ b/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
@@ -82,4 +82,5 @@
gQuarkPlatformTokenSpaceGuid.PcdEdkiiPkcs7TestPublicKeyFileGuid
gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer
gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBuffer
+ gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed
--
2.7.4.windows.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH V2 4/4] Vlv2TbleDevicePkg/Bds: Produce PcdTestKeyUsed.
2016-10-10 7:18 [PATCH V2 0/4] Show test key info on front page Jiewen Yao
` (2 preceding siblings ...)
2016-10-10 7:18 ` [PATCH V2 3/4] QuarkPlatformPkg/Bds: Produce PcdTestKeyUsed Jiewen Yao
@ 2016-10-10 7:18 ` Jiewen Yao
3 siblings, 0 replies; 5+ messages in thread
From: Jiewen Yao @ 2016-10-10 7:18 UTC (permalink / raw)
To: edk2-devel
Cc: David Wei, Eric Dong, Ruiyu Ni, Feng Tian, Star Zeng,
Michael D Kinney, Liming Gao
Update BDS to produce PcdTestKeyUsed to indicate if there is any
test key used in current BIOS, such as recovery key,
or capsule update key.
Then the generic UI may consume this PCD to show warning information.
Cc: David Wei <david.wei@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
---
Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c | 2 ++
Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf | 2 ++
2 files changed, 4 insertions(+)
diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
index 0dacac0..cc5dcfc 100644
--- a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
+++ b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
@@ -2462,6 +2462,7 @@ ShowProgressHotKey (
} else {
SerialPortWrite((UINT8 *)"\n\nWARNING: Recovery Test Key is used.", sizeof("\n\nWARNING: Recovery Test Key is used."));
}
+ PcdSetBoolS(PcdTestKeyUsed, TRUE);
}
FreePool(Buffer);
}
@@ -2481,6 +2482,7 @@ ShowProgressHotKey (
} else {
SerialPortWrite((UINT8 *)"\n\nWARNING: Capsule Test Key is used.", sizeof("\n\nWARNING: Capsule Test Key is used."));
}
+ PcdSetBoolS(PcdTestKeyUsed, TRUE);
}
FreePool(Buffer);
}
diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf
index 6bcfb7f..7748e2d 100644
--- a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf
+++ b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf
@@ -125,3 +125,5 @@
gPlatformModuleTokenSpaceGuid.PcdEdkiiPkcs7TestPublicKeyFileGuid
gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer
gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBuffer
+ gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed
+
--
2.7.4.windows.1
^ permalink raw reply related [flat|nested] 5+ messages in thread