Re: [edk2-devel][PATCH] Maintainers.txt: Add new reviewer for UefiPayloadPkg

2022-07-15 Thread Sean Rhodes
Reviewed-by: Sean Rhodes 

On Sat, 16 Jul 2022, 03:37 Benjamin You,  wrote:

> Reviewed-by: Benjamin You 
>
> > -Original Message-
> > From: Dong, Guo 
> > Sent: Saturday, July 16, 2022 9:02 AM
> > To: devel@edk2.groups.io
> > Cc: Dong, Guo ; Ni, Ray ; You,
> > Benjamin ; Maurice Ma ;
> > Kinney, Michael D ; Rhodes, Sean
> > 
> > Subject: [edk2-devel][PATCH] Maintainers.txt: Add new reviewer for
> > UefiPayloadPkg
> >
> > From: Guo Dong 
> >
> > Promote Sean Rhodes as UefiPayloadPkg maintainer.
> > Remove Maurice and Benjamin since their role was changed.
> >
> > Signed-off-by: Guo Dong 
> > Cc: Ray Ni 
> > Cc: Benjamin You 
> > Cc: Maurice Ma 
> > Cc: Michael D Kinney 
> > Cc: Sean Rhodes 
> > ---
> >  Maintainers.txt | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/Maintainers.txt b/Maintainers.txt
> > index bc08ce1f15..a3b62abeee 100644
> > --- a/Maintainers.txt
> > +++ b/Maintainers.txt
> > @@ -612,9 +612,7 @@ F: UefiPayloadPkg/
> >  W: https://github.com/tianocore/tianocore.github.io/wiki/UefiPayloadPkg
> >
> >  M: Guo Dong  [gdong1]
> >
> >  M: Ray Ni  [niruiyu]
> >
> > -R: Maurice Ma  [mauricema]
> >
> > -R: Benjamin You  [BenjaminYou]
> >
> > -R: Sean Rhodes 
> >
> > +M: Sean Rhodes 
> >
> >  S: Maintained
> >
> >
> >
> >  UnitTestFrameworkPkg
> >
> > --
> > 2.35.1.windows.2
>
>
>
> 
>
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91427): https://edk2.groups.io/g/devel/message/91427
Mute This Topic: https://groups.io/mt/92413853/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




回复: 回复: [edk2-devel] [PATCH] MdeModulePkg\CoreDxe: Allow DXE Drivers to use untested memory

2022-07-15 Thread gaoliming via groups.io
If no other objection, I will merge this patch next week. 

