* [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow BGRT specification
@ 2022-07-26 8:15 Sean Rhodes
2022-07-26 8:15 ` [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo Sean Rhodes
` (3 more replies)
0 siblings, 4 replies; 16+ messages in thread
From: Sean Rhodes @ 2022-07-26 8:15 UTC (permalink / raw)
To: devel; +Cc: Sean Rhodes, Zhichao Gao, Ray Ni, Jian J Wang, Liming Gao
Add an option to position the logo 38.2% from the top of the screen,
which follows the BGRT specification.
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
---
MdeModulePkg/Include/Protocol/PlatformLogo.h | 3 ++-
MdeModulePkg/Library/BootLogoLib/BootLogoLib.c | 7 ++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/MdeModulePkg/Include/Protocol/PlatformLogo.h b/MdeModulePkg/Include/Protocol/PlatformLogo.h
index 08e1dc35a4..7c9ef63c66 100644
--- a/MdeModulePkg/Include/Protocol/PlatformLogo.h
+++ b/MdeModulePkg/Include/Protocol/PlatformLogo.h
@@ -29,7 +29,8 @@ typedef enum {
EdkiiPlatformLogoDisplayAttributeCenterBottom,
EdkiiPlatformLogoDisplayAttributeLeftBottom,
EdkiiPlatformLogoDisplayAttributeCenterLeft,
- EdkiiPlatformLogoDisplayAttributeCenter
+ EdkiiPlatformLogoDisplayAttributeCenter,
+ EdkiiPlatformLogoDisplayAttributeBGRTSpecification
} EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE;
/**
diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
index 478ec2d40e..ac086f9c79 100644
--- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
+++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
@@ -169,7 +169,6 @@ BootLogoEnableLogo (
DestX = SizeOfX - Image.Width;
DestY = 0;
break;
-
case EdkiiPlatformLogoDisplayAttributeCenterLeft:
DestX = 0;
DestY = (SizeOfY - Image.Height) / 2;
@@ -182,7 +181,6 @@ BootLogoEnableLogo (
DestX = SizeOfX - Image.Width;
DestY = (SizeOfY - Image.Height) / 2;
break;
-
case EdkiiPlatformLogoDisplayAttributeLeftBottom:
DestX = 0;
DestY = SizeOfY - Image.Height;
@@ -195,7 +193,10 @@ BootLogoEnableLogo (
DestX = SizeOfX - Image.Width;
DestY = SizeOfY - Image.Height;
break;
-
+ case EdkiiPlatformLogoDisplayAttributeBGRTSpecification:
+ DestX = (SizeOfX - Image.Width) / 2;
+ DestY = (SizeOfY * 382) / 1000 - Image.Height / 2;
+ break;
default:
ASSERT (FALSE);
continue;
--
2.34.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo
2022-07-26 8:15 [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow BGRT specification Sean Rhodes
@ 2022-07-26 8:15 ` Sean Rhodes
2022-08-05 5:58 ` 回复: " gaoliming
2022-07-26 8:15 ` [PATCH 3/3] UefiPayloadPkg: Hook up FOLLOW_BGRT_SPEC macro Sean Rhodes
` (2 subsequent siblings)
3 siblings, 1 reply; 16+ messages in thread
From: Sean Rhodes @ 2022-07-26 8:15 UTC (permalink / raw)
To: devel; +Cc: Sean Rhodes, Zhichao Gao, Ray Ni, Jian J Wang, Liming Gao
When set to true, the Logo is positioned according to the BGRT
specification, 38.2% from the top of the screen. When set to false,
no behaviour is changed and the logo is positioned centrally.
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
---
MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf | 5 ++++-
MdeModulePkg/Logo/Logo.c | 5 +++++
MdeModulePkg/Logo/LogoDxe.inf | 4 ++++
MdeModulePkg/MdeModulePkg.dec | 6 ++++++
MdeModulePkg/MdeModulePkg.uni | 6 ++++++
5 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
index 7d50f2dfa3..14ba8a5906 100644
--- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
+++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
@@ -48,5 +48,8 @@
gEfiUserManagerProtocolGuid ## CONSUMES
gEdkiiPlatformLogoProtocolGuid ## CONSUMES
+[Pcd]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFollowBGRTSpecification ## CONSUMES
+
[FeaturePcd]
- gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## CONSUMES
+ gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## CONSUMES
diff --git a/MdeModulePkg/Logo/Logo.c b/MdeModulePkg/Logo/Logo.c
index 8ab874d2da..73546b32f4 100644
--- a/MdeModulePkg/Logo/Logo.c
+++ b/MdeModulePkg/Logo/Logo.c
@@ -13,6 +13,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Protocol/HiiPackageList.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/DebugLib.h>
+#include <Library/PcdLib.h>
typedef struct {
EFI_IMAGE_ID ImageId;
@@ -69,6 +70,10 @@ GetImage (
return EFI_NOT_FOUND;
}
+ if (FixedPcdGetBool (PcdFollowBGRTSpecification)) {
+ mLogos[Current].Attribute = EdkiiPlatformLogoDisplayAttributeBGRTSpecification;
+ }
+
(*Instance)++;
*Attribute = mLogos[Current].Attribute;
*OffsetX = mLogos[Current].OffsetX;
diff --git a/MdeModulePkg/Logo/LogoDxe.inf b/MdeModulePkg/Logo/LogoDxe.inf
index 41215d25d8..c5c8ad0bcf 100644
--- a/MdeModulePkg/Logo/LogoDxe.inf
+++ b/MdeModulePkg/Logo/LogoDxe.inf
@@ -41,6 +41,7 @@
UefiBootServicesTableLib
UefiDriverEntryPoint
DebugLib
+ PcdLib
[Protocols]
gEfiHiiDatabaseProtocolGuid ## CONSUMES
@@ -48,6 +49,9 @@
gEfiHiiPackageListProtocolGuid ## PRODUCES CONSUMES
gEdkiiPlatformLogoProtocolGuid ## PRODUCES
+[Pcd]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFollowBGRTSpecification ## CONSUMES
+
[Depex]
gEfiHiiDatabaseProtocolGuid AND
gEfiHiiImageExProtocolGuid
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 2bcb9f9453..e09918387c 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -2095,6 +2095,12 @@
# @Prompt The shared bit mask when Intel Tdx is enabled.
gEfiMdeModulePkgTokenSpaceGuid.PcdTdxSharedBitMask|0x0|UINT64|0x10000025
+ ## This PCD sets the position of the Boot Logo.
+ # TRUE - The Logo is positioned according to the BGRT specification.
+ # FALSE - The logo is positioned in the center of the screen.
+ # @ Prompt This position of the boot logo
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFollowBGRTSpecification|FALSE|BOOLEAN|0x10000026
+
[PcdsPatchableInModule]
## Specify memory size with page number for PEI code when
# Loading Module at Fixed Address feature is enabled.
diff --git a/MdeModulePkg/MdeModulePkg.uni b/MdeModulePkg/MdeModulePkg.uni
index b070f15ff2..c6ff7bc1bd 100644
--- a/MdeModulePkg/MdeModulePkg.uni
+++ b/MdeModulePkg/MdeModulePkg.uni
@@ -1334,3 +1334,9 @@
#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdPcieResizableBarSupport_HELP #language en-US "Indicates if the PCIe Resizable BAR Capability Supported.<BR><BR>\n"
"TRUE - PCIe Resizable BAR Capability is supported.<BR>\n"
"FALSE - PCIe Resizable BAR Capability is not supported.<BR>"
+
+#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowBGRTSpecification_PROMPT #language en-US "The position of the Boot Logo"
+
+#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowBGRTSpecification_HELP #language en-US "Sets the position of the Logo. When set to true, the Logo is positioned according to the"
+ " BGRT specification, 38.2% from the top of the screen."
+
--
2.34.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/3] UefiPayloadPkg: Hook up FOLLOW_BGRT_SPEC macro
2022-07-26 8:15 [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow BGRT specification Sean Rhodes
2022-07-26 8:15 ` [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo Sean Rhodes
@ 2022-07-26 8:15 ` Sean Rhodes
2022-08-04 10:01 ` [edk2-devel] [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow BGRT specification Sean Rhodes
2022-08-05 5:59 ` 回复: " gaoliming
3 siblings, 0 replies; 16+ messages in thread
From: Sean Rhodes @ 2022-07-26 8:15 UTC (permalink / raw)
To: devel; +Cc: Sean Rhodes, Guo Dong, Ray Ni
Hook up FOLLOW_BGRT_SPEC macro to PcdFollowBGRTSpecification.
Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
---
UefiPayloadPkg/UefiPayloadPkg.dsc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 862d440b16..dbfa750c3b 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -41,6 +41,7 @@
DEFINE PS2_MOUSE_ENABLE = TRUE
DEFINE CRYPTO_PROTOCOL_SUPPORT = FALSE
DEFINE SD_MMC_TIMEOUT = 1000000
+ DEFINE FOLLOW_BGRT_SPEC = FALSE
#
# NULL: NullMemoryTestDxe
@@ -425,6 +426,7 @@
gUefiPayloadPkgTokenSpaceGuid.PcdDispatchModuleAbove4GMemory|$(ABOVE_4G_MEMORY)
gUefiPayloadPkgTokenSpaceGuid.PcdBootManagerEscape|$(BOOT_MANAGER_ESCAPE)
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFollowBGRTSpecification|$(FOLLOW_BGRT_SPEC)
gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1800000
!if $(CRYPTO_PROTOCOL_SUPPORT) == TRUE
--
2.34.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow BGRT specification
2022-07-26 8:15 [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow BGRT specification Sean Rhodes
2022-07-26 8:15 ` [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo Sean Rhodes
2022-07-26 8:15 ` [PATCH 3/3] UefiPayloadPkg: Hook up FOLLOW_BGRT_SPEC macro Sean Rhodes
@ 2022-08-04 10:01 ` Sean Rhodes
2022-08-05 5:59 ` 回复: " gaoliming
3 siblings, 0 replies; 16+ messages in thread
From: Sean Rhodes @ 2022-08-04 10:01 UTC (permalink / raw)
To: Sean Rhodes, devel
[-- Attachment #1: Type: text/plain, Size: 95 bytes --]
Hi Ray/ Jian/ Liming
Would you be able to review this patch please?
Many thanks
Sean
[-- Attachment #2: Type: text/html, Size: 254 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* 回复: [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo
2022-07-26 8:15 ` [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo Sean Rhodes
@ 2022-08-05 5:58 ` gaoliming
0 siblings, 0 replies; 16+ messages in thread
From: gaoliming @ 2022-08-05 5:58 UTC (permalink / raw)
To: 'Sean Rhodes', devel
Cc: 'Zhichao Gao', 'Ray Ni', 'Jian J Wang'
Sean:
I add my comments below.
> -----邮件原件-----
> 发件人: Sean Rhodes <sean@starlabs.systems>
> 发送时间: 2022年7月26日 16:15
> 收件人: devel@edk2.groups.io
> 抄送: Sean Rhodes <sean@starlabs.systems>; Zhichao Gao
> <zhichao.gao@intel.com>; Ray Ni <ray.ni@intel.com>; Jian J Wang
> <jian.j.wang@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>
> 主题: [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of
> the Logo
>
> When set to true, the Logo is positioned according to the BGRT
> specification, 38.2% from the top of the screen. When set to false,
> no behaviour is changed and the logo is positioned centrally.
>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Signed-off-by: Sean Rhodes <sean@starlabs.systems>
> ---
> MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf | 5 ++++-
> MdeModulePkg/Logo/Logo.c | 5 +++++
> MdeModulePkg/Logo/LogoDxe.inf | 4 ++++
> MdeModulePkg/MdeModulePkg.dec | 6 ++++++
> MdeModulePkg/MdeModulePkg.uni | 6 ++++++
> 5 files changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
> b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
> index 7d50f2dfa3..14ba8a5906 100644
> --- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
> +++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
> @@ -48,5 +48,8 @@
> gEfiUserManagerProtocolGuid ## CONSUMES
>
> gEdkiiPlatformLogoProtocolGuid ## CONSUMES
>
>
>
> +[Pcd]
>
> + gEfiMdeModulePkgTokenSpaceGuid.PcdFollowBGRTSpecification ##
> CONSUMES
>
> +
>
> [FeaturePcd]
>
> - gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## CONSUMES
>
> + gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ##
> CONSUMES
>
The change in BootLogoLib is not required. Please check.
> diff --git a/MdeModulePkg/Logo/Logo.c b/MdeModulePkg/Logo/Logo.c
> index 8ab874d2da..73546b32f4 100644
> --- a/MdeModulePkg/Logo/Logo.c
> +++ b/MdeModulePkg/Logo/Logo.c
> @@ -13,6 +13,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> #include <Protocol/HiiPackageList.h>
>
> #include <Library/UefiBootServicesTableLib.h>
>
> #include <Library/DebugLib.h>
>
> +#include <Library/PcdLib.h>
>
>
>
> typedef struct {
>
> EFI_IMAGE_ID ImageId;
>
> @@ -69,6 +70,10 @@ GetImage (
> return EFI_NOT_FOUND;
>
> }
>
>
>
> + if (FixedPcdGetBool (PcdFollowBGRTSpecification)) {
>
> + mLogos[Current].Attribute =
> EdkiiPlatformLogoDisplayAttributeBGRTSpecification;
>
> + }
>
> +
Here, please use PcdGetBool().
Thanks
Liming
>
> (*Instance)++;
>
> *Attribute = mLogos[Current].Attribute;
>
> *OffsetX = mLogos[Current].OffsetX;
>
> diff --git a/MdeModulePkg/Logo/LogoDxe.inf
> b/MdeModulePkg/Logo/LogoDxe.inf
> index 41215d25d8..c5c8ad0bcf 100644
> --- a/MdeModulePkg/Logo/LogoDxe.inf
> +++ b/MdeModulePkg/Logo/LogoDxe.inf
> @@ -41,6 +41,7 @@
> UefiBootServicesTableLib
>
> UefiDriverEntryPoint
>
> DebugLib
>
> + PcdLib
>
>
>
> [Protocols]
>
> gEfiHiiDatabaseProtocolGuid ## CONSUMES
>
> @@ -48,6 +49,9 @@
> gEfiHiiPackageListProtocolGuid ## PRODUCES CONSUMES
>
> gEdkiiPlatformLogoProtocolGuid ## PRODUCES
>
>
>
> +[Pcd]
>
> + gEfiMdeModulePkgTokenSpaceGuid.PcdFollowBGRTSpecification ##
> CONSUMES
>
> +
>
> [Depex]
>
> gEfiHiiDatabaseProtocolGuid AND
>
> gEfiHiiImageExProtocolGuid
>
> diff --git a/MdeModulePkg/MdeModulePkg.dec
> b/MdeModulePkg/MdeModulePkg.dec
> index 2bcb9f9453..e09918387c 100644
> --- a/MdeModulePkg/MdeModulePkg.dec
> +++ b/MdeModulePkg/MdeModulePkg.dec
> @@ -2095,6 +2095,12 @@
> # @Prompt The shared bit mask when Intel Tdx is enabled.
>
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdTdxSharedBitMask|0x0|UINT64|0x10
> 000025
>
>
>
> + ## This PCD sets the position of the Boot Logo.
>
> + # TRUE - The Logo is positioned according to the BGRT specification.
>
> + # FALSE - The logo is positioned in the center of the screen.
>
> + # @ Prompt This position of the boot logo
>
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdFollowBGRTSpecification|FALSE|BOO
> LEAN|0x10000026
>
> +
>
> [PcdsPatchableInModule]
>
> ## Specify memory size with page number for PEI code when
>
> # Loading Module at Fixed Address feature is enabled.
>
> diff --git a/MdeModulePkg/MdeModulePkg.uni
> b/MdeModulePkg/MdeModulePkg.uni
> index b070f15ff2..c6ff7bc1bd 100644
> --- a/MdeModulePkg/MdeModulePkg.uni
> +++ b/MdeModulePkg/MdeModulePkg.uni
> @@ -1334,3 +1334,9 @@
> #string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdPcieResizableBarSupport_HELP
> #language en-US "Indicates if the PCIe Resizable BAR Capability
> Supported.<BR><BR>\n"
>
>
> "TRUE - PCIe Resizable BAR Capability is supported.<BR>\n"
>
>
> "FALSE - PCIe Resizable BAR Capability is not supported.<BR>"
>
> +
>
> +#string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowBGRTSpecification_PROM
> PT #language en-US "The position of the Boot Logo"
>
> +
>
> +#string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowBGRTSpecification_HELP
> #language en-US "Sets the position of the Logo. When set to true, the Logo
is
> positioned according to the"
>
> +
> " BGRT specification, 38.2% from the top of the screen."
>
> +
>
> --
> 2.34.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* 回复: [edk2-devel] [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow BGRT specification
2022-07-26 8:15 [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow BGRT specification Sean Rhodes
` (2 preceding siblings ...)
2022-08-04 10:01 ` [edk2-devel] [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow BGRT specification Sean Rhodes
@ 2022-08-05 5:59 ` gaoliming
2022-08-05 6:55 ` Sean Rhodes
3 siblings, 1 reply; 16+ messages in thread
From: gaoliming @ 2022-08-05 5:59 UTC (permalink / raw)
To: devel, sean
Cc: 'Zhichao Gao', 'Ray Ni', 'Jian J Wang'
Sean:
Can you give BGRT spec link? I want to check the spec description.
Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Sean Rhodes
> 发送时间: 2022年7月26日 16:15
> 收件人: devel@edk2.groups.io
> 抄送: Sean Rhodes <sean@starlabs.systems>; Zhichao Gao
> <zhichao.gao@intel.com>; Ray Ni <ray.ni@intel.com>; Jian J Wang
> <jian.j.wang@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>
> 主题: [edk2-devel] [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to
> follow BGRT specification
>
> Add an option to position the logo 38.2% from the top of the screen,
> which follows the BGRT specification.
>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Signed-off-by: Sean Rhodes <sean@starlabs.systems>
> ---
> MdeModulePkg/Include/Protocol/PlatformLogo.h | 3 ++-
> MdeModulePkg/Library/BootLogoLib/BootLogoLib.c | 7 ++++---
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/MdeModulePkg/Include/Protocol/PlatformLogo.h
> b/MdeModulePkg/Include/Protocol/PlatformLogo.h
> index 08e1dc35a4..7c9ef63c66 100644
> --- a/MdeModulePkg/Include/Protocol/PlatformLogo.h
> +++ b/MdeModulePkg/Include/Protocol/PlatformLogo.h
> @@ -29,7 +29,8 @@ typedef enum {
> EdkiiPlatformLogoDisplayAttributeCenterBottom,
>
> EdkiiPlatformLogoDisplayAttributeLeftBottom,
>
> EdkiiPlatformLogoDisplayAttributeCenterLeft,
>
> - EdkiiPlatformLogoDisplayAttributeCenter
>
> + EdkiiPlatformLogoDisplayAttributeCenter,
>
> + EdkiiPlatformLogoDisplayAttributeBGRTSpecification
>
> } EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE;
>
>
>
> /**
>
> diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
> b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
> index 478ec2d40e..ac086f9c79 100644
> --- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
> +++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
> @@ -169,7 +169,6 @@ BootLogoEnableLogo (
> DestX = SizeOfX - Image.Width;
>
> DestY = 0;
>
> break;
>
> -
>
> case EdkiiPlatformLogoDisplayAttributeCenterLeft:
>
> DestX = 0;
>
> DestY = (SizeOfY - Image.Height) / 2;
>
> @@ -182,7 +181,6 @@ BootLogoEnableLogo (
> DestX = SizeOfX - Image.Width;
>
> DestY = (SizeOfY - Image.Height) / 2;
>
> break;
>
> -
>
> case EdkiiPlatformLogoDisplayAttributeLeftBottom:
>
> DestX = 0;
>
> DestY = SizeOfY - Image.Height;
>
> @@ -195,7 +193,10 @@ BootLogoEnableLogo (
> DestX = SizeOfX - Image.Width;
>
> DestY = SizeOfY - Image.Height;
>
> break;
>
> -
>
> + case EdkiiPlatformLogoDisplayAttributeBGRTSpecification:
>
> + DestX = (SizeOfX - Image.Width) / 2;
>
> + DestY = (SizeOfY * 382) / 1000 - Image.Height / 2;
>
> + break;
>
> default:
>
> ASSERT (FALSE);
>
> continue;
>
> --
> 2.34.1
>
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#91842): https://edk2.groups.io/g/devel/message/91842
> Mute This Topic: https://groups.io/mt/92623125/4905953
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [gaoliming@byosoft.com.cn]
> -=-=-=-=-=-=
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow BGRT specification
2022-08-05 5:59 ` 回复: " gaoliming
@ 2022-08-05 6:55 ` Sean Rhodes
2022-08-05 7:04 ` Pedro Falcato
0 siblings, 1 reply; 16+ messages in thread
From: Sean Rhodes @ 2022-08-05 6:55 UTC (permalink / raw)
To: devel, gaoliming; +Cc: Zhichao Gao, Ray Ni, Jian J Wang
[-- Attachment #1: Type: text/plain, Size: 4035 bytes --]
Hi Liming
Microsoft details about positioning can be found here:
https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/boot-screen-components
Thanks
Sean
On Fri, 5 Aug 2022 at 07:00, gaoliming via groups.io <gaoliming=
byosoft.com.cn@groups.io> wrote:
> Sean:
> Can you give BGRT spec link? I want to check the spec description.
>
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Sean Rhodes
> > 发送时间: 2022年7月26日 16:15
> > 收件人: devel@edk2.groups.io
> > 抄送: Sean Rhodes <sean@starlabs.systems>; Zhichao Gao
> > <zhichao.gao@intel.com>; Ray Ni <ray.ni@intel.com>; Jian J Wang
> > <jian.j.wang@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>
> > 主题: [edk2-devel] [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to
> > follow BGRT specification
> >
> > Add an option to position the logo 38.2% from the top of the screen,
> > which follows the BGRT specification.
> >
> > Cc: Zhichao Gao <zhichao.gao@intel.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> > Cc: Jian J Wang <jian.j.wang@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Signed-off-by: Sean Rhodes <sean@starlabs.systems>
> > ---
> > MdeModulePkg/Include/Protocol/PlatformLogo.h | 3 ++-
> > MdeModulePkg/Library/BootLogoLib/BootLogoLib.c | 7 ++++---
> > 2 files changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/MdeModulePkg/Include/Protocol/PlatformLogo.h
> > b/MdeModulePkg/Include/Protocol/PlatformLogo.h
> > index 08e1dc35a4..7c9ef63c66 100644
> > --- a/MdeModulePkg/Include/Protocol/PlatformLogo.h
> > +++ b/MdeModulePkg/Include/Protocol/PlatformLogo.h
> > @@ -29,7 +29,8 @@ typedef enum {
> > EdkiiPlatformLogoDisplayAttributeCenterBottom,
> >
> > EdkiiPlatformLogoDisplayAttributeLeftBottom,
> >
> > EdkiiPlatformLogoDisplayAttributeCenterLeft,
> >
> > - EdkiiPlatformLogoDisplayAttributeCenter
> >
> > + EdkiiPlatformLogoDisplayAttributeCenter,
> >
> > + EdkiiPlatformLogoDisplayAttributeBGRTSpecification
> >
> > } EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE;
> >
> >
> >
> > /**
> >
> > diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
> > b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
> > index 478ec2d40e..ac086f9c79 100644
> > --- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
> > +++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
> > @@ -169,7 +169,6 @@ BootLogoEnableLogo (
> > DestX = SizeOfX - Image.Width;
> >
> > DestY = 0;
> >
> > break;
> >
> > -
> >
> > case EdkiiPlatformLogoDisplayAttributeCenterLeft:
> >
> > DestX = 0;
> >
> > DestY = (SizeOfY - Image.Height) / 2;
> >
> > @@ -182,7 +181,6 @@ BootLogoEnableLogo (
> > DestX = SizeOfX - Image.Width;
> >
> > DestY = (SizeOfY - Image.Height) / 2;
> >
> > break;
> >
> > -
> >
> > case EdkiiPlatformLogoDisplayAttributeLeftBottom:
> >
> > DestX = 0;
> >
> > DestY = SizeOfY - Image.Height;
> >
> > @@ -195,7 +193,10 @@ BootLogoEnableLogo (
> > DestX = SizeOfX - Image.Width;
> >
> > DestY = SizeOfY - Image.Height;
> >
> > break;
> >
> > -
> >
> > + case EdkiiPlatformLogoDisplayAttributeBGRTSpecification:
> >
> > + DestX = (SizeOfX - Image.Width) / 2;
> >
> > + DestY = (SizeOfY * 382) / 1000 - Image.Height / 2;
> >
> > + break;
> >
> > default:
> >
> > ASSERT (FALSE);
> >
> > continue;
> >
> > --
> > 2.34.1
> >
> >
> >
> > -=-=-=-=-=-=
> > Groups.io Links: You receive all messages sent to this group.
> > View/Reply Online (#91842): https://edk2.groups.io/g/devel/message/91842
> > Mute This Topic: https://groups.io/mt/92623125/4905953
> > Group Owner: devel+owner@edk2.groups.io
> > Unsubscribe: https://edk2.groups.io/g/devel/unsub
> > [gaoliming@byosoft.com.cn]
> > -=-=-=-=-=-=
> >
>
>
>
>
>
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 6871 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow BGRT specification
2022-08-05 6:55 ` Sean Rhodes
@ 2022-08-05 7:04 ` Pedro Falcato
2022-08-12 4:54 ` 回复: " gaoliming
0 siblings, 1 reply; 16+ messages in thread
From: Pedro Falcato @ 2022-08-05 7:04 UTC (permalink / raw)
To: edk2-devel-groups-io, sean; +Cc: Liming Gao, Zhichao Gao, Ray Ni, Jian J Wang
[-- Attachment #1: Type: text/plain, Size: 4538 bytes --]
Hi Sean,
I think it's clear from the wording that the 38.2% thing is a
recommendation and not mandatory. I was curious and checked out the ACPI
spec and they appear to not mention that at all. Maybe reword things to
"Microsoft recommendation"?
Thanks,
Pedro
On Fri, 5 Aug 2022, 07:55 Sean Rhodes, <sean@starlabs.systems> wrote:
> Hi Liming
>
> Microsoft details about positioning can be found here:
> https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/boot-screen-components
>
> Thanks
>
> Sean
>
> On Fri, 5 Aug 2022 at 07:00, gaoliming via groups.io <gaoliming=
> byosoft.com.cn@groups.io> wrote:
>
>> Sean:
>> Can you give BGRT spec link? I want to check the spec description.
>>
>> Thanks
>> Liming
>> > -----邮件原件-----
>> > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Sean Rhodes
>> > 发送时间: 2022年7月26日 16:15
>> > 收件人: devel@edk2.groups.io
>> > 抄送: Sean Rhodes <sean@starlabs.systems>; Zhichao Gao
>> > <zhichao.gao@intel.com>; Ray Ni <ray.ni@intel.com>; Jian J Wang
>> > <jian.j.wang@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>
>> > 主题: [edk2-devel] [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to
>> > follow BGRT specification
>> >
>> > Add an option to position the logo 38.2% from the top of the screen,
>> > which follows the BGRT specification.
>> >
>> > Cc: Zhichao Gao <zhichao.gao@intel.com>
>> > Cc: Ray Ni <ray.ni@intel.com>
>> > Cc: Jian J Wang <jian.j.wang@intel.com>
>> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
>> > Signed-off-by: Sean Rhodes <sean@starlabs.systems>
>> > ---
>> > MdeModulePkg/Include/Protocol/PlatformLogo.h | 3 ++-
>> > MdeModulePkg/Library/BootLogoLib/BootLogoLib.c | 7 ++++---
>> > 2 files changed, 6 insertions(+), 4 deletions(-)
>> >
>> > diff --git a/MdeModulePkg/Include/Protocol/PlatformLogo.h
>> > b/MdeModulePkg/Include/Protocol/PlatformLogo.h
>> > index 08e1dc35a4..7c9ef63c66 100644
>> > --- a/MdeModulePkg/Include/Protocol/PlatformLogo.h
>> > +++ b/MdeModulePkg/Include/Protocol/PlatformLogo.h
>> > @@ -29,7 +29,8 @@ typedef enum {
>> > EdkiiPlatformLogoDisplayAttributeCenterBottom,
>> >
>> > EdkiiPlatformLogoDisplayAttributeLeftBottom,
>> >
>> > EdkiiPlatformLogoDisplayAttributeCenterLeft,
>> >
>> > - EdkiiPlatformLogoDisplayAttributeCenter
>> >
>> > + EdkiiPlatformLogoDisplayAttributeCenter,
>> >
>> > + EdkiiPlatformLogoDisplayAttributeBGRTSpecification
>> >
>> > } EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE;
>> >
>> >
>> >
>> > /**
>> >
>> > diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
>> > b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
>> > index 478ec2d40e..ac086f9c79 100644
>> > --- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
>> > +++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
>> > @@ -169,7 +169,6 @@ BootLogoEnableLogo (
>> > DestX = SizeOfX - Image.Width;
>> >
>> > DestY = 0;
>> >
>> > break;
>> >
>> > -
>> >
>> > case EdkiiPlatformLogoDisplayAttributeCenterLeft:
>> >
>> > DestX = 0;
>> >
>> > DestY = (SizeOfY - Image.Height) / 2;
>> >
>> > @@ -182,7 +181,6 @@ BootLogoEnableLogo (
>> > DestX = SizeOfX - Image.Width;
>> >
>> > DestY = (SizeOfY - Image.Height) / 2;
>> >
>> > break;
>> >
>> > -
>> >
>> > case EdkiiPlatformLogoDisplayAttributeLeftBottom:
>> >
>> > DestX = 0;
>> >
>> > DestY = SizeOfY - Image.Height;
>> >
>> > @@ -195,7 +193,10 @@ BootLogoEnableLogo (
>> > DestX = SizeOfX - Image.Width;
>> >
>> > DestY = SizeOfY - Image.Height;
>> >
>> > break;
>> >
>> > -
>> >
>> > + case EdkiiPlatformLogoDisplayAttributeBGRTSpecification:
>> >
>> > + DestX = (SizeOfX - Image.Width) / 2;
>> >
>> > + DestY = (SizeOfY * 382) / 1000 - Image.Height / 2;
>> >
>> > + break;
>> >
>> > default:
>> >
>> > ASSERT (FALSE);
>> >
>> > continue;
>> >
>> > --
>> > 2.34.1
>> >
>> >
>> >
>> > -=-=-=-=-=-=
>> > Groups.io Links: You receive all messages sent to this group.
>> > View/Reply Online (#91842):
>> https://edk2.groups.io/g/devel/message/91842
>> > Mute This Topic: https://groups.io/mt/92623125/4905953
>> > Group Owner: devel+owner@edk2.groups.io
>> > Unsubscribe: https://edk2.groups.io/g/devel/unsub
>> > [gaoliming@byosoft.com.cn]
>> > -=-=-=-=-=-=
>> >
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
[-- Attachment #2: Type: text/html, Size: 7921 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo
2022-08-05 7:52 [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow Microsoft Recommendations Sean Rhodes
@ 2022-08-05 7:52 ` Sean Rhodes
0 siblings, 0 replies; 16+ messages in thread
From: Sean Rhodes @ 2022-08-05 7:52 UTC (permalink / raw)
To: devel; +Cc: Sean Rhodes, Zhichao Gao, Ray Ni, Jian J Wang, Liming Gao
When set to true, the Logo is positioned according to the BGRT
specification, 38.2% from the top of the screen. When set to false,
no behaviour is changed and the logo is positioned centrally.
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
---
MdeModulePkg/Logo/Logo.c | 5 +++++
MdeModulePkg/Logo/LogoDxe.inf | 4 ++++
MdeModulePkg/MdeModulePkg.dec | 6 ++++++
MdeModulePkg/MdeModulePkg.uni | 6 ++++++
4 files changed, 21 insertions(+)
diff --git a/MdeModulePkg/Logo/Logo.c b/MdeModulePkg/Logo/Logo.c
index 8ab874d2da..1638d0f984 100644
--- a/MdeModulePkg/Logo/Logo.c
+++ b/MdeModulePkg/Logo/Logo.c
@@ -13,6 +13,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Protocol/HiiPackageList.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/DebugLib.h>
+#include <Library/PcdLib.h>
typedef struct {
EFI_IMAGE_ID ImageId;
@@ -69,6 +70,10 @@ GetImage (
return EFI_NOT_FOUND;
}
+ if (FixedPcdGetBool (PcdFollowMicrosoftRecommended)) {
+ mLogos[Current].Attribute = EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended;
+ }
+
(*Instance)++;
*Attribute = mLogos[Current].Attribute;
*OffsetX = mLogos[Current].OffsetX;
diff --git a/MdeModulePkg/Logo/LogoDxe.inf b/MdeModulePkg/Logo/LogoDxe.inf
index 41215d25d8..ce29950089 100644
--- a/MdeModulePkg/Logo/LogoDxe.inf
+++ b/MdeModulePkg/Logo/LogoDxe.inf
@@ -41,6 +41,7 @@
UefiBootServicesTableLib
UefiDriverEntryPoint
DebugLib
+ PcdLib
[Protocols]
gEfiHiiDatabaseProtocolGuid ## CONSUMES
@@ -48,6 +49,9 @@
gEfiHiiPackageListProtocolGuid ## PRODUCES CONSUMES
gEdkiiPlatformLogoProtocolGuid ## PRODUCES
+[Pcd]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFollowMicrosoftRecommended ## CONSUMES
+
[Depex]
gEfiHiiDatabaseProtocolGuid AND
gEfiHiiImageExProtocolGuid
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 7d98910832..a503aaf58d 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -2098,6 +2098,12 @@
# @Prompt The shared bit mask when Intel Tdx is enabled.
gEfiMdeModulePkgTokenSpaceGuid.PcdTdxSharedBitMask|0x0|UINT64|0x10000025
+ ## This PCD sets the position of the Boot Logo.
+ # TRUE - The Logo is positioned following the recommendations from Microsoft.
+ # FALSE - The logo is positioned in the center of the screen.
+ # @ Prompt This position of the boot logo
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFollowMicrosoftRecommended|FALSE|BOOLEAN|0x10000026
+
[PcdsPatchableInModule]
## Specify memory size with page number for PEI code when
# Loading Module at Fixed Address feature is enabled.
diff --git a/MdeModulePkg/MdeModulePkg.uni b/MdeModulePkg/MdeModulePkg.uni
index b070f15ff2..e7050df7b7 100644
--- a/MdeModulePkg/MdeModulePkg.uni
+++ b/MdeModulePkg/MdeModulePkg.uni
@@ -1334,3 +1334,9 @@
#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdPcieResizableBarSupport_HELP #language en-US "Indicates if the PCIe Resizable BAR Capability Supported.<BR><BR>\n"
"TRUE - PCIe Resizable BAR Capability is supported.<BR>\n"
"FALSE - PCIe Resizable BAR Capability is not supported.<BR>"
+
+#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowMicrosoftRecommended_PROMPT #language en-US "The position of the Boot Logo"
+
+#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowMicrosoftRecommend_HELP #language en-US "Sets the position of the Logo. When set to true, the Logo is positioned following the recommendations"
+ " from Microsoft, 38.2% from the top of the screen."
+
--
2.34.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* 回复: [edk2-devel] [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow BGRT specification
2022-08-05 7:04 ` Pedro Falcato
@ 2022-08-12 4:54 ` gaoliming
0 siblings, 0 replies; 16+ messages in thread
From: gaoliming @ 2022-08-12 4:54 UTC (permalink / raw)
To: devel, pedro.falcato, sean
Cc: 'Zhichao Gao', 'Ray Ni', 'Jian J Wang'
[-- Attachment #1: Type: text/plain, Size: 5375 bytes --]
Sean:
According to the description, I agree with Pedro that this is a recommendation and not mandatory. Do you think so?
Thanks
Liming
发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Pedro Falcato
发送时间: 2022年8月5日 15:04
收件人: edk2-devel-groups-io <devel@edk2.groups.io>; sean@starlabs.systems
抄送: Liming Gao <gaoliming@byosoft.com.cn>; Zhichao Gao <zhichao.gao@intel.com>; Ray Ni <ray.ni@intel.com>; Jian J Wang <jian.j.wang@intel.com>
主题: Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow BGRT specification
Hi Sean,
I think it's clear from the wording that the 38.2% thing is a recommendation and not mandatory. I was curious and checked out the ACPI spec and they appear to not mention that at all. Maybe reword things to "Microsoft recommendation"?
Thanks,
Pedro
On Fri, 5 Aug 2022, 07:55 Sean Rhodes, <sean@starlabs.systems <mailto:sean@starlabs.systems> > wrote:
Hi Liming
Microsoft details about positioning can be found here: https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/boot-screen-components
Thanks
Sean
On Fri, 5 Aug 2022 at 07:00, gaoliming via groups.io <http://groups.io> <gaoliming=byosoft.com.cn@groups.io <mailto:byosoft.com.cn@groups.io> > wrote:
Sean:
Can you give BGRT spec link? I want to check the spec description.
Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <mailto:devel@edk2.groups.io> <devel@edk2.groups.io <mailto:devel@edk2.groups.io> > 代表 Sean Rhodes
> 发送时间: 2022年7月26日 16:15
> 收件人: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
> 抄送: Sean Rhodes <sean@starlabs.systems <mailto:sean@starlabs.systems> >; Zhichao Gao
> <zhichao.gao@intel.com <mailto:zhichao.gao@intel.com> >; Ray Ni <ray.ni@intel.com <mailto:ray.ni@intel.com> >; Jian J Wang
> <jian.j.wang@intel.com <mailto:jian.j.wang@intel.com> >; Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> >
> 主题: [edk2-devel] [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to
> follow BGRT specification
>
> Add an option to position the logo 38.2% from the top of the screen,
> which follows the BGRT specification.
>
> Cc: Zhichao Gao <zhichao.gao@intel.com <mailto:zhichao.gao@intel.com> >
> Cc: Ray Ni <ray.ni@intel.com <mailto:ray.ni@intel.com> >
> Cc: Jian J Wang <jian.j.wang@intel.com <mailto:jian.j.wang@intel.com> >
> Cc: Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> >
> Signed-off-by: Sean Rhodes <sean@starlabs.systems <mailto:sean@starlabs.systems> >
> ---
> MdeModulePkg/Include/Protocol/PlatformLogo.h | 3 ++-
> MdeModulePkg/Library/BootLogoLib/BootLogoLib.c | 7 ++++---
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/MdeModulePkg/Include/Protocol/PlatformLogo.h
> b/MdeModulePkg/Include/Protocol/PlatformLogo.h
> index 08e1dc35a4..7c9ef63c66 100644
> --- a/MdeModulePkg/Include/Protocol/PlatformLogo.h
> +++ b/MdeModulePkg/Include/Protocol/PlatformLogo.h
> @@ -29,7 +29,8 @@ typedef enum {
> EdkiiPlatformLogoDisplayAttributeCenterBottom,
>
> EdkiiPlatformLogoDisplayAttributeLeftBottom,
>
> EdkiiPlatformLogoDisplayAttributeCenterLeft,
>
> - EdkiiPlatformLogoDisplayAttributeCenter
>
> + EdkiiPlatformLogoDisplayAttributeCenter,
>
> + EdkiiPlatformLogoDisplayAttributeBGRTSpecification
>
> } EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE;
>
>
>
> /**
>
> diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
> b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
> index 478ec2d40e..ac086f9c79 100644
> --- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
> +++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
> @@ -169,7 +169,6 @@ BootLogoEnableLogo (
> DestX = SizeOfX - Image.Width;
>
> DestY = 0;
>
> break;
>
> -
>
> case EdkiiPlatformLogoDisplayAttributeCenterLeft:
>
> DestX = 0;
>
> DestY = (SizeOfY - Image.Height) / 2;
>
> @@ -182,7 +181,6 @@ BootLogoEnableLogo (
> DestX = SizeOfX - Image.Width;
>
> DestY = (SizeOfY - Image.Height) / 2;
>
> break;
>
> -
>
> case EdkiiPlatformLogoDisplayAttributeLeftBottom:
>
> DestX = 0;
>
> DestY = SizeOfY - Image.Height;
>
> @@ -195,7 +193,10 @@ BootLogoEnableLogo (
> DestX = SizeOfX - Image.Width;
>
> DestY = SizeOfY - Image.Height;
>
> break;
>
> -
>
> + case EdkiiPlatformLogoDisplayAttributeBGRTSpecification:
>
> + DestX = (SizeOfX - Image.Width) / 2;
>
> + DestY = (SizeOfY * 382) / 1000 - Image.Height / 2;
>
> + break;
>
> default:
>
> ASSERT (FALSE);
>
> continue;
>
> --
> 2.34.1
>
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#91842): https://edk2.groups.io/g/devel/message/91842
> Mute This Topic: https://groups.io/mt/92623125/4905953
> Group Owner: devel+owner@edk2.groups.io <mailto:devel%2Bowner@edk2.groups.io>
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> ]
> -=-=-=-=-=-=
>
[-- Attachment #2: Type: text/html, Size: 13019 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo
2022-09-26 8:09 [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow Microsoft Recommendations Sean Rhodes
@ 2022-09-26 8:09 ` Sean Rhodes
2022-10-08 2:02 ` Ni, Ray
0 siblings, 1 reply; 16+ messages in thread
From: Sean Rhodes @ 2022-09-26 8:09 UTC (permalink / raw)
To: devel; +Cc: Sean Rhodes, Zhichao Gao, Ray Ni, Jian J Wang, Liming Gao
When set to true, the Logo is positioned according to the BGRT
specification, 38.2% from the top of the screen. When set to false,
no behaviour is changed and the logo is positioned centrally.
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
---
MdeModulePkg/Logo/Logo.c | 5 +++++
MdeModulePkg/Logo/LogoDxe.inf | 4 ++++
MdeModulePkg/MdeModulePkg.dec | 6 ++++++
MdeModulePkg/MdeModulePkg.uni | 6 ++++++
4 files changed, 21 insertions(+)
diff --git a/MdeModulePkg/Logo/Logo.c b/MdeModulePkg/Logo/Logo.c
index 8ab874d2da..1638d0f984 100644
--- a/MdeModulePkg/Logo/Logo.c
+++ b/MdeModulePkg/Logo/Logo.c
@@ -13,6 +13,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Protocol/HiiPackageList.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/DebugLib.h>
+#include <Library/PcdLib.h>
typedef struct {
EFI_IMAGE_ID ImageId;
@@ -69,6 +70,10 @@ GetImage (
return EFI_NOT_FOUND;
}
+ if (FixedPcdGetBool (PcdFollowMicrosoftRecommended)) {
+ mLogos[Current].Attribute = EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended;
+ }
+
(*Instance)++;
*Attribute = mLogos[Current].Attribute;
*OffsetX = mLogos[Current].OffsetX;
diff --git a/MdeModulePkg/Logo/LogoDxe.inf b/MdeModulePkg/Logo/LogoDxe.inf
index 41215d25d8..ce29950089 100644
--- a/MdeModulePkg/Logo/LogoDxe.inf
+++ b/MdeModulePkg/Logo/LogoDxe.inf
@@ -41,6 +41,7 @@
UefiBootServicesTableLib
UefiDriverEntryPoint
DebugLib
+ PcdLib
[Protocols]
gEfiHiiDatabaseProtocolGuid ## CONSUMES
@@ -48,6 +49,9 @@
gEfiHiiPackageListProtocolGuid ## PRODUCES CONSUMES
gEdkiiPlatformLogoProtocolGuid ## PRODUCES
+[Pcd]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFollowMicrosoftRecommended ## CONSUMES
+
[Depex]
gEfiHiiDatabaseProtocolGuid AND
gEfiHiiImageExProtocolGuid
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 58e6ab0048..ac437990f1 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -2102,6 +2102,12 @@
# @Prompt The shared bit mask when Intel Tdx is enabled.
gEfiMdeModulePkgTokenSpaceGuid.PcdTdxSharedBitMask|0x0|UINT64|0x10000025
+ ## This PCD sets the position of the Boot Logo.
+ # TRUE - The Logo is positioned following the recommendations from Microsoft.
+ # FALSE - The logo is positioned in the center of the screen.
+ # @ Prompt This position of the boot logo
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFollowMicrosoftRecommended|FALSE|BOOLEAN|0x10000026
+
[PcdsPatchableInModule]
## Specify memory size with page number for PEI code when
# Loading Module at Fixed Address feature is enabled.
diff --git a/MdeModulePkg/MdeModulePkg.uni b/MdeModulePkg/MdeModulePkg.uni
index 33ce9f6198..09c1ac1cc1 100644
--- a/MdeModulePkg/MdeModulePkg.uni
+++ b/MdeModulePkg/MdeModulePkg.uni
@@ -1338,3 +1338,9 @@
#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdPcieResizableBarSupport_HELP #language en-US "Indicates if the PCIe Resizable BAR Capability Supported.<BR><BR>\n"
"TRUE - PCIe Resizable BAR Capability is supported.<BR>\n"
"FALSE - PCIe Resizable BAR Capability is not supported.<BR>"
+
+#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowMicrosoftRecommended_PROMPT #language en-US "The position of the Boot Logo"
+
+#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowMicrosoftRecommend_HELP #language en-US "Sets the position of the Logo. When set to true, the Logo is positioned following the recommendations"
+ " from Microsoft, 38.2% from the top of the screen."
+
--
2.34.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo
2022-09-26 8:09 ` [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo Sean Rhodes
@ 2022-10-08 2:02 ` Ni, Ray
2022-10-10 8:51 ` Sean Rhodes
0 siblings, 1 reply; 16+ messages in thread
From: Ni, Ray @ 2022-10-08 2:02 UTC (permalink / raw)
To: Rhodes, Sean, devel@edk2.groups.io
Cc: Rhodes, Sean, Gao, Zhichao, Wang, Jian J, Gao, Liming
Sean,
I remember that I evaluated the BGRT requirement when designing the PlatformLogo protocol.
So, I went back to got the code I wrote long time ago as below.
I didn't try to understand them now. Does it make sense to you?
Status = gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiGraphicsOutputProtocolGuid, (VOID **) &GraphicsOutput);
if (!EFI_ERROR (Status)) {
//
// Center of LOGO is in the vertical position 38.2% when PcdBootLogoOnlyEnable is TRUE
// Y = (VerticalResolution - LogoHeight) / 2
// Y' = VerticalResolution * 0.382 - LogoHeight * 0.5
// OffsetY + Y = Y'
// OffsetY = Y' - Y = -0.118 * VerticalResolution
//
*Attribute = EdkiiPlatformLogoDisplayAttributeCenter;
*OffsetX = 0;
*OffsetY = -118 * (INTN) GraphicsOutput->Mode->Info->VerticalResolution / 1000;
}
Thanks,
Ray
> -----Original Message-----
> From: Sean Rhodes <sean@starlabs.systems>
> Sent: Monday, September 26, 2022 4:10 PM
> To: devel@edk2.groups.io
> Cc: Rhodes, Sean <sean@starlabs.systems>; Gao, Zhichao
> <zhichao.gao@intel.com>; Ni, Ray <ray.ni@intel.com>; Wang, Jian J
> <jian.j.wang@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
> Subject: [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the
> position of the Logo
>
> When set to true, the Logo is positioned according to the BGRT
> specification, 38.2% from the top of the screen. When set to false,
> no behaviour is changed and the logo is positioned centrally.
>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Signed-off-by: Sean Rhodes <sean@starlabs.systems>
> ---
> MdeModulePkg/Logo/Logo.c | 5 +++++
> MdeModulePkg/Logo/LogoDxe.inf | 4 ++++
> MdeModulePkg/MdeModulePkg.dec | 6 ++++++
> MdeModulePkg/MdeModulePkg.uni | 6 ++++++
> 4 files changed, 21 insertions(+)
>
> diff --git a/MdeModulePkg/Logo/Logo.c b/MdeModulePkg/Logo/Logo.c
> index 8ab874d2da..1638d0f984 100644
> --- a/MdeModulePkg/Logo/Logo.c
> +++ b/MdeModulePkg/Logo/Logo.c
> @@ -13,6 +13,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> #include <Protocol/HiiPackageList.h>
>
> #include <Library/UefiBootServicesTableLib.h>
>
> #include <Library/DebugLib.h>
>
> +#include <Library/PcdLib.h>
>
>
>
> typedef struct {
>
> EFI_IMAGE_ID ImageId;
>
> @@ -69,6 +70,10 @@ GetImage (
> return EFI_NOT_FOUND;
>
> }
>
>
>
> + if (FixedPcdGetBool (PcdFollowMicrosoftRecommended)) {
>
> + mLogos[Current].Attribute =
> EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended;
>
> + }
>
> +
>
> (*Instance)++;
>
> *Attribute = mLogos[Current].Attribute;
>
> *OffsetX = mLogos[Current].OffsetX;
>
> diff --git a/MdeModulePkg/Logo/LogoDxe.inf
> b/MdeModulePkg/Logo/LogoDxe.inf
> index 41215d25d8..ce29950089 100644
> --- a/MdeModulePkg/Logo/LogoDxe.inf
> +++ b/MdeModulePkg/Logo/LogoDxe.inf
> @@ -41,6 +41,7 @@
> UefiBootServicesTableLib
>
> UefiDriverEntryPoint
>
> DebugLib
>
> + PcdLib
>
>
>
> [Protocols]
>
> gEfiHiiDatabaseProtocolGuid ## CONSUMES
>
> @@ -48,6 +49,9 @@
> gEfiHiiPackageListProtocolGuid ## PRODUCES CONSUMES
>
> gEdkiiPlatformLogoProtocolGuid ## PRODUCES
>
>
>
> +[Pcd]
>
> + gEfiMdeModulePkgTokenSpaceGuid.PcdFollowMicrosoftRecommended
> ## CONSUMES
>
> +
>
> [Depex]
>
> gEfiHiiDatabaseProtocolGuid AND
>
> gEfiHiiImageExProtocolGuid
>
> diff --git a/MdeModulePkg/MdeModulePkg.dec
> b/MdeModulePkg/MdeModulePkg.dec
> index 58e6ab0048..ac437990f1 100644
> --- a/MdeModulePkg/MdeModulePkg.dec
> +++ b/MdeModulePkg/MdeModulePkg.dec
> @@ -2102,6 +2102,12 @@
> # @Prompt The shared bit mask when Intel Tdx is enabled.
>
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdTdxSharedBitMask|0x0|UINT64|0x
> 10000025
>
>
>
> + ## This PCD sets the position of the Boot Logo.
>
> + # TRUE - The Logo is positioned following the recommendations from
> Microsoft.
>
> + # FALSE - The logo is positioned in the center of the screen.
>
> + # @ Prompt This position of the boot logo
>
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdFollowMicrosoftRecommended|FA
> LSE|BOOLEAN|0x10000026
>
> +
>
> [PcdsPatchableInModule]
>
> ## Specify memory size with page number for PEI code when
>
> # Loading Module at Fixed Address feature is enabled.
>
> diff --git a/MdeModulePkg/MdeModulePkg.uni
> b/MdeModulePkg/MdeModulePkg.uni
> index 33ce9f6198..09c1ac1cc1 100644
> --- a/MdeModulePkg/MdeModulePkg.uni
> +++ b/MdeModulePkg/MdeModulePkg.uni
> @@ -1338,3 +1338,9 @@
> #string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdPcieResizableBarSupport_HEL
> P #language en-US "Indicates if the PCIe Resizable BAR Capability
> Supported.<BR><BR>\n"
>
> "TRUE - PCIe Resizable BAR
> Capability is supported.<BR>\n"
>
> "FALSE - PCIe Resizable BAR
> Capability is not supported.<BR>"
>
> +
>
> +#string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowMicrosoftRecommende
> d_PROMPT #language en-US "The position of the Boot Logo"
>
> +
>
> +#string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowMicrosoftRecommend_
> HELP #language en-US "Sets the position of the Logo. When set to true, the
> Logo is positioned following the recommendations"
>
> + " from Microsoft, 38.2% from
> the top of the screen."
>
> +
>
> --
> 2.34.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo
2022-10-08 2:02 ` Ni, Ray
@ 2022-10-10 8:51 ` Sean Rhodes
2022-10-10 9:25 ` Ni, Ray
0 siblings, 1 reply; 16+ messages in thread
From: Sean Rhodes @ 2022-10-10 8:51 UTC (permalink / raw)
To: Ni, Ray; +Cc: devel@edk2.groups.io, Gao, Zhichao, Wang, Jian J, Gao, Liming
[-- Attachment #1: Type: text/plain, Size: 6134 bytes --]
Hi Ray
Thank you, it does, and I think it will work for most splash images.
However, the way it's written in my patch accounts for the Image size. This
will handle splash images that are equal to, or larger than the resolution
of the display.
Thanks
Sean
On Sat, 8 Oct 2022 at 03:02, Ni, Ray <ray.ni@intel.com> wrote:
> Sean,
> I remember that I evaluated the BGRT requirement when designing the
> PlatformLogo protocol.
>
> So, I went back to got the code I wrote long time ago as below.
> I didn't try to understand them now. Does it make sense to you?
>
> Status = gBS->HandleProtocol (gST->ConsoleOutHandle,
> &gEfiGraphicsOutputProtocolGuid, (VOID **) &GraphicsOutput);
> if (!EFI_ERROR (Status)) {
> //
> // Center of LOGO is in the vertical position 38.2% when
> PcdBootLogoOnlyEnable is TRUE
> // Y = (VerticalResolution - LogoHeight) / 2
> // Y' = VerticalResolution * 0.382 - LogoHeight * 0.5
> // OffsetY + Y = Y'
> // OffsetY = Y' - Y = -0.118 * VerticalResolution
> //
> *Attribute = EdkiiPlatformLogoDisplayAttributeCenter;
> *OffsetX = 0;
> *OffsetY = -118 * (INTN)
> GraphicsOutput->Mode->Info->VerticalResolution / 1000;
> }
>
> Thanks,
> Ray
>
> > -----Original Message-----
> > From: Sean Rhodes <sean@starlabs.systems>
> > Sent: Monday, September 26, 2022 4:10 PM
> > To: devel@edk2.groups.io
> > Cc: Rhodes, Sean <sean@starlabs.systems>; Gao, Zhichao
> > <zhichao.gao@intel.com>; Ni, Ray <ray.ni@intel.com>; Wang, Jian J
> > <jian.j.wang@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
> > Subject: [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the
> > position of the Logo
> >
> > When set to true, the Logo is positioned according to the BGRT
> > specification, 38.2% from the top of the screen. When set to false,
> > no behaviour is changed and the logo is positioned centrally.
> >
> > Cc: Zhichao Gao <zhichao.gao@intel.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> > Cc: Jian J Wang <jian.j.wang@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Signed-off-by: Sean Rhodes <sean@starlabs.systems>
> > ---
> > MdeModulePkg/Logo/Logo.c | 5 +++++
> > MdeModulePkg/Logo/LogoDxe.inf | 4 ++++
> > MdeModulePkg/MdeModulePkg.dec | 6 ++++++
> > MdeModulePkg/MdeModulePkg.uni | 6 ++++++
> > 4 files changed, 21 insertions(+)
> >
> > diff --git a/MdeModulePkg/Logo/Logo.c b/MdeModulePkg/Logo/Logo.c
> > index 8ab874d2da..1638d0f984 100644
> > --- a/MdeModulePkg/Logo/Logo.c
> > +++ b/MdeModulePkg/Logo/Logo.c
> > @@ -13,6 +13,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> > #include <Protocol/HiiPackageList.h>
> >
> > #include <Library/UefiBootServicesTableLib.h>
> >
> > #include <Library/DebugLib.h>
> >
> > +#include <Library/PcdLib.h>
> >
> >
> >
> > typedef struct {
> >
> > EFI_IMAGE_ID ImageId;
> >
> > @@ -69,6 +70,10 @@ GetImage (
> > return EFI_NOT_FOUND;
> >
> > }
> >
> >
> >
> > + if (FixedPcdGetBool (PcdFollowMicrosoftRecommended)) {
> >
> > + mLogos[Current].Attribute =
> > EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended;
> >
> > + }
> >
> > +
> >
> > (*Instance)++;
> >
> > *Attribute = mLogos[Current].Attribute;
> >
> > *OffsetX = mLogos[Current].OffsetX;
> >
> > diff --git a/MdeModulePkg/Logo/LogoDxe.inf
> > b/MdeModulePkg/Logo/LogoDxe.inf
> > index 41215d25d8..ce29950089 100644
> > --- a/MdeModulePkg/Logo/LogoDxe.inf
> > +++ b/MdeModulePkg/Logo/LogoDxe.inf
> > @@ -41,6 +41,7 @@
> > UefiBootServicesTableLib
> >
> > UefiDriverEntryPoint
> >
> > DebugLib
> >
> > + PcdLib
> >
> >
> >
> > [Protocols]
> >
> > gEfiHiiDatabaseProtocolGuid ## CONSUMES
> >
> > @@ -48,6 +49,9 @@
> > gEfiHiiPackageListProtocolGuid ## PRODUCES CONSUMES
> >
> > gEdkiiPlatformLogoProtocolGuid ## PRODUCES
> >
> >
> >
> > +[Pcd]
> >
> > + gEfiMdeModulePkgTokenSpaceGuid.PcdFollowMicrosoftRecommended
> > ## CONSUMES
> >
> > +
> >
> > [Depex]
> >
> > gEfiHiiDatabaseProtocolGuid AND
> >
> > gEfiHiiImageExProtocolGuid
> >
> > diff --git a/MdeModulePkg/MdeModulePkg.dec
> > b/MdeModulePkg/MdeModulePkg.dec
> > index 58e6ab0048..ac437990f1 100644
> > --- a/MdeModulePkg/MdeModulePkg.dec
> > +++ b/MdeModulePkg/MdeModulePkg.dec
> > @@ -2102,6 +2102,12 @@
> > # @Prompt The shared bit mask when Intel Tdx is enabled.
> >
> >
> > gEfiMdeModulePkgTokenSpaceGuid.PcdTdxSharedBitMask|0x0|UINT64|0x
> > 10000025
> >
> >
> >
> > + ## This PCD sets the position of the Boot Logo.
> >
> > + # TRUE - The Logo is positioned following the recommendations from
> > Microsoft.
> >
> > + # FALSE - The logo is positioned in the center of the screen.
> >
> > + # @ Prompt This position of the boot logo
> >
> > +
> > gEfiMdeModulePkgTokenSpaceGuid.PcdFollowMicrosoftRecommended|FA
> > LSE|BOOLEAN|0x10000026
> >
> > +
> >
> > [PcdsPatchableInModule]
> >
> > ## Specify memory size with page number for PEI code when
> >
> > # Loading Module at Fixed Address feature is enabled.
> >
> > diff --git a/MdeModulePkg/MdeModulePkg.uni
> > b/MdeModulePkg/MdeModulePkg.uni
> > index 33ce9f6198..09c1ac1cc1 100644
> > --- a/MdeModulePkg/MdeModulePkg.uni
> > +++ b/MdeModulePkg/MdeModulePkg.uni
> > @@ -1338,3 +1338,9 @@
> > #string
> > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdPcieResizableBarSupport_HEL
> > P #language en-US "Indicates if the PCIe Resizable BAR Capability
> > Supported.<BR><BR>\n"
> >
> >
> "TRUE - PCIe Resizable BAR
> > Capability is supported.<BR>\n"
> >
> >
> "FALSE - PCIe Resizable BAR
> > Capability is not supported.<BR>"
> >
> > +
> >
> > +#string
> > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowMicrosoftRecommende
> > d_PROMPT #language en-US "The position of the Boot Logo"
> >
> > +
> >
> > +#string
> > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowMicrosoftRecommend_
> > HELP #language en-US "Sets the position of the Logo. When set to true,
> the
> > Logo is positioned following the recommendations"
> >
> > +
> " from Microsoft, 38.2% from
> > the top of the screen."
> >
> > +
> >
> > --
> > 2.34.1
>
>
[-- Attachment #2: Type: text/html, Size: 9391 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo
2022-10-10 8:51 ` Sean Rhodes
@ 2022-10-10 9:25 ` Ni, Ray
2022-10-10 9:44 ` Sean Rhodes
2022-10-25 7:26 ` Sean Rhodes
0 siblings, 2 replies; 16+ messages in thread
From: Ni, Ray @ 2022-10-10 9:25 UTC (permalink / raw)
To: Rhodes, Sean
Cc: devel@edk2.groups.io, Gao, Zhichao, Wang, Jian J, Gao, Liming
[-- Attachment #1: Type: text/plain, Size: 7066 bytes --]
The logic I shared below is from the LogoDxe driver which produces EDKII_PLATFORM_LOGO_PROTOCOL.
This driver should know the image size and it can account for the image size.
Thanks,
Ray
From: Sean Rhodes <sean@starlabs.systems>
Sent: Monday, October 10, 2022 4:51 PM
To: Ni, Ray <ray.ni@intel.com>
Cc: devel@edk2.groups.io; Gao, Zhichao <zhichao.gao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: Re: [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo
Hi Ray
Thank you, it does, and I think it will work for most splash images. However, the way it's written in my patch accounts for the Image size. This will handle splash images that are equal to, or larger than the resolution of the display.
Thanks
Sean
On Sat, 8 Oct 2022 at 03:02, Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>> wrote:
Sean,
I remember that I evaluated the BGRT requirement when designing the PlatformLogo protocol.
So, I went back to got the code I wrote long time ago as below.
I didn't try to understand them now. Does it make sense to you?
Status = gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiGraphicsOutputProtocolGuid, (VOID **) &GraphicsOutput);
if (!EFI_ERROR (Status)) {
//
// Center of LOGO is in the vertical position 38.2% when PcdBootLogoOnlyEnable is TRUE
// Y = (VerticalResolution - LogoHeight) / 2
// Y' = VerticalResolution * 0.382 - LogoHeight * 0.5
// OffsetY + Y = Y'
// OffsetY = Y' - Y = -0.118 * VerticalResolution
//
*Attribute = EdkiiPlatformLogoDisplayAttributeCenter;
*OffsetX = 0;
*OffsetY = -118 * (INTN) GraphicsOutput->Mode->Info->VerticalResolution / 1000;
}
Thanks,
Ray
> -----Original Message-----
> From: Sean Rhodes <sean@starlabs.systems<mailto:sean@starlabs.systems>>
> Sent: Monday, September 26, 2022 4:10 PM
> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Cc: Rhodes, Sean <sean@starlabs.systems<mailto:sean@starlabs.systems>>; Gao, Zhichao
> <zhichao.gao@intel.com<mailto:zhichao.gao@intel.com>>; Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>; Wang, Jian J
> <jian.j.wang@intel.com<mailto:jian.j.wang@intel.com>>; Gao, Liming <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
> Subject: [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the
> position of the Logo
>
> When set to true, the Logo is positioned according to the BGRT
> specification, 38.2% from the top of the screen. When set to false,
> no behaviour is changed and the logo is positioned centrally.
>
> Cc: Zhichao Gao <zhichao.gao@intel.com<mailto:zhichao.gao@intel.com>>
> Cc: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>>
> Cc: Jian J Wang <jian.j.wang@intel.com<mailto:jian.j.wang@intel.com>>
> Cc: Liming Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
> Signed-off-by: Sean Rhodes <sean@starlabs.systems<mailto:sean@starlabs.systems>>
> ---
> MdeModulePkg/Logo/Logo.c | 5 +++++
> MdeModulePkg/Logo/LogoDxe.inf | 4 ++++
> MdeModulePkg/MdeModulePkg.dec | 6 ++++++
> MdeModulePkg/MdeModulePkg.uni | 6 ++++++
> 4 files changed, 21 insertions(+)
>
> diff --git a/MdeModulePkg/Logo/Logo.c b/MdeModulePkg/Logo/Logo.c
> index 8ab874d2da..1638d0f984 100644
> --- a/MdeModulePkg/Logo/Logo.c
> +++ b/MdeModulePkg/Logo/Logo.c
> @@ -13,6 +13,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> #include <Protocol/HiiPackageList.h>
>
> #include <Library/UefiBootServicesTableLib.h>
>
> #include <Library/DebugLib.h>
>
> +#include <Library/PcdLib.h>
>
>
>
> typedef struct {
>
> EFI_IMAGE_ID ImageId;
>
> @@ -69,6 +70,10 @@ GetImage (
> return EFI_NOT_FOUND;
>
> }
>
>
>
> + if (FixedPcdGetBool (PcdFollowMicrosoftRecommended)) {
>
> + mLogos[Current].Attribute =
> EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended;
>
> + }
>
> +
>
> (*Instance)++;
>
> *Attribute = mLogos[Current].Attribute;
>
> *OffsetX = mLogos[Current].OffsetX;
>
> diff --git a/MdeModulePkg/Logo/LogoDxe.inf
> b/MdeModulePkg/Logo/LogoDxe.inf
> index 41215d25d8..ce29950089 100644
> --- a/MdeModulePkg/Logo/LogoDxe.inf
> +++ b/MdeModulePkg/Logo/LogoDxe.inf
> @@ -41,6 +41,7 @@
> UefiBootServicesTableLib
>
> UefiDriverEntryPoint
>
> DebugLib
>
> + PcdLib
>
>
>
> [Protocols]
>
> gEfiHiiDatabaseProtocolGuid ## CONSUMES
>
> @@ -48,6 +49,9 @@
> gEfiHiiPackageListProtocolGuid ## PRODUCES CONSUMES
>
> gEdkiiPlatformLogoProtocolGuid ## PRODUCES
>
>
>
> +[Pcd]
>
> + gEfiMdeModulePkgTokenSpaceGuid.PcdFollowMicrosoftRecommended
> ## CONSUMES
>
> +
>
> [Depex]
>
> gEfiHiiDatabaseProtocolGuid AND
>
> gEfiHiiImageExProtocolGuid
>
> diff --git a/MdeModulePkg/MdeModulePkg.dec
> b/MdeModulePkg/MdeModulePkg.dec
> index 58e6ab0048..ac437990f1 100644
> --- a/MdeModulePkg/MdeModulePkg.dec
> +++ b/MdeModulePkg/MdeModulePkg.dec
> @@ -2102,6 +2102,12 @@
> # @Prompt The shared bit mask when Intel Tdx is enabled.
>
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdTdxSharedBitMask|0x0|UINT64|0x
> 10000025
>
>
>
> + ## This PCD sets the position of the Boot Logo.
>
> + # TRUE - The Logo is positioned following the recommendations from
> Microsoft.
>
> + # FALSE - The logo is positioned in the center of the screen.
>
> + # @ Prompt This position of the boot logo
>
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdFollowMicrosoftRecommended|FA
> LSE|BOOLEAN|0x10000026
>
> +
>
> [PcdsPatchableInModule]
>
> ## Specify memory size with page number for PEI code when
>
> # Loading Module at Fixed Address feature is enabled.
>
> diff --git a/MdeModulePkg/MdeModulePkg.uni
> b/MdeModulePkg/MdeModulePkg.uni
> index 33ce9f6198..09c1ac1cc1 100644
> --- a/MdeModulePkg/MdeModulePkg.uni
> +++ b/MdeModulePkg/MdeModulePkg.uni
> @@ -1338,3 +1338,9 @@
> #string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdPcieResizableBarSupport_HEL
> P #language en-US "Indicates if the PCIe Resizable BAR Capability
> Supported.<BR><BR>\n"
>
> "TRUE - PCIe Resizable BAR
> Capability is supported.<BR>\n"
>
> "FALSE - PCIe Resizable BAR
> Capability is not supported.<BR>"
>
> +
>
> +#string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowMicrosoftRecommende
> d_PROMPT #language en-US "The position of the Boot Logo"
>
> +
>
> +#string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowMicrosoftRecommend_
> HELP #language en-US "Sets the position of the Logo. When set to true, the
> Logo is positioned following the recommendations"
>
> + " from Microsoft, 38.2% from
> the top of the screen."
>
> +
>
> --
> 2.34.1
[-- Attachment #2: Type: text/html, Size: 13871 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo
2022-10-10 9:25 ` Ni, Ray
@ 2022-10-10 9:44 ` Sean Rhodes
2022-10-25 7:26 ` Sean Rhodes
1 sibling, 0 replies; 16+ messages in thread
From: Sean Rhodes @ 2022-10-10 9:44 UTC (permalink / raw)
To: Ni, Ray
Cc: devel@edk2.groups.io, Gao, Zhichao, Wang, Jian J, Gao, Liming,
Matt DeVillier
[-- Attachment #1: Type: text/plain, Size: 6907 bytes --]
+ Matt
@Matt DeVillier <matt.devillier@gmail.com> Does Ray's code work for you?
On Mon, 10 Oct 2022 at 10:25, Ni, Ray <ray.ni@intel.com> wrote:
> The logic I shared below is from the LogoDxe driver which produces
> EDKII_PLATFORM_LOGO_PROTOCOL.
>
> This driver should know the image size and it can account for the image
> size.
>
>
>
> Thanks,
>
> Ray
>
>
>
> *From:* Sean Rhodes <sean@starlabs.systems>
> *Sent:* Monday, October 10, 2022 4:51 PM
> *To:* Ni, Ray <ray.ni@intel.com>
> *Cc:* devel@edk2.groups.io; Gao, Zhichao <zhichao.gao@intel.com>; Wang,
> Jian J <jian.j.wang@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
> *Subject:* Re: [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the
> position of the Logo
>
>
>
> Hi Ray
>
>
>
> Thank you, it does, and I think it will work for most splash images.
> However, the way it's written in my patch accounts for the Image size. This
> will handle splash images that are equal to, or larger than the resolution
> of the display.
>
>
>
> Thanks
>
>
>
> Sean
>
>
>
> On Sat, 8 Oct 2022 at 03:02, Ni, Ray <ray.ni@intel.com> wrote:
>
> Sean,
> I remember that I evaluated the BGRT requirement when designing the
> PlatformLogo protocol.
>
> So, I went back to got the code I wrote long time ago as below.
> I didn't try to understand them now. Does it make sense to you?
>
> Status = gBS->HandleProtocol (gST->ConsoleOutHandle,
> &gEfiGraphicsOutputProtocolGuid, (VOID **) &GraphicsOutput);
> if (!EFI_ERROR (Status)) {
> //
> // Center of LOGO is in the vertical position 38.2% when
> PcdBootLogoOnlyEnable is TRUE
> // Y = (VerticalResolution - LogoHeight) / 2
> // Y' = VerticalResolution * 0.382 - LogoHeight * 0.5
> // OffsetY + Y = Y'
> // OffsetY = Y' - Y = -0.118 * VerticalResolution
> //
> *Attribute = EdkiiPlatformLogoDisplayAttributeCenter;
> *OffsetX = 0;
> *OffsetY = -118 * (INTN)
> GraphicsOutput->Mode->Info->VerticalResolution / 1000;
> }
>
> Thanks,
> Ray
>
> > -----Original Message-----
> > From: Sean Rhodes <sean@starlabs.systems>
> > Sent: Monday, September 26, 2022 4:10 PM
> > To: devel@edk2.groups.io
> > Cc: Rhodes, Sean <sean@starlabs.systems>; Gao, Zhichao
> > <zhichao.gao@intel.com>; Ni, Ray <ray.ni@intel.com>; Wang, Jian J
> > <jian.j.wang@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
> > Subject: [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the
> > position of the Logo
> >
> > When set to true, the Logo is positioned according to the BGRT
> > specification, 38.2% from the top of the screen. When set to false,
> > no behaviour is changed and the logo is positioned centrally.
> >
> > Cc: Zhichao Gao <zhichao.gao@intel.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> > Cc: Jian J Wang <jian.j.wang@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Signed-off-by: Sean Rhodes <sean@starlabs.systems>
> > ---
> > MdeModulePkg/Logo/Logo.c | 5 +++++
> > MdeModulePkg/Logo/LogoDxe.inf | 4 ++++
> > MdeModulePkg/MdeModulePkg.dec | 6 ++++++
> > MdeModulePkg/MdeModulePkg.uni | 6 ++++++
> > 4 files changed, 21 insertions(+)
> >
> > diff --git a/MdeModulePkg/Logo/Logo.c b/MdeModulePkg/Logo/Logo.c
> > index 8ab874d2da..1638d0f984 100644
> > --- a/MdeModulePkg/Logo/Logo.c
> > +++ b/MdeModulePkg/Logo/Logo.c
> > @@ -13,6 +13,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> > #include <Protocol/HiiPackageList.h>
> >
> > #include <Library/UefiBootServicesTableLib.h>
> >
> > #include <Library/DebugLib.h>
> >
> > +#include <Library/PcdLib.h>
> >
> >
> >
> > typedef struct {
> >
> > EFI_IMAGE_ID ImageId;
> >
> > @@ -69,6 +70,10 @@ GetImage (
> > return EFI_NOT_FOUND;
> >
> > }
> >
> >
> >
> > + if (FixedPcdGetBool (PcdFollowMicrosoftRecommended)) {
> >
> > + mLogos[Current].Attribute =
> > EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended;
> >
> > + }
> >
> > +
> >
> > (*Instance)++;
> >
> > *Attribute = mLogos[Current].Attribute;
> >
> > *OffsetX = mLogos[Current].OffsetX;
> >
> > diff --git a/MdeModulePkg/Logo/LogoDxe.inf
> > b/MdeModulePkg/Logo/LogoDxe.inf
> > index 41215d25d8..ce29950089 100644
> > --- a/MdeModulePkg/Logo/LogoDxe.inf
> > +++ b/MdeModulePkg/Logo/LogoDxe.inf
> > @@ -41,6 +41,7 @@
> > UefiBootServicesTableLib
> >
> > UefiDriverEntryPoint
> >
> > DebugLib
> >
> > + PcdLib
> >
> >
> >
> > [Protocols]
> >
> > gEfiHiiDatabaseProtocolGuid ## CONSUMES
> >
> > @@ -48,6 +49,9 @@
> > gEfiHiiPackageListProtocolGuid ## PRODUCES CONSUMES
> >
> > gEdkiiPlatformLogoProtocolGuid ## PRODUCES
> >
> >
> >
> > +[Pcd]
> >
> > + gEfiMdeModulePkgTokenSpaceGuid.PcdFollowMicrosoftRecommended
> > ## CONSUMES
> >
> > +
> >
> > [Depex]
> >
> > gEfiHiiDatabaseProtocolGuid AND
> >
> > gEfiHiiImageExProtocolGuid
> >
> > diff --git a/MdeModulePkg/MdeModulePkg.dec
> > b/MdeModulePkg/MdeModulePkg.dec
> > index 58e6ab0048..ac437990f1 100644
> > --- a/MdeModulePkg/MdeModulePkg.dec
> > +++ b/MdeModulePkg/MdeModulePkg.dec
> > @@ -2102,6 +2102,12 @@
> > # @Prompt The shared bit mask when Intel Tdx is enabled.
> >
> >
> > gEfiMdeModulePkgTokenSpaceGuid.PcdTdxSharedBitMask|0x0|UINT64|0x
> > 10000025
> >
> >
> >
> > + ## This PCD sets the position of the Boot Logo.
> >
> > + # TRUE - The Logo is positioned following the recommendations from
> > Microsoft.
> >
> > + # FALSE - The logo is positioned in the center of the screen.
> >
> > + # @ Prompt This position of the boot logo
> >
> > +
> > gEfiMdeModulePkgTokenSpaceGuid.PcdFollowMicrosoftRecommended|FA
> > LSE|BOOLEAN|0x10000026
> >
> > +
> >
> > [PcdsPatchableInModule]
> >
> > ## Specify memory size with page number for PEI code when
> >
> > # Loading Module at Fixed Address feature is enabled.
> >
> > diff --git a/MdeModulePkg/MdeModulePkg.uni
> > b/MdeModulePkg/MdeModulePkg.uni
> > index 33ce9f6198..09c1ac1cc1 100644
> > --- a/MdeModulePkg/MdeModulePkg.uni
> > +++ b/MdeModulePkg/MdeModulePkg.uni
> > @@ -1338,3 +1338,9 @@
> > #string
> > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdPcieResizableBarSupport_HEL
> > P #language en-US "Indicates if the PCIe Resizable BAR Capability
> > Supported.<BR><BR>\n"
> >
> >
> "TRUE - PCIe Resizable BAR
> > Capability is supported.<BR>\n"
> >
> >
> "FALSE - PCIe Resizable BAR
> > Capability is not supported.<BR>"
> >
> > +
> >
> > +#string
> > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowMicrosoftRecommende
> > d_PROMPT #language en-US "The position of the Boot Logo"
> >
> > +
> >
> > +#string
> > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowMicrosoftRecommend_
> > HELP #language en-US "Sets the position of the Logo. When set to true,
> the
> > Logo is positioned following the recommendations"
> >
> > +
> " from Microsoft, 38.2% from
> > the top of the screen."
> >
> > +
> >
> > --
> > 2.34.1
>
>
[-- Attachment #2: Type: text/html, Size: 12571 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo
2022-10-10 9:25 ` Ni, Ray
2022-10-10 9:44 ` Sean Rhodes
@ 2022-10-25 7:26 ` Sean Rhodes
1 sibling, 0 replies; 16+ messages in thread
From: Sean Rhodes @ 2022-10-25 7:26 UTC (permalink / raw)
To: Ni, Ray; +Cc: devel@edk2.groups.io, Gao, Zhichao, Wang, Jian J, Gao, Liming
[-- Attachment #1: Type: text/plain, Size: 6986 bytes --]
Hi Ray
Where would you suggest this code goes? edk2 should support both Microsoft
recommended and "normal". The original patch handled this well.
Thanks
Sean
On Mon, 10 Oct 2022 at 10:25, Ni, Ray <ray.ni@intel.com> wrote:
> The logic I shared below is from the LogoDxe driver which produces
> EDKII_PLATFORM_LOGO_PROTOCOL.
>
> This driver should know the image size and it can account for the image
> size.
>
>
>
> Thanks,
>
> Ray
>
>
>
> *From:* Sean Rhodes <sean@starlabs.systems>
> *Sent:* Monday, October 10, 2022 4:51 PM
> *To:* Ni, Ray <ray.ni@intel.com>
> *Cc:* devel@edk2.groups.io; Gao, Zhichao <zhichao.gao@intel.com>; Wang,
> Jian J <jian.j.wang@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
> *Subject:* Re: [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the
> position of the Logo
>
>
>
> Hi Ray
>
>
>
> Thank you, it does, and I think it will work for most splash images.
> However, the way it's written in my patch accounts for the Image size. This
> will handle splash images that are equal to, or larger than the resolution
> of the display.
>
>
>
> Thanks
>
>
>
> Sean
>
>
>
> On Sat, 8 Oct 2022 at 03:02, Ni, Ray <ray.ni@intel.com> wrote:
>
> Sean,
> I remember that I evaluated the BGRT requirement when designing the
> PlatformLogo protocol.
>
> So, I went back to got the code I wrote long time ago as below.
> I didn't try to understand them now. Does it make sense to you?
>
> Status = gBS->HandleProtocol (gST->ConsoleOutHandle,
> &gEfiGraphicsOutputProtocolGuid, (VOID **) &GraphicsOutput);
> if (!EFI_ERROR (Status)) {
> //
> // Center of LOGO is in the vertical position 38.2% when
> PcdBootLogoOnlyEnable is TRUE
> // Y = (VerticalResolution - LogoHeight) / 2
> // Y' = VerticalResolution * 0.382 - LogoHeight * 0.5
> // OffsetY + Y = Y'
> // OffsetY = Y' - Y = -0.118 * VerticalResolution
> //
> *Attribute = EdkiiPlatformLogoDisplayAttributeCenter;
> *OffsetX = 0;
> *OffsetY = -118 * (INTN)
> GraphicsOutput->Mode->Info->VerticalResolution / 1000;
> }
>
> Thanks,
> Ray
>
> > -----Original Message-----
> > From: Sean Rhodes <sean@starlabs.systems>
> > Sent: Monday, September 26, 2022 4:10 PM
> > To: devel@edk2.groups.io
> > Cc: Rhodes, Sean <sean@starlabs.systems>; Gao, Zhichao
> > <zhichao.gao@intel.com>; Ni, Ray <ray.ni@intel.com>; Wang, Jian J
> > <jian.j.wang@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
> > Subject: [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the
> > position of the Logo
> >
> > When set to true, the Logo is positioned according to the BGRT
> > specification, 38.2% from the top of the screen. When set to false,
> > no behaviour is changed and the logo is positioned centrally.
> >
> > Cc: Zhichao Gao <zhichao.gao@intel.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> > Cc: Jian J Wang <jian.j.wang@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Signed-off-by: Sean Rhodes <sean@starlabs.systems>
> > ---
> > MdeModulePkg/Logo/Logo.c | 5 +++++
> > MdeModulePkg/Logo/LogoDxe.inf | 4 ++++
> > MdeModulePkg/MdeModulePkg.dec | 6 ++++++
> > MdeModulePkg/MdeModulePkg.uni | 6 ++++++
> > 4 files changed, 21 insertions(+)
> >
> > diff --git a/MdeModulePkg/Logo/Logo.c b/MdeModulePkg/Logo/Logo.c
> > index 8ab874d2da..1638d0f984 100644
> > --- a/MdeModulePkg/Logo/Logo.c
> > +++ b/MdeModulePkg/Logo/Logo.c
> > @@ -13,6 +13,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> > #include <Protocol/HiiPackageList.h>
> >
> > #include <Library/UefiBootServicesTableLib.h>
> >
> > #include <Library/DebugLib.h>
> >
> > +#include <Library/PcdLib.h>
> >
> >
> >
> > typedef struct {
> >
> > EFI_IMAGE_ID ImageId;
> >
> > @@ -69,6 +70,10 @@ GetImage (
> > return EFI_NOT_FOUND;
> >
> > }
> >
> >
> >
> > + if (FixedPcdGetBool (PcdFollowMicrosoftRecommended)) {
> >
> > + mLogos[Current].Attribute =
> > EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended;
> >
> > + }
> >
> > +
> >
> > (*Instance)++;
> >
> > *Attribute = mLogos[Current].Attribute;
> >
> > *OffsetX = mLogos[Current].OffsetX;
> >
> > diff --git a/MdeModulePkg/Logo/LogoDxe.inf
> > b/MdeModulePkg/Logo/LogoDxe.inf
> > index 41215d25d8..ce29950089 100644
> > --- a/MdeModulePkg/Logo/LogoDxe.inf
> > +++ b/MdeModulePkg/Logo/LogoDxe.inf
> > @@ -41,6 +41,7 @@
> > UefiBootServicesTableLib
> >
> > UefiDriverEntryPoint
> >
> > DebugLib
> >
> > + PcdLib
> >
> >
> >
> > [Protocols]
> >
> > gEfiHiiDatabaseProtocolGuid ## CONSUMES
> >
> > @@ -48,6 +49,9 @@
> > gEfiHiiPackageListProtocolGuid ## PRODUCES CONSUMES
> >
> > gEdkiiPlatformLogoProtocolGuid ## PRODUCES
> >
> >
> >
> > +[Pcd]
> >
> > + gEfiMdeModulePkgTokenSpaceGuid.PcdFollowMicrosoftRecommended
> > ## CONSUMES
> >
> > +
> >
> > [Depex]
> >
> > gEfiHiiDatabaseProtocolGuid AND
> >
> > gEfiHiiImageExProtocolGuid
> >
> > diff --git a/MdeModulePkg/MdeModulePkg.dec
> > b/MdeModulePkg/MdeModulePkg.dec
> > index 58e6ab0048..ac437990f1 100644
> > --- a/MdeModulePkg/MdeModulePkg.dec
> > +++ b/MdeModulePkg/MdeModulePkg.dec
> > @@ -2102,6 +2102,12 @@
> > # @Prompt The shared bit mask when Intel Tdx is enabled.
> >
> >
> > gEfiMdeModulePkgTokenSpaceGuid.PcdTdxSharedBitMask|0x0|UINT64|0x
> > 10000025
> >
> >
> >
> > + ## This PCD sets the position of the Boot Logo.
> >
> > + # TRUE - The Logo is positioned following the recommendations from
> > Microsoft.
> >
> > + # FALSE - The logo is positioned in the center of the screen.
> >
> > + # @ Prompt This position of the boot logo
> >
> > +
> > gEfiMdeModulePkgTokenSpaceGuid.PcdFollowMicrosoftRecommended|FA
> > LSE|BOOLEAN|0x10000026
> >
> > +
> >
> > [PcdsPatchableInModule]
> >
> > ## Specify memory size with page number for PEI code when
> >
> > # Loading Module at Fixed Address feature is enabled.
> >
> > diff --git a/MdeModulePkg/MdeModulePkg.uni
> > b/MdeModulePkg/MdeModulePkg.uni
> > index 33ce9f6198..09c1ac1cc1 100644
> > --- a/MdeModulePkg/MdeModulePkg.uni
> > +++ b/MdeModulePkg/MdeModulePkg.uni
> > @@ -1338,3 +1338,9 @@
> > #string
> > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdPcieResizableBarSupport_HEL
> > P #language en-US "Indicates if the PCIe Resizable BAR Capability
> > Supported.<BR><BR>\n"
> >
> >
> "TRUE - PCIe Resizable BAR
> > Capability is supported.<BR>\n"
> >
> >
> "FALSE - PCIe Resizable BAR
> > Capability is not supported.<BR>"
> >
> > +
> >
> > +#string
> > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowMicrosoftRecommende
> > d_PROMPT #language en-US "The position of the Boot Logo"
> >
> > +
> >
> > +#string
> > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFollowMicrosoftRecommend_
> > HELP #language en-US "Sets the position of the Logo. When set to true,
> the
> > Logo is positioned following the recommendations"
> >
> > +
> " from Microsoft, 38.2% from
> > the top of the screen."
> >
> > +
> >
> > --
> > 2.34.1
>
>
[-- Attachment #2: Type: text/html, Size: 12805 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2022-10-25 7:26 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-26 8:15 [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow BGRT specification Sean Rhodes
2022-07-26 8:15 ` [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo Sean Rhodes
2022-08-05 5:58 ` 回复: " gaoliming
2022-07-26 8:15 ` [PATCH 3/3] UefiPayloadPkg: Hook up FOLLOW_BGRT_SPEC macro Sean Rhodes
2022-08-04 10:01 ` [edk2-devel] [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow BGRT specification Sean Rhodes
2022-08-05 5:59 ` 回复: " gaoliming
2022-08-05 6:55 ` Sean Rhodes
2022-08-05 7:04 ` Pedro Falcato
2022-08-12 4:54 ` 回复: " gaoliming
-- strict thread matches above, loose matches on Subject: below --
2022-08-05 7:52 [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow Microsoft Recommendations Sean Rhodes
2022-08-05 7:52 ` [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo Sean Rhodes
2022-09-26 8:09 [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow Microsoft Recommendations Sean Rhodes
2022-09-26 8:09 ` [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo Sean Rhodes
2022-10-08 2:02 ` Ni, Ray
2022-10-10 8:51 ` Sean Rhodes
2022-10-10 9:25 ` Ni, Ray
2022-10-10 9:44 ` Sean Rhodes
2022-10-25 7:26 ` Sean Rhodes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox