From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) by mx.groups.io with SMTP id smtpd.web10.3235.1678870424206179800 for ; Wed, 15 Mar 2023 01:53:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@9elements.com header.s=google header.b=QD5JmeGT; spf=pass (domain: 9elements.com, ip: 209.85.208.52, mailfrom: sheng.tan@9elements.com) Received: by mail-ed1-f52.google.com with SMTP id o12so72470204edb.9 for ; Wed, 15 Mar 2023 01:53:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; t=1678870422; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=w1FaeeuMsH0Cizj56WHNPt5hEmepzIU1KiAYwyuqo8Y=; b=QD5JmeGT7iblYi+kKMYaJ8Ce9irTTuTWA6xemdy4szLx0F+taOn/1vyldW3ihiZF3Z nUqm5xDt3+remqweZP+Bn4eMLsjgzmskK8Yjq1jTy87NgdX0+L4qCscJEpGsAMOAY9r4 zZx+a2dycR02G5aAcGAJmNAY0l2qC9JkzLsahy9I/53dNvvC6BPr4SXnnG/qS1I28ZAH pM0UDRGifrGrYi2GVWSH5vQKQpZDNOOBRGPj9Eytoed/1nTUv/a7yd+6fMlnA+1xXwtl S1LiHY5jxeA0/ZGP68UVFW0rzjaq9hck/4uYYuYPg23hVVaECRiPoC3/NIfeQLniU55M k2Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678870422; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w1FaeeuMsH0Cizj56WHNPt5hEmepzIU1KiAYwyuqo8Y=; b=iS7IqBXF9E0juHCVBCmImArMl4RqfaXu0cpYXmQwDmwthDxfkcRHhW7LnSvC1XIlOu kyD+qlrXYlSNabsFqtOZxQTa4c80Sb0HDj9KA1UB5X8Hr3LuUoD6w8/Pyb+YzonmUBtw GyKGck9XHST29Liqbt8eRB0EbZIyezxurAkYHOiM7Sl9WQGqUxAUpqWjFHISdcz5OyXp 6McjywRCz3wfWuFa2e/VZVq27MV8etzuBlSePj53SB6h10iyZUqMm2dwwjeHB/DLVbMk VztXejWBc2mB5GIvb7YMbCXez1ZFbglWfs+RbIq/Qapt9wfOS4bjKku4kE8jseOY3mZ0 4wfg== X-Gm-Message-State: AO0yUKX2HWGV8zd+PMF2DxLuqXIricPho+Sj5zUq9T+vyw9JRjDOd873 YI66OzRb0jjT0yFQpubnFpzhgg== X-Google-Smtp-Source: AK7set+4D3nJbnhmqwTZOPHNAShzZ5Cgdh0P8HL+A9DlqJkiXVS+QBiOlo3hMxknOmXIK7W/J7egVQ== X-Received: by 2002:a17:907:2c59:b0:921:412b:d8c1 with SMTP id hf25-20020a1709072c5900b00921412bd8c1mr4737841ejc.71.1678870422361; Wed, 15 Mar 2023 01:53:42 -0700 (PDT) Return-Path: Received: from smtpclient.apple ([5.180.209.20]) by smtp.gmail.com with ESMTPSA id cd18-20020a170906b35200b008b9d2da5343sm2179156ejb.210.2023.03.15.01.53.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Mar 2023 01:53:42 -0700 (PDT) From: "Sheng Lean Tan" Mime-Version: 1.0 (1.0) Subject: Re: [edk2-devel] [PATCH 2/3] MdeModulePkg/Logo: Add a PCD to control the position of the Logo Date: Wed, 15 Mar 2023 09:53:31 +0100 Message-Id: References: Cc: "Ni, Ray" , "Kinney, Michael D" , "Gao, Zhichao" , "Wang, Jian J" , "Gao, Liming" In-Reply-To: To: devel@edk2.groups.io, sean@starlabs.systems X-Mailer: iPhone Mail (20D67) Content-Type: multipart/alternative; boundary=Apple-Mail-4D8F700C-E81C-418F-AA07-74ACDF3A18A4 Content-Transfer-Encoding: 7bit --Apple-Mail-4D8F700C-E81C-418F-AA07-74ACDF3A18A4 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ray,
Again - any update on this.=  
Thanks.

On 13. Mar 2023, at 12:49, Lean Sheng Tan <sheng.tan@9elements.com> = wrote:

=EF=BB=BF
Hi Ray,
= What is your thought on this?

Best Regards,=
Lean Sheng Tan

=

9elements Gm= bH, Kortumstra=C3=9Fe 19-21, 44787 Bochum, Germany

Registered office: Bo= chum
Commercial registe= r: 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 <sean@starlabs.systems> wrote:
Hi Ray

     &= nbsp;          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
<= span style=3D"color:rgb(80,0,80)">
Sean

On W= ed, 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:

        &nbs= p;       You can get the screen resolution in= the code that produces Logo protocol.

        &nbs= p;       You can return a carefully-calculate= d X/Y value to make the logo at MS preferred position.

 

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

 

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

  • yes.

 

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

 

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

 

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.

 

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

 

Hi Ray

 

Where would you suggest this code goes? edk2 should support bot= h 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 ac= count 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<= /a>>; 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 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. 

 

Thanks

 

Sean

 

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?

    Status =3D gBS->HandleProtocol (gST->ConsoleOutHandle, = &gEfiGraphicsOutputProtocolGuid, (VOID **) &GraphicsOutput);
    if (!EFI_ERROR (Status)) {
      //
      // Center of LOGO is in the vertical position 38.2% wh= en 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<= br>       //
      *Attribute =3D EdkiiPlatformLogoDisplayAttributeCenter= ;
      *OffsetX   =3D 0;
      *OffsetY   =3D -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@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>
> ---
>  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            &nb= sp;                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     ## PROD= UCES CONSUMES
>
>    gEdkiiPlatformLogoProtocolGuid     ## PROD= UCES
>
>
>
> +[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.<= br> >
>
> gEfiMdeModulePkgTokenSpaceGuid.PcdTdxSharedBitMask|0x0|UINT64|0x
> 10000025
>
>
>
> +  ## This PCD sets the position of the Boot Logo.
>
> +  #   TRUE  - The Logo is positioned following th= e 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 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 @@
>  #string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdPcieResizableBarSupport_HEL
> P #language en-US "Indicates if the PCIe Resizable BAR Capability
> Supported.<BR><BR>\n"
>
>                    &= nbsp;                    =                     &nbs= p;                     &n= bsp;         "TRUE  - PCIe Resizable BAR
> Capability is supported.<BR>\n"
>
>                    &= nbsp;                    =                     &nbs= p;                     &n= bsp;         "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"
>
> +                   =                     &nbs= p;                     &n= bsp;                     =          " from Microsoft, 38.2% from
> the top of the screen."
>
> +
>
> --
> 2.34.1

--Apple-Mail-4D8F700C-E81C-418F-AA07-74ACDF3A18A4--