Thanks
Liming
> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Howell, Stacy
> 发送时间: 2022年4月25日 22:11
> 收件人: Kinney, Michael D ;
> devel@edk2.groups.io; spbro...@outlook.com; Gao, Liming
> 
> 抄送: Bi, Dandan ; Howell, Stacy
> 
> 主题: Re: 回复: [edk2-devel] [PATCH] MdeModulePkg\CoreDxe: Allow DXE
> Drivers to use untested memory
> 
> Hi all,
> Are there any other comments or concerns regarding this patch?
> 
> Thanks,
> Stacy
> 
> -Original Message-
> From: Howell, Stacy
> Sent: Friday, January 14, 2022 4:13 PM
> To: Kinney, Michael D ; devel@edk2.groups.io;
> spbro...@outlook.com; Gao, Liming 
> Cc: Bi, Dandan ; Howell, Stacy
> 
> Subject: RE: 回复: [edk2-devel] [PATCH] MdeModulePkg\CoreDxe: Allow DXE
> Drivers to use untested memory
> 
> Hi Sean,
> Setting all memory as tested in PEI is a workaround for the issue that this
> patch addresses.  However, promoting all memory in PEI is not a workable
> solution for BIOSes that incorporate full memory testing functionality, as 
> this
> relies on the tested flag to determine which memory regions to test.
> 
> This patch addresses a discrepancy in EDK2 core regarding how untested
> memory is treated for allocation by DXE drivers.  In the case where a DXE
> driver does not request a specific memory region DXE Core will promote
> untested memory if necessary to provide memory to the driver.  In the case
> where a DXE driver requests a specific memory range of untested memory,
> DXE Core will currently return an error instead of promoting untested memory
> to make the region available for the driver.
> 
> Thanks,
> Stacy
> 
> -Original Message-
> From: Kinney, Michael D 
> Sent: Tuesday, January 11, 2022 10:57 AM
> To: devel@edk2.groups.io; spbro...@outlook.com; Gao, Liming
> ; Howell, Stacy ;
> Kinney, Michael D 
> Cc: Bi, Dandan 
> Subject: RE: 回复: [edk2-devel] [PATCH] MdeModulePkg\CoreDxe: Allow DXE
> Drivers to use untested memory
> 
> Hi Sean,
> 
> The auto promotion of memory was only intended as a dev/debug feature to
> maximize platform boot without having to tune what memory is tested in PEI
> phase.
> 
> In my opinion, a production platform should never trigger any auto
> promotions of untested to tested memory, and part of production validation
> should make sure this event never occurs in any production boot scenarios.
> 
> The specific bug being fix here is that auto promotion was not symmetric
> across all memory allocation types.  It simply aligns this dev/debug feature.
> 
> Mike
> 
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of Sean
> > Sent: Monday, January 10, 2022 6:47 PM
> > To: devel@edk2.groups.io; Gao, Liming ;
> > Howell, Stacy 
> > Cc: Bi, Dandan 
> > Subject: Re: 回复: [edk2-devel] [PATCH] MdeModulePkg\CoreDxe: Allow
> DXE
> > Drivers to use untested memory
> >
> > if this is auto promotion is happening in the core then what is the
> > value of memory testing and tracking that state.   Is memory testing
> > state a necessary feature of the Dxe Core?
> >
> >
> > I think it makes more sense that if you platform wants to use a given
> > range your platform should either test it and/or mark it as tested.
> >
> > OR
> >
> > The dxe core should do away with the memory testing tracking.
> >
> >
> > On most platforms i have seen in the past few years all memory is
> > marked as tested without doing any testing.  The only value in the
> > flag is keep the initial memory allocations in a given low range (below 
> > 4gb).
> >
> >
> >
> >
> > On 1/10/2022 5:59 PM, gaoliming wrote:
> > > Stacy:
> > >This fix covers the case with AllocateAddress allocation type. I
> > > agree this fix. Reviewed-by: Liming Gao 
> > >
> > > Thanks
> > > Liming
> > >> -邮件原件-
> > >> 发件人: devel@edk2.groups.io  代表 Stacy
> Howell
> > >> 发送时间: 2022年1月8日 3:36
> > >> 收件人: devel@edk2.groups.io
> > >> 抄送: Stacy Howell ; Dandan Bi
> > >> ; Liming Gao 
> > >> 主题: [edk2-devel] [PATCH] MdeModulePkg\CoreDxe: Allow DXE Drivers
> to
> > >> use untested memory
> > >>
> > >> REF: https://https://bugzilla.tianocore.org/show_bug.cgi?id=3795
> > >> CC: Dandan Bi 
> > >> CC: Liming Gao 
> > >>
> > >> Updated CoreInternalAllocatePages() to call PromoteMemoryResource()
> > >> and re-attempt the allocation if unable to convert the specified
> > >> memory range
> > >>
> > >> Signed-off-by: Stacy Howell 
> > >> ---
> > >>   MdeModulePkg/Core/Dxe/Mem/Page.c | 14 ++
> > >>   1 file changed, 14 insertions(+)
> > >>
> > >> diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c
> > >> b/MdeModulePkg/Core/Dxe/Mem/Page.c
> > >> index 47d4c5d92e..cc0b90ac0d 100644
> > >> --- a/MdeModulePkg/Core/Dxe/Mem/Page.c
> > >> +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c
> > >> @@ -1417,6 +1417,20 @@ CoreInternalAllocatePages (
> > >>   Status = CoreConvertPages (Start, NumberOfPages,
> MemoryType);
> > >> }
> > >>
> > >> +  if (EFI_ERROR (Status)) {
> > >> +//
> > >> +// If requested memory 

Re: [edk2-devel][PATCH] Maintainers.txt: Add new reviewer for UefiPayloadPkg

2022-07-15 Thread Benjamin You
Reviewed-by: Benjamin You 

> -Original Message-
> From: Dong, Guo 
> Sent: Saturday, July 16, 2022 9:02 AM
> To: devel@edk2.groups.io
> Cc: Dong, Guo ; Ni, Ray ; You,
> Benjamin ; Maurice Ma ;
> Kinney, Michael D ; Rhodes, Sean
> 
> Subject: [edk2-devel][PATCH] Maintainers.txt: Add new reviewer for
> UefiPayloadPkg
> 
> From: Guo Dong 
> 
> Promote Sean Rhodes as UefiPayloadPkg maintainer.
> Remove Maurice and Benjamin since their role was changed.
> 
> Signed-off-by: Guo Dong 
> Cc: Ray Ni 
> Cc: Benjamin You 
> Cc: Maurice Ma 
> Cc: Michael D Kinney 
> Cc: Sean Rhodes 
> ---
>  Maintainers.txt | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index bc08ce1f15..a3b62abeee 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -612,9 +612,7 @@ F: UefiPayloadPkg/
>  W: https://github.com/tianocore/tianocore.github.io/wiki/UefiPayloadPkg
> 
>  M: Guo Dong  [gdong1]
> 
>  M: Ray Ni  [niruiyu]
> 
> -R: Maurice Ma  [mauricema]
> 
> -R: Benjamin You  [BenjaminYou]
> 
> -R: Sean Rhodes 
> 
> +M: Sean Rhodes 
> 
>  S: Maintained
> 
> 
> 
>  UnitTestFrameworkPkg
> 
> --
> 2.35.1.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91425): https://edk2.groups.io/g/devel/message/91425
Mute This Topic: https://groups.io/mt/92413853/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH 2/3] UefiPayloadPkg/PlatformBootManagerLib: Evenly space boot prompt

2022-07-15 Thread Guo Dong


Reviewed-by: Guo Dong 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Sean Rhodes
Sent: Monday, July 4, 2022 12:39 PM
To: devel@edk2.groups.io
Cc: Rhodes, Sean ; Dong, Guo ; Ni, 
Ray ; Maurice Ma ; You, Benjamin 

Subject: [edk2-devel] [PATCH 2/3] UefiPayloadPkg/PlatformBootManagerLib: Evenly 
space boot prompt

Add 4 spaces before the boot prompt "F2 or Down..." so that the spacing is 
equadistant from the top, which is spaced with a `\n`, and the left.

Cc: Guo Dong 
Cc: Ray Ni 
Cc: Maurice Ma 
Cc: Benjamin You 
Signed-off-by: Sean Rhodes 
---
 .../Library/PlatformBootManagerLib/PlatformBootManager.c  | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c 
b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
index 0eb577313a..b360e29dfe 100644
--- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
+++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.
+++ c
@@ -263,15 +263,15 @@ PlatformBootManagerAfterConsole (
   if (FixedPcdGetBool (PcdBootManagerEscape)) { Print (   L"\n"-  
L"Esc or Down  to enter Boot Manager Menu.\n"-  L"ENTER   to 
boot directly.\n"+  L"Esc or Down  to enter Boot Manager Menu.\n"+  
L"ENTER   to boot directly.\n"   L"\n"   );   } else {  
   Print (   L"\n"-  L"F2 or Down  to enter Boot Manager Menu.\n"-  
L"ENTER   to boot directly.\n"+  L"F2 or Down  to enter 
Boot Manager Menu.\n"+  L"ENTER   to boot directly.\n"   
L"\n"   );   }-- 
2.34.1



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91044): https://edk2.groups.io/g/devel/message/91044
Mute This Topic: https://groups.io/mt/92172169/1781375
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [guo.d...@intel.com] 
-=-=-=-=-=-=




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91424): https://edk2.groups.io/g/devel/message/91424
Mute This Topic: https://groups.io/mt/92172169/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel][PATCH] Maintainers.txt: Add new reviewer for UefiPayloadPkg

