From: "Sean Rhodes" <sean@starlabs.systems>
To: devel@edk2.groups.io
Cc: zhichao.gao@intel.com, guo.dong@intel.com,
Sean Rhodes <sean@starlabs.systems>
Subject: [PATCH 1/2] MdeModulePackage: Add option to follow BGRT spec
Date: Wed, 2 Feb 2022 07:32:50 +0000 [thread overview]
Message-ID: <53c055b8f160277e7c24cb156e5c11921c7b897c.1643787071.git.sean@starlabs.systems> (raw)
Add option to centre the Boot Logo 38.2% from the top of screen, following
the BGRT specification.
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
---
MdeModulePkg/Library/BootLogoLib/BootLogoLib.c | 7 ++++++-
MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf | 3 +++
MdeModulePkg/MdeModulePkg.dec | 3 +++
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
index 478ec2d40e..a9b4c6444b 100644
--- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
+++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
@@ -176,7 +176,12 @@ BootLogoEnableLogo (
break;
case EdkiiPlatformLogoDisplayAttributeCenter:
DestX = (SizeOfX - Image.Width) / 2;
- DestY = (SizeOfY - Image.Height) / 2;
+ if (FixedPcdGetBool (PcdFollowBGRTSpec) == TRUE) {
+ DestY = (SizeOfY * 382) / 1000 - Image.Height / 2;
+ } else {
+ DestY = (SizeOfY - Image.Height) / 2;
+ }
+
break;
case EdkiiPlatformLogoDisplayAttributeCenterRight:
DestX = SizeOfX - Image.Width;
diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
index 7d50f2dfa3..03ff038f47 100644
--- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
+++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
@@ -48,5 +48,8 @@
gEfiUserManagerProtocolGuid ## CONSUMES
gEdkiiPlatformLogoProtocolGuid ## CONSUMES
+[Pcd]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFollowBGRTSpec
+
[FeaturePcd]
gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## CONSUMES
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 463e889e9a..b4855431b0 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -2079,6 +2079,9 @@
# @Prompt Enable PCIe Resizable BAR Capability support.
gEfiMdeModulePkgTokenSpaceGuid.PcdPcieResizableBarSupport|FALSE|BOOLEAN|0x10000024
+ # Follow BGRT Specifcation
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFollowBGRTSpec|FALSE|BOOLEAN|0x00000025
+
[PcdsPatchableInModule]
## Specify memory size with page number for PEI code when
# Loading Module at Fixed Address feature is enabled.
--
2.32.0
next reply other threads:[~2022-02-02 7:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-02 7:32 Sean Rhodes [this message]
2022-02-02 7:32 ` [PATCH 2/2] UefiPayloadPkg: Hookup BGRT build option Sean Rhodes
-- strict thread matches above, loose matches on Subject: below --
2022-02-20 21:37 [PATCH 1/2] MdeModulePackage: Add option to follow BGRT spec Sean Rhodes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53c055b8f160277e7c24cb156e5c11921c7b897c.1643787071.git.sean@starlabs.systems \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox