From e2acb76028036fef9ca03e256d78fe9acfe86462 Mon Sep 17 00:00:00 2001 From: xianhu2x Date: Thu, 12 Oct 2017 14:52:57 +0800 Subject: QR code display under EFI Shell Showing QR code and website link to screen under EFI shell for MinnowBoard. Output website link to serial port too. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: xianhu2x --- .../Common/PlatformSettings/PlatformDxe/Platform.c | 21 ++++++++++++++++++++- .../PlatformSettings/PlatformDxe/PlatformDxe.inf | 10 ++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'Platform/BroxtonPlatformPkg/Common') diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/Platform.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/Platform.c index a6d251ded2..54e80df917 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/Platform.c +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/Platform.c @@ -15,6 +15,7 @@ #include "PlatformDxe.h" #include "Platform.h" +#include "Logo.h" #include #include @@ -254,7 +255,6 @@ EnableAcpiCallback ( IoWrite16 (AcpiBaseAddr + R_ACPI_PM1_CNT, Pm1Cnt); } - VOID PlatformScInitBeforeBoot ( VOID @@ -699,6 +699,8 @@ InitializePlatform ( EFI_HOB_GUID_TYPE *FdoEnabledGuidHob = NULL; EFI_PLATFORM_INFO_HOB *PlatformInfoHob; EFI_PEI_HOB_POINTERS Hob; + EFI_EVENT EfiShellEvent = NULL; + VOID *mEfiShellProtocolRegistration; mImageHandle = ImageHandle; @@ -900,6 +902,23 @@ InitializePlatform ( OverrideSdCardPresence(); + // + //QR code showing under EFI Shell + // + if (PcdGetBool(PcdLogoDisplay)) { + Status = gBS->CreateEvent ( + EVT_NOTIFY_SIGNAL, + TPL_CALLBACK, + EfiShellProtocolCallback, + NULL, + &EfiShellEvent + ); + Status = gBS->RegisterProtocolNotify ( + &gEfiShellProtocolGuid, + EfiShellEvent, + &mEfiShellProtocolRegistration + ); + } return EFI_SUCCESS; } diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PlatformDxe.inf b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PlatformDxe.inf index ee8fd5a689..b15d0ed8ae 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PlatformDxe.inf +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PlatformDxe.inf @@ -34,6 +34,7 @@ IchTcoReset.c SensorVar.c Rtc.c + Logo.c [Packages] MdePkg/MdePkg.dec @@ -66,6 +67,7 @@ DxeSaPolicyLib ConfigBlockLib GpioLib + DxeServicesLib [Guids] gEfiBiosIdGuid @@ -116,6 +118,9 @@ gDxePlatformTdtPolicyGuid gDxePlatformSeCPolicyGuid gEfiSeCOperationProtocolGuid + gEfiUgaDrawProtocolGuid + gEfiUgaDrawProtocolGuid |PcdUgaConsumeSupport + gEfiShellProtocolGuid [Pcd] gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress @@ -127,6 +132,11 @@ gPlatformModuleTokenSpaceGuid.PcdPBTNDisableInterval gEfiMdeModulePkgTokenSpaceGuid.PcdFastPS2Detection gEfiBxtTokenSpaceGuid.PcdP2SBBaseAddress + gPlatformModuleTokenSpaceGuid.PcdLogoFileGuid + gPlatformModuleTokenSpaceGuid.PcdLogoDisplay + +[FeaturePcd] + gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport [Depex] gEfiPciRootBridgeIoProtocolGuid AND -- cgit v1.2.3