2022-07-15 Thread Guo Dong
From: Guo Dong 

Promote Sean Rhodes as UefiPayloadPkg maintainer.
Remove Maurice and Benjamin since their role was changed.

Signed-off-by: Guo Dong 
Cc: Ray Ni 
Cc: Benjamin You 
Cc: Maurice Ma 
Cc: Michael D Kinney 
Cc: Sean Rhodes 
---
 Maintainers.txt | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Maintainers.txt b/Maintainers.txt
index bc08ce1f15..a3b62abeee 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -612,9 +612,7 @@ F: UefiPayloadPkg/
 W: https://github.com/tianocore/tianocore.github.io/wiki/UefiPayloadPkg
 M: Guo Dong  [gdong1]
 M: Ray Ni  [niruiyu]
-R: Maurice Ma  [mauricema]
-R: Benjamin You  [BenjaminYou]
-R: Sean Rhodes 
+M: Sean Rhodes 
 S: Maintained
 
 UnitTestFrameworkPkg
-- 
2.35.1.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91423): https://edk2.groups.io/g/devel/message/91423
Mute This Topic: https://groups.io/mt/92413853/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [edk2-platforms][PATCH v1 0/7] Resolving SecureBootVariableLib dependency

2022-07-15 Thread Kun Qin

Hi SiFive, QEMU, Socionext & Pythium maintainers,

This patch series was sent to resolve the newly introduced dependency in 
the impacted

packages/platforms.

Could you please provide feedback if any? Any input is appreciated.

Regards,
Kun

On 7/8/2022 2:02 PM, Kun Qin via groups.io wrote:

The new changes in SecureBootVariableLib brought in a new dependency
of PlatformPKProtectionLib.

This patch series added the new library instance from SecurityPkg to
resolve edk2 platforms build.

Patch v1 branch:https://github.com/kuqin12/edk2-platforms/tree/fix_sb_dep

Cc: Ard Biesheuvel
Cc: Leif Lindholm
Cc: Graeme Gregory
Cc: Radoslaw Biernacki
Cc: Masami Hiramatsu
Cc: Nhi Pham
Cc: Vu Nguyen
Cc: Thang Nguyen
Cc: Chuong Tran
Cc: Thomas Abraham
Cc: Sami Mujawar
Cc: Abner Chang
Cc: Gilbert Chen
Cc: Daniel Schaefer
Cc: Jeremy Linton
Cc: Peng Xie
Cc: Ling Jia
Cc: Yiqi Shu

Kun Qin (7):
   RaspberryPi: Pipeline: Resolving newly introduced dependency
   U5SeriesPkg: Pipeline: Resolving newly introduced dependency
   VExpressPkg: Pipeline: Resolving newly introduced dependency
   Qemu: Pipeline: Resolving newly introduced dependency
   Socionext: Pipeline: Resolving newly introduced dependency
   AmpereAltraPkg: Pipeline: Resolving newly introduced dependency
   PhytiumCommonPkg: Pipeline: Resolving newly introduced dependency

  Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 1 +
  Platform/Qemu/SbsaQemu/SbsaQemu.dsc  | 1 +
  Platform/RaspberryPi/RPi3/RPi3.dsc   | 1 +
  Platform/RaspberryPi/RPi4/RPi4.dsc   | 1 +
  Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc   | 1 +
  Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc | 1 +
  Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 1 +
  Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc | 1 +
  Silicon/Phytium/PhytiumCommonPkg/PhytiumCommonPkg.dsc.inc| 1 +
  9 files changed, 9 insertions(+)




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91422): https://edk2.groups.io/g/devel/message/91422
Mute This Topic: https://groups.io/mt/92260955/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [NetworkPkg] Clarification on EFI_TCP6_PROTOCOL Destruction Behavior

2022-07-15 Thread Ayush Singh
Ok, so I have made some small progress in implementing networking. 
However, I have a few things I don't quite understand since I have never 
really dug so deep into networking before:



1. I am trying to implement a TcpListener[1]. I think TcpListener can be 
implemented by setting the `EFI_TCP6_ACCESS_POINT->ActiveFlag` to false 
during configuration. However, while binding the TcpListenere to an 
address, should the `StationAddress` or the `RemoteAddress` be set to 
the supplied address?



2. Is there any UEFI Shell Application/utility that I can use to listen 
to an address (like `nc` in linux). This would be helpful for me to test 
out whether something is a problem in my implementation or in my qemu 
config.



3. The networking stuff in Rust is synchronous. Currently, I am creating 
a new event during accept with the following parameters:


```

Type = EVT_NOTIFY_SIGNAL

NotifyTpl = TPL_CALLBACK

NotifyFunction = 

NotifyContext = NULL

```

I pass this event as `ListenToken->CompletionToken->Event`. Then I call 
`EFI_BOOT_SERVICES.WaitForEvent()` on this event. Is there any better 
way to do this?



4. Does the EFI_TCP6_PROTOCOL support IPv4-mapped IPv6 address [2]? I 
was thinking just converting the IPv4 address to IPv6 instead of using 
EFI_TCP4_PROTOCOL.



Ayush Singh


[1]: https://doc.rust-lang.org/std/net/struct.TcpListener.html#

[2]: 
https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#ipv4-mapped-ipv6-addresses



On 7/14/22 00:00, Ayush Singh wrote:

Thanks. I'm not sure if I will use it directly, but it gives a very
good idea about using these protocols in Rust std.

On Wed, Jul 13, 2022 at 11:07 PM Kinney, Michael D
 wrote:

It may be simpler to use the following lib class that layers on top of the TCP 
protocols.

https://github.com/tianocore/edk2/blob/master/NetworkPkg/Include/Library/TcpIoLib.h

