From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by mx.groups.io with SMTP id smtpd.web11.12920.1679316423379333649 for ; Mon, 20 Mar 2023 05:47:04 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@starlabs-systems.20210112.gappssmtp.com header.s=20210112 header.b=E7NqhQMa; spf=pass (domain: starlabs.systems, ip: 209.85.208.50, mailfrom: sean@starlabs.systems) Received: by mail-ed1-f50.google.com with SMTP id t5so9419468edd.7 for ; Mon, 20 Mar 2023 05:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=starlabs-systems.20210112.gappssmtp.com; s=20210112; t=1679316421; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9hp7NdA097aS6UMDj8WsG7+NM2lstJcO/TSkzdda33k=; b=E7NqhQMaJgxBSjCuRs1C097fOGnYBhN8PPNqt0aKK8fsN6eYiKCr8YkNUTSG5bIx9e NBjNWi2XeqkKsNMZUx3oyEB6kA9OCMdDpjvwYtyciqOMsQNVM9ZSXWg5OCp/fg5PnC8K /KPQjvzUrmdI/gwhX+q44iTmmtuyfj9oEQ+VH0+n36oY0ntNb6E2HvCf7X0Q5UDWIoMr t9q30KY3AXGGwmOzDJ1lv332AWkFAkGx4hWeONF2mRyp+SDi6zUwH+RuMpZfpRR0eA00 ICYnEVn0eXDbLBeTLsNU/iiOdk7FhH/AGYI3bNXrF8PLOICv8Lb8rQ9jbOnqKHafmnS7 5zYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679316421; 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=9hp7NdA097aS6UMDj8WsG7+NM2lstJcO/TSkzdda33k=; b=d8duW8vL4YC3YPBHN988GXflLg78kacfYvABEGUw956jIfDMciDGvm0PYytxN3IMC6 eZMY/2awviC2lglMJZaTi/CkItN1F2JEqUgLUwQGCTH5BF3gIqw1mn0TI2Vi0Tk3LmxF 7CAVz1MAVMm+YsAclp421fxR1v3/hWsEI12xCbkw+M4ETrveRtUVqYP5lpBtMS4vOY8N BbcDCzWMS8Z6/rPmQOEOiaW6vBF7uNeAUO4xDPsw8RnfnFP+xvuVhPOfoiG8jXTlDXWX V026mPOH6M+WMGUgOu76eD9yXci7XWW9caVLN26OrwnBP6AJJe10NThI2Zb1V37zWbsq Crbg== X-Gm-Message-State: AO0yUKW0gGBUp+H6bjAaAUWVceLo+/qTxTyxF359qzBod+IF+JI6D+Ph QVfnVrTzn3OT1//Qk0VoaWclyUZZB3MEYB/wbf4/ X-Google-Smtp-Source: AK7set+YT72hEl/q14RXg0Ctf2pQtDr92tBCMNmtAk7yk18kzwsf0YLLjpCDfnK8lFUYt2iPGMhr8lwlUpf5+iEx/3U= X-Received: by 2002:a17:906:f1ca:b0:92f:cf96:e1f6 with SMTP id gx10-20020a170906f1ca00b0092fcf96e1f6mr3455117ejb.11.1679316421573; Mon, 20 Mar 2023 05:47:01 -0700 (PDT) MIME-Version: 1.0 References: <2716E6F6-CE10-45EF-A1AB-25F90C5878EC@9elements.com> In-Reply-To: From: "Sean Rhodes" Date: Mon, 20 Mar 2023 12:46:50 +0000 Message-ID: Subject: Re: [edk2-devel] [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo To: "Ni, Ray" Cc: "Tan, Lean Sheng" , "devel@edk2.groups.io" , "Kinney, Michael D" , "Gao, Zhichao" , "Wang, Jian J" , "Gao, Liming" Content-Type: multipart/alternative; boundary="000000000000c60f2b05f7545204" --000000000000c60f2b05f7545204 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Ray Some members of the coreboot community want to centre the logo (as it is currently) and some want to use the Microsoft recommended position. All we want to do is have the option to build edk2 with one or the other. Thanks Sean On Mon, 20 Mar 2023 at 09:56, Ni, Ray wrote: > Sheng Lean Tan, > > > > In short, I am looking forward to be convinced by you and Sean, but so fa= r > I haven=E2=80=99t been. > > > > 1. In the beginning, I left comments to suggest you use the logic > below to meet your requirement. > 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; > } > > > > 1. Then, Sean replied following: =E2=80=9CThank you, it does, and I th= ink 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 e= qual > to, or larger than the resolution of the display. =E2=80=9C > > > > 1. Then, I replied =E2=80=9CThe logic I shared below is from the LogoD= xe > driver which produces EDKII_PLATFORM_LOGO_PROTOCOL. This driver should= know > the image size and it can account for the image size.=E2=80=9D > > Then, I don=E2=80=99t think we are talking in the same page. Maybe I didn= =E2=80=99t > understand your problem, maybe you didn=E2=80=99t understand my above sam= ple code. > > Thanks, > > Ray > > > > > > > > *From:* Sheng Lean Tan > *Sent:* Monday, March 20, 2023 4:12 PM > *To:* devel@edk2.groups.io; Ni, Ray ; Kinney, Michael D > > *Cc:* Rhodes, Sean ; Gao, Zhichao < > zhichao.gao@intel.com>; 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, > > Any feedback per Mic feedback? > > Sent from my iPhone > > > On 15. Mar 2023, at 16:35, Michael D Kinney > wrote: > > =EF=BB=BF > > HI Ray, > > > > I think it is a reasonable request to have the EDK II logo driver support > multiple standards for the logo location. Especially if they are > documented in public specifications. > > > > The additional conditions of supporting a logo larger than the display > resolution also looks like a good corner case to cover no matter what log= o > location standard is used. > > > > Perhaps a single PCD that is a enum of logo locations. Default 0x00 can > be EDK II default that is centered in the display. 0x01 can be BGRT. > Leaves from for more if there are additional public standard logo locatio= ns. > > > > Mike > > > > > > *From:* Ni, Ray > *Sent:* Wednesday, March 15, 2023 2:24 AM > *To:* devel@edk2.groups.io; Rhodes, Sean > *Cc:* Kinney, Michael D ; Gao, Zhichao < > zhichao.gao@intel.com>; Wang, Jian J ; Gao, Liming > > *Subject:* RE: [edk2-devel] [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to > control the position of the Logo > > > > What=E2=80=99s the meaning of =E2=80=9Chave both options=E2=80=9D? > > If you want to support two cases, put the logic in your platform specific > Logo driver. > > This Logo driver is just for reference. > > > > *From:* devel@edk2.groups.io *On Behalf Of *Sean > Rhodes > *Sent:* Friday, March 10, 2023 9:43 PM > *To:* Ni, Ray > *Cc:* devel@edk2.groups.io; Kinney, Michael D ; > 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 > > > > > 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, Ra= y > *Sent:* Wednesday, October 26, 2022 10:32 AM > *To:* Kinney, Michael D ; devel@edk2.groups.i= o; > 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? > > 1. 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, Ra= y > *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 pos= sible 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 Microsof= t > 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. Th= is > will handle splash images that are equal to, or larger than the resolutio= n > 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 fro= m > > 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 > --000000000000c60f2b05f7545204 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Ray

