MdeModulePkg/UiApp: Show test key warning info in FrontPage.
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> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Michael Kinney <michael.d.kinney@intel.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user