The implementation of this lib shows the correct sequence:

https://github.com/tianocore/edk2/blob/master/NetworkPkg/Library/DxeTcpIoLib/DxeTcpIoLib.c

It uses NetLib services too

https://github.com/tianocore/edk2/blob/master/NetworkPkg/Library/DxeNetLib/DxeNetLib.c

Mike



-Original Message-
From: Ayush Singh 
Sent: Wednesday, July 13, 2022 9:45 AM
To: devel@edk2.groups.io
Cc: Kinney, Michael D ; 
mikub...@linux.microsoft.com; Gaibusab, Jabeena B
; Yao, Jiewen 
Subject: [NetworkPkg] Clarification on EFI_TCP6_PROTOCOL Destruction Behavior

Hello everyone. I am trying to implement Network Support in Rust std for
UEFI. While trying to use the TCP6_PROTOCOL, I am not quite sure how to
deal with destructing the protocol. Since TCP6_PROTOCOL is created using
a EFI_SERVICE_BINDING_PROTCOL, it should be destroyed using the
`DestroyChild()` method. However, do I also have to call
`TCP6_PROTOCOL->Close()` before this or will `DestroyChild()` do that
implicitly? If I do have to call this method myself, then do I need to
do `DestroyChild()` in the `CloseToken->Event->NotifyFunction` or is it
fine to `DestroyChild()` after calling `Close()` (event though `Close`
is nonblocking) ?


Also, it would be great if someone can point me to some TCP Network
applications. I did find some but most were either drivers, or were very
simple and did not do any Cleanup stuff.


Note: Rust does not need the user to close the connection manually. It
is closed once the object is dropped (which is done once the object
owner goes out of scope at compile time).


Yours Sincerely

Ayush Singh



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91421): https://edk2.groups.io/g/devel/message/91421
Mute This Topic: https://groups.io/mt/92361755/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [edk2-staging][PATCH v2 0/3] Add TPM subclass definition

2022-07-15 Thread Yao, Jiewen
Reviewed by Jiewen Yao 

> -Original Message-
> From: Kinney, Michael D 
> Sent: Saturday, July 16, 2022 12:28 AM
> To: devel@edk2.groups.io; kuqi...@gmail.com; Kinney, Michael D
> 
> Cc: Andrew Fish ; Leif Lindholm ; Gao,
> Liming ; Liu, Zhiguang ;
> Yao, Jiewen ; Wang, Jian J ;
> Zhang, Qi1 ; Kumar, Rahul1 
> Subject: RE: [edk2-devel] [edk2-staging][PATCH v2 0/3] Add TPM subclass
> definition
> 
> Series Reviewed-by: Michael D Kinney 
> 
> 
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of Kun Qin
> > Sent: Wednesday, July 13, 2022 7:28 PM
> > To: devel@edk2.groups.io
> > Cc: Andrew Fish ; Leif Lindholm ;
> Kinney, Michael D ; Gao,
> > Liming ; Liu, Zhiguang ;
> Yao, Jiewen ; Wang, Jian J
> > ; Zhang, Qi1 ; Kumar, Rahul1
> 
> > Subject: [edk2-devel] [edk2-staging][PATCH v2 0/3] Add TPM subclass
> definition
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3966
> >
> > This patch series is a follow up of previous submission:
> > https://edk2.groups.io/g/devel/message/91075
> >
> > v2 patch changes include feedback for v1 series:
> > a. Removed PCD replacement related code change;
> >
> > From PI Specification v1.7 Errata A, EFI_PERIPHERAL_DOCKING is defined as
> > 0xD (as well as included in PiStatusCode.h).
> >
> > However, subclass employed as PCD for TPM peripheral in SecurityPkg is
> > also defined as 0xD. The TPM subclass code was used in TcgPei.c when
> > reporting error codes.
> >
> > The collision of subclass definition could cause the parsing of reported
> > errors being ambiguous.
> >
> > This patch series add EFI_PERIPHERAL_TPM as a spec-defined value and
> > removed potential usages in the SecurityPkg.
> >
> > Patch v2 branch: https://github.com/kuqin12/edk2/tree/BZ3966-
> add_tpm_subclass_v2
> >
> > Cc: Andrew Fish 
> > Cc: Leif Lindholm 
> > Cc: Michael D Kinney 
> > Cc: Liming Gao 
> > Cc: Zhiguang Liu 
> > Cc: Jiewen Yao 
> > Cc: Jian J Wang 
> > Cc: Qi Zhang 
> > Cc: Rahul Kumar 
> >
> > Kun Qin (3):
> >   EDK2 Code First: PI Specification: New peripheral subclass for TPM
> >   MdePkg: MmCommunication: Add TPM subclass definition to MdePkg
> >   SecurityPkg: SubClassTpm: Updated default value
> >
> >  CodeFirst/BZ3966-SpecChange.md   | 59 
> >  MdePkg/Include/Pi/PiStatusCode.h |  1 +
> >  SecurityPkg/SecurityPkg.dec  |  6 +-
> >  SecurityPkg/SecurityPkg.uni  |  2 +-
> >  4 files changed, 64 insertions(+), 4 deletions(-)
> >  create mode 100644 CodeFirst/BZ3966-SpecChange.md
> >
> > --
> > 2.37.0.windows.1
> >
> >
> >
> > 
> >



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91420): https://edk2.groups.io/g/devel/message/91420
Mute This Topic: https://groups.io/mt/92372090/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v2] MdePkg/BasePrintLib: Add %z specifier

2022-07-15 Thread Michael D Kinney
Hi Pedro,

I would like to see feedback from Andrew Fish on this topic too.

Thanks,

Mike

From: Pedro Falcato 
Sent: Tuesday, July 12, 2022 3:30 PM
To: edk2-devel-groups-io ; Kinney, Michael D 

Cc: Andrew Fish (af...@apple.com) ; Gao, Liming 
; Liu, Zhiguang 
Subject: Re: [edk2-devel] [PATCH v2] MdePkg/BasePrintLib: Add %z specifier