Some members of the coreboot commu= nity want to centre the logo (as it is currently) and some want to use the = Microsoft recommended position. All we want to do is have the option to bui= ld edk2 with one or the other.

Thanks

Sean

On Mon, 20 Mar 2023 at 09:56, Ni, Ray <ray.ni@intel.com> wrote:

Sheng Lean Tan,

=C2=A0

In short, I am looking forward to be convinced by yo= u and Sean, but so far I haven=E2=80=99t been.

=C2=A0

  1. In the beginning, I lef= t comments to suggest you use the logic below to meet your requirement.
    Status =3D gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiGraph= icsOutputProtocolGuid, (VOID **) &GraphicsOutput);
  2. =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 }

    =C2=A0

    1. Then, Sean replied foll= owing: =E2=80=9CThank you, it does, and I think it will work for most splash images. H= owever, the way it's written in my patch accounts for the Image size. This will handle splash images th= at are equal to, or larger than the resolution of the display.=C2=A0=E2=80= =9C

    =C2=A0

    1. Then, I rep= lied =E2=80=9CThe logic I shared below is from the LogoDxe driver wh= ich produces EDKII_PLATFORM_LOGO_PROTOCOL. This driver should know the imag= e size and it can account for the image size.=E2=80=9D
    2. Then, I don=E2=80=99t think we are talking in the sa= me page. Maybe I didn=E2=80=99t understand your problem, maybe you didn=E2= =80=99t understand my above sample code.

      Thanks,

      Ray

      =C2=A0

      =C2=A0

      =C2=A0

      From: Sheng Lean Tan <sheng.tan@9elements.com> Sent: Monday, March 20, 2023 4:12 PM
      To: devel@= edk2.groups.io; Ni, Ray <ray.ni@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com= >
      Cc: Rhodes, Sean <sean@starlabs.systems>; Gao, Zhichao <zhichao.gao@intel.c= om>; 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

      Hi Ray,

      Any feedback per Mic fe= edback?


      On 15. Mar 2023, at 16:35, Michael D Kinney <michael.d.kinney@intel.com> wro= te:

      =EF=BB=BF

      HI Ray,

      =C2=A0

      I think it is a reasonable request to have the EDK I= I logo driver support multiple standards for the logo location.=C2=A0 Espec= ially if they are documented in public specifications.

      =C2=A0

      The additional conditions of supporting a logo large= r than the display resolution also looks like a good corner case to cover n= o matter what logo location standard is used.

      =C2=A0

      Perhaps a single PCD that is a enum of logo locations.=C2=A0 Default 0x00 can= be EDK II default that is centered in the display.=C2=A0 0x01 can be BGRT.= =C2=A0 Leaves from for more if there are additional public standard logo locations.

      =C2=A0

      Mike

      =C2=A0

      =C2=A0

      From: Ni, Ray <ray.ni@intel.com>
      Sent: Wednesday, March 15, 2023 2:24 AM
      To: devel@= edk2.groups.io; Rhodes, Sean <sean@starlabs.systems>
      Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Zhichao <= zhichao.gao@inte= l.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

      What=E2=80=99s the meaning of =E2=80=9Chave both opt= ions=E2=80=9D?

      If you want to support two cases, put the logic in y= our platform specific Logo driver.

      This Logo driver is just for reference.

      =C2=A0

      From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sean Rhodes
      Sent: Friday, March 10, 2023 9:43 PM
      To: Ni, Ray <ray.ni@intel.com>
      Cc: devel@= edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Zhi= chao <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

      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=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.

      =C2=A0

      Thanks

      =C2=A0

      Sean

      =C2=A0

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

      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?

      1. 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>; Kinney, 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

--000000000000c60f2b05f7545204--