From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by mx.groups.io with SMTP id smtpd.web10.17278.1678708195904644557 for ; Mon, 13 Mar 2023 04:49:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@9elements.com header.s=google header.b=BVMJPShV; spf=pass (domain: 9elements.com, ip: 209.85.208.47, mailfrom: sheng.tan@9elements.com) Received: by mail-ed1-f47.google.com with SMTP id x3so47462541edb.10 for ; Mon, 13 Mar 2023 04:49:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; t=1678708194; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ATk1uGSgr+U9R+eJiuklcJBDe2oTqvlGfztGF74gyx4=; b=BVMJPShVv2R9u+MebZvdhW5jU5aPWmoTcE3DMvzb2OIdotCEAzpcu3951iuidwdyQ/ m0SZNmkFNJEqYRS8P5DGtxluhAXLmbKihw0Ppup67VQK6xzX/TqfpSNgW8r3YxEXryJo f6UvL7o4eKAfkSptr6T+tlYlLKTUWTyhFJaP5JfnwdgHrZZC4W2WFEoI5/xQXpCmnb+c eabVVuDVhQG7zmiGac+83VHJq2SRKjsC7IITJDi1iEiPiLvEzGy0QygpNfCglf90moth vIC6iwtI2S2wjfdhoyCvtXk6V6oky8zm/g1yAvVZuFRaq9TnwTNJaZcO1+uSTNX2vE/8 nyrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678708194; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ATk1uGSgr+U9R+eJiuklcJBDe2oTqvlGfztGF74gyx4=; b=a6k2JuMPEOByGquuXPWNN0j52nMgquFzYJ9v0aOGbB2TdoL1hOm4SXc7fudtUBu0bh a3PvTNtnOeRu/Tbb8CcSIf+HY5bi4poUZia4TEPXYAWsxKq9vXt1PZYfULYswIq6Hmhl BPdd7hpYH+NxzUFfwTWIOKXpWiXODHJ8UhiM7HrSJ4z2H5ugCxv/YcIOSeHGIMytlg32 lXUSoMVxmrJ1IaHss09etsVbLnA3ulvDP6od1HQy38DBJ6OlLK9GedVKmyBELEVMyD6R uu++8+pgVXtD1yNOCD2YMdAjCBYMu9l8te4mqWSF0WgBLCSvDV2hQ9v4JXNjT00kAc6p kKIw== X-Gm-Message-State: AO0yUKU3CJV6L7an8munV88nOlX3ZQSjcP+YMTsIGShOqgEiErs9lIT2 rPb1zARTF1avBcA2+t4tcmApfgJfZKX567ixDljcV2IZMTsbd2XvL/w= X-Google-Smtp-Source: AK7set+AAL2eUiDg+5i682iRU0LiW7EhCkL4Ti3iK9PsaqGPniJnRVnswZ6IahmBIUOyTwYYcWtreEjUT01ZDS9tosY= X-Received: by 2002:a17:906:cccf:b0:88d:64e7:a2be with SMTP id ot15-20020a170906cccf00b0088d64e7a2bemr17724505ejb.15.1678708193853; Mon, 13 Mar 2023 04:49:53 -0700 (PDT) MIME-Version: 1.0 References: <9c3d2f03a7f021c5044301f7b4d869b70e8990e0.1664179796.git.sean@starlabs.systems> <18575f8eca30cec6eb2fab56b878196925f0dd90.1664179796.git.sean@starlabs.systems> <17217DAE805D1AD6.492@groups.io> In-Reply-To: From: "Sheng Lean Tan" Date: Mon, 13 Mar 2023 12:49:17 +0100 Message-ID: Subject: Re: [edk2-devel] [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo To: devel@edk2.groups.io, sean@starlabs.systems Cc: "Ni, Ray" , "Kinney, Michael D" , "Gao, Zhichao" , "Wang, Jian J" , "Gao, Liming" Content-Type: multipart/alternative; boundary="00000000000093970c05f6c6b565" --00000000000093970c05f6c6b565 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Ray, What is your thought on this? Best Regards, *Lean Sheng Tan* 9elements GmbH, Kortumstra=C3=9Fe 19-21, 44787 Bochum, Germany Email: sheng.tan@9elements.com Phone: *+49 234 68 94 188 <+492346894188>* Mobile: *+49 176 76 113842 <+4917676113842>* Registered office: Bochum Commercial register: Amtsgericht Bochum, HRB 17519 Management: Sebastian German, Eray Bazaar Data protection information according to Art. 13 GDPR On Fri, 10 Mar 2023 at 14:43, Sean Rhodes wrote: > Hi Ray > > > You can return a carefully-calculated X/Y value to make > the logo at MS preferred position. > > As we discussed before, we need to have both options. > > Thanks > > Sean > > On Wed, 8 Mar 2023 at 09:01, Ni, Ray wrote: > >> Maybe I didn=E2=80=99t explain my idea clearly. >> >> That is: >> >> You can get the screen resolution in the code that >> produces Logo protocol. >> >> You can return a carefully-calculated X/Y value to make >> the logo at MS preferred position. >> >> >> >> *From:* devel@edk2.groups.io * On Behalf Of *Ni, >> Ray >> *Sent:* Wednesday, October 26, 2022 10:32 AM >> *To:* Kinney, Michael D ; >> devel@edk2.groups.io; Rhodes, Sean >> *Cc:* Gao, Zhichao ; Wang, Jian J < >> jian.j.wang@intel.com>; Gao, Liming >> *Subject:* Re: [edk2-devel] [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to >> control the position of the Logo >> >> >> >> Are you suggesting that the exiting logic be updated for this use case >> without adding a new enum? >> >> - yes. >> >> >> >> *From:* Kinney, Michael D >> *Sent:* Wednesday, October 26, 2022 12:21 AM >> *To:* devel@edk2.groups.io; Ni, Ray ; Rhodes, Sean < >> sean@starlabs.systems>; Kinney, Michael D >> *Cc:* Gao, Zhichao ; Wang, Jian J < >> jian.j.wang@intel.com>; Gao, Liming >> *Subject:* RE: [edk2-devel] [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to >> control the position of the Logo >> >> >> >> Ray, >> >> >> >> Are you suggesting that the exiting logic be updated for this use case >> without adding a new enum? >> >> >> >> Sean, can you provide a revised patch that does this? >> >> >> >> Thanks, >> >> >> >> Mike >> >> >> >> *From:* devel@edk2.groups.io *On Behalf Of *Ni, >> Ray >> *Sent:* Tuesday, October 25, 2022 12:58 AM >> *To:* devel@edk2.groups.io; Rhodes, Sean >> *Cc:* Gao, Zhichao ; Wang, Jian J < >> jian.j.wang@intel.com>; Gao, Liming >> *Subject:* Re: [edk2-devel] [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to >> control the position of the Logo >> >> >> >> I need a reason of adding >> EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended. >> >> In my opinion, without adding this new enum value, it=E2=80=99s still po= ssible to >> support MS recommendation. >> >> >> >> *From:* devel@edk2.groups.io *On Behalf Of *Sean >> Rhodes >> *Sent:* Tuesday, October 25, 2022 3:27 PM >> *To:* Ni, Ray >> *Cc:* devel@edk2.groups.io; Gao, Zhichao ; Wang, >> Jian J ; Gao, Liming >> *Subject:* Re: [edk2-devel] [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to >> control the position of the Logo >> >> >> >> 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 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 >> *Sent:* Monday, October 10, 2022 4:51 PM >> *To:* Ni, Ray >> *Cc:* devel@edk2.groups.io; Gao, Zhichao ; Wang, >> Jian J ; Gao, Liming >> *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. T= his >> will handle splash images that are equal to, or larger than the resoluti= on >> of the display. >> >> >> >> Thanks >> >> >> >> Sean >> >> >> >> On Sat, 8 Oct 2022 at 03:02, Ni, Ray 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 =3D 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 =3D (VerticalResolution - LogoHeight) / 2 >> // Y' =3D VerticalResolution * 0.382 - LogoHeight * 0.5 >> // OffsetY + Y =3D Y' >> // OffsetY =3D Y' - Y =3D -0.118 * VerticalResolution >> // >> *Attribute =3D EdkiiPlatformLogoDisplayAttributeCenter; >> *OffsetX =3D 0; >> *OffsetY =3D -118 * (INTN) >> GraphicsOutput->Mode->Info->VerticalResolution / 1000; >> } >> >> Thanks, >> Ray >> >> > -----Original Message----- >> > From: Sean Rhodes >> > Sent: Monday, September 26, 2022 4:10 PM >> > To: devel@edk2.groups.io >> > Cc: Rhodes, Sean ; Gao, Zhichao >> > ; Ni, Ray ; Wang, Jian J >> > ; Gao, Liming >> > 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 >> > Cc: Ray Ni >> > Cc: Jian J Wang >> > Cc: Liming Gao >> > Signed-off-by: Sean Rhodes >> > --- >> > 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 >> > >> > #include >> > >> > #include >> > >> > +#include >> > >> > >> > >> > typedef struct { >> > >> > EFI_IMAGE_ID ImageId; >> > >> > @@ -69,6 +70,10 @@ GetImage ( >> > return EFI_NOT_FOUND; >> > >> > } >> > >> > >> > >> > + if (FixedPcdGetBool (PcdFollowMicrosoftRecommended)) { >> > >> > + mLogos[Current].Attribute =3D >> > EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended; >> > >> > + } >> > >> > + >> > >> > (*Instance)++; >> > >> > *Attribute =3D mLogos[Current].Attribute; >> > >> > *OffsetX =3D 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 fr= om >> > 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.

\n" >> > >> > >> "TRUE - PCIe Resizable BAR >> > Capability is supported.
\n" >> > >> > >> "FALSE - PCIe Resizable BAR >> > Capability is not supported.
" >> > >> > + >> > >> > +#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 >> >>=20 > > --00000000000093970c05f6c6b565 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Ray,
What is your thought on this?

Best Regards,
Lean Sheng Tan



9elements= GmbH, Kortumstra=C3=9Fe 19-21, 44787 Bochum, Germany
Email:=C2=A0sheng= .tan@9elements.com
Ph= one:=C2=A0+= 49 234 68 94 188
Mobile:=C2=A0+49 17= 6 76 113842

Registered offi= ce: Bochum
Commercial r= egister: Amtsgericht Bochum, HRB 17519
Management: Sebastian German, Eray Bazaar


On Fri, 10 Mar 2023 = at 14:43, Sean Rhodes <sean@starlabs.systems> wrote:
Hi Ray

>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 You can = return a carefully-calculated X/Y value to make the=C2=A0logo=C2=A0at MS preferred position.

As we discussed= before, we need to have both options.
=
Thanks

Sean

On Wed, 8 Mar 2023 at 09:01, Ni, Ray <ray.ni@intel.com> wrote:

Maybe I didn=E2=80=99t explain my idea clearly.

That is:

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 You can get the screen resolution i= n the code that produces Logo protocol.

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 You can return a carefully-calculat= ed X/Y value to make the logo at MS preferred position.

=C2=A0

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ni, Ray
Sent: Wednesday, October 26, 2022 10:32 AM
To: Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io; Rhodes, = Sean <sean@starlabs.systems>
Cc: Gao, Zhichao <zhichao.gao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; = Gao, Liming <gaoliming@byosoft.com.cn>
Subject: Re: [edk2-devel] [PATCH 2/3] MdeModulePkg/Logo: Add a PCD t= o control the position of the Logo

=C2=A0

Are you suggesting that the exiting logic be updated= for this use case without adding a new enum?

  • yes.

=C2=A0

From: Kinney, Michael D <michael.d.kinney@intel.com>
Sent: Wednesday, October 26, 2022 12:21 AM
To:
devel@= edk2.groups.io; Ni, Ray <ray.ni@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Kinne= y, Michael D <michael.d.kinney@intel.com>
Cc: Gao, Zhichao <zhichao.gao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; = Gao, Liming <gaoliming@byosoft.com.cn>
Subject: RE: [edk2-devel] [PATCH 2/3] MdeModulePkg/Logo: Add a PCD t= o control the position of the Logo

=C2=A0

Ray,

=C2=A0

Are you suggesting that the exiting logic be updated= for this use case without adding a new enum?

=C2=A0

Sean, can you provide a revised patch that does this= ?

=C2=A0

Thanks,

=C2=A0

Mike

=C2=A0

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ni, Ray
Sent: Tuesday, October 25, 2022 12:58 AM
To: devel@= edk2.groups.io; Rhodes, Sean <sean@starlabs.systems>
Cc: Gao, Zhichao <zhichao.gao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; = Gao, Liming <gaoliming@byosoft.com.cn>
Subject: Re: [edk2-devel] [PATCH 2/3] MdeModulePkg/Logo: Add a PCD t= o control the position of the Logo

=C2=A0

I need a reason of adding EdkiiPlatformLogoDisplayAt= tributeMicrosoftRecommended.

In my opinion, without adding this new enum value, i= t=E2=80=99s still possible to support MS recommendation.

=C2=A0

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sean Rhodes
Sent: Tuesday, October 25, 2022 3:27 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<= /a>>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: Re: [edk2-devel] [PATCH 2/3] MdeModulePkg/Logo: Add a PCD t= o control the position of the Logo

=C2=A0

Hi Ray

=C2=A0

Where would you suggest this code goes? edk2 should support bot= h Microsoft recommended and "normal". The original patch handled = this well.

=C2=A0

Thanks

=C2=A0

Sean

=C2=A0

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 ac= count for the image size.

=C2=A0

Thanks,

Ray

=C2=A0

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<= /a>>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: Re: [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the= position of the Logo

=C2=A0

Hi Ray

=C2=A0

Thank you, it does, and I think it will work for most splash im= ages. 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 th= an the resolution of the display.=C2=A0

=C2=A0

Thanks

=C2=A0

Sean

=C2=A0

On Sat, 8 Oct 2022 at 03:02, Ni, Ray <ray.ni@intel.com> wrote:<= u>

Sean,
I remember that I evaluated the BGRT requirement when designing the Platfor= mLogo 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?

=C2=A0 =C2=A0 Status =3D gBS->HandleProtocol (gST->ConsoleOutHandle, = &gEfiGraphicsOutputProtocolGuid, (VOID **) &GraphicsOutput);
=C2=A0 =C2=A0 if (!EFI_ERROR (Status)) {
=C2=A0 =C2=A0 =C2=A0 //
=C2=A0 =C2=A0 =C2=A0 // Center of LOGO is in the vertical position 38.2% wh= en PcdBootLogoOnlyEnable is TRUE
=C2=A0 =C2=A0 =C2=A0 // Y =3D (VerticalResolution - LogoHeight) / 2
=C2=A0 =C2=A0 =C2=A0 // Y' =3D VerticalResolution * 0.382 - LogoHeight = * 0.5
=C2=A0 =C2=A0 =C2=A0 // OffsetY + Y =3D Y'
=C2=A0 =C2=A0 =C2=A0 // OffsetY =3D Y' - Y =3D -0.118 * VerticalResolut= ion
=C2=A0 =C2=A0 =C2=A0 //
=C2=A0 =C2=A0 =C2=A0 *Attribute =3D EdkiiPlatformLogoDisplayAttributeCenter= ;
=C2=A0 =C2=A0 =C2=A0 *OffsetX=C2=A0 =C2=A0=3D 0;
=C2=A0 =C2=A0 =C2=A0 *OffsetY=C2=A0 =C2=A0=3D -118 * (INTN) GraphicsOutput-= >Mode->Info->VerticalResolution / 1000;
=C2=A0 =C2=A0 }

Thanks,
Ray

> -----Original Message-----
> From: Sean Rhodes <sean@starlabs.systems>
> Sent: Monday, September 26, 2022 4:10 PM
> To: devel@ed= k2.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 <r= ay.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>
> ---
>=C2=A0 MdeModulePkg/Logo/Logo.c=C2=A0 =C2=A0 =C2=A0 | 5 +++++
>=C2=A0 MdeModulePkg/Logo/LogoDxe.inf | 4 ++++
>=C2=A0 MdeModulePkg/MdeModulePkg.dec | 6 ++++++
>=C2=A0 MdeModulePkg/MdeModulePkg.uni | 6 ++++++
>=C2=A0 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
>=C2=A0 #include <Protocol/HiiPackageList.h>
>
>=C2=A0 #include <Library/UefiBootServicesTableLib.h>
>
>=C2=A0 #include <Library/DebugLib.h>
>
> +#include <Library/PcdLib.h>
>
>
>
>=C2=A0 typedef struct {
>
>=C2=A0 =C2=A0 EFI_IMAGE_ID=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ImageId;
>
> @@ -69,6 +70,10 @@ GetImage (
>=C2=A0 =C2=A0 =C2=A0 return EFI_NOT_FOUND;
>
>=C2=A0 =C2=A0 }
>
>
>
> +=C2=A0 if (FixedPcdGetBool (PcdFollowMicrosoftRecommended)) {
>
> +=C2=A0 =C2=A0 mLogos[Current].Attribute =3D
> EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended;
>
> +=C2=A0 }
>
> +
>
>=C2=A0 =C2=A0 (*Instance)++;
>
>=C2=A0 =C2=A0 *Attribute =3D mLogos[Current].Attribute;
>
>=C2=A0 =C2=A0 *OffsetX=C2=A0 =C2=A0=3D 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 @@
>=C2=A0 =C2=A0 UefiBootServicesTableLib
>
>=C2=A0 =C2=A0 UefiDriverEntryPoint
>
>=C2=A0 =C2=A0 DebugLib
>
> +=C2=A0 PcdLib
>
>
>
>=C2=A0 [Protocols]
>
>=C2=A0 =C2=A0 gEfiHiiDatabaseProtocolGuid=C2=A0 =C2=A0 =C2=A0 =C2=A0 ##= CONSUMES
>
> @@ -48,6 +49,9 @@
>=C2=A0 =C2=A0 gEfiHiiPackageListProtocolGuid=C2=A0 =C2=A0 =C2=A0## PROD= UCES CONSUMES
>
>=C2=A0 =C2=A0 gEdkiiPlatformLogoProtocolGuid=C2=A0 =C2=A0 =C2=A0## PROD= UCES
>
>
>
> +[Pcd]
>
> +=C2=A0 gEfiMdeModulePkgTokenSpaceGuid.PcdFollowMicrosoftRecommended > ## CONSUMES
>
> +
>
>=C2=A0 [Depex]
>
>=C2=A0 =C2=A0 gEfiHiiDatabaseProtocolGuid AND
>
>=C2=A0 =C2=A0 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 @@
>=C2=A0 =C2=A0 # @Prompt The shared bit mask when Intel Tdx is enabled.<= br> >
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdTdxSharedBitMask|0x0|UINT64|0x
> 10000025
>
>
>
> +=C2=A0 ## This PCD sets the position of the Boot Logo.
>
> +=C2=A0 #=C2=A0 =C2=A0TRUE=C2=A0 - The Logo is positioned following th= e recommendations from
> Microsoft.
>
> +=C2=A0 #=C2=A0 =C2=A0FALSE - The logo is positioned in the center of = the screen.
>
> +=C2=A0 # @ Prompt This position of the boot logo
>
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdFollowMicrosoftRecommended|FA
> LSE|BOOLEAN|0x10000026
>
> +
>
>=C2=A0 [PcdsPatchableInModule]
>
>=C2=A0 =C2=A0 ## Specify memory size with page number for PEI code when=
>
>=C2=A0 =C2=A0 #=C2=A0 Loading Module at Fixed Address feature is enable= d.
>
> 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 @@
>=C2=A0 #string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdPcieResizableBarSupport_HEL
> P #language en-US "Indicates if the PCIe Resizable BAR Capability=
> Supported.<BR><BR>\n"
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "TRUE=C2=A0 - PCIe Resizable BA= R
> Capability is supported.<BR>\n"
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "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=C2=A0 =C2=A0#language en-US "Sets the position of the Logo. = When set to true, the
> Logo is positioned following the recommendations"
>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0" from Microsoft, 38.2% from
> the top of the screen."
>
> +
>
> --
> 2.34.1

--00000000000093970c05f6c6b565--