On Tue, Jul 12, 2022 at 11:02 PM Michael D Kinney 
mailto:michael.d.kin...@intel.com>> wrote:
Hi Pedro,

All good points. I agree that there are some assumptions in implementation code 
that sizeof(size_t) == sizeof(UINTN) == sizeof(VOID *).

When the PrintLib does use a format specifier defined by the ANSI C Spec and 
the behavior is not identical to ANSI C, then we state that in the format 
string description in PrintLib.h.  Since we do not define or use size_t, we are 
not strictly conformant.
So, do you agree on %z for UINTN? Stating that %z prints UINTN and not size_t 
in the description could work (and indeed, my original patch does that), even 
though it's a bit redundant since we have no size_t. Strict conformance is not 
something I'm looking for (and indeed, I believe that ship has sailed for 
UEFI), I just want an intuitive interface that resembles ANSI C as best as it 
can.

Mike


From: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>> On Behalf Of Pedro Falcato
Sent: Tuesday, July 12, 2022 2:33 PM
To: edk2-devel-groups-io mailto:devel@edk2.groups.io>>; 
Kinney, Michael D 
mailto:michael.d.kin...@intel.com>>
Cc: Andrew Fish (af...@apple.com) 
mailto:af...@apple.com>>; Gao, Liming 
mailto:gaolim...@byosoft.com.cn>>; Liu, Zhiguang 
mailto:zhiguang@intel.com>>
Subject: Re: [edk2-devel] [PATCH v2] MdePkg/BasePrintLib: Add %z specifier



On Tue, Jul 12, 2022 at 9:46 PM Michael D Kinney 
mailto:michael.d.kin...@intel.com>> wrote:
Hi Pedro,

There is a good brief description of size_t on this page:
https://en.wikipedia.org/wiki/C_data_types

sizeof() is built into the C compiler, but size_t is defined by the std C lib 
being used.  It can be as small as 16-bits.

We do not use the std C lib, so size_t is not defined when we do EDK II builds. 
 This means we do not know how large the value sizeof() returns is.
Hi Mike,

The C standard library and the compiler usually work together and need to agree 
on how large each type is (uint8_t, uint16_t, uint32_t, uint64_t, size_t), just 
like EDK2 does for its types. The definition of "implementation" (which 
encompasses both the compiler and the C standard library) is intentionally 
vague (as is a good chunk of the C standard) but essentially maps to "whatever 
makes your program run on a standard C environment".

However, your request is to support printing values of type UINTN in the 
PrintLib.  I agree this feature is not present today.  Adding in a new format 
specifier would be required.

Using %z may be confusing because size_t defined by a C lib we are not using 
and UINTN defined in the UEFI Spec are not the same.

Using %z makes sense because in practice (and almost by definition, although 
not technically) UINTN will hold the native word size, and so will size_t. 
UINTN is used all over the place in UEFI to represent lengths of things in 
memory, and so is size_t in standard C codebases. Even if we go by both 
standards' definition of size_t and UINTN ( "unsigned integer type of the 
result of the sizeof operator" vs "Unsigned value of native width" ), since the 
two types in every platform we will ever support[1] map to the same concept and 
the same type, I would defend the use of %z for UINTN.

Do you have a suggestion for a different specifier that perhaps is not used in 
the ANSI C printf() format string?
I believe we have quite a good amount of specifiers that are not reserved but I 
think those would be better used for really non-standard types instead of UINTN 
(which is effectively a size_t).

If we do want a 100% ANSI C conformant version of a print library, then I agree 
this would require a new library class and we would need to use different API 
names so the caller knows which format string style to use.
Agreed.

[1] In fact, I would dare to say that if there ever was a modern machine that 
we ported UEFI to, that had addresses/sizeof() > native word size, a lot of 
code would implicitly break as UINTN takes the role of a size_t in UEFI. As a 
quick example, all interfaces in boot services and runtime services that deal 
with memory length/size take a UINTN. This should be clarified in the spec 
(unless it's written down somewhere and I don't see it). My interpretation of 
both standards leads me to conclude that both size_t and UINTN are intended to 
be used to represent addresses and lengths in memory.

All the best,
Pedro


There is a long history associated with the format string defined in PrintLib 
today.  Mostly related to size optimizations of the PrintLib when FLASH devices 
were much, much smaller.

Mike

From: 

Re: [edk2-devel] [edk2-staging][PATCH v2 0/3] Add TPM subclass definition

2022-07-15 Thread Michael D Kinney
Series Reviewed-by: Michael D Kinney 


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Kun Qin
> Sent: Wednesday, July 13, 2022 7:28 PM
> To: devel@edk2.groups.io
> Cc: Andrew Fish ; Leif Lindholm ; Kinney, 
> Michael D ; Gao,
> Liming ; Liu, Zhiguang ; 
> Yao, Jiewen ; Wang, Jian J
> ; Zhang, Qi1 ; Kumar, Rahul1 
> 
> Subject: [edk2-devel] [edk2-staging][PATCH v2 0/3] Add TPM subclass definition
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3966
> 
> This patch series is a follow up of previous submission:
> https://edk2.groups.io/g/devel/message/91075
> 
> v2 patch changes include feedback for v1 series:
> a. Removed PCD replacement related code change;
> 
> From PI Specification v1.7 Errata A, EFI_PERIPHERAL_DOCKING is defined as
> 0xD (as well as included in PiStatusCode.h).
> 
> However, subclass employed as PCD for TPM peripheral in SecurityPkg is
> also defined as 0xD. The TPM subclass code was used in TcgPei.c when
> reporting error codes.
> 
> The collision of subclass definition could cause the parsing of reported
> errors being ambiguous.
> 
> This patch series add EFI_PERIPHERAL_TPM as a spec-defined value and
> removed potential usages in the SecurityPkg.
> 
> Patch v2 branch: 
> https://github.com/kuqin12/edk2/tree/BZ3966-add_tpm_subclass_v2
> 
> Cc: Andrew Fish 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Zhiguang Liu 
> Cc: Jiewen Yao 
> Cc: Jian J Wang 
> Cc: Qi Zhang 
> Cc: Rahul Kumar 
> 
> Kun Qin (3):
>   EDK2 Code First: PI Specification: New peripheral subclass for TPM
>   MdePkg: MmCommunication: Add TPM subclass definition to MdePkg
>   SecurityPkg: SubClassTpm: Updated default value
> 
>  CodeFirst/BZ3966-SpecChange.md   | 59 
>  MdePkg/Include/Pi/PiStatusCode.h |  1 +
>  SecurityPkg/SecurityPkg.dec  |  6 +-
>  SecurityPkg/SecurityPkg.uni  |  2 +-
>  4 files changed, 64 insertions(+), 4 deletions(-)
>  create mode 100644 CodeFirst/BZ3966-SpecChange.md
> 
> --
> 2.37.0.windows.1
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91418): https://edk2.groups.io/g/devel/message/91418
Mute This Topic: https://groups.io/mt/92372090/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [Patch v2 11/11] MdePkg/UefiLib: Remove all UGA support

