summaryrefslogtreecommitdiff
path: root/Platform/BroxtonPlatformPkg/Common
diff options
context:
space:
mode:
authorxianhu2x <xianhuix.liu@intel.com>2017-10-12 14:52:57 +0800
committerzwei4 <david.wei@intel.com>2017-10-12 15:29:52 +0800
commite2acb76028036fef9ca03e256d78fe9acfe86462 (patch)
tree49ecfde0891759cbce20c15a9dd0ae8362a96b5f /Platform/BroxtonPlatformPkg/Common
parent0eff97a03f40aa5378845edd46a487c86580c4f9 (diff)
downloadedk2-platforms-e2acb76028036fef9ca03e256d78fe9acfe86462.tar.xz
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 <xianhuix.liu@intel.com>
Diffstat (limited to 'Platform/BroxtonPlatformPkg/Common')
-rw-r--r--Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/Platform.c21
-rw-r--r--Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PlatformDxe.inf10
2 files changed, 30 insertions, 1 deletions
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 <Library/S3BootScriptLib.h>
#include <Library/PciLib.h>
@@ -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