2022-07-15 Thread Michael D Kinney
Reviewed-by: Michael D Kinney 


> -Original Message-
> From: Jiang, Guomin 
> Sent: Thursday, July 14, 2022 6:51 PM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D ; Gao, Liming 
> ; Liu, Zhiguang
> 
> Subject: [Patch v2 11/11] MdePkg/UefiLib: Remove all UGA support
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368
> 
> Remove all UGA code in MdePkg except the definition
> 
> The reason why keep definition is because downstream need it to pass
> build.
> It will be removed when all downstream remove UGA support
> 
> Signed-off-by: Guomin Jiang 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Zhiguang Liu 
> ---
>  MdePkg/Library/UefiLib/UefiLib.inf   |  4 +-
>  MdePkg/Library/UefiLib/UefiLibInternal.h |  3 +-
>  MdePkg/Library/UefiLib/UefiLibPrint.c| 91 +---
>  MdePkg/MdePkg.dsc|  3 -
>  4 files changed, 3 insertions(+), 98 deletions(-)
> 
> diff --git a/MdePkg/Library/UefiLib/UefiLib.inf 
> b/MdePkg/Library/UefiLib/UefiLib.inf
> index 01ed92092da2..ac9d68907261 100644
> --- a/MdePkg/Library/UefiLib/UefiLib.inf
> +++ b/MdePkg/Library/UefiLib/UefiLib.inf
> @@ -7,7 +7,7 @@
>  #  EFI Driver Model related protocols, manage Unicode string tables for UEFI 
> Drivers,
>  #  and print messages on the console output and standard error devices.
>  #
> -# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
> +# Copyright (c) 2007 - 2022, Intel Corporation. All rights reserved.
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
> @@ -67,7 +67,6 @@
>gEfiGraphicsOutputProtocolGuid  ## SOMETIMES_CONSUMES
>gEfiHiiFontProtocolGuid ## SOMETIMES_CONSUMES
>gEfiSimpleFileSystemProtocolGuid## SOMETIMES_CONSUMES
> -  gEfiUgaDrawProtocolGuid | gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport
>  ## SOMETIMES_CONSUMES # Consumes
> if gEfiGraphicsOutputProtocolGuid uninstalled
>gEfiComponentNameProtocolGuid  | NOT 
> gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable   ## SOMETIMES_PRODUCES # 
> User
> chooses to produce it
>gEfiComponentName2ProtocolGuid | NOT 
> gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable  ## SOMETIMES_PRODUCES # 
> User
> chooses to produce it
>gEfiDriverConfigurationProtocolGuid## 
> SOMETIMES_PRODUCES # User chooses to produce it
> @@ -84,5 +83,4 @@
>gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable## CONSUMES
>gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable   ## CONSUMES
>gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable   ## CONSUMES
> -  gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport   ## CONSUMES
> 
> diff --git a/MdePkg/Library/UefiLib/UefiLibInternal.h 
> b/MdePkg/Library/UefiLib/UefiLibInternal.h
> index 4365282cf213..be5c9ddcdde8 100644
> --- a/MdePkg/Library/UefiLib/UefiLibInternal.h
> +++ b/MdePkg/Library/UefiLib/UefiLibInternal.h
> @@ -1,7 +1,7 @@
>  /** @file
>Internal include file for UefiLib.
> 
> -  Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
> +  Copyright (c) 2007 - 2022, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent
>  **/
> 
> @@ -18,7 +18,6 @@
>  #include 
>  #include 
>  #include 
> -#include 
>  #include 
> 
>  #include 
> diff --git a/MdePkg/Library/UefiLib/UefiLibPrint.c 
> b/MdePkg/Library/UefiLib/UefiLibPrint.c
> index 39edeb7283dd..2451775aeb90 100644
> --- a/MdePkg/Library/UefiLib/UefiLibPrint.c
> +++ b/MdePkg/Library/UefiLib/UefiLibPrint.c
> @@ -2,7 +2,7 @@
>Mde UEFI library API implementation.
>Print to StdErr or ConOut defined in EFI_SYSTEM_TABLE
> 
> -  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
> +  Copyright (c) 2007 - 2022, Intel Corporation. All rights reserved.
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -344,20 +344,14 @@ InternalPrintGraphic (
>EFI_STATUS   Status;
>UINT32   HorizontalResolution;
>UINT32   VerticalResolution;
> -  UINT32   ColorDepth;
> -  UINT32   RefreshRate;
>EFI_HII_FONT_PROTOCOL*HiiFont;
>EFI_IMAGE_OUTPUT *Blt;
>EFI_FONT_DISPLAY_INFOFontInfo;
>EFI_HII_ROW_INFO *RowInfoArray;
>UINTNRowInfoArraySize;
>EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
> -  EFI_UGA_DRAW_PROTOCOL*UgaDraw;
>EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *Sto;
>EFI_HANDLE   ConsoleHandle;
> -  UINTNWidth;
> -  UINTNHeight;
> -  UINTNDelta;
> 
>HorizontalResolution = 0;
>VerticalResolution   = 0;
> @@ -374,20 +368,6 @@ InternalPrintGraphic (
>(VOID **)
>);
> 
> -  UgaDraw = NULL;
> -  if (EFI_ERROR (Status) 

[edk2-devel] [PATCH v2] MdeModulePkg/Include: Long debug string is truncated to 104 char

2022-07-15 Thread Cosmo Lai
From: Cosmo Lai 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3986

The EFI_STATUS_CODE_DATA_MAX_SIZE is defined as 200 in MdeModulePkg.
After reducing 96byte buffer for variable parameters it is limited to
only 104 char debug string. This is a non-necessary limitation.
It can be set to 0x200 to follow MAX_EXTENDED_DATA_SIZE (also 0x200)
which is used in ReportStatusCodeLib to support longer debug string.

Signed-off-by: Cosmo Lai 
---
 MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h 
b/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h
index 16203452e4..2f408a5622 100644
--- a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h
+++ b/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h
@@ -21,7 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 ///
 /// The maximum size of an EFI_DEBUG_INFO structure.
 ///
-#define EFI_STATUS_CODE_DATA_MAX_SIZE  200
+#define EFI_STATUS_CODE_DATA_MAX_SIZE  0x200
 
 ///
 /// This structure contains the ErrorLevel passed into the DEBUG() macro, 
followed
-- 
2.16.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91415): https://edk2.groups.io/g/devel/message/91415
Mute This Topic: https://groups.io/mt/92401812/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [edk2-platforms PATCH v1 0/1] BoardModulePkg: Copy device path

2022-07-15 Thread Attar, AbdulLateef (Abdul Lateef) via groups.io
[Public]

Maintainers, Reviewers,
 please review the patch.
Thanks
AbduL


-Original Message-
From: Attar, AbdulLateef (Abdul Lateef)
Sent: 25 April 2022 12:45
To: devel@edk2.groups.io; Eric Dong ; Liming Gao 

Subject: RE: [edk2-devel] [edk2-platforms PATCH v1 0/1] BoardModulePkg: Copy 
device path

Hi,
   Please review the patch.
Thanks
AbduL

-Original Message-
From: Attar, AbdulLateef (Abdul Lateef) 
Sent: 05 April 2022 11:25
To: devel@edk2.groups.io; Attar, AbdulLateef (Abdul Lateef) 
; Eric Dong ; Liming Gao 

Subject: RE: [edk2-devel] [edk2-platforms PATCH v1 0/1] BoardModulePkg: Copy 
device path

[Public]

Hi,
   Could you please review the patch?
Thanks
AbduL

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Abdul Lateef 
Attar via groups.io
Sent: 15 March 2022 10:16
To: devel@edk2.groups.io
Cc: Eric Dong ; Liming Gao 
Subject: [edk2-devel] [edk2-platforms PATCH v1 0/1] BoardModulePkg: Copy device 
path

[CAUTION: External Email]

(Resending patch with [edk2-platforms] prefix with correct emailid).
GCC compiler puts the DevicePath PCDs to the read-only section. During boot if 
try to process the device path after PtrGetPtr it throws a page fault exception.

Hence making a local copy using DuplicateDevicePath() to avoid the page fault 
exception.

REF : 
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fabdattar%2Fedk2-platforms%2Ftree%2FBoardModulePkgdata=04%7C01%7CAbdulLateef.Attar%40amd.com%7Cdd04fc2187754979081008da063ebd5d%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637829164332474465%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=MX%2FlzKO2jVyPHaaURb7b8kMyNWFAlMPZ%2B0gK%2Ffrh5xo%3Dreserved=0

Cc: Eric Dong 
Cc: Liming Gao 

Abdul Lateef Attar (1):
  BoardModulePkg: Copy device path before processing

 Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib.c | 19 
++-
 1 file changed, 14 insertions(+), 5 deletions(-)

--
2.25.1









-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91413): https://edk2.groups.io/g/devel/message/91413
Mute This Topic: https://groups.io/mt/89792070/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3] MdeModulePkg/Include: Long debug string is truncated to 104 char

2022-07-15 Thread Cosmo Lai
From: Cosmo Lai 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3986

The EFI_STATUS_CODE_DATA_MAX_SIZE is defined as 200 in MdeModulePkg.
After reducing 96byte buffer for variable parameters it is limited to
only 104 char debug string. This is a non-necessary limitation.
It can be set to 0x200 to follow MAX_EXTENDED_DATA_SIZE (also 0x200)
which is used in ReportStatusCodeLib to support longer debug string.

Cc: Jian J Wang 
Cc: Liming Gao 
Cc: Dandan Bi 

Signed-off-by: Cosmo Lai 
---
 MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h 
b/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h
index 16203452e4..2f408a5622 100644
--- a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h
+++ b/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h
@@ -21,7 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 ///
 /// The maximum size of an EFI_DEBUG_INFO structure.
 ///
-#define EFI_STATUS_CODE_DATA_MAX_SIZE  200
+#define EFI_STATUS_CODE_DATA_MAX_SIZE  0x200
 
 ///
 /// This structure contains the ErrorLevel passed into the DEBUG() macro, 
followed
-- 
2.16.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91416): https://edk2.groups.io/g/devel/message/91416
Mute This Topic: https://groups.io/mt/92401813/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH] Debug msg is limited to 104 char due to EFI_STATUS_CODE_DATA_MAX_SIZE set to 200

2022-07-15 Thread Cosmo Lai
From: Cosmo Lai 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3986

The EFI_STATUS_CODE_DATA_MAX_SIZE is defined as 200 in MdeModulePkg. After
reducing 96byte buffer for variable parameters it is limited to only 104 char
debug string. This is a non-necessary limitation. It can be set to 0x200 to
follow MAX_EXTENDED_DATA_SIZE (also 0x200) which is used in ReportStatusCodeLib
to support longer debug string.

Signed-off-by: Cosmo Lai 
---
 MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h 
b/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h
index 16203452e4..2f408a5622 100644
--- a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h
+++ b/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h
@@ -21,7 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 ///
 /// The maximum size of an EFI_DEBUG_INFO structure.
 ///
-#define EFI_STATUS_CODE_DATA_MAX_SIZE  200
+#define EFI_STATUS_CODE_DATA_MAX_SIZE  0x200
 
 ///
 /// This structure contains the ErrorLevel passed into the DEBUG() macro, 
followed
-- 
2.16.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91414): https://edk2.groups.io/g/devel/message/91414
Mute This Topic: https://groups.io/mt/92401810/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [Patch v2 03/11] ArmPkg: Remove All UGA Support

2022-07-15 Thread Sami Mujawar

Hi Guomin,

Thank you for this patch.

This change looks good to me.

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar

On 15/07/2022 02:50 am, Guomin Jiang wrote:

From: GuoMinJ 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368

Remove All UGA Support in ArmPkg.

Signed-off-by: Guomin Jiang 
Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
Cc: Sami Mujawar 
---
  ArmPkg/Library/PlatformBootManagerLib/PlatformBm.h   | 4 ++--
  .../PlatformBootManagerLib/PlatformBootManagerLib.inf| 5 +
  2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.h 
b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.h
index a40a2ff5cb4f..a2ec4c4ad6c7 100644
--- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.h
+++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.h
@@ -2,7 +2,7 @@
Head file for BDS Platform specific code
  
Copyright (C) 2015-2016, Red Hat, Inc.

-  Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.
+  Copyright (c) 2004 - 2022, Intel Corporation. All rights reserved.
Copyright (c) 2016, Linaro Ltd. All rights reserved.
  
SPDX-License-Identifier: BSD-2-Clause-Patent

@@ -43,7 +43,7 @@ EnableQuietBoot (
Simple Text Out screens will now be synced up with all non video output
devices
  
-  @retval EFI_SUCCESS UGA devices are back in text mode and synced up.

+  @retval EFI_SUCCESS Graphic devices are back in text mode and synced up.
  **/
  EFI_STATUS
  DisableQuietBoot (
diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf 
b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
index 86751b45f82b..63d1d83ab0ef 100644
--- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
@@ -3,7 +3,7 @@
  #
  #  Copyright (C) 2015-2016, Red Hat, Inc.
  #  Copyright (c) 2014, ARM Ltd. All rights reserved.
-#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+#  Copyright (c) 2007 - 2022, Intel Corporation. All rights reserved.
  #  Copyright (c) 2016, Linaro Ltd. All rights reserved.
  #
  #  SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -51,9 +51,6 @@
UefiLib
UefiRuntimeServicesTableLib
  
-[FeaturePcd]

-  gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport
-
  [FixedPcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91412): https://edk2.groups.io/g/devel/message/91412
Mute This Topic: https://groups.io/mt/92393244/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [Patch v2 02/11] ArmVirtPkg: Remove All UGA Support

2022-07-15 Thread Sami Mujawar

Hi Guomin,

Thank you for this patch.

Please find my response inline marked [SAMI].

Regards,

Sami Mujawar

On 15/07/2022 02:50 am, Guomin Jiang wrote:

From: GuoMinJ 

REF: https//bugzilla.tianocore.org/show_bug.cgi?id=2368

Remove PcdConOutGopSupport, it is unnecessary any more.
Remove All UGA Support in ArmVirtPkg

Signed-off-by: Guomin Jiang 
Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Sami Mujawar 
Cc: Gerd Hoffmann 
---
  ArmVirtPkg/ArmVirtQemu.dsc   | 7 +--
  ArmVirtPkg/ArmVirtQemuKernel.dsc | 7 +--
  2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 9369a88858fd..dc87050f3f3a 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -1,7 +1,7 @@
  #
  #  Copyright (c) 2011-2015, ARM Limited. All rights reserved.
  #  Copyright (c) 2014, Linaro Limited. All rights reserved.
-#  Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.
+#  Copyright (c) 2015 - 2022, Intel Corporation. All rights reserved.
  #
  #  SPDX-License-Identifier: BSD-2-Clause-Patent
  #
@@ -125,11 +125,6 @@
gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE
gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE
  
-  ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.

-  #  It could be set FALSE to save size.
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE


[SAMI] I am assuming PcdConOutGopSupport is going to be removed. Can you 
confiirm, please?


I am not sure I am looking at the right pull request. But the patch at 
https://github.com/tianocore/edk2/pull/290/commits/49838844df66826c5d09a2dad075dfe0d37ee709#diff-6bdd1bc5bd7bacf61a4499e556ae002cbc49fc24c19e424fdf544d91e163bbb8 
does not seem to drop it.


Also the subject line for the commit is same as for the patch at 
https://edk2.groups.io/g/devel/message/91390 in this series.


[/SAMI]


-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
-
gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
  
gArmVirtTokenSpaceGuid.PcdTpm2SupportEnabled|$(TPM2_ENABLE)

diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 7f7d15d6eee3..0d13d8edb407 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -1,7 +1,7 @@
  #
  #  Copyright (c) 2011-2015, ARM Limited. All rights reserved.
  #  Copyright (c) 2014, Linaro Limited. All rights reserved.
-#  Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.
+#  Copyright (c) 2015 - 2022, Intel Corporation. All rights reserved.
  #
  #  SPDX-License-Identifier: BSD-2-Clause-Patent
  #
@@ -107,11 +107,6 @@
gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE
gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE
  
-  ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.

-  #  It could be set FALSE to save size.
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
-
gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
  
  [PcdsFixedAtBuild.common]



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91411): https://edk2.groups.io/g/devel/message/91411
Mute This Topic: https://groups.io/mt/92393243/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-