Re: [edk2-devel] [EXTERNAL] [Patch 12/12] UnitTestFrameworkPkg: Update YAML to ignore specific ECC files/errors

2021-11-26 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew 

- Bret

From: Michael D Kinney
Sent: Tuesday, November 23, 2021 1:21 PM
To: devel@edk2.groups.io
Cc: Sean Brogan; Bret 
Barkelew; Liming 
Gao; Michael 
Kubacki
Subject: [EXTERNAL] [Patch 12/12] UnitTestFrameworkPkg: Update YAML to ignore 
specific ECC files/errors

REF: 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3749data=04%7C01%7CBret.Barkelew%40microsoft.com%7C7f8dbf0e635b435fe38a08d9aec73d99%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637732993028966105%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=z5uy6%2BorMDeC%2BhrPZe%2Bi4WBAdWWkBqQSbdwJZqe9jCo%3Dreserved=0

Update package YAML files to ignore ECC errors that are
already present.  These issues must be fixed in the future,
but should not block source code changes for these known
issues.

Cc: Sean Brogan 
Cc: Bret Barkelew 
Cc: Liming Gao 
Cc: Michael Kubacki 
Signed-off-by: Michael D Kinney 
---
 UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml 
b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
index 9e9ffc1af113..1b247a831593 100644
--- a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
+++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
@@ -15,10 +15,13 @@
 ## "", ""
 ## ]
 "ExceptionList": [
+"9005", "@MRT",
+"7007", "_UNIT_TEST_FAILURE_TYPE_STRING"
 ],
 ## Both file path and directory path are accepted.
 "IgnoreFiles": [
-"Library/CmockaLib/cmocka"
+"Library/CmockaLib/cmocka",
+"Library/UnitTestLib/RunTestsCmocka.c"
 ]
 },
 ## options defined .pytool/Plugin/CompilerPlugin
--
2.32.0.windows.1



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




Re: [EXTERNAL] Re: [edk2-devel] [PATCH v2 16/16] ArmPlatformPkg: Resolve build errors resulting from package moves

2021-11-08 Thread Bret Barkelew via groups.io
Marvin,

Thanks for the question! You’re right, I need to squash this patch into the 
applicable patches in the series so that the build fixes are present when the 
initial changes are added (to maintain bisectability). Surprised no one had 
mentioned it yet. 

I would actually be happy to keep the Arm entry point in StandaloneMmPkg if 
someone else wanted to tackle the work needed to remove the ArmPkg interface 
dependencies from the implementation. The necessary abstractions are beyond my 
ability to bite off right now, so the most direct solution was to relocate the 
implementation (leveraging the abstraction at the EntryPoint level) to the 
ArmPkg so that the necessary platforms could consume it. I could also see an 
argument that it should be platform code, but I think it’s more common than 
that and would prefer to keep it in EDK2.

- Bret

From: Marvin Häuser via groups.io
Sent: Saturday, November 6, 2021 2:50 AM
To: devel@edk2.groups.io; 
b...@corthon.com
Cc: devel@edk2.groups.io; Lindholm, 
Leif; Ard 
Biesheuvel; Sean 
Brogan
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v2 16/16] ArmPlatformPkg: Resolve 
build errors resulting from package moves

Hey Bret,

If I understood this correctly, this fixes build issues introduced with
the move patch of the same series? In that case, is there no edk2 rule
that every commit must compile for the whole tree? We have such a rule
downstream that overrides any colliding rules (e.g. "mod only one
package at a time") to not break bisectioning. We actually have
per-commit builds readily available in a database for some projects to
ease it further. No big deal for us as we don't do that with edk2 (yet),
but maybe worth considering for the future? :)

I'll just ask about another patch here because it doesn't matter for
review, but why move the ARM entry point to ArmPkg? I guess because
abstracting the ARM-specific things would more or less just make the
StandaloneMm library a trivial wrapper? My "issue" with this is that ARM
kind of has its own ecosystem in edk2 and without keeping up, it's hard
to tell whether to look for ARM implementations of modules and libraries
in the "generic" or the ARM packages.

Thanks a lot for the series!

Best regards,
Marvin

02.11.2021 21:21:59 Bret Barkelew :

> From: Bret Barkelew 
>
> REF: 
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3652data=04%7C01%7CBret.Barkelew%40microsoft.com%7C2d061d1ff7a845914be808d9a10addee%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637717890363754993%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=r5yRvqRrCGPQLNCXfXv4KdmldhxFTpCwdsjMoPcvl4M%3Dreserved=0
>
> Cc: Leif Lindholm 
> Cc: Ard Biesheuvel 
> Cc: Sean Brogan 
> Signed-off-by: Bret Barkelew 
> ---
> ArmPlatformPkg/ArmPlatformPkg.dsc | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/ArmPlatformPkg/ArmPlatformPkg.dsc 
> b/ArmPlatformPkg/ArmPlatformPkg.dsc
> index 661a4cea220d..3ed0bae87c41 100644
> --- a/ArmPlatformPkg/ArmPlatformPkg.dsc
> +++ b/ArmPlatformPkg/ArmPlatformPkg.dsc
> @@ -79,6 +79,8 @@ [LibraryClasses.common]
>NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
>NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
>
> +  ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf
> +
> [LibraryClasses.common.PEIM]
>HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
>
> MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
> @@ -92,7 +94,7 @@ [LibraryClasses.common.SEC]
>
> MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
>
> PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
>
> -[LibraryClasses.AARCH64.MM_STANDALONE]
> +[LibraryClasses.common.MM_STANDALONE]
>HobLib|StandaloneMmPkg/Library/StandaloneMmHobLib/StandaloneMmHobLib.inf
>
> MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmMemoryAllocationLib/StandaloneMmMemoryAllocationLib.inf
>
> MmServicesTableLib|MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.inf
> --
> 2.31.1.windows.1
>
>
>
>







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




Re: [edk2-devel] [EXTERNAL] [Patch V2 6/7] MdeModulePkg/Variable/RuntimeDxeUnitTest: Fix 32-bit GCC builds

2021-11-03 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew 

- Bret

From: Michael D Kinney
Sent: Wednesday, November 3, 2021 4:00 PM
To: devel@edk2.groups.io
Cc: Hao A Wu; Liming 
Gao; Bret 
Barkelew; Philippe 
Mathieu-Daude
Subject: [EXTERNAL] [Patch V2 6/7] MdeModulePkg/Variable/RuntimeDxeUnitTest: 
Fix 32-bit GCC builds

When using will_return() on a pointer value, it must be
cast to UINTN to be compatible with 32-bit GCC builds.
This uses the same approach in samples provided in the
UnitTestFramworkPkg when passing pointer values to
UT_ASSERT_EQUAL().

Cc: Hao A Wu 
Cc: Liming Gao 
Cc: Bret Barkelew 
Signed-off-by: Michael D Kinney 
Reviewed-by: Philippe Mathieu-Daude 
---
 .../RuntimeDxeUnitTest/VariableLockRequestToLockUnitTest.c  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/VariableLockRequestToLockUnitTest.c
 
b/MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/VariableLockRequestToLockUnitTest.c
index 44d70e639d77..880994fe71fc 100644
--- 
a/MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/VariableLockRequestToLockUnitTest.c
+++ 
b/MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/VariableLockRequestToLockUnitTest.c
@@ -287,7 +287,7 @@ LockingAnUnlockedVariableShouldFail (
   // With a policy, make sure that writes still work, since the variable 
doesn't exist.
   will_return( StubGetVariableNull, TEST_POLICY_ATTRIBUTES_NULL );// 
Attributes
   will_return( StubGetVariableNull, 0 );  // Size
-  will_return( StubGetVariableNull, NULL );   // 
DataPtr
+  will_return( StubGetVariableNull, (UINTN)NULL );// 
DataPtr
   will_return( StubGetVariableNull, EFI_NOT_FOUND);   // Status

   Status = VariableLockRequestToLock (NULL, TEST_VAR_1_NAME, );
@@ -342,7 +342,7 @@ LockingALockedVariableWithMatchingDataShouldSucceed (
   Data = 1;
   will_return( StubGetVariableNull, TEST_POLICY_ATTRIBUTES_NULL );// 
Attributes
   will_return( StubGetVariableNull, sizeof (Data) );  // Size
-  will_return( StubGetVariableNull,  );  // 
DataPtr
+  will_return( StubGetVariableNull, (UINTN) );   // 
DataPtr
   will_return( StubGetVariableNull, EFI_SUCCESS); // Status

   Status = VariableLockRequestToLock (NULL, TEST_VAR_1_NAME, );
@@ -397,7 +397,7 @@ LockingALockedVariableWithNonMatchingDataShouldFail (
   Data = 2;
   will_return( StubGetVariableNull, TEST_POLICY_ATTRIBUTES_NULL );// 
Attributes
   will_return( StubGetVariableNull, sizeof (Data) );  // Size
-  will_return( StubGetVariableNull,  );  // 
DataPtr
+  will_return( StubGetVariableNull, (UINTN) );   // 
DataPtr
   will_return( StubGetVariableNull, EFI_SUCCESS); // Status

   Status = VariableLockRequestToLock (NULL, TEST_VAR_1_NAME, );
--
2.32.0.windows.1



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




Re: [EXTERNAL] [edk2-devel] [PATCH v1 06/16] ArmPkg and BaseTools: Move the GccLto binaries from ArmPkg to BaseTools

2021-11-03 Thread Bret Barkelew via groups.io
Sounds good. Will update in v3.

- Bret

From: Feng, Bob C 
Sent: Wednesday, November 3, 2021 8:35:33 AM
To: Andrew Fish ; edk2-devel-groups-io ; 
Bret Barkelew 
Cc: Lindholm, Leif ; brbar...@microsoft.com 
; Ard Biesheuvel ; Liming Gao 
; Chen, Yuwei ; Sean Brogan 

Subject: RE: [EXTERNAL] [edk2-devel] [PATCH v1 06/16] ArmPkg and BaseTools: 
Move the GccLto binaries from ArmPkg to BaseTools


I’d prefer to use EDK_TOOLS_PATH. Because of PACKAGES_PATH, the relative path 
does not depend on the WORKSPACE, the WORKSPACE can be set to anywhere. So we 
can’t assume the BaseTools is under WORKSPACE. But EDK_TOOLS_PATH always points 
to edk2/BaseTools.



This patch does not break any of the use-cases on my side.



Thanks,

Bob



From: Andrew Fish 
Sent: Wednesday, November 3, 2021 7:34 AM
To: edk2-devel-groups-io ; bret.barke...@microsoft.com
Cc: Lindholm, Leif ; brbar...@microsoft.com 
; Ard Biesheuvel ; Feng, Bob C 
; Liming Gao ; Chen, Christine 
; Sean Brogan 
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 06/16] ArmPkg and BaseTools: 
Move the GccLto binaries from ArmPkg to BaseTools







On Nov 2, 2021, at 12:45 PM, Bret Barkelew via 
groups.io<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.io%2F=04%7C01%7Cbret.barkelew%40microsoft.com%7C06f295b9903a44c7b8d408d99edff565%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637715507056865024%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=7IeYGfQir8xUiKwmZ9N%2BTsiLRc8%2F03Rzsr%2FwJ08qmvQ%3D=0>
 
mailto:bret.barkelew=microsoft@groups.io>>
 wrote:



Good call. Maintainers, your opinion?



- Bret



From: Leif Lindholm via groups.io<mailto:leif=nuviainc@groups.io>
Sent: Tuesday, November 2, 2021 2:55 AM
To: brbar...@microsoft.com<mailto:b...@corthon.com>
Cc: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Ard 
Biesheuvel<mailto:ardb+tianoc...@kernel.org>; Feng, Bob 
C<mailto:bob.c.f...@intel.com>; Liming Gao<mailto:gaolim...@byosoft.com.cn>; 
Chen, Yuwei<mailto:yuwei.c...@intel.com>; Sean 
Brogan<mailto:sean.bro...@microsoft.com>
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v1 06/16] ArmPkg and BaseTools: 
Move the GccLto binaries from ArmPkg to BaseTools



On Mon, Nov 01, 2021 at 12:56:38 -0700, 
brbar...@microsoft.com<mailto:brbar...@microsoft.com> wrote:
> From: Bret Barkelew mailto:brbar...@microsoft.com>>
>
> This aligns better with Mu's philosophy around dependency structuring
> and is one of the steps to enable Basecore to have zero CI dependencies
> on other Mu repos.
>
> REF: 
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3650data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cc9129586336447a44c3908d99de6e1d1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637714437251132216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=ijjQG1L4fScVxSn5nIBQGrFHLVtNbuTfd0YYLGdw8sg%3Dreserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3650=04%7C01%7Cbret.barkelew%40microsoft.com%7C06f295b9903a44c7b8d408d99edff565%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637715507056865024%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=oBOJo5g2DzNrgu2Py0sjxAd%2BHekQBxrlDylc%2BkIwEow%3D=0>
>
> Cc: Leif Lindholm mailto:l...@nuviainc.com>>
> Cc: Ard Biesheuvel 
> mailto:ardb+tianoc...@kernel.org>>
> Cc: Bob Feng mailto:bob.c.f...@intel.com>>
> Cc: Liming Gao mailto:gaolim...@byosoft.com.cn>>
> Cc: Yuwei Chen mailto:yuwei.c...@intel.com>>
> Cc: Sean Brogan mailto:sean.bro...@microsoft.com>>
> Signed-off-by: Bret Barkelew 
> mailto:bret.barke...@microsoft.com>>

No objections to this for any of my use-cases, but I'd like for one of
the BaseTools maintainers to comment on whether this breaks anything
with regards to EDK_TOOLS_PATH, or if we can finally get rid of that
and replace it with $WORKSPACE/BaseTools globally.

Our internal repo uses EDK_TOOLS_PATH. In our case it is 
$(WORKSPACE)/edk2/BaseTools. We have a PACKAGES_PATH set to $(WORKSPACE)/edk2 
and magic happens.



So I’m thinking maybe:

  $(EDK_TOOLS_PATH)/Bin/GccLto

Vs:

  $(WORKSPACE)/BaseTools/Bin/GccLto



If EDK_TOOLS_PATH gets ripped out, it should be one atomic remove, but let us 
not stick that on Bret.



Thanks,



Andrew Fish



/
Leif

> ---
>  {ArmPkg/Library => BaseTools/Bin}/GccLto/liblto-aarch64.a | Bin
>  {ArmPkg/Library => BaseTools/Bin}/GccLto/liblto-aarch64.s |   0
>  {ArmPkg/Library => BaseTools/Bin}/GccLto/liblto-arm.a | Bin
>  {ArmPkg/Library => BaseTools/Bin}/GccLto/liblto-arm.s |   0
>  BaseTools/Conf/tools_def.template

Re: [EXTERNAL] Re: [edk2-devel] [PATCH v1 06/16] ArmPkg and BaseTools: Move the GccLto binaries from ArmPkg to BaseTools

2021-11-02 Thread Bret Barkelew via groups.io
Good call. Maintainers, your opinion?

- Bret

From: Leif Lindholm via groups.io
Sent: Tuesday, November 2, 2021 2:55 AM
To: brbar...@microsoft.com
Cc: devel@edk2.groups.io; Ard 
Biesheuvel; Feng, Bob 
C; Liming Gao; 
Chen, Yuwei; Sean 
Brogan
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v1 06/16] ArmPkg and BaseTools: 
Move the GccLto binaries from ArmPkg to BaseTools

On Mon, Nov 01, 2021 at 12:56:38 -0700, brbar...@microsoft.com wrote:
> From: Bret Barkelew 
>
> This aligns better with Mu's philosophy around dependency structuring
> and is one of the steps to enable Basecore to have zero CI dependencies
> on other Mu repos.
>
> REF: 
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3650data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cc9129586336447a44c3908d99de6e1d1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637714437251132216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=ijjQG1L4fScVxSn5nIBQGrFHLVtNbuTfd0YYLGdw8sg%3Dreserved=0
>
> Cc: Leif Lindholm 
> Cc: Ard Biesheuvel 
> Cc: Bob Feng 
> Cc: Liming Gao 
> Cc: Yuwei Chen 
> Cc: Sean Brogan 
> Signed-off-by: Bret Barkelew 

No objections to this for any of my use-cases, but I'd like for one of
the BaseTools maintainers to comment on whether this breaks anything
with regards to EDK_TOOLS_PATH, or if we can finally get rid of that
and replace it with $WORKSPACE/BaseTools globally.

/
Leif

> ---
>  {ArmPkg/Library => BaseTools/Bin}/GccLto/liblto-aarch64.a | Bin
>  {ArmPkg/Library => BaseTools/Bin}/GccLto/liblto-aarch64.s |   0
>  {ArmPkg/Library => BaseTools/Bin}/GccLto/liblto-arm.a | Bin
>  {ArmPkg/Library => BaseTools/Bin}/GccLto/liblto-arm.s |   0
>  BaseTools/Conf/tools_def.template |  19 
> ++-
>  5 files changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/ArmPkg/Library/GccLto/liblto-aarch64.a 
> b/BaseTools/Bin/GccLto/liblto-aarch64.a
> similarity index 100%
> rename from ArmPkg/Library/GccLto/liblto-aarch64.a
> rename to BaseTools/Bin/GccLto/liblto-aarch64.a
> diff --git a/ArmPkg/Library/GccLto/liblto-aarch64.s 
> b/BaseTools/Bin/GccLto/liblto-aarch64.s
> similarity index 100%
> rename from ArmPkg/Library/GccLto/liblto-aarch64.s
> rename to BaseTools/Bin/GccLto/liblto-aarch64.s
> diff --git a/ArmPkg/Library/GccLto/liblto-arm.a 
> b/BaseTools/Bin/GccLto/liblto-arm.a
> similarity index 100%
> rename from ArmPkg/Library/GccLto/liblto-arm.a
> rename to BaseTools/Bin/GccLto/liblto-arm.a
> diff --git a/ArmPkg/Library/GccLto/liblto-arm.s 
> b/BaseTools/Bin/GccLto/liblto-arm.s
> similarity index 100%
> rename from ArmPkg/Library/GccLto/liblto-arm.s
> rename to BaseTools/Bin/GccLto/liblto-arm.s
> diff --git a/BaseTools/Conf/tools_def.template 
> b/BaseTools/Conf/tools_def.template
> index 2e6b382ab623..cd8899d24d4a 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -15,7 +15,8 @@
>  # 2.00 - Initial version with changes for CI
>  #  - Change RC path to use plugin
>  #
> -#!VERSION=2.00
> +# 2.10 - Move GccLto files to a tools path to be more repository layout 
> agnostic
> +#!VERSION=2.10
>
>  IDENTIFIER = Default TOOL_CHAIN_CONF
>
> @@ -2386,10 +2387,10 @@ RELEASE_GCC5_X64_DLINK_FLAGS = 
> DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
>  *_GCC5_ARM_CC_XIPFLAGS   = DEF(GCC5_ARM_CC_XIPFLAGS)
>
>DEBUG_GCC5_ARM_CC_FLAGS= DEF(GCC5_ARM_CC_FLAGS) -flto 
> -Wno-unused-but-set-variable -Wno-unused-const-variable
> -  DEBUG_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os 
> -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm 
> -Wl,-plugin-opt=-pass-through=-llto-arm
> +  DEBUG_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os 
> -L$(WORKSPACE)/BaseTools/Bin/GccLto -llto-arm 
> -Wl,-plugin-opt=-pass-through=-llto-arm
>
>  RELEASE_GCC5_ARM_CC_FLAGS= DEF(GCC5_ARM_CC_FLAGS) -flto 
> -Wno-unused-but-set-variable -Wno-unused-const-variable
> -RELEASE_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os 
> -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm 
> -Wl,-plugin-opt=-pass-through=-llto-arm
> +RELEASE_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os 
> -L$(WORKSPACE)/BaseTools/Bin/GccLto -llto-arm 
> -Wl,-plugin-opt=-pass-through=-llto-arm
>
>NOOPT_GCC5_ARM_CC_FLAGS= DEF(GCC5_ARM_CC_FLAGS) -O0
>NOOPT_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -O0
> @@ -2420,11 +2421,11 @@ RELEASE_GCC5_ARM_DLINK_FLAGS = 
> DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKS
>  *_GCC5_AARCH64_CC_XIPFLAGS   = DEF(GCC5_AARCH64_CC_XIPFLAGS)
>
>DEBUG_GCC5_AARCH64_CC_FLAGS= DEF(GCC5_AARCH64_CC_FLAGS) -flto 
> 

Re: [EXTERNAL] Re: [edk2-devel] [PATCH v1 05/16] ArmPkg and MdePkg: Move the Arm CompilerIntrinsicsLib to MdePkg

2021-11-02 Thread Bret Barkelew via groups.io
I’d be amenable to that. @Sean?

- Bret

From: Leif Lindholm via groups.io
Sent: Tuesday, November 2, 2021 2:51 AM
To: brbar...@microsoft.com
Cc: devel@edk2.groups.io; Ard 
Biesheuvel; Kinney, Michael 
D; Liming 
Gao; Zhiguang 
Liu; Sami Mujawar; 
Yao, Jiewen; Supreeth 
Venkatesh; Maciej 
Rabeda; Jiaxin 
Wu; Siyuan Fu; Ni, 
Ray; Zhichao Gao; Sean 
Brogan
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v1 05/16] ArmPkg and MdePkg: Move 
the Arm CompilerIntrinsicsLib to MdePkg

On Mon, Nov 01, 2021 at 12:56:37 -0700, brbar...@microsoft.com wrote:
> From: Bret Barkelew 
>
> This aligns better with Mu's philosophy around dependency structuring
> and is one of the steps to enable Basecore to have zero CI dependencies
> on other Mu repos.
>
> REF: 
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3649data=04%7C01%7CBret.Barkelew%40microsoft.com%7C6acadbd5a03f44edf9c408d99de642ee%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637714434603817528%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=AmwBKl6uWTs1VYo3Hw3I3RglkhPrWXhKPkobrwQid84%3Dreserved=0
>

Only one comment on this patch really.

>  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf => 
> MdePkg/Library/CompilerIntrinsicsLib/ArmCompilerIntrinsicsLib.inf | 3 +--

Could we just keep the .inf name as is?

I think we're getting closer to the x86 folk accepting that they
need this too, rather than keep inventing new dialects of C in the
desperate hope that the compiler won't generate stdlib calls it's
fully permitted to generate whenever it feels like.

/
Leif







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




Re: [EXTERNAL] [edk2-devel][edk2-platforms][PATCH V1 1/1] MinPlatformPkg/Variable*Lib: Build VariableRead and VariableWrite libs

2021-09-08 Thread Bret Barkelew via groups.io
Question:

I’ve recently brought up with some that the GetVariable##() functions in 
UefiLib are probably incorrect as they are written (because they assume things 
like gRT and gBS availability). Would it perhaps make sense to move this 
interface up into the MdePkg scope and leverage it to start removing some of 
those assumptions?

I already have a TODO to start splitting UefiLib along phase lines (PEI, DXE, 
MM, etc), but that work could largely be obviated with this abstraction.

- Bret

From: Oram, Isaac W via groups.io
Sent: Wednesday, September 8, 2021 3:29 PM
To: devel@edk2.groups.io
Cc: Chasel Chiu; Desimone, Nathaniel 
L; Liming 
Gao; Dong, Eric
Subject: [EXTERNAL] [edk2-devel][edk2-platforms][PATCH V1 1/1] 
MinPlatformPkg/Variable*Lib: Build VariableRead and VariableWrite libs

Add the VariableReadLib and VariableWriteLib instances to Components to
ensure build when building MinPlatformPkg.dsc.
Add a NULL library instance that provides the non-functional library
instance for VariableReadLib designed for all phase use.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Liming Gao 
Cc: Eric Dong 
Signed-off-by: Isaac Oram 
---
 
Platform/Intel/MinPlatformPkg/Library/BaseVariableReadLibNull/BaseVariableReadLibNull.c
   | 75 
 
Platform/Intel/MinPlatformPkg/Library/BaseVariableReadLibNull/BaseVariableReadLibNull.inf
 | 37 ++
 Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc   
   |  6 +-
 3 files changed, 117 insertions(+), 1 deletion(-)

diff --git 
a/Platform/Intel/MinPlatformPkg/Library/BaseVariableReadLibNull/BaseVariableReadLibNull.c
 
b/Platform/Intel/MinPlatformPkg/Library/BaseVariableReadLibNull/BaseVariableReadLibNull.c
new file mode 100644
index 00..f276b7b6b4
--- /dev/null
+++ 
b/Platform/Intel/MinPlatformPkg/Library/BaseVariableReadLibNull/BaseVariableReadLibNull.c
@@ -0,0 +1,75 @@
+/** @file
+  NULL implementation of Variable Read Lib
+
+  This library provides phase agnostic access to the UEFI Variable Services.
+  This is done by implementing a wrapper on top of the phase specific mechanism
+  for reading from UEFI variables. For example, the PEI implementation of this
+  library uses EFI_PEI_READ_ONLY_VARIABLE2_PPI. The DXE implementation accesses
+  the UEFI Runtime Services Table, and the SMM implementation uses
+  EFI_SMM_VARIABLE_PROTOCOL.
+
+  Using this library allows code to be written in a generic manner that can be
+  used in PEI, DXE, or SMM without modification.
+
+  @copyright
+  Copyright 2021 Intel Corporation. 
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#include 
+
+/**
+  Returns the value of a variable.
+
+  @param[in]   VariableName  A Null-terminated string that is the name of 
the vendor's
+ variable.
+  @param[in]   VendorGuidA unique identifier for the vendor.
+  @param[out]  AttributesIf not NULL, a pointer to the memory location 
to return the
+ attributes bitmask for the variable.
+  @param[in, out]  DataSize  On input, the size in bytes of the return 
Data buffer.
+ On output the size of data returned in Data.
+  @param[out]  Data  The buffer to return the contents of the 
variable. May be NULL
+ with a zero DataSize in order to determine 
the size buffer needed.
+
+  @retval EFI_UNSUPPORTEDThis function is not implemented by this 
instance of the LibraryClass
+
+**/
+EFI_STATUS
+EFIAPI
+VarLibGetVariable (
+  IN CHAR16  *VariableName,
+  IN EFI_GUID*VendorGuid,
+  OUTUINT32  *Attributes,OPTIONAL
+  IN OUT UINTN   *DataSize,
+  OUTVOID*Data   OPTIONAL
+  )
+{
+  return EFI_UNSUPPORTED;
+}
+
+/**
+  Enumerates the current variable names.
+
+  @param[in, out]  VariableNameSize The size of the VariableName buffer. The 
size must be large
+enough to fit input string supplied in 
VariableName buffer.
+  @param[in, out]  VariableName On input, supplies the last VariableName 
that was returned
+by GetNextVariableName(). On output, 
returns the Nullterminated
+string of the current variable.
+  @param[in, out]  VendorGuid   On input, supplies the last VendorGuid 
that was returned by
+GetNextVariableName(). On output, returns 
the
+VendorGuid of the current variable.
+
+  @retval EFI_UNSUPPORTED   This function is not implemented by this 
instance of the LibraryClass
+
+**/
+EFI_STATUS
+EFIAPI

Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib

2021-08-12 Thread Bret Barkelew via groups.io
Thanks, Jiewen! I’ll make those changes!

- Bret

From: Yao, Jiewen 
Sent: Thursday, August 12, 2021 7:47:04 PM
To: devel@edk2.groups.io ; Yao, Jiewen 
; gaolim...@byosoft.com.cn ; 
Bret Barkelew ; b...@corthon.com 
; Kinney, Michael D 
Cc: Wang, Jian J ; Zhang, Qi1 ; 
Kumar, Rahul1 
Subject: RE: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib


Hi Bret

Since it took much long time to get ECC feedback than I expected, I would give 
feedback on code while we are waiting.



1) Please confirm how you test the code, such as Microsoft platform ?

2) Please remove “+} // Tpm2NvUndefineSpaceSpecial()” at the end of the 
function. We do not use that style in other code.

3) Please copy the definition from TPM spec “This command allows removal of a 
platform-created NV Index that has TPMA_NV_POLICY_DELETE SET” to the function 
header description. The current one “This command removes an index from the 
TPM.” is for TPM2_NV_UndefineSpace instead of TPM2_NV_UndefineSpaceSpecial.



Since above comment does not impact any function, I would like to give RB.



With about change, reviewed-by: Jiewen Yao 



Thank you

Yao Jiewen



From: Bret Barkelew via groups.io<mailto:bret.barkelew=microsoft@groups.io>
Sent: Friday, July 30, 2021 11:08 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
b...@corthon.com<mailto:b...@corthon.com>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Jian J 
Wang<mailto:jian.j.w...@intel.com>; Qi Zhang<mailto:qi1.zh...@intel.com>; Rahul 
Kumar<mailto:rahul1.ku...@intel.com>
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib



Note, even though this keeps with the style of the rest of the file, it breaks 
ECC:

SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib by 
corthon · Pull Request #1848 · tianocore/edk2 
(github.com)<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fpull%2F1848=04%7C01%7Cbret.barkelew%40microsoft.com%7C887b6ef599664679e21808d95e04a428%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637644196321232497%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=1TMpHKJ9Mwh6VW4fBAjs0Cf2hIqcmbtDfNqsJY47z5U%3D=0>



PROGRESS - --Running SecurityPkg: EccCheck Test NO-TARGET --

ERROR -

ERROR -

ERROR - EFI coding style error

ERROR - *Error code: 8001

ERROR - *Only capital letters are allowed to be used for #define declarations

ERROR - *file: 
//home/vsts/work/1/s/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c

ERROR - *Line number: 27

ERROR - *The #define name [RC_NV_UndefineSpaceSpecial_nvIndex] does no



Thoughts?



- Bret



From: Bret Barkelew via groups.io<mailto:bret=corthon@groups.io>
Sent: Friday, July 30, 2021 10:55 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Jian J 
Wang<mailto:jian.j.w...@intel.com>; Qi Zhang<mailto:qi1.zh...@intel.com>; Rahul 
Kumar<mailto:rahul1.ku...@intel.com>
Subject: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib



Used to provision and maintain certain HW-defined NV spaces.

REF: 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2994data=04%7C01%7CBret.Barkelew%40microsoft.com%7Cb7ae3c62047c48fc85d908d953833ca0%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637632645397602953%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=s96M3RvxMOY831Vfr1nt%2Fz1h3cyb6jU9eFzvjKO7Dtc%3Dreserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2994=04%7C01%7Cbret.barkelew%40microsoft.com%7C887b6ef599664679e21808d95e04a428%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637644196321232497%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=q%2FGqsG776H1TD9bqGRw8ihZNDnJscXK0dwzEVGCNYf0%3D=0>

Signed-off-by: Bret Barkelew 
mailto:bret.barke...@microsoft.com>>
Cc: Jiewen Yao mailto:jiewen@intel.com>>
Cc: Jian J Wang mailto:jian.j.w...@intel.com>>
Cc: Qi Zhang mailto:qi1.zh...@intel.com>>
Cc: Rahul Kumar mailto:rahul1.ku...@intel.com>>
---
 SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c | 122 
 SecurityPkg/Include/Library/Tpm2CommandLib.h   |  22 
 2 files changed, 144 insertions(+)

diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c 
b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
index 87572de20164..7931fade9190 100644
--- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
+++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
@@ -24,6 +24,8 @@ S

Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib

2021-08-12 Thread Bret Barkelew via groups.io
+ @Kinney, Michael D<mailto:michael.d.kin...@intel.com>

Mike, any thoughts on when “sticking with the file convention” breaks ECC? 
Should I just ignore the rest of the file and pass ECC at all costs?

- Bret

From: Yao, Jiewen<mailto:jiewen@intel.com>
Sent: Thursday, August 12, 2021 5:06 PM
To: Bret Barkelew<mailto:bret.barke...@microsoft.com>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
b...@corthon.com<mailto:b...@corthon.com>
Cc: Wang, Jian J<mailto:jian.j.w...@intel.com>; Zhang, 
Qi1<mailto:qi1.zh...@intel.com>; Kumar, Rahul1<mailto:rahul1.ku...@intel.com>
Subject: RE: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib

I don’t know the answer about ECC or PatchChecker.
I  just know we need pass CI to merge the patch.

Thank you
Yao Jiewen

From: Bret Barkelew 
Sent: Friday, August 13, 2021 1:52 AM
To: devel@edk2.groups.io; b...@corthon.com
Cc: Yao, Jiewen ; Wang, Jian J ; 
Zhang, Qi1 ; Kumar, Rahul1 
Subject: RE: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib

Thoughts?

- Bret


From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>> on behalf of Bret Barkelew 
via groups.io 
mailto:bret.barkelew=microsoft@groups.io>>
Sent: Wednesday, August 11, 2021 12:37:52 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>>; 
b...@corthon.com<mailto:b...@corthon.com> 
mailto:b...@corthon.com>>
Cc: Yao, Jiewen mailto:jiewen@intel.com>>; Jian J 
Wang mailto:jian.j.w...@intel.com>>; Qi Zhang 
mailto:qi1.zh...@intel.com>>; Rahul Kumar 
mailto:rahul1.ku...@intel.com>>
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib


Thoughts?



- Bret



From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>> on behalf of Bret Barkelew 
via groups.io 
mailto:bret.barkelew=microsoft@groups.io>>
Sent: Wednesday, August 4, 2021 9:32:32 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>>; 
b...@corthon.com<mailto:b...@corthon.com> 
mailto:b...@corthon.com>>
Cc: Yao, Jiewen mailto:jiewen@intel.com>>; Jian J 
Wang mailto:jian.j.w...@intel.com>>; Qi Zhang 
mailto:qi1.zh...@intel.com>>; Rahul Kumar 
mailto:rahul1.ku...@intel.com>>
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib


Poking this one.



  1.  It’s a easy review with small, obvious code change.
  2.  I need some answers on “when is it okay to violate ECC/PatchCheck, if the 
new code matches the style of the existing code. Should I endeavor to pass the 
PatchCheck and ECCCheck with this patch only, and leave it in conflict with the 
rest of the file?



Thanks!



- Bret



From: Bret Barkelew via groups.io<mailto:bret.barkelew=microsoft@groups.io>
Sent: Friday, July 30, 2021 11:08 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
b...@corthon.com<mailto:b...@corthon.com>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Jian J 
Wang<mailto:jian.j.w...@intel.com>; Qi Zhang<mailto:qi1.zh...@intel.com>; Rahul 
Kumar<mailto:rahul1.ku...@intel.com>
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib



Note, even though this keeps with the style of the rest of the file, it breaks 
ECC:

SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib by 
corthon · Pull Request #1848 · tianocore/edk2 
(github.com)<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fpull%2F1848=04%7C01%7CBret.Barkelew%40microsoft.com%7Ce90f066a5a8c4feae73108d95dee3ec3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637644100117879377%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=7uX%2FX1sJDbWsxeqYtqfQIFXBbDRVnii7kcJ1nri65T4%3D=0>



PROGRESS - --Running SecurityPkg: EccCheck Test NO-TARGET --

ERROR -

ERROR -

ERROR - EFI coding style error

ERROR - *Error code: 8001

ERROR - *Only capital letters are allowed to be used for #define declarations

ERROR - *file: 
//home/vsts/work/1/s/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c

ERROR - *Line number: 27

ERROR - *The #define name [RC_NV_UndefineSpaceSpecial_nvIndex] does no



Thoughts?



- Bret



From: Bret Barkelew via groups.io<mailto:bret=corthon@groups.io>
Sent: Friday, July 30, 2021 10:55 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Jian J 
Wang<mailto:jian.j.w...@intel.com>; Qi Zhang<mailto:qi1.zh...@inte

Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib

2021-08-12 Thread Bret Barkelew via groups.io
Thoughts?

- Bret


From: devel@edk2.groups.io  on behalf of Bret Barkelew 
via groups.io 
Sent: Wednesday, August 11, 2021 12:37:52 PM
To: devel@edk2.groups.io ; b...@corthon.com 

Cc: Yao, Jiewen ; Jian J Wang ; Qi 
Zhang ; Rahul Kumar 
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib


Thoughts?



- Bret




From: devel@edk2.groups.io  on behalf of Bret Barkelew 
via groups.io 
Sent: Wednesday, August 4, 2021 9:32:32 AM
To: devel@edk2.groups.io ; b...@corthon.com 

Cc: Yao, Jiewen ; Jian J Wang ; Qi 
Zhang ; Rahul Kumar 
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib


Poking this one.



  1.  It’s a easy review with small, obvious code change.
  2.  I need some answers on “when is it okay to violate ECC/PatchCheck, if the 
new code matches the style of the existing code. Should I endeavor to pass the 
PatchCheck and ECCCheck with this patch only, and leave it in conflict with the 
rest of the file?



Thanks!



- Bret



From: Bret Barkelew via groups.io<mailto:bret.barkelew=microsoft@groups.io>
Sent: Friday, July 30, 2021 11:08 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
b...@corthon.com<mailto:b...@corthon.com>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Jian J 
Wang<mailto:jian.j.w...@intel.com>; Qi Zhang<mailto:qi1.zh...@intel.com>; Rahul 
Kumar<mailto:rahul1.ku...@intel.com>
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib



Note, even though this keeps with the style of the rest of the file, it breaks 
ECC:

SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib by 
corthon · Pull Request #1848 · tianocore/edk2 
(github.com)<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fpull%2F1848=04%7C01%7Cbret.barkelew%40microsoft.com%7Cba78a3e7f9c74b56180308d95cff85ac%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637643074816403966%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=W6%2FZUYQmTc5I6ks8woDCoBw%2FtTmYrNn79jtLB8fEeYE%3D=0>



PROGRESS - --Running SecurityPkg: EccCheck Test NO-TARGET --

ERROR -

ERROR -

ERROR - EFI coding style error

ERROR - *Error code: 8001

ERROR - *Only capital letters are allowed to be used for #define declarations

ERROR - *file: 
//home/vsts/work/1/s/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c

ERROR - *Line number: 27

ERROR - *The #define name [RC_NV_UndefineSpaceSpecial_nvIndex] does no



Thoughts?



- Bret



From: Bret Barkelew via groups.io<mailto:bret=corthon@groups.io>
Sent: Friday, July 30, 2021 10:55 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Jian J 
Wang<mailto:jian.j.w...@intel.com>; Qi Zhang<mailto:qi1.zh...@intel.com>; Rahul 
Kumar<mailto:rahul1.ku...@intel.com>
Subject: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib



Used to provision and maintain certain HW-defined NV spaces.

REF: 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2994data=04%7C01%7CBret.Barkelew%40microsoft.com%7Cb7ae3c62047c48fc85d908d953833ca0%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637632645397602953%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=s96M3RvxMOY831Vfr1nt%2Fz1h3cyb6jU9eFzvjKO7Dtc%3Dreserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2994=04%7C01%7Cbret.barkelew%40microsoft.com%7Cba78a3e7f9c74b56180308d95cff85ac%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637643074816413922%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=AaKL%2BDQTryN6x9nNVyvMDuV%2B04EkYV%2BVYuXC2aVw4n4%3D=0>

Signed-off-by: Bret Barkelew 
Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Qi Zhang 
Cc: Rahul Kumar 
---
 SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c | 122 
 SecurityPkg/Include/Library/Tpm2CommandLib.h   |  22 
 2 files changed, 144 insertions(+)

diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c 
b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
index 87572de20164..7931fade9190 100644
--- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
+++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
@@ -24,6 +24,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #define RC_NV_UndefineSpace_authHandle  (TPM_RC_H + TPM_RC_1)

 #define RC_NV_UndefineSpace_nvIndex (TPM_RC_H + TPM_RC_2)



+#define RC_NV_UndefineSpaceSpecial_nvIndex  (TPM_RC_H + TPM_RC_1)

+

 #def

Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib

2021-08-11 Thread Bret Barkelew via groups.io
Thoughts?

- Bret


From: devel@edk2.groups.io  on behalf of Bret Barkelew 
via groups.io 
Sent: Wednesday, August 4, 2021 9:32:32 AM
To: devel@edk2.groups.io ; b...@corthon.com 

Cc: Yao, Jiewen ; Jian J Wang ; Qi 
Zhang ; Rahul Kumar 
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib


Poking this one.



  1.  It’s a easy review with small, obvious code change.
  2.  I need some answers on “when is it okay to violate ECC/PatchCheck, if the 
new code matches the style of the existing code. Should I endeavor to pass the 
PatchCheck and ECCCheck with this patch only, and leave it in conflict with the 
rest of the file?



Thanks!



- Bret



From: Bret Barkelew via groups.io<mailto:bret.barkelew=microsoft@groups.io>
Sent: Friday, July 30, 2021 11:08 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
b...@corthon.com<mailto:b...@corthon.com>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Jian J 
Wang<mailto:jian.j.w...@intel.com>; Qi Zhang<mailto:qi1.zh...@intel.com>; Rahul 
Kumar<mailto:rahul1.ku...@intel.com>
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib



Note, even though this keeps with the style of the rest of the file, it breaks 
ECC:

SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib by 
corthon · Pull Request #1848 · tianocore/edk2 
(github.com)<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fpull%2F1848=04%7C01%7CBret.Barkelew%40microsoft.com%7Cfe8eb7e487664492e2cc08d957657978%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637636917288577969%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=02RQYngWn6MoSWUvzakivPEZKpu%2BQ0QzV1oDnrxugno%3D=0>



PROGRESS - --Running SecurityPkg: EccCheck Test NO-TARGET --

ERROR -

ERROR -

ERROR - EFI coding style error

ERROR - *Error code: 8001

ERROR - *Only capital letters are allowed to be used for #define declarations

ERROR - *file: 
//home/vsts/work/1/s/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c

ERROR - *Line number: 27

ERROR - *The #define name [RC_NV_UndefineSpaceSpecial_nvIndex] does no



Thoughts?



- Bret



From: Bret Barkelew via groups.io<mailto:bret=corthon@groups.io>
Sent: Friday, July 30, 2021 10:55 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Jian J 
Wang<mailto:jian.j.w...@intel.com>; Qi Zhang<mailto:qi1.zh...@intel.com>; Rahul 
Kumar<mailto:rahul1.ku...@intel.com>
Subject: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib



Used to provision and maintain certain HW-defined NV spaces.

REF: 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2994data=04%7C01%7CBret.Barkelew%40microsoft.com%7Cb7ae3c62047c48fc85d908d953833ca0%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637632645397602953%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=s96M3RvxMOY831Vfr1nt%2Fz1h3cyb6jU9eFzvjKO7Dtc%3Dreserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2994=04%7C01%7CBret.Barkelew%40microsoft.com%7Cfe8eb7e487664492e2cc08d957657978%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637636917288587926%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=0A5MYpi%2FFRfhR3UMP9GoXcakIsXTDMwoMpnIiWM%2FaXc%3D=0>

Signed-off-by: Bret Barkelew 
Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Qi Zhang 
Cc: Rahul Kumar 
---
 SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c | 122 
 SecurityPkg/Include/Library/Tpm2CommandLib.h   |  22 
 2 files changed, 144 insertions(+)

diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c 
b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
index 87572de20164..7931fade9190 100644
--- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
+++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
@@ -24,6 +24,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #define RC_NV_UndefineSpace_authHandle  (TPM_RC_H + TPM_RC_1)

 #define RC_NV_UndefineSpace_nvIndex (TPM_RC_H + TPM_RC_2)



+#define RC_NV_UndefineSpaceSpecial_nvIndex  (TPM_RC_H + TPM_RC_1)

+

 #define RC_NV_Read_authHandle   (TPM_RC_H + TPM_RC_1)

 #define RC_NV_Read_nvIndex  (TPM_RC_H + TPM_RC_2)

 #define RC_NV_Read_size (TPM_RC_P + TPM_RC_1)

@@ -74,6 +76,20 @@ typedef struct {
   TPMS_AUTH_RESPONSE AuthSession;

 } TPM2_NV_UNDEFINESPACE_RESPONSE;



+typedef struct {

+  TPM2_COMMAND_HEADER   Header;

+  TPMI_RH_NV_INDEX  NvIn

Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib

2021-08-04 Thread Bret Barkelew via groups.io
Poking this one.


  1.  It’s a easy review with small, obvious code change.
  2.  I need some answers on “when is it okay to violate ECC/PatchCheck, if the 
new code matches the style of the existing code. Should I endeavor to pass the 
PatchCheck and ECCCheck with this patch only, and leave it in conflict with the 
rest of the file?

Thanks!

- Bret

From: Bret Barkelew via groups.io<mailto:bret.barkelew=microsoft@groups.io>
Sent: Friday, July 30, 2021 11:08 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
b...@corthon.com<mailto:b...@corthon.com>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Jian J 
Wang<mailto:jian.j.w...@intel.com>; Qi Zhang<mailto:qi1.zh...@intel.com>; Rahul 
Kumar<mailto:rahul1.ku...@intel.com>
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib

Note, even though this keeps with the style of the rest of the file, it breaks 
ECC:
SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib by 
corthon · Pull Request #1848 · tianocore/edk2 
(github.com)<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fpull%2F1848=04%7C01%7Cbret.barkelew%40microsoft.com%7C54f6a1acc6bb476e2ecb08d953850ece%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637632653231745775%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=FsjyOQ%2FlBlbUlCBndVhxVbROhW%2Bd66q2g4m63sBg%2BHc%3D=0>

PROGRESS - --Running SecurityPkg: EccCheck Test NO-TARGET --
ERROR -
ERROR -
ERROR - EFI coding style error
ERROR - *Error code: 8001
ERROR - *Only capital letters are allowed to be used for #define declarations
ERROR - *file: 
//home/vsts/work/1/s/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
ERROR - *Line number: 27
ERROR - *The #define name [RC_NV_UndefineSpaceSpecial_nvIndex] does no

Thoughts?

- Bret

From: Bret Barkelew via groups.io<mailto:bret=corthon@groups.io>
Sent: Friday, July 30, 2021 10:55 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Jian J 
Wang<mailto:jian.j.w...@intel.com>; Qi Zhang<mailto:qi1.zh...@intel.com>; Rahul 
Kumar<mailto:rahul1.ku...@intel.com>
Subject: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib

Used to provision and maintain certain HW-defined NV spaces.

REF: 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2994data=04%7C01%7CBret.Barkelew%40microsoft.com%7Cb7ae3c62047c48fc85d908d953833ca0%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637632645397602953%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=s96M3RvxMOY831Vfr1nt%2Fz1h3cyb6jU9eFzvjKO7Dtc%3Dreserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2994=04%7C01%7Cbret.barkelew%40microsoft.com%7C54f6a1acc6bb476e2ecb08d953850ece%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637632653231755738%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=3Os5cZEtbmZ9h5Jz0Zz5er2gG%2FNO%2FSSmnqVGuoYiqdY%3D=0>

Signed-off-by: Bret Barkelew 
Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Qi Zhang 
Cc: Rahul Kumar 
---
 SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c | 122 
 SecurityPkg/Include/Library/Tpm2CommandLib.h   |  22 
 2 files changed, 144 insertions(+)

diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c 
b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
index 87572de20164..7931fade9190 100644
--- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
+++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
@@ -24,6 +24,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #define RC_NV_UndefineSpace_authHandle  (TPM_RC_H + TPM_RC_1)

 #define RC_NV_UndefineSpace_nvIndex (TPM_RC_H + TPM_RC_2)



+#define RC_NV_UndefineSpaceSpecial_nvIndex  (TPM_RC_H + TPM_RC_1)

+

 #define RC_NV_Read_authHandle   (TPM_RC_H + TPM_RC_1)

 #define RC_NV_Read_nvIndex  (TPM_RC_H + TPM_RC_2)

 #define RC_NV_Read_size (TPM_RC_P + TPM_RC_1)

@@ -74,6 +76,20 @@ typedef struct {
   TPMS_AUTH_RESPONSE AuthSession;

 } TPM2_NV_UNDEFINESPACE_RESPONSE;



+typedef struct {

+  TPM2_COMMAND_HEADER   Header;

+  TPMI_RH_NV_INDEX  NvIndex;

+  TPMI_RH_PLATFORM  Platform;

+  UINT32AuthSessionSize;

+  TPMS_AUTH_COMMAND AuthSession;

+} TPM2_NV_UNDEFINESPACESPECIAL_COMMAND;

+

+typedef struct {

+  TPM2_RESPONSE_HEADER   Header;

+  UINT32 AuthSessionSize;

+  TPMS_AUTH_RESPONSE AuthSession;

+} TPM2_NV_UNDEFINESPACESPECIAL_RESPONSE;

+

 typedef struct {

   TPM2_COMMAND_

Re: [edk2-devel] Proposing a new area of the edk2-test repository

2021-08-03 Thread Bret Barkelew via groups.io
Yeah, go for the patch.

- Bret

From: Samer El-Haj-Mahmoud via 
groups.io
Sent: Tuesday, August 3, 2021 6:10 AM
To: Nelson, Eric; Bret 
Barkelew; 
devel@edk2.groups.io; G Edhaya 
Chandran; 
gao...@byosoft.com.cn; Kinney, Michael 
D
Cc: Samer El-Haj-Mahmoud
Subject: [EXTERNAL] Re: [edk2-devel] Proposing a new area of the edk2-test 
repository

I would think just sending the code contribution patch is sufficient.


From: Nelson, Eric 
Sent: Wednesday, July 28, 2021 3:05 PM
To: Samer El-Haj-Mahmoud ; Bret Barkelew 
; devel@edk2.groups.io; G Edhaya Chandran 
; gao...@byosoft.com.cn; Kinney, Michael D 

Subject: RE: Proposing a new area of the edk2-test repository


Adding ResumeOK.efi tool under /edk2-test/test-tools/TestToolsPkg would be 
great.

Should I propose this in the RFC and DEVEL mailing lists as a next step?

Thanks,
__e


From: Samer El-Haj-Mahmoud 
mailto:samer.el-haj-mahm...@arm.com>>
Sent: Friday, July 9, 2021 1:12 PM
To: Bret Barkelew 
mailto:bret.barke...@microsoft.com>>; 
devel@edk2.groups.io; Nelson, Eric 
mailto:eric.nel...@intel.com>>; G Edhaya Chandran 
mailto:edhaya.chand...@arm.com>>; 
gao...@byosoft.com.cn; Kinney, Michael D 
mailto:michael.d.kin...@intel.com>>
Subject: RE: Proposing a new area of the edk2-test repository

Interesting, thanks for sharing Bret. Some of those tests seem to be x64 
specific (SMM tests), and some can be more generic like MorLockTestApp

Like I said earlier, I am not against adding test tools to edk2-test. That in 
fact is welcomed, especially if their usefulness in validating the solutions 
extend beyond specific implementations.

What would a good tree structure look like to accommodate misc tools? Today we 
have

/edk2-test/uefi-sct/SctPkg

How about something like this?
/edk2-test/test-tools/TestToolsPkg
or /edk2-test/ TestToolsPkg

The “ResumeOK” can be placed there

Any other ideas?


From: Bret Barkelew 
mailto:bret.barke...@microsoft.com>>
Sent: Thursday, June 24, 2021 12:25 AM
To: devel@edk2.groups.io; 
eric.nel...@intel.com; Samer El-Haj-Mahmoud 
mailto:samer.el-haj-mahm...@arm.com>>; G Edhaya 
Chandran mailto:edhaya.chand...@arm.com>>; 
gao...@byosoft.com.cn; Kinney, Michael D 
mailto:michael.d.kin...@intel.com>>
Subject: RE: Proposing a new area of the edk2-test repository

Fun fact! Mu also has a number of apps and things that we could work on moving 
to EDK2 if there were a suitable location. Right now, many of them are here:
mu_plus/UefiTestingPkg at release/202102 · microsoft/mu_plus 
(github.com)

- Bret

From: Nelson, Eric via groups.io
Sent: Wednesday, June 23, 2021 3:38 PM
To: Samer El-Haj-Mahmoud; G Edhaya 
Chandran; 
gao...@byosoft.com.cn; 
devel@edk2.groups.io; Kinney, Michael 
D
Subject: [EXTERNAL] Re: [edk2-devel] Proposing a new area of the edk2-test 
repository


I have created a few other internal apps that build under WinTestPkg, although 
ResumeOK.efi is the only one I have received permissions to release sources for 
at this time.
And yes, they are primarily intended for validating Windows requirements.
I had some issues with my apps, needing to use different libraries than 
MdeModulePkg, and found it easier to create my own package, and use the libs I 
want.

__e


From: Samer El-Haj-Mahmoud 
mailto:samer.el-haj-mahm...@arm.com>>
Sent: Wednesday, June 23, 2021 1:56 PM
To: Nelson, Eric mailto:eric.nel...@intel.com>>; G 
Edhaya Chandran mailto:edhaya.chand...@arm.com>>; 
gao...@byosoft.com.cn; 
devel@edk2.groups.io
Cc: Samer El-Haj-Mahmoud 
mailto:samer.el-haj-mahm...@arm.com>>
Subject: RE: Proposing a new area of the edk2-test repository

+edk2 list

I am not against adding additional test tools to edk2-test. Just feel like 
there is a need to organize and have a strategy, rather than just use edk2-test 
as a dumping group of miscellaneous tools.

There is already a place for apps under 

Re: [EXTERNAL] [edk2-devel] [edk2][PATCH v1 1/1] StandaloneMmPkg: add support to populate StMM boot data from device tree

2021-07-30 Thread Bret Barkelew via groups.io
I don’t think this is a good dependency. StandaloneMmCore shouldn’t require 
anything from EmbeddedPkg, and if it does there’s probably some more 
generalization necessary.

Further, we can’t require the MmCore (which should be considered generic at the 
level of PEI Core or DXE Core) include some external library like Libfdt 
without significant justification.

- Bret

From: Sayanta Pattanayak via 
groups.io
Sent: Friday, July 30, 2021 10:36 AM
To: devel@edk2.groups.io
Cc: Ard Biesheuvel; Sami 
Mujawar; Achin Gupta
Subject: [EXTERNAL] [edk2-devel] [edk2][PATCH v1 1/1] StandaloneMmPkg: add 
support to populate StMM boot data from device tree

Introduce support to populate StMM boot data via DTS parsing. The DTB is
passed as a boot argument by a binary of higer exception level.
Previously it was achieved by placing the boot data structure in a
shared buffer and the address of this shared buffer was passed by the
binary of higher exception level. Now either of the option can be used
for populating StMM boot info.

StMM boot information structure binding in device tree can be of following
prototype. Property values are not mentioned here.

bootarg {
  compatible = "bootargs";
  h_type  = <..>;
  h_version = <..>;
  h_size= <..>;
  h_attr= <..>;
  sp_mem_base = <..>;
  sp_mem_limit= <..>;
  sp_image_base   = <..>;
  sp_stack_base   = <..>;
  sp_heap_base= <..>;
  sp_ns_comm_buf_base = <..>;fc
  sp_shared_buf_base  = <..>;
  sp_image_size   = <..>;
  sp_pcpu_stack_size  = <..>;
  sp_heap_size= <..>;
  sp_ns_comm_buf_size = <..>;
  sp_shared_buf_size  = <..>;
  num_sp_mem_regions  = <..>;
  num_cpus= <..>;
};

Addition of DTS supoort involves a dependency on FdtLib from EmbeddedPkg.

Signed-off-by: Sayanta Pattanayak 
---
 Link to github branch with this patch -
 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSayantaP-arm%2Fedk2%2Ftree%2Fstmm-dtsdata=04%7C01%7Cbret.barkelew%40microsoft.com%7Cb365266c83cb433d1e0108d953806c83%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637632633786132182%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=gJw%2BH8Dj9lih1DNrIzbNPToJn9nH%2BHqpvpSr2JJrS4I%3Dreserved=0

 StandaloneMmPkg/StandaloneMmPkg.dsc
 |   1 +
 
StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf
   |   3 +
 
StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
 | 153 ++--
 3 files changed, 143 insertions(+), 14 deletions(-)

diff --git a/StandaloneMmPkg/StandaloneMmPkg.dsc 
b/StandaloneMmPkg/StandaloneMmPkg.dsc
index 0c45df95e2dd..e3a3a6ee3ba1 100644
--- a/StandaloneMmPkg/StandaloneMmPkg.dsc
+++ b/StandaloneMmPkg/StandaloneMmPkg.dsc
@@ -49,6 +49,7 @@
   HobLib|StandaloneMmPkg/Library/StandaloneMmHobLib/StandaloneMmHobLib.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   MemLib|StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
+  FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
   
MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.inf
   
MmServicesTableLib|MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.inf
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
diff --git 
a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf
 
b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf
index 4fa426f58ef4..0a2e519dd664 100644
--- 
a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf
+++ 
b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf
@@ -30,6 +30,7 @@
   X64/StandaloneMmCoreEntryPoint.c

 [Packages]
+  EmbeddedPkg/EmbeddedPkg.dec
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
   StandaloneMmPkg/StandaloneMmPkg.dec
@@ -40,10 +41,12 @@
 [LibraryClasses]
   BaseLib
   DebugLib
+  FdtLib

 [LibraryClasses.AARCH64]
   StandaloneMmMmuLib
   ArmSvcLib
+  FdtLib

 [Guids]
   gMpInformationHobGuid
diff --git 
a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
 
b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
index 6c50f470aa35..cc09d75dac36 100644
--- 
a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
+++ 
b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
@@ -16,6 +16,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include 
 #include 

+#include 
 #include 
 #include 
 #include 
@@ -45,33 +46,31 @@ STATIC CONST UINT32 mSpmMinorVerFfa = SPM_MINOR_VERSION_FFA;
 

Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib

2021-07-30 Thread Bret Barkelew via groups.io
Note, even though this keeps with the style of the rest of the file, it breaks 
ECC:
SecurityPkg/Library: Add Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib by 
corthon · Pull Request #1848 · tianocore/edk2 
(github.com)<https://github.com/tianocore/edk2/pull/1848>

PROGRESS - --Running SecurityPkg: EccCheck Test NO-TARGET --
ERROR -
ERROR -
ERROR - EFI coding style error
ERROR - *Error code: 8001
ERROR - *Only capital letters are allowed to be used for #define declarations
ERROR - *file: 
//home/vsts/work/1/s/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
ERROR - *Line number: 27
ERROR - *The #define name [RC_NV_UndefineSpaceSpecial_nvIndex] does no

Thoughts?

- Bret

From: Bret Barkelew via groups.io<mailto:bret=corthon@groups.io>
Sent: Friday, July 30, 2021 10:55 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Jian J 
Wang<mailto:jian.j.w...@intel.com>; Qi Zhang<mailto:qi1.zh...@intel.com>; Rahul 
Kumar<mailto:rahul1.ku...@intel.com>
Subject: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] SecurityPkg/Library: Add 
Tpm2NvUndefineSpaceSpecial to Tpm2CommandLib

Used to provision and maintain certain HW-defined NV spaces.

REF: 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2994data=04%7C01%7CBret.Barkelew%40microsoft.com%7Cb7ae3c62047c48fc85d908d953833ca0%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637632645397602953%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=s96M3RvxMOY831Vfr1nt%2Fz1h3cyb6jU9eFzvjKO7Dtc%3Dreserved=0

Signed-off-by: Bret Barkelew 
Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Qi Zhang 
Cc: Rahul Kumar 
---
 SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c | 122 
 SecurityPkg/Include/Library/Tpm2CommandLib.h   |  22 
 2 files changed, 144 insertions(+)

diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c 
b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
index 87572de20164..7931fade9190 100644
--- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
+++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
@@ -24,6 +24,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #define RC_NV_UndefineSpace_authHandle  (TPM_RC_H + TPM_RC_1)

 #define RC_NV_UndefineSpace_nvIndex (TPM_RC_H + TPM_RC_2)



+#define RC_NV_UndefineSpaceSpecial_nvIndex  (TPM_RC_H + TPM_RC_1)

+

 #define RC_NV_Read_authHandle   (TPM_RC_H + TPM_RC_1)

 #define RC_NV_Read_nvIndex  (TPM_RC_H + TPM_RC_2)

 #define RC_NV_Read_size (TPM_RC_P + TPM_RC_1)

@@ -74,6 +76,20 @@ typedef struct {
   TPMS_AUTH_RESPONSE AuthSession;

 } TPM2_NV_UNDEFINESPACE_RESPONSE;



+typedef struct {

+  TPM2_COMMAND_HEADER   Header;

+  TPMI_RH_NV_INDEX  NvIndex;

+  TPMI_RH_PLATFORM  Platform;

+  UINT32AuthSessionSize;

+  TPMS_AUTH_COMMAND AuthSession;

+} TPM2_NV_UNDEFINESPACESPECIAL_COMMAND;

+

+typedef struct {

+  TPM2_RESPONSE_HEADER   Header;

+  UINT32 AuthSessionSize;

+  TPMS_AUTH_RESPONSE AuthSession;

+} TPM2_NV_UNDEFINESPACESPECIAL_RESPONSE;

+

 typedef struct {

   TPM2_COMMAND_HEADER   Header;

   TPMI_RH_NV_AUTH   AuthHandle;

@@ -506,6 +522,112 @@ Done:
   return Status;

 }



+/**

+  This command removes an index from the TPM.

+

+  @param[in]  NvIndex The NV Index.

+  @param[in]  IndexAuthSessionAuth session context for the Index 
auth/policy

+  @param[in]  PlatAuthSession Auth session context for the Platform 
auth/policy

+

+  @retval EFI_SUCCESS Operation completed successfully.

+  @retval EFI_NOT_FOUND   The command was returned successfully, but 
NvIndex is not found.

+  @retval EFI_UNSUPPORTED Selected NvIndex does not support deletion 
through this call.

+  @retval EFI_SECURITY_VIOLATION  Deletion is not authorized by current policy 
session.

+  @retval EFI_INVALID_PARAMETER   The command was unsuccessful.

+  @retval EFI_DEVICE_ERRORThe command was unsuccessful.

+**/

+EFI_STATUS

+EFIAPI

+Tpm2NvUndefineSpaceSpecial (

+  IN  TPMI_RH_NV_INDEX  NvIndex,

+  IN  TPMS_AUTH_COMMAND *IndexAuthSession OPTIONAL,

+  IN  TPMS_AUTH_COMMAND *PlatAuthSession OPTIONAL

+  )

+{

+  EFI_STATUS  Status;

+  TPM2_NV_UNDEFINESPACESPECIAL_COMMANDSendBuffer;

+  TPM2_NV_UNDEFINESPACESPECIAL_RESPONSE   RecvBuffer;

+  UINT32  SendBufferSize;

+  UINT32  RecvBufferSize;

+  UINT8   *Buffer;

+  UINT32  IndexAuthSize, PlatAuthSize;

+  TPM_RC  ResponseCode;

+

+  //

+  // Construct command

+  //

+  SendBuffe

Re: [EXTERNAL] [edk2-devel] Missing TPM 2 related call to Tpm2HierarchyChangeAuth

2021-07-27 Thread Bret Barkelew via groups.io
Adding @Jeremiah…

Jeremiah, weren’t you or @Michael 
shopping this change to MinPlatform?

- Bret

From: Stefan Berger via groups.io
Sent: Monday, July 26, 2021 7:48 AM
To: Yao, Jiewen; 
devel@edk2.groups.io
Cc: Marc-André Lureau
Subject: [EXTERNAL] [edk2-devel] Missing TPM 2 related call to 
Tpm2HierarchyChangeAuth

Hello!

   The TPM 2 code in EDK2 is missing an important call to
Tpm2HierarchyChangeAuth for the platform hierarchy. We have to set the
password of that hierarchy and discard the password. See also specs
section 11:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftrustedcomputinggroup.org%2Fwp-content%2Fuploads%2FTCG_PCClient_PFP_r1p05_v22_02dec2020.pdfdata=04%7C01%7Cbret.barkelew%40microsoft.com%7Cf2a2262eee2c44b3760c08d95044601a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637629077356686202%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000sdata=N7VQIw87rHqUAFQ54TvhNwcsPFEwJzdZQ9JZrmX1S4E%3Dreserved=0

"Platform Firmware MUST protect access to the Platform Hierarchy and
prevent access to the platform hierarchy by
non-manufacturer-controlled components.  "

I was wondering where we could put that call so it's invoked after the
user has possibly interacted with the menu and before passing control to
the next stage such as boot loader.

Regards,

   Stefan









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




Re: [edk2-devel] ArmVirt and Self-Updating Code

2021-07-22 Thread Bret Barkelew via groups.io
Expanding audience to the full dev list…
See below…

- Bret

From: Thomas Abraham
Sent: Wednesday, July 7, 2021 11:07 PM
To: Bret Barkelew; Ard Biesheuvel 
(TianoCore); Lindholm, 
Leif; Laszlo Ersek; Marvin 
Häuser; Sami Mujawar
Cc: nd
Subject: [EXTERNAL] RE: ArmVirt and Self-Updating Code

+ Sami

From: Bret Barkelew 
Sent: Thursday, July 8, 2021 11:05 AM
To: Thomas Abraham ; Ard Biesheuvel (TianoCore) 
; Lindholm, Leif ; Laszlo Ersek 
; Marvin Häuser 
Subject: ArmVirt and Self-Updating Code

All,

Marvin asked me a question on the UEFI Talkbox Discord that’s a little beyond 
my ken…

“There is self-relocating code in ArmVirtPkg:
https://github.com/tianocore/edk2/blob/17143c4837393d42c484b42d1789b85b2cff1aaf/ArmVirtPkg/PrePi/PrePi.c#L133-L165
According to comments in the ASM, it seems like this is for Linux-based RAM 
boot (I saw further stuff for KVM, so it makes sense I guess?). It seems 
unfortunate it cannot be mapped into a known address range so that 
self-relocation is not necessary, but that's out of my scope to understand.

“Now, StandaloneMmPkg has similar (self-)relocation code too: 
https://github.com/tianocore/edk2/blob/17143c4837393d42c484b42d1789b85b2cff1aaf/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c#L379-L386
Because I cannot find such elsewhere, I assume it must be for the same ARM 
virtualised environment as above. The binary it applies the Relocations to is 
documented to be the Standalone MM core, but in fact SecCore is located:
https://github.com/tianocore/edk2/blob/17143c4837393d42c484b42d1789b85b2cff1aaf/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/SetPermissions.c#L131-L158

“This yields the following questions to me:
1) What even invokes Standalone MM on ARM? It is documented it is spawned 
during SEC, but I could not find any actual invocation.
2) Why does Standalone MM (self-)relocation locate SecCore? Should it not 
already have been relocated with the code from ArmPlatformPkg? Is Standalone MM 
embedded into ARM SecCore?
3) Why is SecCore the only module relocated? Are all others guaranteed to be 
"properly" loaded?
4) Is there maybe some high-level documented about the ARM boot flow? It seems 
to be significantly different from the x86 routes quite vastly.”

Hoping that one of you could get me closer to an answer for him. Also happy to 
take this to the greater mailing list, but thought I’d avoid churn.

Thanks in advance!
- Bret




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




Re: [edk2-devel] [PATCH] Maintainers.txt: remove Laszlo Ersek's entries

2021-07-08 Thread Bret Barkelew via groups.io
I shall pour out a cup of bits in your honor! Your diligence will be missed.

- Bret

From: Michael D Kinney via 
groups.io
Sent: Thursday, July 8, 2021 9:42 AM
To: Laszlo Ersek; 
edk2-devel-groups-io; Kinney, Michael 
D
Cc: Andrew Fish; Ard 
Biesheuvel; Dong, 
Eric; Justen, Jordan 
L; Lindholm, Leif; 
Philippe Mathieu-Daudé; Kumar, 
Rahul1; Ni, Ray; Sami 
Mujawar
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH] Maintainers.txt: remove Laszlo 
Ersek's entries

Reviewed-by: Michael D Kinney 


> -Original Message-
> From: Laszlo Ersek 
> Sent: Thursday, July 8, 2021 12:09 AM
> To: edk2-devel-groups-io 
> Cc: Andrew Fish ; Ard Biesheuvel 
> ; Dong, Eric ; Justen,
> Jordan L ; Leif Lindholm ; 
> Kinney, Michael D ;
> Philippe Mathieu-Daudé ; Kumar, Rahul1 
> ; Ni, Ray ; Sami
> Mujawar 
> Subject: [PATCH] Maintainers.txt: remove Laszlo Ersek's entries
>
> I'm relinquishing all my roles listed in "Maintainers.txt", for personal
> reasons.
>
> My email address  remains functional.
>
> To my understanding, my employer is working to assign others engineers to
> the edk2 project (at their discretion).
>
> Cc: Andrew Fish 
> Cc: Ard Biesheuvel 
> Cc: Eric Dong 
> Cc: Jordan Justen 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> Cc: Philippe Mathieu-Daudé 
> Cc: Rahul Kumar 
> Cc: Ray Ni 
> Cc: Sami Mujawar 
> Signed-off-by: Laszlo Ersek 
> ---
>  Maintainers.txt | 4 
>  1 file changed, 4 deletions(-)
>
> diff --git a/Maintainers.txt b/Maintainers.txt
> index f4e4c72d0628..e9dda5c5ca0c 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -69,7 +69,6 @@ Tianocore Stewards
>  --
>  F: *
>  M: Andrew Fish 
> -M: Laszlo Ersek 
>  M: Leif Lindholm 
>  M: Michael D Kinney 
>
> @@ -143,7 +142,6 @@ M: Ard Biesheuvel 
>  ArmVirtPkg
>  F: ArmVirtPkg/
>  W: 
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Ftianocore.github.io%2Fwiki%2FArmVirtPkgdata=04%7C01%7Cbret.barkelew%40microsoft.com%7Ca360d7dc108143d2eaa308d9422f3c7e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637613593658506841%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=5HBNn3xOBYoAI%2Fc7jAr%2BfyC2nf5JcRox1Xa8Ks7iw7o%3Dreserved=0
> -M: Laszlo Ersek 
>  M: Ard Biesheuvel 
>  R: Leif Lindholm 
>  R: Sami Mujawar 
> @@ -421,7 +419,6 @@ R: Siyuan Fu 
>  OvmfPkg
>  F: OvmfPkg/
>  W: 
> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tianocore.org%2Fovmf%2Fdata=04%7C01%7Cbret.barkelew%40microsoft.com%7Ca360d7dc108143d2eaa308d9422f3c7e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637613593658506841%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=5LIFlvPs7GpLWJ0%2F1MF3pe0s4JtKA7Imi9tX1OMJJJc%3Dreserved=0
> -M: Laszlo Ersek 
>  M: Ard Biesheuvel 
>  R: Jordan Justen 
>  S: Maintained
> @@ -567,7 +564,6 @@ F: UefiCpuPkg/
>  W: 
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Ftianocore.github.io%2Fwiki%2FUefiCpuPkgdata=04%7C01%7Cbret.barkelew%40microsoft.com%7Ca360d7dc108143d2eaa308d9422f3c7e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637613593658506841%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=oBQwlzOLwQ%2FBXNb6C68jcsInFWeDZQKrS4L1LUe1zWU%3Dreserved=0
>  M: Eric Dong 
>  M: Ray Ni 
> -R: Laszlo Ersek 
>  R: Rahul Kumar 
>
>  UefiCpuPkg: Sec related modules
> --
> 2.19.1.3.g30247aa5d201








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




Re: [edk2-devel] [EXTERNAL] [Patch 2/3] .mergify: Simplify Mergify rules using GitHub status checks

2021-07-07 Thread Bret Barkelew via groups.io
Acked-by: Bret Barkelew 

- Bret

From: Michael D Kinney
Sent: Wednesday, July 7, 2021 8:49 PM
To: devel@edk2.groups.io
Cc: Liming Gao; Sean 
Brogan; Bret 
Barkelew
Subject: [EXTERNAL] [Patch 2/3] .mergify: Simplify Mergify rules using GitHub 
status checks

* Enable Mergify queue feature to support auto rebase when
  'push' label is set and gauarntee that all EDK II CI checks
  are run before merging in changes with linear history.
* Use status checks configured in GitHub branch protections
* Allow non EDK II Maintainers to create a PR
  Requires an EDK II Maintainer to accept the change and
  request merge by adding 'push' label.  Only EDK II Maintainers
  have ability to set/clear labels.
* Do not automatically close PRs for personal builds.

Cc: Liming Gao 
Cc: Sean Brogan 
Cc: Bret Barkelew 
Signed-off-by: Michael D Kinney 
---
 .mergify/config.yml | 71 -
 1 file changed, 12 insertions(+), 59 deletions(-)

diff --git a/.mergify/config.yml b/.mergify/config.yml
index 9774aaf49774..bd6da4c77937 100644
--- a/.mergify/config.yml
+++ b/.mergify/config.yml
@@ -16,7 +16,7 @@
 # * This file must be checked into the 'default' branch of a repo.  Copies
 #   of this file on other branches of a repo are ignored by Mergify.
 #
-# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 # 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapps%2Fmergifydata=04%7C01%7CBret.Barkelew%40microsoft.com%7Cb73475b4d67744f2e3ce08d941c35a00%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637613129552748468%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=bWUUW1qS2GsSqRMBiZELIj4qlLBe06nkALTz0hkLrLo%3Dreserved=0
@@ -24,74 +24,27 @@
 #
 ##

+queue_rules:
+  - name: default
+conditions:
+  - base~=(^main|^master|^stable/)
+  - label=push
+
 pull_request_rules:
-
   - name: Automatically merge a PR when all required checks pass and 'push' 
label is present
 conditions:
-  - base~=(^master|^stable/)
+  - base~=(^main|^master|^stable/)
   - label=push
-  - author=@tianocore/edk-ii-maintainers
-  - status-success=tianocore.PatchCheck
-  - status-success=Ubuntu GCC5 PR
-  - status-success=Windows VS2019 PR
 actions:
-  merge:
-strict: true
+  queue:
 method: rebase
-
-  - name: Automatically close a PR when all required checks pass and 'push' 
label is not present
-conditions:
-  - base~=(^master|^stable/)
-  - -label=push
-  - -closed
-  - status-success=tianocore.PatchCheck
-  - status-success=Ubuntu GCC5 PR
-  - status-success=Windows VS2019 PR
-  - status-success=Ubuntu GCC5 PR (FINISHED)
-  - status-success=Windows VS2019 PR (FINISHED)
-actions:
-  close:
-message: All checks passed. Auto close personal build.
+rebase_fallback: none
+name: default

   - name: Post a comment on a PR that can not be merged due to a merge conflict
 conditions:
-  - base~=(^master|^stable/)
+  - base~=(^main|^master|^stable/)
   - conflict
 actions:
   comment:
 message: PR can not be merged due to conflict.  Please rebase and 
resubmit
-
-  - name: Automatically close a PR that fails the EDK II Maintainers 
membership check and 'push' label is present
-conditions:
-  - base~=(^master|^stable/)
-  - label=push
-  - -author=@tianocore/edk-ii-maintainers
-actions:
-  close:
-message: PR submitter is not a member of the Tianocore EDK II 
Maintainers team
-
-  - name: Post a comment on a PR if PatchCheck fails
-conditions:
-  - base~=(^master|^stable/)
-  - status-failure=tianocore.PatchCheck
-actions:
-  comment:
-message: PR can not be merged due to a PatchCheck failure.  Please 
resolve and resubmit
-
-  - name: Post a comment on a PR if Ubuntu GCC5 fails
-conditions:
-  - base~=(^master|^stable/)
-  - status-failure=Ubuntu GCC5 PR
-  - status-success=Ubuntu GCC5 PR (FAILED)
-actions:
-  comment:
-message: PR can not be merged due to an Ubuntu GCC5 failure.  Please 
resolve and resubmit
-
-  - name: Post a comment on a PR if Windows VS2019 fails
-conditions:
-  - base~=(^master|^stable/)
-  - status-failure=Windows VS2019 PR
-  - status-success=Windows VS2019 PR (FAILED)
-actions:
-  comment:
-message: PR can not be merged due to a Windows VS2019 failure.  Please 
resolve and resubmit
--
2.32.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77581): 

Re: [EXTERNAL] [edk2-devel] [Patch 1/3] BaseTools/Scripts: Ignore Mergify merge commits in PatchCheck.py

2021-07-07 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew 

- Bret


From: devel@edk2.groups.io  on behalf of Michael D Kinney 
via groups.io 
Sent: Wednesday, July 7, 2021 8:49:00 PM
To: devel@edk2.groups.io 
Cc: Feng, Bob C ; Liming Gao ; 
Chen, Yuwei 
Subject: [EXTERNAL] [edk2-devel] [Patch 1/3] BaseTools/Scripts: Ignore Mergify 
merge commits in PatchCheck.py

Mergify adds merge commits to a PR when processing PRs using
the queue feature with auto rebase.  Update PatchCheck.py
to ignore commit message issues with these merge commits.
These merge commits are not added to the base branch when
the PR is merged by Mergify.

Cc: Bob Feng 
Cc: Liming Gao 
Cc: Yuwei Chen 
Signed-off-by: Michael D Kinney 
---
 BaseTools/Scripts/PatchCheck.py | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
index 80754e763c5a..63e6223f8ebc 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -1,7 +1,7 @@
 ## @file
 #  Check a patch for various format issues
 #
-#  Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.
+#  Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.
 #  Copyright (C) 2020, Red Hat, Inc.
 #  Copyright (c) 2020, ARM Ltd. All rights reserved.
 #
@@ -89,22 +89,28 @@ class EmailAddressCheck:
 class CommitMessageCheck:
 """Checks the contents of a git commit message."""

-def __init__(self, subject, message):
+def __init__(self, subject, message, author_email):
 self.ok = True

 if subject is None and  message is None:
 self.error('Commit message is missing!')
 return

+MergifyMerge = False
+if "mergify[bot]@users.noreply.github.com" in author_email:
+if "Merge branch" in subject:
+MergifyMerge = True
+
 self.subject = subject
 self.msg = message

 print (subject)

 self.check_contributed_under()
-self.check_signed_off_by()
-self.check_misc_signatures()
-self.check_overall_format()
+if not MergifyMerge:
+self.check_signed_off_by()
+self.check_misc_signatures()
+self.check_overall_format()
 self.report_message_result()

 url = 
'https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Ftianocore.github.io%2Fwiki%2FCommit-Message-Formatdata=04%7C01%7CBret.Barkelew%40microsoft.com%7C44bf20b900a8463872f608d941c36036%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637613129659549071%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=ScoSoLs0hgaj7DOtCjE1uevYTX2oAHOqJOHKJYZQ%2BGw%3Dreserved=0'
@@ -522,7 +528,7 @@ class CheckOnePatch:
 email_check = EmailAddressCheck(self.author_email, 'Author')
 email_ok = email_check.ok

-msg_check = CommitMessageCheck(self.commit_subject, self.commit_msg)
+msg_check = CommitMessageCheck(self.commit_subject, self.commit_msg, 
self.author_email)
 msg_ok = msg_check.ok

 diff_ok = True
--
2.32.0.windows.1








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




Re: [edk2-devel] [EXTERNAL] [Patch 3/3] .azurepipelines: Remove FINISHED and FAILED states

2021-07-07 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew 

- Bret

From: Michael D Kinney
Sent: Wednesday, July 7, 2021 8:49 PM
To: devel@edk2.groups.io
Cc: Sean Brogan; Bret 
Barkelew; Liming 
Gao
Subject: [EXTERNAL] [Patch 3/3] .azurepipelines: Remove FINISHED and FAILED 
states

Remove 10 second delay workarounds for issues observed
when Mergify was originally enabled.  These issues are
no longer present when GitHub branch protections are
used for status checks.

Cc: Sean Brogan 
Cc: Bret Barkelew 
Cc: Liming Gao 
Signed-off-by: Michael D Kinney 
---
 .../templates/pr-gate-build-job.yml   | 20 ---
 1 file changed, 20 deletions(-)

diff --git a/.azurepipelines/templates/pr-gate-build-job.yml 
b/.azurepipelines/templates/pr-gate-build-job.yml
index 3f9a28024567..207acc76316f 100644
--- a/.azurepipelines/templates/pr-gate-build-job.yml
+++ b/.azurepipelines/templates/pr-gate-build-job.yml
@@ -67,23 +67,3 @@ jobs:
   build_pkgs: $(Build.Pkgs)
   build_targets: $(Build.Targets)
   build_archs: ${{ parameters.arch_list }}
-
-- job: FINISHED
-  dependsOn: Build_${{ parameters.tool_chain_tag }}
-  condition: succeeded()
-  steps:
-  - checkout: none
-  - script: |
-  echo FINISHED
-  sleep 10
-displayName: FINISHED
-
-- job: FAILED
-  dependsOn: Build_${{ parameters.tool_chain_tag }}
-  condition: failed()
-  steps:
-  - checkout: none
-  - script: |
-  echo FAILED
-  sleep 10
-displayName: FAILED
--
2.32.0.windows.1



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




Re: [EXTERNAL] [edk2-devel] [Patch 1/1] MdePkg/Include: Add STATIC_ASSERT for L'' and L"" strings

2021-07-07 Thread Bret Barkelew via groups.io
I like it.
Do you have an extra space after the (L’A’) and (L”A”)?

Reviewed-by: Bret Barkelew 

- Bret

From: Michael D Kinney via 
groups.io
Sent: Wednesday, July 7, 2021 3:43 PM
To: devel@edk2.groups.io
Cc: Liming Gao; Zhiguang 
Liu
Subject: [EXTERNAL] [edk2-devel] [Patch 1/1] MdePkg/Include: Add STATIC_ASSERT 
for L'' and L"" strings

Add STATIC_ASSERT() macros to verify that the compiler is
configured correctly for the use of L'' and L"" strings.

Cc: Liming Gao 
Cc: Zhiguang Liu 
Signed-off-by: Michael D Kinney 
---
 MdePkg/Include/Base.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
index 8e4271f6eaf5..2da08b0c787f 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -6,7 +6,7 @@
   environment. There are a set of base libraries in the Mde Package that can
   be used to implement base modules.

-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent

@@ -821,6 +821,8 @@ STATIC_ASSERT (sizeof (INT64)   == 8, "sizeof (INT64) does 
not meet UEFI Specifi
 STATIC_ASSERT (sizeof (UINT64)  == 8, "sizeof (UINT64) does not meet UEFI 
Specification Data Type requirements");
 STATIC_ASSERT (sizeof (CHAR8)   == 1, "sizeof (CHAR8) does not meet UEFI 
Specification Data Type requirements");
 STATIC_ASSERT (sizeof (CHAR16)  == 2, "sizeof (CHAR16) does not meet UEFI 
Specification Data Type requirements");
+STATIC_ASSERT (sizeof (L'A')== 2, "sizeof (L'A') does not meet UEFI 
Specification Data Type requirements");
+STATIC_ASSERT (sizeof (L"A")== 4, "sizeof (L\"A\") does not meet UEFI 
Specification Data Type requirements");

 //
 // The following three enum types are used to verify that the compiler
--
2.32.0.windows.1








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




Re: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?

2021-07-01 Thread Bret Barkelew via groups.io
t.Http, Version=4.0.0.0, 
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
  Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, 
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
System.AggregateException: One or more errors occurred. (Could not load file or 
assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could not load 
file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could not load 
file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could not load 
file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could not load 
file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) ---> 
System.IO.FileNotFoundException: Could not load file or assembly 
'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
   --- End of inner exception stack trace ---
  at NuGet.CommandLine.Program.Initialize (NuGet.IFileSystem fileSystem, 
NuGet.CommandLine.IConsole console) [0x000ce] in 
:0
  at NuGet.CommandLine.Program.MainCore (System.String workingDirectory, 
System.String[] args) [0x000d8] in :0
---> (Inner Exception #0) System.IO.FileNotFoundException: Could not load file 
or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a'<---

---> (Inner Exception #1) System.IO.FileNotFoundException: Could not load file 
or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a'<---

---> (Inner Exception #2) System.IO.FileNotFoundException: Could not load file 
or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a'<---

---> (Inner Exception #3) System.IO.FileNotFoundException: Could not load file 
or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a'<---

---> (Inner Exception #4) System.IO.FileNotFoundException: Could not load file 
or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a'<---


Thanks

Steven Shi


From: Bret Barkelew 
<mailto:bret.barke...@microsoft.com>
Sent: Friday, July 2, 2021 9:04 AM
To: Shi, Steven <mailto:steven@intel.com>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
rebe...@nuviainc.com<mailto:rebe...@nuviainc.com>
Subject: RE: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in 
Linux?

I believe the Azure DevOps build agents that are used by the EDK2 CI pipeline 
already have mono installed.

- Bret

From: Shi, Steven<mailto:steven@intel.com>
Sent: Thursday, July 1, 2021 5:54 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Bret 
Barkelew<mailto:bret.barke...@microsoft.com>; 
rebe...@nuviainc.com<mailto:rebe...@nuviainc.com>
Subject: RE: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in 
Linux?

Hi Bret, Rebecca,
Thanks for the info. Does edk2 CI run the .pytool unit tests in Linux? If yes, 
how does edk2 CI solve the nuget dependency problem in Linux right now?


Thanks

Steven Shi


From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>> On Behalf Of Bret Barkelew 
via groups.io
Sent: Wednesday, June 30, 2021 1:02 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
rebe...@nuviainc.com<mailto:rebe...@nuviainc.com>; Shi, Steven 
mailto:steven@intel.com>>
Subject: Re: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in 
Linux?

Hmmm. If that works well, we might be able to investigate carrying both and 
picking based on the host OS.

- Bret

From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>> on behalf of Rebecca Cran 
via groups.io 
mailto:rebecca=nuviainc@groups.io>>
Sent: Tuesday, June 29, 2021 9:42:41 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io&g

Re: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?

2021-07-01 Thread Bret Barkelew via groups.io
ies.) (Could not load 
file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could not load 
file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could not load 
file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could not load 
file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) ---> 
System.IO.FileNotFoundException: Could not load file or assembly 
'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

   --- End of inner exception stack trace ---

  at NuGet.CommandLine.Program.Initialize (NuGet.IFileSystem fileSystem, 
NuGet.CommandLine.IConsole console) [0x000ce] in 
:0

  at NuGet.CommandLine.Program.MainCore (System.String workingDirectory, 
System.String[] args) [0x000d8] in :0

---> (Inner Exception #0) System.IO.FileNotFoundException: Could not load file 
or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a'<---



---> (Inner Exception #1) System.IO.FileNotFoundException: Could not load file 
or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a'<---



---> (Inner Exception #2) System.IO.FileNotFoundException: Could not load file 
or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a'<---



---> (Inner Exception #3) System.IO.FileNotFoundException: Could not load file 
or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a'<---



---> (Inner Exception #4) System.IO.FileNotFoundException: Could not load file 
or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a'<---





Thanks



Steven Shi





From: Bret Barkelew 
Sent: Friday, July 2, 2021 9:04 AM
To: Shi, Steven ; devel@edk2.groups.io; 
rebe...@nuviainc.com
Subject: RE: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in 
Linux?



I believe the Azure DevOps build agents that are used by the EDK2 CI pipeline 
already have mono installed.



- Bret



From: Shi, Steven<mailto:steven@intel.com>
Sent: Thursday, July 1, 2021 5:54 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Bret 
Barkelew<mailto:bret.barke...@microsoft.com>; 
rebe...@nuviainc.com<mailto:rebe...@nuviainc.com>
Subject: RE: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in 
Linux?



Hi Bret, Rebecca,

Thanks for the info. Does edk2 CI run the .pytool unit tests in Linux? If yes, 
how does edk2 CI solve the nuget dependency problem in Linux right now?





Thanks



Steven Shi





From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>> On Behalf Of Bret Barkelew 
via groups.io
Sent: Wednesday, June 30, 2021 1:02 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
rebe...@nuviainc.com<mailto:rebe...@nuviainc.com>; Shi, Steven 
mailto:steven@intel.com>>
Subject: Re: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in 
Linux?



Hmmm. If that works well, we might be able to investigate carrying both and 
picking based on the host OS.



- Bret



From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>> on behalf of Rebecca Cran 
via groups.io 
mailto:rebecca=nuviainc@groups.io>>
Sent: Tuesday, June 29, 2021 9:42:41 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>>; 
steven@intel.com<mailto:steven@intel.com> 
mailto:steven@intel.com>>
Subject: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?



Your Linux distribution should have a nuget package available (e.g. 
https://packages.ubuntu.com/hirsute/nuget<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpackages.ubuntu.com%2Fhirsute%2Fnuget=04%7C01%7CBret.Barkelew%40microsoft.com%7C7fe13d52d6584572cfda08d93cf9d4e7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637607865993996088%7CUnknown%7

Re: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?

2021-07-01 Thread Bret Barkelew via groups.io
I believe the Azure DevOps build agents that are used by the EDK2 CI pipeline 
already have mono installed.

- Bret

From: Shi, Steven<mailto:steven@intel.com>
Sent: Thursday, July 1, 2021 5:54 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Bret 
Barkelew<mailto:bret.barke...@microsoft.com>; 
rebe...@nuviainc.com<mailto:rebe...@nuviainc.com>
Subject: RE: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in 
Linux?

Hi Bret, Rebecca,
Thanks for the info. Does edk2 CI run the .pytool unit tests in Linux? If yes, 
how does edk2 CI solve the nuget dependency problem in Linux right now?


Thanks

Steven Shi


From: devel@edk2.groups.io  On Behalf Of Bret Barkelew 
via groups.io
Sent: Wednesday, June 30, 2021 1:02 AM
To: devel@edk2.groups.io; rebe...@nuviainc.com; Shi, Steven 

Subject: Re: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in 
Linux?

Hmmm. If that works well, we might be able to investigate carrying both and 
picking based on the host OS.

- Bret

From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>> on behalf of Rebecca Cran 
via groups.io 
mailto:rebecca=nuviainc@groups.io>>
Sent: Tuesday, June 29, 2021 9:42:41 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>>; 
steven@intel.com<mailto:steven@intel.com> 
mailto:steven@intel.com>>
Subject: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?


Your Linux distribution should have a nuget package available (e.g. 
https://packages.ubuntu.com/hirsute/nuget<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpackages.ubuntu.com%2Fhirsute%2Fnuget=04%7C01%7Cbret.barkelew%40microsoft.com%7C28bf7b813a9a4d6e365508d93cf3fd8a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637607840913328150%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=Z7vCN9JUmx1kQks%2FuWKjcnMRo7koWoyxOET0bnSbN6U%3D=0>)
 but the EDK2 CI is designed to use the copy of nuget installed with the 
edk2toolext package.



--
Rebecca Cran


On 6/29/21 9:44 AM, Steven Shi wrote:

Cran, Thanks. I’m curious whether the .pytool has native Linux executable 
binary to run? It looks the edk2 CI framework has more dependency in Linux than 
Windows.





Thanks



Steven Shi

Intel\IAGS\SFP\FIA (Firmware Infrastructure Automation)





From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
<mailto:devel@edk2.groups.io> On Behalf Of Rebecca Cran
Sent: Tuesday, June 29, 2021 8:13 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Shi, Steven 
<mailto:steven@intel.com>
Subject: Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?



NuGet.exe is a .NET assembly/executable, so on Linux you'll need to install 
Mono 
(https://www.mono-project.com/<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.mono-project.com%2F=04%7C01%7Cbret.barkelew%40microsoft.com%7C28bf7b813a9a4d6e365508d93cf3fd8a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637607840913338106%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=uPkpInnWMx%2FP35GUXlbffQwxbLya9DDDegyLJvtuScU%3D=0>).



--

Rebecca Cran





On 6/28/21 7:45 PM, Steven Shi wrote:

Hello,

I’m interested in the edk2 CI unit 
tests(https://github.com/tianocore/edk2/tree/master/.pytool<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Ftree%2Fmaster%2F.pytool=04%7C01%7Cbret.barkelew%40microsoft.com%7C28bf7b813a9a4d6e365508d93cf3fd8a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637607840913338106%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=v%2FqnYohY9bDCIAC8ZmqPkV3RvhaIuyQEXfkY9JNyIqs%3D=0>).
 I tested it in my local. It works well in Windows but does not work in Linux. 
It looks the NuGet in pytool only has windows version 
(C:\steven\unit_test_env\Lib\site-packages\edk2toolext\bin\NuGet.exe) but not 
support the Linux. Below is my detail test steps. Do the edk2 CI unit tests 
work in Linux?



  1.  Windows :

c:\steven>py -m venv unit_test_env

c:\steven>cd  c:\steven\edk2

c:\steven\edk2>c:\steven\unit_test_env\Scripts\activate.bat

(unit_test_env) c:\steven\edk2>pip install --upgrade -r pip-requirements.txt

(unit_test_env) c:\steven\edk2>stuart_setup -c .pytool/CISettings.py 
TOOL_CHAIN_TAG=VS2019

(unit_test_env) c:\steven\edk2>stuart_update -c .pytool/CISettings.py 
TOOL_CHAIN_TAG=VS2019

(unit_test_env) c:\steven\edk2>edksetup.bat

(unit_test_env) c:\steven\edk2>edksetup.bat Rebuild

(unit_test_env) c:\steven\edk2>stuart_ci_build -c .pytool/CISettings.py 
TOOL_CHAIN_TAG=VS2019 -a X64,IA32 -t DEBUG --verbose

…

PROGRESS - Overall Build Status: Success

SECTION - Summary

PROGRESS - Success



  1.  Linux:

jshi19@ub2-uefi-b01:~/wksp_efi$ python3 -m venv 

Re: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?

2021-06-29 Thread Bret Barkelew via groups.io
Hmmm. If that works well, we might be able to investigate carrying both and 
picking based on the host OS.

- Bret

From: devel@edk2.groups.io  on behalf of Rebecca Cran via 
groups.io 
Sent: Tuesday, June 29, 2021 9:42:41 AM
To: devel@edk2.groups.io ; steven@intel.com 

Subject: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?


Your Linux distribution should have a nuget package available (e.g. 
https://packages.ubuntu.com/hirsute/nuget)
 but the EDK2 CI is designed to use the copy of nuget installed with the 
edk2toolext package.


--
Rebecca Cran


On 6/29/21 9:44 AM, Steven Shi wrote:

Cran, Thanks. I’m curious whether the .pytool has native Linux executable 
binary to run? It looks the edk2 CI framework has more dependency in Linux than 
Windows.





Thanks



Steven Shi

Intel\IAGS\SFP\FIA (Firmware Infrastructure Automation)





From: devel@edk2.groups.io 
 On Behalf Of Rebecca Cran
Sent: Tuesday, June 29, 2021 8:13 PM
To: devel@edk2.groups.io; Shi, Steven 

Subject: Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?



NuGet.exe is a .NET assembly/executable, so on Linux you'll need to install 
Mono 
(https://www.mono-project.com/).



--

Rebecca Cran





On 6/28/21 7:45 PM, Steven Shi wrote:

Hello,

I’m interested in the edk2 CI unit 
tests(https://github.com/tianocore/edk2/tree/master/.pytool).
 I tested it in my local. It works well in Windows but does not work in Linux. 
It looks the NuGet in pytool only has windows version 
(C:\steven\unit_test_env\Lib\site-packages\edk2toolext\bin\NuGet.exe) but not 
support the Linux. Below is my detail test steps. Do the edk2 CI unit tests 
work in Linux?



  1.  Windows :

c:\steven>py -m venv unit_test_env

c:\steven>cd  c:\steven\edk2

c:\steven\edk2>c:\steven\unit_test_env\Scripts\activate.bat

(unit_test_env) c:\steven\edk2>pip install --upgrade -r pip-requirements.txt

(unit_test_env) c:\steven\edk2>stuart_setup -c .pytool/CISettings.py 
TOOL_CHAIN_TAG=VS2019

(unit_test_env) c:\steven\edk2>stuart_update -c .pytool/CISettings.py 
TOOL_CHAIN_TAG=VS2019

(unit_test_env) c:\steven\edk2>edksetup.bat

(unit_test_env) c:\steven\edk2>edksetup.bat Rebuild

(unit_test_env) c:\steven\edk2>stuart_ci_build -c .pytool/CISettings.py 
TOOL_CHAIN_TAG=VS2019 -a X64,IA32 -t DEBUG --verbose

…

PROGRESS - Overall Build Status: Success

SECTION - Summary

PROGRESS - Success



  1.  Linux:

jshi19@ub2-uefi-b01:~/wksp_efi$ python3 -m venv unit_test_env

jshi19@ub2-uefi-b01:~/wksp_efi$ source unit_test_env/bin/activate

(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ pip install --upgrade -r 
pip-requirements.txt

(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ make -C BaseTools/

(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ stuart_setup -c 
.pytool/CISettings.py TOOL_CHAIN_TAG=GCC5

(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ stuart_update -c 
.pytool/CISettings.py TOOL_CHAIN_TAG=GCC5

SECTION - Init SDE

WARNING - Using Pip Tools based BaseTools

SECTION - Loading Plugins

SECTION - Start Invocable Tool

SECTION - Initial update of environment

UpdatingWARNING - [SDE] Failed to fetch NugetDependecy: 
edk2-acpica-iasl@20200717.0.0: [Nuget] We 
failed to install this version 20200717.0.0 of edk2-acpica-iasl

WARNING - [SDE] Failed to fetch NugetDependecy: 
mu_nasm@2.15.05: [Nuget] We failed to install this 
version 2.15.05 of mu_nasm

. Done

SECTION -   Updated/Verified 3 dependencies

SECTION - Second pass update of environment

UpdatingWARNING - [SDE] Failed to fetch NugetDependecy: 

Re: [EXTERNAL] Re: [edk2-devel] NetworkPkg: Unexpected DHCP RELEASE after PXE server reply on IPv6

2021-06-29 Thread Bret Barkelew via groups.io
Thanks, Maciej! We’ll investigate!

- Bret

From: Rabeda, Maciej 
Sent: Tuesday, June 29, 2021 9:39:59 AM
To: devel@edk2.groups.io ; LathaKannan Arumugam 
; Bret Barkelew 
Subject: Re: [EXTERNAL] Re: [edk2-devel] NetworkPkg: Unexpected DHCP RELEASE 
after PXE server reply on IPv6

Additionally, for claim that IPv4 does not do that, please provide Wireshark 
trace, if available.

On 29-Jun-21 18:36, Maciej Rabeda wrote:
Hi guys,

Finally got some time to look into it.

Long story short, this smells like infrastructure problem.
SARR passes over 546/547 port pair. That is between UEFI PXE client and DHCP 
server (even if it is the same machine).
The next packet is essentially a Boot Server choice step. UEFI PXE client sends 
a unicast discovery packet towards Boot server (same machine, same address) 
coded as DHCP Request.
The release packet is a direct reaction to 3 second timeout (see time diff 
between packet 9 and 11).

See section 2.2.1 in PXE spec: 
http://www.pix.net/software/pxeboot/archive/pxespec.pdf

Please verify that your WDS service is running correctly, since clearly there 
is no reaction to that packet from Boot server.

[cid:part2.DA8CACBA.5A309C91@linux.intel.com]

On 28-Jun-21 22:05, LathaKannan Arumugam via groups.io wrote:
Can you please help us on this issues?
Get Outlook for 
Android

From: devel@edk2.groups.io 
 on behalf of LathaKannan 
Arumugam via groups.io 

Sent: Friday, June 25, 2021 1:11:42 PM
To: Bret Barkelew 
; Rabeda, 
Maciej ; 
devel@edk2.groups.io 

Subject: Re: [EXTERNAL] Re: [edk2-devel] NetworkPkg: Unexpected DHCP RELEASE 
after PXE server reply on IPv6


Any inputs?

We kind of blocked on this for a week.  Kindly look into packet capture and 
suggest a path forward.





From: LathaKannan Arumugam
Sent: Friday, June 25, 2021 9:23 AM
To: Bret Barkelew 
; Rabeda, 
Maciej ; 
devel@edk2.groups.io
Subject: RE: [EXTERNAL] Re: [edk2-devel] NetworkPkg: Unexpected DHCP RELEASE 
after PXE server reply on IPv6



Attached packet captured from server.



From: Bret Barkelew 
mailto:bret.barke...@microsoft.com>>
Sent: Friday, June 25, 2021 9:19 AM
To: Rabeda, Maciej 
mailto:maciej.rab...@linux.intel.com>>; 
devel@edk2.groups.io; LathaKannan Arumugam 
mailto:larumu...@microsoft.com>>
Subject: Re: [EXTERNAL] Re: [edk2-devel] NetworkPkg: Unexpected DHCP RELEASE 
after PXE server reply on IPv6



+ @LathaKannan Arumugam



- Bret



From: Rabeda, Maciej 
mailto:maciej.rab...@linux.intel.com>>
Sent: Friday, June 25, 2021 7:40:16 AM
To: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>>; Bret Barkelew 
mailto:bret.barke...@microsoft.com>>; Bret 
Barkelew mailto:bret.barke...@microsoft.com>>
Subject: [EXTERNAL] Re: [edk2-devel] NetworkPkg: Unexpected DHCP RELEASE after 
PXE server reply on IPv6



Looking at it. Any chance to get Wireshark trace for this scenario?

On 25-Jun-21 09:25, brbarkel via groups.io wrote:

Just poking this to see if anyone has any ideas. Thanks!







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




Re: [EXTERNAL] Re: [edk2-devel] [PATCH v1 0/5] EDK2 Code First: PI Specification: Update EFI_MM_COMMUNICATE_HEADER

2021-06-29 Thread Bret Barkelew via groups.io
Good note. Thanks!

- Bret

From: Marvin Häuser
Sent: Tuesday, June 29, 2021 1:58 AM
To: Bret Barkelew; Laszlo 
Ersek; Kun Qin; Kinney, 
Michael D; 
devel@edk2.groups.io
Cc: Wang, Jian J; Wu, Hao 
A; Dong, Eric; Ni, 
Ray; Liming Gao; Liu, 
Zhiguang; Andrew Fish; 
Lindholm, Leif; Michael 
Kubacki
Subject: Re: [EXTERNAL] Re: [edk2-devel] [PATCH v1 0/5] EDK2 Code First: PI 
Specification: Update EFI_MM_COMMUNICATE_HEADER

Generally yes, but gladly not for EDK II. Default GNU ABI uses 32-bit
alignment for 64-bit integers on IA32 (which led to a (non-critical)
mistake in our PE paper :( ) for example, but UEFI / EDK II (seem to)
successfully dictate natural alignment consistently. Possibly we could
introduce some STATIC_ASSERTs around important cases (e.g. UINT64 on
32-bit platforms) to ensure compilers keep it that way, once the ALIGNOF
macro is introduced.

Best regards,
Marvin

On 29.06.21 08:49, Bret Barkelew wrote:
>
> The fact that it may vary per ABI seems like a pretty big gotcha if
> the SMM/MM Core was compiled at a different time or on a different
> system than the module that’s invoking the communication.
>
> - Bret
>
> *From: *Marvin Häuser 
> *Sent: *Monday, June 28, 2021 8:43 AM
> *To: *Laszlo Ersek ; Kun Qin
> ; Kinney, Michael D
> ; devel@edk2.groups.io
> 
> *Cc: *Wang, Jian J ; Wu, Hao A
> ; Dong, Eric ;
> Ni, Ray ; Liming Gao
> ; Liu, Zhiguang
> ; Andrew Fish ;
> Lindholm, Leif ; Bret Barkelew
> ; Michael Kubacki
> 
> *Subject: *[EXTERNAL] Re: [edk2-devel] [PATCH v1 0/5] EDK2 Code First:
> PI Specification: Update EFI_MM_COMMUNICATE_HEADER
>
> On 28.06.21 16:57, Laszlo Ersek wrote:
> > On 06/25/21 20:47, Kun Qin wrote:
> >> Hi Mike,
> >>
> >> Thanks for the information. I can update the patch and proposed spec
> >> change to use flexible array in v-next if there is no other concerns.
> >>
> >> After switching to flexible array, OFFSET_OF (Data) should lead to the
> >> same result as sizeof.
> > This may be true on specific compilers, but it is *not* guaranteed by
> > the C language standard.
>
> Sorry, for completeness sake... :)
>
> I don't think it really depends on the compiler (but can vary per ABI),
> but it's a conceptual issue with alignment requirements. Assuming
> natural alignment and the usual stuff, for "struct s { uint64_t a;
> uint32_t b; uint8_t c[]; }" the alignment requirement is 8 Bytes, where
> there are 4 Bytes of padding after "b" (as "c" may as well be empty).
> "c" however is guaranteed to start after b in the same fashion as if it
> was declared with the maximum amount of elements that fit the memory. So
> if we take 4 elements for "c", and note that "c" has an alignment
> requirement of 1 Byte, c[0 .. 3] will alias the padding after "b". For
> "sizeof" this means that the padding is included, whereas for "offsetof"
> it is not, yielding "sizeof(struct s) == offsetof(struct s, c) + 4".
> That is what I meant by "wasted space" earlier, but this could possibly
> be made nicer with macros as necessary.
>
> As for this specific struct, the values should be identical as it is
> padded.
>
> Best regards,
> Marvin
>
> >
> > Quoting C99 6.7.2.1 "Structure and union specifiers", paragraph 16:
> >
> > "In most situations, the flexible array member is ignored. In
> > particular, the size of the structure is as if the flexible array member
> > were omitted except that it may have more trailing padding than the
> > omission would imply."
> >
> > Quoting footnotes 17 and 19,
> >
> > (17)  [...]
> >struct s { int n; double d[]; };
> >[...]
> >
> > (19)  [...]
> >the expressions:
> >[...]
> >sizeof (struct s) >= offsetof(struct s, d)
> >
> >are always equal to 1.
> >
> > Thanks
> > Laszlo
> >
> >
> >
> >> While sizeof would be a preferred way to move
> >> forward.
> >>
> >> Regards,
> >> Kun
> >>
> >> On 06/24/2021 08:25, Kinney, Michael D wrote:
> >>> Hello,
> >>>
> >>> Flexible array members are supported and should be used.  The old
> style
> >>> of adding an array of size [1] at the end of a structure was used at a
> >>> time
> >>> flexible array members were not 

Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?

2021-06-29 Thread Bret Barkelew via groups.io
Which executable are you referring to?

Also, yes, it is entirely possible that Linux has more dependencies since the 
dependency list has conditionals based on your OS.

- Bret

From: Steven Shi via groups.io
Sent: Tuesday, June 29, 2021 8:44 AM
To: devel@edk2.groups.io; 
rebe...@nuviainc.com
Subject: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?

Cran, Thanks. I’m curious whether the .pytool has native Linux executable 
binary to run? It looks the edk2 CI framework has more dependency in Linux than 
Windows.


Thanks

Steven Shi
Intel\IAGS\SFP\FIA (Firmware Infrastructure Automation)


From: devel@edk2.groups.io  On Behalf Of Rebecca Cran
Sent: Tuesday, June 29, 2021 8:13 PM
To: devel@edk2.groups.io; Shi, Steven 
Subject: Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?


NuGet.exe is a .NET assembly/executable, so on Linux you'll need to install 
Mono 
(https://www.mono-project.com/).



--

Rebecca Cran




On 6/28/21 7:45 PM, Steven Shi wrote:
Hello,
I’m interested in the edk2 CI unit 
tests(https://github.com/tianocore/edk2/tree/master/.pytool).
 I tested it in my local. It works well in Windows but does not work in Linux. 
It looks the NuGet in pytool only has windows version 
(C:\steven\unit_test_env\Lib\site-packages\edk2toolext\bin\NuGet.exe) but not 
support the Linux. Below is my detail test steps. Do the edk2 CI unit tests 
work in Linux?


  1.  Windows :

c:\steven>py -m venv unit_test_env

c:\steven>cd  c:\steven\edk2

c:\steven\edk2>c:\steven\unit_test_env\Scripts\activate.bat

(unit_test_env) c:\steven\edk2>pip install --upgrade -r pip-requirements.txt

(unit_test_env) c:\steven\edk2>stuart_setup -c .pytool/CISettings.py 
TOOL_CHAIN_TAG=VS2019

(unit_test_env) c:\steven\edk2>stuart_update -c .pytool/CISettings.py 
TOOL_CHAIN_TAG=VS2019

(unit_test_env) c:\steven\edk2>edksetup.bat

(unit_test_env) c:\steven\edk2>edksetup.bat Rebuild

(unit_test_env) c:\steven\edk2>stuart_ci_build -c .pytool/CISettings.py 
TOOL_CHAIN_TAG=VS2019 -a X64,IA32 -t DEBUG --verbose

…

PROGRESS - Overall Build Status: Success

SECTION - Summary

PROGRESS - Success


  1.  Linux:
jshi19@ub2-uefi-b01:~/wksp_efi$ python3 -m venv unit_test_env
jshi19@ub2-uefi-b01:~/wksp_efi$ source unit_test_env/bin/activate
(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ pip install --upgrade -r 
pip-requirements.txt
(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ make -C BaseTools/
(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ stuart_setup -c 
.pytool/CISettings.py TOOL_CHAIN_TAG=GCC5
(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ stuart_update -c 
.pytool/CISettings.py TOOL_CHAIN_TAG=GCC5
SECTION - Init SDE
WARNING - Using Pip Tools based BaseTools
SECTION - Loading Plugins
SECTION - Start Invocable Tool
SECTION - Initial update of environment
UpdatingWARNING - [SDE] Failed to fetch NugetDependecy: 
edk2-acpica-iasl@20200717.0.0: [Nuget] We 
failed to install this version 20200717.0.0 of edk2-acpica-iasl
WARNING - [SDE] Failed to fetch NugetDependecy: 
mu_nasm@2.15.05: [Nuget] We failed to install this 
version 2.15.05 of mu_nasm
. Done
SECTION -   Updated/Verified 3 dependencies
SECTION - Second pass update of environment
UpdatingWARNING - [SDE] Failed to fetch NugetDependecy: 
edk2-acpica-iasl@20200717.0.0: [Nuget] We 
failed to install this version 20200717.0.0 of edk2-acpica-iasl
WARNING - [SDE] Failed to fetch NugetDependecy: 
mu_nasm@2.15.05: [Nuget] We failed to install this 
version 2.15.05 of mu_nasm
. Done
SECTION -   Updated/Verified 3 dependencies
ERROR - We were unable to successfully update 2 dependencies in environment
SECTION - Summary
ERROR - Error




Thanks

Steven Shi







-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77280): https://edk2.groups.io/g/devel/message/77280
Mute This Topic: https://groups.io/mt/83860276/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 

Re: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?

2021-06-29 Thread Bret Barkelew via groups.io
Here’s some of the documentation, but I believe the standard apt mono-devel 
package is now up-to-date enough that the extra apt source is not necessary.

edk2-pytool-extensions/using_extdep.md at master · 
tianocore/edk2-pytool-extensions 
(github.com)

- Bret

From: Rebecca Cran via groups.io
Sent: Tuesday, June 29, 2021 5:12 AM
To: devel@edk2.groups.io; 
steven@intel.com
Subject: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?


NuGet.exe is a .NET assembly/executable, so on Linux you'll need to install 
Mono 
(https://www.mono-project.com/).



--

Rebecca Cran




On 6/28/21 7:45 PM, Steven Shi wrote:
Hello,
I’m interested in the edk2 CI unit 
tests(https://github.com/tianocore/edk2/tree/master/.pytool).
 I tested it in my local. It works well in Windows but does not work in Linux. 
It looks the NuGet in pytool only has windows version 
(C:\steven\unit_test_env\Lib\site-packages\edk2toolext\bin\NuGet.exe) but not 
support the Linux. Below is my detail test steps. Do the edk2 CI unit tests 
work in Linux?


  1.  Windows :

c:\steven>py -m venv unit_test_env

c:\steven>cd  c:\steven\edk2

c:\steven\edk2>c:\steven\unit_test_env\Scripts\activate.bat

(unit_test_env) c:\steven\edk2>pip install --upgrade -r pip-requirements.txt

(unit_test_env) c:\steven\edk2>stuart_setup -c .pytool/CISettings.py 
TOOL_CHAIN_TAG=VS2019

(unit_test_env) c:\steven\edk2>stuart_update -c .pytool/CISettings.py 
TOOL_CHAIN_TAG=VS2019

(unit_test_env) c:\steven\edk2>edksetup.bat

(unit_test_env) c:\steven\edk2>edksetup.bat Rebuild

(unit_test_env) c:\steven\edk2>stuart_ci_build -c .pytool/CISettings.py 
TOOL_CHAIN_TAG=VS2019 -a X64,IA32 -t DEBUG --verbose

…

PROGRESS - Overall Build Status: Success

SECTION - Summary

PROGRESS - Success


  1.  Linux:
jshi19@ub2-uefi-b01:~/wksp_efi$ python3 -m venv unit_test_env
jshi19@ub2-uefi-b01:~/wksp_efi$ source unit_test_env/bin/activate
(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ pip install --upgrade -r 
pip-requirements.txt
(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ make -C BaseTools/
(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ stuart_setup -c 
.pytool/CISettings.py TOOL_CHAIN_TAG=GCC5
(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ stuart_update -c 
.pytool/CISettings.py TOOL_CHAIN_TAG=GCC5
SECTION - Init SDE
WARNING - Using Pip Tools based BaseTools
SECTION - Loading Plugins
SECTION - Start Invocable Tool
SECTION - Initial update of environment
UpdatingWARNING - [SDE] Failed to fetch NugetDependecy: 
edk2-acpica-iasl@20200717.0.0: [Nuget] We 
failed to install this version 20200717.0.0 of edk2-acpica-iasl
WARNING - [SDE] Failed to fetch NugetDependecy: 
mu_nasm@2.15.05: [Nuget] We failed to install this 
version 2.15.05 of mu_nasm
. Done
SECTION -   Updated/Verified 3 dependencies
SECTION - Second pass update of environment
UpdatingWARNING - [SDE] Failed to fetch NugetDependecy: 
edk2-acpica-iasl@20200717.0.0: [Nuget] We 
failed to install this version 20200717.0.0 of edk2-acpica-iasl
WARNING - [SDE] Failed to fetch NugetDependecy: 
mu_nasm@2.15.05: [Nuget] We failed to install this 
version 2.15.05 of mu_nasm
. Done
SECTION -   Updated/Verified 3 dependencies
ERROR - We were unable to successfully update 2 dependencies in environment
SECTION - Summary
ERROR - Error




Thanks

Steven Shi







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




Re: [EXTERNAL] Re: [edk2-devel] [PATCH v1 0/5] EDK2 Code First: PI Specification: Update EFI_MM_COMMUNICATE_HEADER

2021-06-29 Thread Bret Barkelew via groups.io
The fact that it may vary per ABI seems like a pretty big gotcha if the SMM/MM 
Core was compiled at a different time or on a different system than the module 
that’s invoking the communication.

- Bret

From: Marvin Häuser
Sent: Monday, June 28, 2021 8:43 AM
To: Laszlo Ersek; Kun Qin; 
Kinney, Michael D; 
devel@edk2.groups.io
Cc: Wang, Jian J; Wu, Hao 
A; Dong, Eric; Ni, 
Ray; Liming Gao; Liu, 
Zhiguang; Andrew Fish; 
Lindholm, Leif; Bret 
Barkelew; Michael 
Kubacki
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v1 0/5] EDK2 Code First: PI 
Specification: Update EFI_MM_COMMUNICATE_HEADER

On 28.06.21 16:57, Laszlo Ersek wrote:
> On 06/25/21 20:47, Kun Qin wrote:
>> Hi Mike,
>>
>> Thanks for the information. I can update the patch and proposed spec
>> change to use flexible array in v-next if there is no other concerns.
>>
>> After switching to flexible array, OFFSET_OF (Data) should lead to the
>> same result as sizeof.
> This may be true on specific compilers, but it is *not* guaranteed by
> the C language standard.

Sorry, for completeness sake... :)

I don't think it really depends on the compiler (but can vary per ABI),
but it's a conceptual issue with alignment requirements. Assuming
natural alignment and the usual stuff, for "struct s { uint64_t a;
uint32_t b; uint8_t c[]; }" the alignment requirement is 8 Bytes, where
there are 4 Bytes of padding after "b" (as "c" may as well be empty).
"c" however is guaranteed to start after b in the same fashion as if it
was declared with the maximum amount of elements that fit the memory. So
if we take 4 elements for "c", and note that "c" has an alignment
requirement of 1 Byte, c[0 .. 3] will alias the padding after "b". For
"sizeof" this means that the padding is included, whereas for "offsetof"
it is not, yielding "sizeof(struct s) == offsetof(struct s, c) + 4".
That is what I meant by "wasted space" earlier, but this could possibly
be made nicer with macros as necessary.

As for this specific struct, the values should be identical as it is padded.

Best regards,
Marvin

>
> Quoting C99 6.7.2.1 "Structure and union specifiers", paragraph 16:
>
> "In most situations, the flexible array member is ignored. In
> particular, the size of the structure is as if the flexible array member
> were omitted except that it may have more trailing padding than the
> omission would imply."
>
> Quoting footnotes 17 and 19,
>
> (17)  [...]
>struct s { int n; double d[]; };
>[...]
>
> (19)  [...]
>the expressions:
>[...]
>sizeof (struct s) >= offsetof(struct s, d)
>
>are always equal to 1.
>
> Thanks
> Laszlo
>
>
>
>> While sizeof would be a preferred way to move
>> forward.
>>
>> Regards,
>> Kun
>>
>> On 06/24/2021 08:25, Kinney, Michael D wrote:
>>> Hello,
>>>
>>> Flexible array members are supported and should be used.  The old style
>>> of adding an array of size [1] at the end of a structure was used at a
>>> time
>>> flexible array members were not supported by all compilers (late 1990's).
>>> The workarounds used to handle the array of size [1] are very
>>> confusing when
>>> reading the C  code and the fact that sizeof() does not produce the
>>> expected
>>> result make it even worse.
>>>
>>> If we use flexible array members in this proposed change then there is
>>> no need to use OFFSET_OF().  Correct?
>>>
>>> Mike
>>>
>>>
 -Original Message-
 From: Marvin Häuser 
 Sent: Thursday, June 24, 2021 1:00 AM
 To: Kun Qin ; Laszlo Ersek ;
 devel@edk2.groups.io
 Cc: Wang, Jian J ; Wu, Hao A
 ; Dong, Eric ; Ni, Ray
 ; Kinney, Michael D ;
 Liming Gao ; Liu, Zhiguang
 ; Andrew Fish ; Leif
 Lindholm ; Bret Barkelew
 ; michael.kuba...@microsoft.com
 Subject: Re: [edk2-devel] [PATCH v1 0/5] EDK2 Code First: PI
 Specification: Update EFI_MM_COMMUNICATE_HEADER

 Hey Kun,

 Why would you rely on undefined behaviours? The OFFSET_OF macro is
 well-defined for GCC and Clang as it's implemented by an intrinsic, and
 while the expression for the MSVC compiler is undefined behaviour as per
 the C standard, it is well-defined for MSVC due to their own
 implementation being identical. From my standpoint, all supported
 compilers will yield well-defined behaviour even this way. OFFSET_OF on
 flexible arrays is not UB in any case to my knowledge.

 However, the same way as your new suggestion, you can replace OFFSET_OF
 with sizeof. While this *can* lead to wasted space with certain
 structure 

Re: [EXTERNAL] Re: [edk2-devel] NetworkPkg: Unexpected DHCP RELEASE after PXE server reply on IPv6

2021-06-25 Thread Bret Barkelew via groups.io
+ @LathaKannan Arumugam

- Bret

From: Rabeda, Maciej 
Sent: Friday, June 25, 2021 7:40:16 AM
To: devel@edk2.groups.io ; Bret Barkelew 
; Bret Barkelew 
Subject: [EXTERNAL] Re: [edk2-devel] NetworkPkg: Unexpected DHCP RELEASE after 
PXE server reply on IPv6

Looking at it. Any chance to get Wireshark trace for this scenario?

On 25-Jun-21 09:25, brbarkel via groups.io wrote:
Just poking this to see if anyone has any ideas. Thanks!




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




Re: [edk2-devel] Proposing a new area of the edk2-test repository

2021-06-23 Thread Bret Barkelew via groups.io
Fun fact! Mu also has a number of apps and things that we could work on moving 
to EDK2 if there were a suitable location. Right now, many of them are here:
mu_plus/UefiTestingPkg at release/202102 · microsoft/mu_plus 
(github.com)

- Bret

From: Nelson, Eric via groups.io
Sent: Wednesday, June 23, 2021 3:38 PM
To: Samer El-Haj-Mahmoud; G Edhaya 
Chandran; 
gao...@byosoft.com.cn; 
devel@edk2.groups.io; Kinney, Michael 
D
Subject: [EXTERNAL] Re: [edk2-devel] Proposing a new area of the edk2-test 
repository


I have created a few other internal apps that build under WinTestPkg, although 
ResumeOK.efi is the only one I have received permissions to release sources for 
at this time.
And yes, they are primarily intended for validating Windows requirements.
I had some issues with my apps, needing to use different libraries than 
MdeModulePkg, and found it easier to create my own package, and use the libs I 
want.

__e


From: Samer El-Haj-Mahmoud 
Sent: Wednesday, June 23, 2021 1:56 PM
To: Nelson, Eric ; G Edhaya Chandran 
; gao...@byosoft.com.cn; devel@edk2.groups.io
Cc: Samer El-Haj-Mahmoud 
Subject: RE: Proposing a new area of the edk2-test repository

+edk2 list

I am not against adding additional test tools to edk2-test. Just feel like 
there is a need to organize and have a strategy, rather than just use edk2-test 
as a dumping group of miscellaneous tools.

There is already a place for apps under 
https://github.com/tianocore/edk2/tree/master/MdeModulePkg/Application

We also have a number of EDK2 misc applications that use edk2-libc in 
https://github.com/tianocore/edk2-libc/tree/master/AppPkg/Applications

A couple of questions:

  *   Do you expect more apps from WinTestPkg to be contributed to TianoCore? 
And are they all around testing specific Windows requirements? If so, then 
having an edk2-test/WinTestPkg makes sense to me, as you will have a collection 
of useful testing app targeting specific area.
 *   But what about other OSes?
  *   If this is a one-off test app and other WinTestPkg apps are not going to 
be contributed, then does it make sense to put this under 
MdeModulePkg/Application ?



From: Nelson, Eric mailto:eric.nel...@intel.com>>
Sent: Wednesday, June 23, 2021 3:10 PM
To: G Edhaya Chandran 
mailto:edhaya.chand...@arm.com>>; 
gao...@byosoft.com.cn
Cc: Samer El-Haj-Mahmoud 
mailto:samer.el-haj-mahm...@arm.com>>
Subject: RE: Proposing a new area of the edk2-test repository


Hi Edhay,

Do you have any more questions?
What do you think of creating another directory in edk2-test, for other test 
apps, in addition to uefi-sct, such as ResumeOK.efi?

Thanks,
__e


From: Nelson, Eric
Sent: Tuesday, June 15, 2021 12:00 PM
To: G Edhaya Chandran 
mailto:edhaya.chand...@arm.com>>; 
gao...@byosoft.com.cn
Cc: Samer El-Haj-Mahmoud 
mailto:samer.el-haj-mahm...@arm.com>>
Subject: RE: Proposing a new area of the edk2-test repository


Hi Edhay,

ResumeOK.efi is a tool I wrote from the HelloWorld example, that validates 
Windows resume from S4 requirements, specifically that the memory-map run-time 
memory regions don’t change, and secondly that PCI devices don’t disappear from 
the system, both conditions would cause Windows to fail to resume from S4.

You install the tool to the root of the ESP, and set it as the default/top 
entry in the boot manager, and launch it.  (Disable Secure Boot.)

It runs warm, cold, and 60s ACPI RTC wake cycles, infinitely looking for errors.

ResumeOK.efi writes a file to the root of the ESP, ResumeOK.map, which contains 
the ACPI Facs->HardwareSignature, a list of the PCI devices in the system, and 
a copy of its memory map, from the first time it runs.

During each test pass, it runs a barrage of tests:


  1.  Free memory test – does the available memory match the memory map saved 
in 

Re: [EXTERNAL] Re: [edk2-devel] [PATCH v1 1/5] EDK2 Code First: PI Specification: EFI_MM_COMMUNICATE_HEADER Update

2021-06-23 Thread Bret Barkelew via groups.io
Yeah, the only other thought I had for moving forwards quickly (i.e. hackily) 
is to define a new GUID that just means “I use an updated header configuration” 
since the EFI_GUID field comes first and is a well-understood size.

I would prefer the “deprecate, break builds, fix code, move forward” approach.

- Bret

From: Kun Qin via groups.io
Sent: Wednesday, June 23, 2021 5:53 PM
To: Wu, Hao A; 
devel@edk2.groups.io
Cc: Kinney, Michael D; Liming 
Gao; Liu, 
Zhiguang; Andrew Fish; 
Laszlo Ersek; Lindholm, 
Leif; Bret 
Barkelew; Michael 
Kubacki
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v1 1/5] EDK2 Code First: PI 
Specification: EFI_MM_COMMUNICATE_HEADER Update

Hi Hao,

We have been circulating different ideas internally about how to enforce
a warning around this change.

There is an idea of deprecating the old structure and replacing it with
a newly defined EFI_MM_COMMUNICATE_HEADER_V2. That way all consumers
will be enforced to update their implementation and (hopefully) inspect
the compatibility accordingly. In addition, we could add other fields
such as signature and/or header version number for further extensibility.

If there are code instances that uses "sizeof(EFI_GUID) + sizeof(UINTN)"
in lieu of OFFSET_OF, this implementation is essentially decoupled from
the structure definition. So compiler might not be able to help. In that
case, runtime protections such as pool guard or stack guard might be useful.

Please let me know if you think header structure V2 is an idea worth to try.

Thanks,
Kun

On 06/15/2021 18:15, Wu, Hao A wrote:
> Thanks Kun,
>
> I am a little concerned on whether there will be other missing cases that are 
> not covered by this patch series.
>
> I am also wondering is there any detection can be made to warn the cases that 
> code modification should be made after this structure update.
> Otherwise, it will be the burden for the platform owners to review the 
> platform codes following your guide mentioned in this patch.
>
> Hoping others can provide some inputs on this.
>
> Best Regards,
> Hao Wu
>
>> -Original Message-
>> From: Kun Qin 
>> Sent: Wednesday, June 16, 2021 4:51 AM
>> To: Wu, Hao A ; devel@edk2.groups.io
>> Cc: Kinney, Michael D ; Liming Gao
>> ; Liu, Zhiguang ;
>> Andrew Fish ; Laszlo Ersek ; Leif
>> Lindholm 
>> Subject: Re: [edk2-devel] [PATCH v1 1/5] EDK2 Code First: PI Specification:
>> EFI_MM_COMMUNICATE_HEADER Update
>>
>> Hi Hao,
>>
>> Sorry that I missed comments for this patch earlier. You are correct. I only
>> inspected SmmLockBoxPeiLib. The PEI instance handled mode switch with
>> ```OFFSET_OF ``` function. But DXE instance still have a few use cases that 
>> will
>> be impacted.
>>
>> I will update this read me file and add a code change patch for this library 
>> in
>> v2. Thanks for pointing this out.
>>
>> Regards,
>> Kun
>>
>> On 06/11/2021 00:46, Wu, Hao A wrote:
 -Original Message-
 From: devel@edk2.groups.io  On Behalf Of Kun
 Qin
 Sent: Thursday, June 10, 2021 9:43 AM
 To: devel@edk2.groups.io
 Cc: Kinney, Michael D ; Liming Gao
 ; Liu, Zhiguang ;
 Andrew Fish ; Laszlo Ersek ; Leif
 Lindholm 
 Subject: [edk2-devel] [PATCH v1 1/5] EDK2 Code First: PI Specification:
 EFI_MM_COMMUNICATE_HEADER Update

 REF: 
 https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3430data=04%7C01%7CBret.Barkelew%40microsoft.com%7Ca480819ff5e84e12239f08d936aa7bc5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637600928127681913%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=483mG24s%2Bp0xSF90Wf%2Fmh2TN1atrIQa5mOrLyEPCTuE%3Dreserved=0

 This change includes specification update markdown file that
 describes the proposed PI Specification v1.7 Errata A in detail and
 potential impact to the existing codebase.

 Cc: Michael D Kinney 
 Cc: Liming Gao 
 Cc: Zhiguang Liu 
 Cc: Andrew Fish 
 Cc: Laszlo Ersek 
 Cc: Leif Lindholm 

 Signed-off-by: Kun Qin 
 ---
BZ3430-SpecChange.md | 88 
1 file changed, 88 insertions(+)

 diff --git a/BZ3430-SpecChange.md b/BZ3430-SpecChange.md new file
 mode
 100644 index ..33a1ffda447b
 --- /dev/null
 +++ b/BZ3430-SpecChange.md
 @@ -0,0 +1,88 @@
 +# Title: Change MessageLength Field of
>> EFI_MM_COMMUNICATE_HEADER
 to
 +UINT64
 +
 +## Status: Draft
 +
 +## Document: UEFI Platform Initialization Specification Version 1.7
 +Errata A
 +
 +## License
 

[edk2-devel] NetworkPkg: Unexpected DHCP RELEASE after PXE server reply on IPv6

2021-06-23 Thread Bret Barkelew via groups.io
Hi all!

Trying to track down an unexpected behavior for one of our teams here:
“We tried to PXEBoot a VM using IPv6 and even though the server replied with 
all requested boot options, the firmware for some reason did a DHCPv6 release 
instead of going for a network boot.”

The team dug in with some debugging and tracked things down to this process and 
the associated code:

  1.  DHCP server is sending REPLY with valid boot params and tftp server 
address.
  2.  UEFI upon receiving this REPLY, it is trying to send UDP request with 
port 4011 and uses TFTP global address as destination address.
  3.  Ip6Output() in /NetworkPkg/Ip6Dxe/Ip6Output.c drops the UDP request 
generated in Step-2. This is due to route miss.
 *   Function: 
https://github.com/tianocore/edk2/blob/20ca52882877ba9025da2ee58c8dab7808eca457/NetworkPkg/Ip6Dxe/Ip6Output.c#L476
 *   Error return: 
https://github.com/tianocore/edk2/blob/20ca52882877ba9025da2ee58c8dab7808eca457/NetworkPkg/Ip6Dxe/Ip6Output.c#L701
  4.  As the UDP request with port 4011 failed, UEFI does a RELEASE message and 
errors out.
  5.  Below the code snippet inside UEFI where packet is getting dropped.

Here’s some questions from the team:

  1.  Why is UEFI doing UDP request with port 4011 to TFTP server address. We 
expect it to start TFTP with data provided in REPLY by server.
  2.  In data center, the blades are not directly connected to server. So how 
can UEFI learn the routes to send a unicast request using global address.
  3.  In case of IPv4, we don’t see any UDP request using port 4011. Why alone 
for IPv6?


Thoughts? Thanks in advance!

- Bret



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




Re: [EXTERNAL] Re: [edk2-devel] [PATCH v1 1/1] Pytool: SpellCheck: Defer path expansion in cspell parameters

2021-06-15 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew 

- Bret

From: Sean Brogan
Sent: Tuesday, June 15, 2021 9:00 AM
To: devel@edk2.groups.io; 
kuqi...@gmail.com
Cc: Sean Brogan; Bret 
Barkelew; Kinney, Michael 
D; Liming 
Gao
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v1 1/1] Pytool: SpellCheck: Defer 
path expansion in cspell parameters

Please update the signed-off-by to include yours.

Reviewed-by: Sean Brogan 

Thanks
Sean


On 6/11/2021 10:04 PM, Kun Qin wrote:
> From: Sean Brogan 
>
> REF: 
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3454data=04%7C01%7CBret.Barkelew%40microsoft.com%7C436f445e3f774d2549b608d930169d05%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637593696216659744%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=pJiLG4bZ8gYR0MjDuNTmuT3NgRjq%2FZRMnTi1sT67VqM%3Dreserved=0
>
> On Linux the shell expands the wildcard paths and causes multiple files
> to be missed. This change adds additional quotes to defer expansion in
> order to bring parity in cspell result.
>
> Cc: Sean Brogan 
> Cc: Bret Barkelew 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
>
> Signed-off-by: Sean Brogan 
> ---
>   .pytool/Plugin/SpellCheck/SpellCheck.py | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/.pytool/Plugin/SpellCheck/SpellCheck.py 
> b/.pytool/Plugin/SpellCheck/SpellCheck.py
> index 43365441b91c..97b240ef747c 100644
> --- a/.pytool/Plugin/SpellCheck/SpellCheck.py
> +++ b/.pytool/Plugin/SpellCheck/SpellCheck.py
> @@ -133,7 +133,8 @@ class SpellCheck(ICiBuildPlugin):
>   #
>   relpath = os.path.relpath(abs_pkg_path)
>   cpsell_paths = " ".join(
> -[f"{relpath}/**/{x}" for x in 
> package_relative_paths_to_spell_check])
> +# Double quote each path to defer expansion to cspell parameters
> +[f'"{relpath}/**/{x}"' for x in 
> package_relative_paths_to_spell_check])
>
>   # Make the config file
>   config_file_path = os.path.join(
>



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




Re: [EXTERNAL] Re: [edk2-devel] [PATCH v2 4/6] SecurityPkg: Add EnrollFromDefaultKeys application.

2021-06-02 Thread Bret Barkelew via groups.io
> +#define FAIL(fmt...) AsciiPrint("EnrollFromDefaultKeysApp: " fmt)

I don’t think this sort of implied concatenation works on all compilers.

- Bret

From: Pete Batard via groups.io
Sent: Wednesday, June 2, 2021 10:40 AM
To: devel@edk2.groups.io; 
g...@semihalf.com
Cc: Lindholm, Leif; 
ardb+tianoc...@kernel.org; Samer 
El-Haj-Mahmoud; 
sunny.w...@arm.com; 
m...@semihalf.com; 
upstr...@semihalf.com; Yao, 
Jiewen; 
jian.j.w...@intel.com; 
min.m...@intel.com; 
ler...@redhat.com
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v2 4/6] SecurityPkg: Add 
EnrollFromDefaultKeys application.

On 2021.06.01 14:12, Grzegorz Bernacki wrote:
> This application allows user to force key enrollment from
> Secure Boot default variables.
>
> Signed-off-by: Grzegorz Bernacki 
> ---
>   SecurityPkg/EnrollFromDefaultKeysApp/EnrollFromDefaultKeysApp.inf |  47 
> +
>   SecurityPkg/EnrollFromDefaultKeysApp/EnrollFromDefaultKeysApp.c   | 107 
> 
>   2 files changed, 154 insertions(+)
>   create mode 100644 
> SecurityPkg/EnrollFromDefaultKeysApp/EnrollFromDefaultKeysApp.inf
>   create mode 100644 
> SecurityPkg/EnrollFromDefaultKeysApp/EnrollFromDefaultKeysApp.c
>
> diff --git 
> a/SecurityPkg/EnrollFromDefaultKeysApp/EnrollFromDefaultKeysApp.inf 
> b/SecurityPkg/EnrollFromDefaultKeysApp/EnrollFromDefaultKeysApp.inf
> new file mode 100644
> index 00..4d79ca3844
> --- /dev/null
> +++ b/SecurityPkg/EnrollFromDefaultKeysApp/EnrollFromDefaultKeysApp.inf
> @@ -0,0 +1,47 @@
> +## @file
> +#  Enroll PK, KEK, db, dbx from Default variables
> +#
> +#  Copyright (c) 2021, ARM Ltd. All rights reserved.
> +#  Copyright (c) 2021, Semihalf All rights reserved.
> +#  SPDX-License-Identifier: BSD-2-Clause-Patent
> +##
> +
> +[Defines]
> +  INF_VERSION= 1.28
> +  BASE_NAME  = EnrollFromDefaultKeysApp
> +  FILE_GUID  = 6F18CB2F-1293-4BC1-ABB8-35F84C71812E
> +  MODULE_TYPE= UEFI_APPLICATION
> +  VERSION_STRING = 0.1
> +  ENTRY_POINT= UefiMain
> +
> +[Sources]
> +  EnrollFromDefaultKeysApp.c
> +
> +[Packages]
> +  MdeModulePkg/MdeModulePkg.dec
> +  MdePkg/MdePkg.dec
> +  SecurityPkg/SecurityPkg.dec
> +
> +[Guids]
> +  gEfiCertPkcs7Guid
> +  gEfiCertSha256Guid
> +  gEfiCertX509Guid
> +  gEfiCustomModeEnableGuid
> +  gEfiGlobalVariableGuid
> +  gEfiImageSecurityDatabaseGuid
> +  gEfiSecureBootEnableDisableGuid
> +
> +[Protocols]
> +  gEfiSmbiosProtocolGuid ## CONSUMES
> +
> +[LibraryClasses]
> +  BaseLib
> +  BaseMemoryLib
> +  DebugLib
> +  MemoryAllocationLib
> +  PrintLib
> +  UefiApplicationEntryPoint
> +  UefiBootServicesTableLib
> +  UefiLib
> +  UefiRuntimeServicesTableLib
> +  SecureBootVariableLib
> diff --git a/SecurityPkg/EnrollFromDefaultKeysApp/EnrollFromDefaultKeysApp.c 
> b/SecurityPkg/EnrollFromDefaultKeysApp/EnrollFromDefaultKeysApp.c
> new file mode 100644
> index 00..1907ce1d4e
> --- /dev/null
> +++ b/SecurityPkg/EnrollFromDefaultKeysApp/EnrollFromDefaultKeysApp.c
> @@ -0,0 +1,107 @@
> +/** @file
> +  Enroll default PK, KEK, db, dbx.
> +
> +Copyright (c) 2021, ARM Ltd. All rights reserved.
> +Copyright (c) 2021, Semihalf All rights reserved.
> +
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +**/
> +
> +#include // gEfiCustomModeEnableGuid
> +#include  // EFI_SETUP_MODE_NAME
> +#include // 
> EFI_IMAGE_SECURITY_DATABASE
> +#include  // GUID_STRING_LENGTH
> +#include// CopyGuid()
> +#include // ASSERT()
> +#include  // FreePool()
> +#include // AsciiSPrint()
> +#include // gBS
> +#include  // AsciiPrint()
> +#include  // gRT
> +#include 
> +#include 
> +
> +#define FAIL(fmt...) AsciiPrint("EnrollFromDefaultKeysApp: " fmt)
> +
> +/**
> +  Entry point function of this shell application.
> +**/
> +EFI_STATUS
> +EFIAPI
> +UefiMain (
> +  IN EFI_HANDLEImageHandle,
> +  IN EFI_SYSTEM_TABLE  *SystemTable
> +  )
> +{
> +  EFI_STATUS Status;
> +  UINT8  SetupMode;
> +
> +  Status = GetSetupMode ();
> +  if (EFI_ERROR (Status)) {
> +FAIL ("Cannot get SetupMode variable: %r\n", Status);
> +return 1;
> +  }
> +
> +  if (SetupMode == USER_MODE) {
> +FAIL ("Skipped - USER_MODE\n");
> +return 1;
> +  }
> +
> +  Status = SetSecureBootMode (CUSTOM_SECURE_BOOT_MODE);
> +  if (EFI_ERROR (Status)) {
> +FAIL ("Cannot set CUSTOM_SECURE_BOOT_MODE: %r\n", Status);
> +return 1;
> +  }
> +
> +  Status = EnrollDbFromDefault ();
> +  if (EFI_ERROR (Status)) {
> 

[edk2-devel] ArmPkg: TranslationTable exceeding TempRam on virtual systems

2021-05-27 Thread Bret Barkelew via groups.io
I’m fielding a series of questions coming out of our compatriot team that deals 
with virtual FW (for HyperV). They’re seeing ARM64 systems that have lots of 
RAM vastly exceeding the TempRam that’s passed into the system due to HOB 
allocations to create all the 4k entries for the early page tables.

Is this a known limitation or are we doing something dumb?
Is there a way to sparsely populate the page tables and fill them in more in 
DXE?
I’ve seen some questions about 64k pages on the list before. Is that an option?

Thanks in advance!

- Bret



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




Re: [edk2-devel] [EXTERNAL] [edk2-stable202105 PATCH] MdeModulePkg/VariableLock: downgrade compatibility warnings to DEBUG_WARN

2021-05-21 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew 
bret.barke...@microsoft.com

I don’t regret making it ERROR at first because now no one can claim to have 
not been warned when the interface drops, but I agree that lowering to WARN now 
is prudent.

- Bret

From: Laszlo Ersek
Sent: Friday, May 21, 2021 1:40 PM
To: edk2-devel-groups-io
Cc: Bret Barkelew; Hao A 
Wu; Jian J Wang; 
Liming Gao; Kinney, Michael 
D; Philippe 
Mathieu-Daudé
Subject: [EXTERNAL] [edk2-stable202105 PATCH] MdeModulePkg/VariableLock: 
downgrade compatibility warnings to DEBUG_WARN

Commit a18a9bde36d2 ("MdeModulePkg/Variable/RuntimeDxe: Restore Variable
Lock Protocol behavior", 2020-12-15), for bug 3111, added two such sets of
debug messages that:

(a) are relevant for developers,

(b) yet should not necessarily poke end-users, because no functionality
suffers in practice.

Both message sets are in function VariableLockRequestToLock(): the first
is a generic interface deprecation warning; the second is the
double-locking situation, which we permit for compatibility (return status
EFI_SUCCESS).

Both message sets should be emitted with the DEBUG_WARN mask, not the most
serious DEBUG_ERROR mask. On some platforms, the serial console carries
both terminal traffic, and grave (DEBUG_ERROR-only) log messages. On such
platforms, both message sets may be perceived as a nuisance by end-users,
as there is nothing they can do, and there's nothing they *should* do --
in practice, nothing malfunctions.

(Such a platform is ArmVirtQemu, built with "-D
DEBUG_PRINT_ERROR_LEVEL=0x8000".)

Cc: Bret Barkelew 
Cc: Hao A Wu 
Cc: Jian J Wang 
Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Philippe Mathieu-Daudé 
Ref: 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3410data=04%7C01%7Cbret.barkelew%40microsoft.com%7Ca7ff677adbc34cf62f0608d91c98b5b9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637572264482965812%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=2WuJ06k2ViIR6JnQVRmsGdsnYjmOrPUtGD82thYLe%2FU%3Dreserved=0
Fixes: a18a9bde36d2ffc12df29cdced1efa1f8f9f2021
Signed-off-by: Laszlo Ersek 
---
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c | 10 
+-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c 
b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c
index 7d87e50efdcd..4e1efef9a7e4 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c
@@ -48,9 +48,9 @@ VariableLockRequestToLock (
   EFI_STATUS Status;
   VARIABLE_POLICY_ENTRY  *NewPolicy;

-  DEBUG ((DEBUG_ERROR, "!!! DEPRECATED INTERFACE !!! %a() will go away 
soon!\n", __FUNCTION__));
-  DEBUG ((DEBUG_ERROR, "!!! DEPRECATED INTERFACE !!! Please move to use 
Variable Policy!\n"));
-  DEBUG ((DEBUG_ERROR, "!!! DEPRECATED INTERFACE !!! Variable: %g %s\n", 
VendorGuid, VariableName));
+  DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! %a() will go away 
soon!\n", __FUNCTION__));
+  DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Please move to use 
Variable Policy!\n"));
+  DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Variable: %g %s\n", 
VendorGuid, VariableName));

   NewPolicy = NULL;
   Status = CreateBasicVariablePolicy(
@@ -69,13 +69,13 @@ VariableLockRequestToLock (
 //
 // If the error returned is EFI_ALREADY_STARTED, we need to check the
 // current database for the variable and see whether it's locked. If it's
-// locked, we're still fine, but also generate a DEBUG_ERROR message so the
+// locked, we're still fine, but also generate a DEBUG_WARN message so the
 // duplicate lock can be removed.
 //
 if (Status == EFI_ALREADY_STARTED) {
   Status = ValidateSetVariable (VariableName, VendorGuid, 0, 0, NULL);
   if (Status == EFI_WRITE_PROTECTED) {
-DEBUG ((DEBUG_ERROR, "  Variable: %g %s is already locked!\n", 
VendorGuid, VariableName));
+DEBUG ((DEBUG_WARN, "  Variable: %g %s is already locked!\n", 
VendorGuid, VariableName));
 Status = EFI_SUCCESS;
   } else {
 DEBUG ((DEBUG_ERROR, "  Variable: %g %s can not be locked!\n", 
VendorGuid, VariableName));
--
2.19.1.3.g30247aa5d201



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

Re: [edk2-devel] A plea for help

2021-05-19 Thread Bret Barkelew via groups.io
Yup, I was tired. Read the Python version all wrong.

- Bret

From: Hernandez Miramontes, Jose Miguel 

Sent: Wednesday, May 19, 2021 7:15:30 AM
To: devel@edk2.groups.io ; Bret Barkelew 
; fowler_e...@ne.bah.com 
Subject: [EXTERNAL] RE: [edk2-devel] A plea for help


So, the problem is here.

File "C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\Common\Misc.py", 
line 1638, in __init__

if ByteArray.tostring() != b'PE\0\0':



see:

https://docs.python.org/3/whatsnew/3.9.html<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.python.org%2F3%2Fwhatsnew%2F3.9.html=04%7C01%7Cbret.barkelew%40microsoft.com%7Cf3fb8f5288bd4af41aa408d91ad09263%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637570305407840963%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=cciIITpbNA55d7ZKakdj3DS8YWEnilz37Dlz%2B1Vzb8Q%3D=0>



array.array: tostring() and fromstring() methods have been removed. They were 
aliases to tobytes() and frombytes(), deprecated since Python 3.2. (Contributed 
by Victor Stinner in bpo-38916.)



you could try python 3.8 or cherry pick this change.

https://github.com/tianocore/edk2/commit/43bec9ea3d56f3662ede78023baa2a791b66acac<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fcommit%2F43bec9ea3d56f3662ede78023baa2a791b66acac=04%7C01%7Cbret.barkelew%40microsoft.com%7Cf3fb8f5288bd4af41aa408d91ad09263%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637570305407850918%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=3XL3RTbGl0QPbNYIDgs2R3fWhBwsld37zvPjeI7Acso%3D=0>







Jose Miguel Hernandez Miramontes

BIOS  Engineer

jose.miguel.hernandez.miramon...@intel.com

Intel Corporation



From: devel@edk2.groups.io  On Behalf Of Bret Barkelew 
via groups.io
Sent: Wednesday, May 19, 2021 3:12 AM
To: devel@edk2.groups.io; fowler_e...@ne.bah.com
Subject: Re: [edk2-devel] A plea for help



Have you tried the latest Python 3.x?



- Bret



From: Fowler, Eric (Mondo International, LLC) via 
groups.io<mailto:Fowler_Eric=ne.bah@groups.io>
Sent: Wednesday, May 19, 2021 12:41 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: [EXTERNAL] [edk2-devel] A plea for help



build.py...

: error C0DE: Unknown fatal error when processing 
[c:\edk2020\district-defend\edk2\MdeModulePkg\Universal\Console\GraphicsConsoleDxe\GraphicsConsoleDxe.inf]



(Please send email to devel@edk2.groups.io<mailto:devel@edk2.groups.io> for 
help, attaching following call stack trace!)



(Python 3.9.5 on win32) Traceback (most recent call last):

  File 
"C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\build\build.py", line 
2596, in Main

MyBuild.Launch()

  File 
"C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\build\build.py", line 
2391, in Launch

self._MultiThreadBuildPlatform()

  File 
"C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\build\build.py", line 
2271, in _MultiThreadBuildPlatform

self.CreateAsBuiltInf()

  File 
"C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\build\build.py", line 
2401, in CreateAsBuiltInf

Module.CreateAsBuiltInf()

  File 
"C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\AutoGen\ModuleAutoGen.py",
 line 1503, in CreateAsBuiltInf

PatchList = parsePcdInfoFromMapFile(

  File 
"C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\GenPatchPcdTable\GenPatchPcdTable.py",
 line 59, in parsePcdInfoFromMapFile

return _parseGeneral(lines, efifilepath)

  File 
"C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\GenPatchPcdTable\GenPatchPcdTable.py",
 line 174, in _parseGeneral

efisecs = PeImageClass(efifilepath).SectionHeaderList

  File 
"C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\Common\Misc.py", line 
1638, in __init__

if ByteArray.tostring() != b'PE\0\0':

AttributeError: 'array.array' object has no attribute 'tostring'





- Failed -

Build end time: 21:15:31, May.18 2021

Build total time: 00:07:11






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




Re: [edk2-devel] A plea for help

2021-05-19 Thread Bret Barkelew via groups.io
Have you tried the latest Python 3.x?

- Bret

From: Fowler, Eric (Mondo International, LLC) via 
groups.io
Sent: Wednesday, May 19, 2021 12:41 AM
To: devel@edk2.groups.io
Subject: [EXTERNAL] [edk2-devel] A plea for help

build.py...
: error C0DE: Unknown fatal error when processing 
[c:\edk2020\district-defend\edk2\MdeModulePkg\Universal\Console\GraphicsConsoleDxe\GraphicsConsoleDxe.inf]

(Please send email to devel@edk2.groups.io for help, attaching following call 
stack trace!)

(Python 3.9.5 on win32) Traceback (most recent call last):
  File 
"C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\build\build.py", line 
2596, in Main
MyBuild.Launch()
  File 
"C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\build\build.py", line 
2391, in Launch
self._MultiThreadBuildPlatform()
  File 
"C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\build\build.py", line 
2271, in _MultiThreadBuildPlatform
self.CreateAsBuiltInf()
  File 
"C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\build\build.py", line 
2401, in CreateAsBuiltInf
Module.CreateAsBuiltInf()
  File 
"C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\AutoGen\ModuleAutoGen.py",
 line 1503, in CreateAsBuiltInf
PatchList = parsePcdInfoFromMapFile(
  File 
"C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\GenPatchPcdTable\GenPatchPcdTable.py",
 line 59, in parsePcdInfoFromMapFile
return _parseGeneral(lines, efifilepath)
  File 
"C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\GenPatchPcdTable\GenPatchPcdTable.py",
 line 174, in _parseGeneral
efisecs = PeImageClass(efifilepath).SectionHeaderList
  File 
"C:\EDK2020\district-defend\edk2\BaseTools\Source\Python\Common\Misc.py", line 
1638, in __init__
if ByteArray.tostring() != b'PE\0\0':
AttributeError: 'array.array' object has no attribute 'tostring'


- Failed -
Build end time: 21:15:31, May.18 2021
Build total time: 00:07:11




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




Re: [edk2-devel] [EXTERNAL] [PATCH v1 1/1] UnitTestFrameworkPkg: Sample unit test hangs when running in OVMF/QEMU

2021-04-30 Thread Bret Barkelew via groups.io
Mike,

Can you stage the PR for this? Thanks!

- Bret

From: Bret Barkelew via groups.io<mailto:bret.barkelew=microsoft@groups.io>
Sent: Friday, April 30, 2021 2:16 PM
To: Getnat Ejigu<mailto:getnatej...@gmail.com>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Kinney, Michael D<mailto:michael.d.kin...@intel.com>; Sean 
Brogan<mailto:sean.bro...@microsoft.com>
Subject: Re: [edk2-devel] [EXTERNAL] [PATCH v1 1/1] UnitTestFrameworkPkg: 
Sample unit test hangs when running in OVMF/QEMU

Reviewed-by: Bret Barkelew 

- Bret

From: Getnat Ejigu<mailto:getnatej...@gmail.com>
Sent: Friday, April 30, 2021 2:07 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Kinney, Michael D<mailto:michael.d.kin...@intel.com>; Sean 
Brogan<mailto:sean.bro...@microsoft.com>; Bret 
Barkelew<mailto:bret.barke...@microsoft.com>
Subject: [EXTERNAL] [PATCH v1 1/1] UnitTestFrameworkPkg: Sample unit test hangs 
when running in OVMF/QEMU

Sample unit tests in UnitTestFrameworkPkg hangs when running in OVMF/QEMU
environment. Build target is X64/GCC5. Fixing this issue by adding EFIAPI
to ReportPrint() function that use VA_ARGS.

Signed-off-by: Getnat Ejigu 
Cc: Michael D Kinney 
Cc: Sean Brogan 
Cc: Bret Barkelew 
---
 UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c 
| 1 +
 
UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.c
   | 1 +
 
UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.c
 | 1 +
 3 files changed, 3 insertions(+)

diff --git 
a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c
 
b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c
index 66c9db457d80..7f7443a23391 100644
--- 
a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c
+++ 
b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c
@@ -11,6 +11,7 @@
 #include 



 VOID

+EFIAPI

 ReportPrint (

   IN CONST CHAR8  *Format,

   ...

diff --git 
a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.c
 
b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.c
index cfb0c5972bd1..db5402d6a210 100644
--- 
a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.c
+++ 
b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.c
@@ -12,6 +12,7 @@
 #include 



 VOID

+EFIAPI

 ReportPrint (

   IN CONST CHAR8  *Format,

   ...

diff --git 
a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.c
 
b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.c
index 1402d0ef83e2..1d62c6a37117 100644
--- 
a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.c
+++ 
b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.c
@@ -11,6 +11,7 @@
 #include 



 VOID

+EFIAPI

 ReportPrint (

   IN CONST CHAR8  *Format,

   ...

--
2.25.1





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




Re: [edk2-devel] [EXTERNAL] [PATCH v1 1/1] UnitTestFrameworkPkg: Sample unit test hangs when running in OVMF/QEMU

2021-04-30 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew 

- Bret

From: Getnat Ejigu
Sent: Friday, April 30, 2021 2:07 PM
To: devel@edk2.groups.io
Cc: Kinney, Michael D; Sean 
Brogan; Bret 
Barkelew
Subject: [EXTERNAL] [PATCH v1 1/1] UnitTestFrameworkPkg: Sample unit test hangs 
when running in OVMF/QEMU

Sample unit tests in UnitTestFrameworkPkg hangs when running in OVMF/QEMU
environment. Build target is X64/GCC5. Fixing this issue by adding EFIAPI
to ReportPrint() function that use VA_ARGS.

Signed-off-by: Getnat Ejigu 
Cc: Michael D Kinney 
Cc: Sean Brogan 
Cc: Bret Barkelew 
---
 UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c 
| 1 +
 
UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.c
   | 1 +
 
UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.c
 | 1 +
 3 files changed, 3 insertions(+)

diff --git 
a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c
 
b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c
index 66c9db457d80..7f7443a23391 100644
--- 
a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c
+++ 
b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c
@@ -11,6 +11,7 @@
 #include 



 VOID

+EFIAPI

 ReportPrint (

   IN CONST CHAR8  *Format,

   ...

diff --git 
a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.c
 
b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.c
index cfb0c5972bd1..db5402d6a210 100644
--- 
a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.c
+++ 
b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.c
@@ -12,6 +12,7 @@
 #include 



 VOID

+EFIAPI

 ReportPrint (

   IN CONST CHAR8  *Format,

   ...

diff --git 
a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.c
 
b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.c
index 1402d0ef83e2..1d62c6a37117 100644
--- 
a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.c
+++ 
b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.c
@@ -11,6 +11,7 @@
 #include 



 VOID

+EFIAPI

 ReportPrint (

   IN CONST CHAR8  *Format,

   ...

--
2.25.1



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




Re: [edk2-devel] [EXTERNAL] [PATCH v1 1/1] UnitTestFrameworkPkg: Sample unit test hangs when running in OVMF/QEMU

2021-04-29 Thread Bret Barkelew via groups.io
This change should also be made in:
UnitTestFrameworkPkg\Library\UnitTestResultReportLib\UnitTestResultReportLibDebugLib.c
UnitTestFrameworkPkg\Library\UnitTestResultReportLib\UnitTestResultReportLib.c 
(for the prototype)

- Bret

From: Getnat Ejigu
Sent: Thursday, April 29, 2021 10:43 AM
To: devel@edk2.groups.io
Cc: Kinney, Michael D; Sean 
Brogan; Bret 
Barkelew
Subject: [EXTERNAL] [PATCH v1 1/1] UnitTestFrameworkPkg: Sample unit test hangs 
when running in OVMF/QEMU

Sample unit tests in UnitTestFrameworkPkg hangs when running in OVMF/QEMU
environment. Build target is X64/GCC5. Fixing this issue by adding EFIAPI
to ReportPrint() function that use VA_ARGS.

Signed-off-by: Getnat Ejigu 
Cc: Michael D Kinney 
Cc: Sean Brogan 
Cc: Bret Barkelew 
---
 
UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.c
 | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.c
 
b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.c
index cfb0c5972bd1..db5402d6a210 100644
--- 
a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.c
+++ 
b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.c
@@ -12,6 +12,7 @@
 #include 



 VOID

+EFIAPI

 ReportPrint (

   IN CONST CHAR8  *Format,

   ...

--
2.25.1



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




Re: [EXTERNAL] Re: [edk2-devel] RFC: Adding support for ARM (RNDR etc.) to RngDxe

2021-04-26 Thread Bret Barkelew via groups.io
I vote the latter.

- Bret

From: Rebecca Cran via groups.io
Sent: Monday, April 26, 2021 2:29 PM
To: Sami Mujawar; 
devel@edk2.groups.io; Samer 
El-Haj-Mahmoud; Ard 
Biesheuvel; 
l...@nuviainc.com
Cc: r...@edk2.groups.io; Yao, 
Jiewen; Rahul 
Kumar; nd; Jose 
Marinho
Subject: [EXTERNAL] Re: [edk2-devel] RFC: Adding support for ARM (RNDR etc.) to 
RngDxe

Hi Sami,

I've been looking through the design document again, and was wondering
if the work I previously did will just slot in?

Were you thinking the "RngLib|RNDR" would go into ArmPkg (since it's not
labeled as being in BaseRngLib)? Or would it still make sense to
refactor MdePkg/Library/BaseRngLib to support both x86 (using RDRAND)
and aarch64 (using RNDR)?

--
Rebecca Cran



On 4/22/21 3:30 AM, Sami Mujawar wrote:
> Hi Rebecca,
>
> I have been working on the following modules (See slide 11 in “EDKII -
> Proposed update to RNG implementation.pdf
> ):
>
>  1. TrngLib|FwTrnglib (Arm Firmware TRNG)
>  2. DrbgLib stack – with support for DrbgAlgorithmLib|CRT_DRBG &
> AesLib|ArmAesInstructionLib.
>
> I plan to post patches for (a) in the next fortnight. Following this I
> plan to update the proposal with the interface definitions for the
> various library interfaces in the DrbgLib Stack.
>
> I have not looked at RngLib|RNDR as I believe you were interested in
> implementing the part. Kindly let me know if you plan to implement this
> and the platform you would be using for testing. It looks like the
> FVP_Base_AEMv8A-AEMv8A and the FVP-RevC models support RNDR, so these
> could be used for testing as well. Please feel free to get in touch
> should you need any help with the model parameters or if you face any
> issues.
>
> Regards,
>
> Sami Mujawar
>
> *From: *Rebecca Cran 
> *Date: *Tuesday, 20 April 2021 at 21:04
> *To: *Sami Mujawar , devel@edk2.groups.io
> , Samer El-Haj-Mahmoud
> , Ard Biesheuvel ,
> l...@nuviainc.com 
> *Cc: *r...@edk2.groups.io , Jiewen Yao
> , Rahul Kumar , nd
> , Jose Marinho 
> *Subject: *Re: [edk2-devel] RFC: Adding support for ARM (RNDR etc.) to
> RngDxe
>
> Hi Sami,
>
> I was wondering if you're still collecting feedback on the design, or if
> you have a plan and schedule for the implementation?
>
> --
> Rebecca Cran
>
> On 1/15/21 7:51 PM, Sami Mujawar wrote:
>  > Hi All,
>  >
>  > I have shared some initial thoughts on the RNG implementation updates
> at
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Ffiles%2FDesigns%2F2021%2F0116%2FEDKII%2520-%2520Proposed%2520update%2520to%2520RNG%2520implementation.pdfdata=04%7C01%7Cbret.barkelew%40microsoft.com%7C676a9101f67845dbdc8908d908fa4cd1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637550693569385394%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=Q8ka83ReO2aG8yTVrgpTAVxczJVjl2JBH3ksHo2%2BSHk%3Dreserved=0
> 
>  >
>  > Kindly let me know your feedback or if you have any queries.
>  >
>  > Regards,
>  >
>  > Sami Mujawar
>  >
>  > -Original Message-
>  > From: devel@edk2.groups.io  On Behalf Of
> Rebecca Cran via groups.io
>  > Sent: 14 January 

Re: [EXTERNAL] Re: [edk2-devel] [PATCH v1 03/12] ArmPkg: Add missing library headers to ArmPkg.dec

2021-04-26 Thread Bret Barkelew via groups.io
Those look good to me. Made one comment on 12/12. Also screwed up my hyphen on 
8, 9, 10, and 12.

- Bret

From: Pierre Gondois
Sent: Monday, April 26, 2021 9:40 AM
To: devel@edk2.groups.io; Bret 
Barkelew
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v1 03/12] ArmPkg: Add missing 
library headers to ArmPkg.dec

Hi Bret,
Ok I will do that in a V2.

Do these patches look ok to you ?

[PATCH v1 08/12] .pytool: Enable CI for ArmPkg
[PATCH v1 09/12] .pytool: Enable CI for ArmPlatformPkg
[PATCH v1 10/12] .pytool: Document LicenseCheck and EccCheck
[PATCH v1 11/12] AzurePipelines: Add support for ArmPkg
[PATCH v1 12/12] AzurePipelines: Add support for ArmPlatformPkg

Regards,
Pierre

On 4/21/21 8:13 PM, brbarkel via groups.io wrote:
>
> 1) To expedite the required reviews, you may want to add CC to the
> package maintainers for ArmPkg to this commit message and email. I
> know a lot of people filter based on direct mention vs mailing list.
>
> 2) Generally, other packages have a brief description of the lib in
> the DEC, as well. Example:
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fd3b0d007a135284981fa750612a47234b83976f9%2FMdeModulePkg%2FMdeModulePkg.dec%23L55data=04%7C01%7CBret.Barkelew%40microsoft.com%7C11a94a7986c94a1dc9dd08d908d20f74%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637550520568164761%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=MsbriQVK47dxlgZxsTWgpiKS0XM8FOVwFY5askVkvAA%3Dreserved=0
> 
> However, I see that this has not historically been maintained in this
> package, so I'm not going to make a big deal of it.
>
> Reviewed-by: Bret Barkelew 
>
> 



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




Re: [edk2-devel] [EXTERNAL] [PATCH v1 11/12] AzurePipelines: Add support for ArmPkg

2021-04-26 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew 

Just realized I left a hyphen out of my other reviews today. Apologies.

- Bret

From: pierre.gond...@arm.com
Sent: Wednesday, April 21, 2021 5:21 AM
To: devel@edk2.groups.io; 
sami.muja...@arm.com; 
l...@nuviainc.com; 
ardb+tianoc...@kernel.org; Sean 
Brogan; Bret 
Barkelew
Subject: [EXTERNAL] [PATCH v1 11/12] AzurePipelines: Add support for ArmPkg

From: Pierre Gondois 

Add an entry to build the ArmPkg in the CI.

Fixes: 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3348data=04%7C01%7CBret.Barkelew%40microsoft.com%7C1480560cf7934a9ecb3508d904bffccc%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637546044922056341%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=hJmH1ZPKXHLKyHJozmsRM3By8%2BXewjBY235NhkflflI%3Dreserved=0
Signed-off-by: Pierre Gondois 
---
 .azurepipelines/templates/pr-gate-build-job.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.azurepipelines/templates/pr-gate-build-job.yml 
b/.azurepipelines/templates/pr-gate-build-job.yml
index 3e6d275b1b9a..837079e7bd97 100644
--- a/.azurepipelines/templates/pr-gate-build-job.yml
+++ b/.azurepipelines/templates/pr-gate-build-job.yml
@@ -21,6 +21,9 @@ jobs:
   #Use matrix to speed up the build process
   strategy:
 matrix:
+  TARGET_ARM:
+Build.Pkgs: 'ArmPkg'
+Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
   TARGET_MDE_CPU:
 Build.Pkgs: 'MdePkg,UefiCpuPkg'
 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
--
2.17.1



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




Re: [edk2-devel] [EXTERNAL] [PATCH v1 12/12] AzurePipelines: Add support for ArmPlatformPkg

2021-04-26 Thread Bret Barkelew via groups.io
I think the TARGET name should be updated to TARGET_ARM_ARMPLATFORM.
Otherwise,

Reviewed by: Bret Barkelew 

- Bret

From: pierre.gond...@arm.com
Sent: Wednesday, April 21, 2021 5:21 AM
To: devel@edk2.groups.io; 
sami.muja...@arm.com; 
l...@nuviainc.com; 
ardb+tianoc...@kernel.org; Sean 
Brogan; Bret 
Barkelew
Subject: [EXTERNAL] [PATCH v1 12/12] AzurePipelines: Add support for 
ArmPlatformPkg

From: Pierre Gondois 

Add an entry to build the ArmPlatformPkg in the CI.

Fixes: 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3349data=04%7C01%7CBret.Barkelew%40microsoft.com%7C5d0e796c603443cba5cb08d904bffdf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637546044920304051%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=A8udDEiGEU4kXwVm88lNlnOCJq4c65uW7R4n%2FYYGUCs%3Dreserved=0
Signed-off-by: Pierre Gondois 
---
 .azurepipelines/templates/pr-gate-build-job.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.azurepipelines/templates/pr-gate-build-job.yml 
b/.azurepipelines/templates/pr-gate-build-job.yml
index 837079e7bd97..16d197cde913 100644
--- a/.azurepipelines/templates/pr-gate-build-job.yml
+++ b/.azurepipelines/templates/pr-gate-build-job.yml
@@ -22,7 +22,7 @@ jobs:
   strategy:
 matrix:
   TARGET_ARM:
-Build.Pkgs: 'ArmPkg'
+Build.Pkgs: 'ArmPkg,ArmPlatformPkg'
 Build.Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
   TARGET_MDE_CPU:
 Build.Pkgs: 'MdePkg,UefiCpuPkg'
--
2.17.1



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




Re: [edk2-devel] [EXTERNAL] [PATCH v1 10/12] .pytool: Document LicenseCheck and EccCheck

2021-04-26 Thread Bret Barkelew via groups.io
Acked by: Bret Barkelew 

- Bret

From: pierre.gond...@arm.com
Sent: Wednesday, April 21, 2021 5:21 AM
To: devel@edk2.groups.io; 
sami.muja...@arm.com; 
l...@nuviainc.com; 
ardb+tianoc...@kernel.org; Sean 
Brogan; Bret 
Barkelew
Subject: [EXTERNAL] [PATCH v1 10/12] .pytool: Document LicenseCheck and EccCheck

From: Pierre Gondois 

Add an entry in the documentation for the LicenseCheck and
EccCheck plugins.

Signed-off-by: Pierre Gondois 
---
 .pytool/Readme.md | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/.pytool/Readme.md b/.pytool/Readme.md
index eca86c6a822d..f6505507966a 100644
--- a/.pytool/Readme.md
+++ b/.pytool/Readme.md
@@ -254,6 +254,16 @@ Install

   More cspell info: 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fstreetsidesoftware%2Fcspelldata=04%7C01%7CBret.Barkelew%40microsoft.com%7Cd3baca9349a5434e411408d904bffb9b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637546044883177478%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=r%2BsyJEm3F5LEoSXSJ8wvtklOlVbkHrkK7mQGh5qzxEs%3Dreserved=0

+### License Checking - LicenseCheck
+
+Scans all new added files in a package to make sure code is contributed under
+BSD-2-Clause-Patent.
+
+### Ecc tool - EccCheck
+
+Run the Ecc tool on the package. The Ecc tool is available in the BaseTools
+package. It checks that the code complies to the EDKII coding standard.
+
 ## PyTool Scopes

 Scopes are how the PyTool ext_dep, path_env, and plugins are activated.  
Meaning
--
2.17.1



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




Re: [edk2-devel] [EXTERNAL] [PATCH v1 09/12] .pytool: Enable CI for ArmPlatformPkg

2021-04-26 Thread Bret Barkelew via groups.io
Reviewed by: Bret Barkelew 

- Bret

From: pierre.gond...@arm.com
Sent: Wednesday, April 21, 2021 5:21 AM
To: devel@edk2.groups.io; 
sami.muja...@arm.com; 
l...@nuviainc.com; 
ardb+tianoc...@kernel.org; Sean 
Brogan; Bret 
Barkelew
Subject: [EXTERNAL] [PATCH v1 09/12] .pytool: Enable CI for ArmPlatformPkg

From: Pierre Gondois 

Enable the CI for the ArmPlatformPkg.

Signed-off-by: Pierre Gondois 
---
 .pytool/CISettings.py | 1 +
 .pytool/Readme.md | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py
index 6f7daeca076b..96e6baa5190d 100644
--- a/.pytool/CISettings.py
+++ b/.pytool/CISettings.py
@@ -50,6 +50,7 @@ class Settings(CiBuildSettingsManager, UpdateSettingsManager, 
SetupSettingsManag
 These should be edk2 workspace relative paths '''

 return ("ArmPkg",
+"ArmPlatformPkg",
 "ArmVirtPkg",
 "DynamicTablesPkg",
 "EmulatorPkg",
diff --git a/.pytool/Readme.md b/.pytool/Readme.md
index cbce1f6cd54a..eca86c6a822d 100644
--- a/.pytool/Readme.md
+++ b/.pytool/Readme.md
@@ -5,7 +5,7 @@
 | Package  | Windows VS2019 (IA32/X64)| Ubuntu GCC 
(IA32/X64/ARM/AARCH64) | Known Issues |
 | :| :-   | :  
   | :--- |
 | ArmPkg   || :heavy_check_mark: |
-| ArmPlatformPkg   |
+| ArmPlatformPkg   || :heavy_check_mark: |
 | ArmVirtPkg   | SEE PACKAGE README | SEE PACKAGE README |
 | CryptoPkg| :heavy_check_mark: | :heavy_check_mark: | Spell 
checking in audit mode
 | DynamicTablesPkg || :heavy_check_mark: |
--
2.17.1



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




Re: [edk2-devel] [EXTERNAL] [PATCH v1 08/12] .pytool: Enable CI for ArmPkg

2021-04-26 Thread Bret Barkelew via groups.io
Reviewed by: Bret Barkelew 

- Bret

From: pierre.gond...@arm.com
Sent: Wednesday, April 21, 2021 5:21 AM
To: devel@edk2.groups.io; 
sami.muja...@arm.com; 
l...@nuviainc.com; 
ardb+tianoc...@kernel.org; Sean 
Brogan; Bret 
Barkelew
Subject: [EXTERNAL] [PATCH v1 08/12] .pytool: Enable CI for ArmPkg

From: Pierre Gondois 

Enable the CI for the ArmPkg.

Signed-off-by: Pierre Gondois 
---
 .pytool/CISettings.py | 3 ++-
 .pytool/Readme.md | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py
index 5f71eca1992e..6f7daeca076b 100644
--- a/.pytool/CISettings.py
+++ b/.pytool/CISettings.py
@@ -49,7 +49,8 @@ class Settings(CiBuildSettingsManager, UpdateSettingsManager, 
SetupSettingsManag
 ''' return iterable of edk2 packages supported by this build.
 These should be edk2 workspace relative paths '''

-return ("ArmVirtPkg",
+return ("ArmPkg",
+"ArmVirtPkg",
 "DynamicTablesPkg",
 "EmulatorPkg",
 "MdePkg",
diff --git a/.pytool/Readme.md b/.pytool/Readme.md
index e158b2b81a34..cbce1f6cd54a 100644
--- a/.pytool/Readme.md
+++ b/.pytool/Readme.md
@@ -4,7 +4,7 @@

 | Package  | Windows VS2019 (IA32/X64)| Ubuntu GCC 
(IA32/X64/ARM/AARCH64) | Known Issues |
 | :| :-   | :  
   | :--- |
-| ArmPkg   |
+| ArmPkg   || :heavy_check_mark: |
 | ArmPlatformPkg   |
 | ArmVirtPkg   | SEE PACKAGE README | SEE PACKAGE README |
 | CryptoPkg| :heavy_check_mark: | :heavy_check_mark: | Spell 
checking in audit mode
--
2.17.1



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




Re: [EXTERNAL] Re: [edk2-devel] [GSoC proposal] Secure Image Loader

2021-04-12 Thread Bret Barkelew via groups.io
As always, we volunteer the UEFI Talkbox Discord for conversations of this 
nature. 

https://discord.gg/cuqjER3Juw

- Bret

From: Marvin Häuser via groups.io
Sent: Monday, April 12, 2021 10:24 AM
To: devel@edk2.groups.io; Desimone, Nathaniel 
L; Laszlo 
Ersek; Andrew Fish; Kinney, 
Michael D
Subject: [EXTERNAL] Re: [edk2-devel] [GSoC proposal] Secure Image Loader

Good day Nate,

As you seem to be mostly in charge of the GSoC side of things, I direct
this at you, but of course everyone is welcome to comment.

I think I finished my first round of investigations just in time for the
deadline. You can find a list of BZs attached[1]. Please note that 1)
some are declared security issues and may not be publicly accessible,
and 2) that this list is far from complete. I only added items that are
a) not implicitly fixed by "simply" deploying the new Image Loader
(*some* important prerequisites are listed), and b) I am confident are
actual issues (or things to consider) I believe to know how to approach.

I have taken notes about more things, e.g. the existence of the security
architectural protocols, which I could not find a rationale for. I can
prepare something for this matter, but it really needs an active
discussion with some of the core people. I'm not sure delayed e-mail
discussion is going to be enough, but there is an official IRC I
suppose. :) I hope we can work something out for this.

I also hope this makes it clearer why I don't believe that we need to
"fill" 10 weeks, but rather the opposite. This is not a matter of
replacing a library instance, but the whole surrounding ecosystem needs
to follow for the changes to make sense. And as I tried to make clear in
my discussion with Michael Brown, I am not keen on preserving
backwards-compatibility with platform code (i.e. PEI, DXE, things we
consider "internal"), as most of it should be controlled by EDK II
already. This of course does *not* include user code (OROMs,
bootloaders, ...), for which I want to provide the *option* to lock some
of them out for security, but with sane defaults that will ensure good
compatibility.

I'd like to thank Michael Brown for his cooperation and support, because
we recently landed changes in iPXE to allow for the strictest image
format and permission constraints currently possible[2].

I will have to rework the submitted proposal to reflect the new
knowledge. To be honest, seeing how the BZs kept rolling in, I am not
convinced an amazing amount of mainlining can be accomplished during the
10 weeks. It may have to suffice to have a publicly accessible prototype
(e.g. OVMF) and a subset of the planned patches on the list. I hope you
can manage to provide some feedback before the deadline passes tomorrow.

Thank you in advance!

Best regards,
Marvin

[1]
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3315data=04%7C01%7Cbret.barkelew%40microsoft.com%7C045c38141f1e443d1e4b08d8fdd78e23%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637538450446516854%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=xkAIi7yRQfRtw3pKELUzpb1oo9EN4kyroCdadjEzPLQ%3Dreserved=0
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3316data=04%7C01%7Cbret.barkelew%40microsoft.com%7C045c38141f1e443d1e4b08d8fdd78e23%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637538450446516854%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=cFAacXfo69cDMpxSggXjnVpoRqYdIj21QYg%2Ffo5jp9Y%3Dreserved=0
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3317data=04%7C01%7Cbret.barkelew%40microsoft.com%7C045c38141f1e443d1e4b08d8fdd78e23%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637538450446516854%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=Ssf4h8yn3zee1IaK5%2BwI5WwvOvUW4gAtjikil0pS3Fw%3Dreserved=0
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3318data=04%7C01%7Cbret.barkelew%40microsoft.com%7C045c38141f1e443d1e4b08d8fdd78e23%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637538450446516854%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=2KKVA6qqHIP2skLSLXo56av1%2FS9pL1MMJbt%2FPI9BBPM%3Dreserved=0

Re: [EXTERNAL] [edk2-devel] Build Failed for QEMU35Pkg

2021-04-12 Thread Bret Barkelew via groups.io
To my knowledge, we do not currently have a required version; the current state 
is it either works or it doesn’t, and if it doesn’t it’s on you to figure that 
out from the failures.

I’m not opposed to adding one – if there’s interest. I’d have to think about 
the best place to add it. The idea of making it its own test is interesting. It 
wouldn’t prevent you from getting other test data, but it would let you know 
you aren’t on the ideal version and there may be unpredictable results. Ponder 
ponder…

- Bret

From: Andrew Fish<mailto:af...@apple.com>
Sent: Monday, April 12, 2021 9:27 AM
To: edk2-devel-groups-io<mailto:devel@edk2.groups.io>; Bret 
Barkelew<mailto:bret.barke...@microsoft.com>
Cc: shivanshi.pan...@dell.com<mailto:shivanshi.pan...@dell.com>
Subject: Re: [EXTERNAL] [edk2-devel] Build Failed for QEMU35Pkg




On Apr 9, 2021, at 6:33 PM, Bret Barkelew via 
groups.io<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.io%2F=04%7C01%7Cbret.barkelew%40microsoft.com%7C6d96996208ff4e09af9b08d8fdcfe4ff%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637538416634242026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=2Q27KOA7lPRrGvoT9s%2FyZ2A3R4B897iBiDuCj3zH3IU%3D=0>
 
mailto:bret.barkelew=microsoft@groups.io>>
 wrote:

Andrew,
Not a scheme that I would consider a “good” scheme. You can see what we’re 
running CI against (in Mu and EDK, both), by checking for the  
“UsePythonVersion” command in the .azurepipelines/pr-gate-steps.yml file.


Bret,

If I understand correctly the CI list is the recommended versions, but not the 
required versions. Do we have any concept of the required versions? I guess we 
could put a python assert to enforce min Python version? I guess we could be 
more aggressive on the required Python version (forces people to install a 
custom Python version for the edk2 build), or build a CI test that tests the 
min Python version for the tools...

Sorry mostly thinking out loud….

Thanks,

Andrew Fish



Shivanshi,
I just ran a build on my system with that exact version of Python (3.9.0). Did 
your build produce a “BUILD_TOOLS_REPORT.json” file? If so, can you send it?
Can you also send the exact command that you’re running when you see this issue?

Thanks!

- Bret

From: Andrew Fish<mailto:af...@apple.com>
Sent: Friday, April 9, 2021 4:54 PM
To: edk2-devel-groups-io<mailto:devel@edk2.groups.io>; Bret 
Barkelew<mailto:bret.barke...@microsoft.com>
Cc: shivanshi.pan...@dell.com<mailto:shivanshi.pan...@dell.com>
Subject: [EXTERNAL] Re: [edk2-devel] Build Failed for QEMU35Pkg





On Apr 9, 2021, at 1:55 PM, Bret Barkelew via 
groups.io<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.io%2F=04%7C01%7Cbret.barkelew%40microsoft.com%7C6d96996208ff4e09af9b08d8fdcfe4ff%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637538416634251982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=TDUsg4PF7O202XD6JQKQbzSIUB5C9d%2BZWknajLWg2j0%3D=0>
 
mailto:bret.barkelew=microsoft@groups.io>>
 wrote:

It looks like a Python 3.8.x vs 3.9.x issue.


Do we have a scheme to require a min Python version?

Thanks,

Andrew Fish



It looks as if you’re using Mu Q35 as your platform. Can you tell me what 
branch you’re on?

- Bret

From: Pandya, Shivanshi via 
groups.io<mailto:Shivanshi.Pandya=dell@groups.io>
Sent: Friday, April 9, 2021 1:52 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: [EXTERNAL] [edk2-devel] Build Failed for QEMU35Pkg

Hello,

Build failed with following call trace

build.py...
INFO -  : error C0DE: Unknown fatal error when processing 
[c:\bea\dfci\mu_tiano_platforms\Common\PRM\PrmPkg\Library\DxePrmModuleDiscoveryLib\DxePrmModuleDiscoveryLib.inf
 [X64, VS2017, DEBUG]]
INFO -
INFO - (Please send email to devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
for help, attaching following call stack trace!)
INFO -
INFO - (Python 3.9.0 on win32) Traceback (most recent call last):
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\build\build.py",
 line 2635, in Main
INFO - MyBuild.Launch()
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\build\build.py",
 line 2430, in Launch
INFO - self._MultiThreadBuildPlatform()
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\build\build.py",
 line 2238, in _MultiThreadBuildPlatform
INFO - Wa, self.BuildModules = self.PerformAutoGen(BuildTarget,ToolChain)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\build\build.py",
 line 2112, in PerformAutoGen
INFO - CmdListDict = self._GenFfsCmd(Wa.ArchList)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\build\build.py",
 line 2009, in 

Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Initialize temp variable in VarCheckPolicyLib

2021-04-12 Thread Bret Barkelew via groups.io
Looks like we have the requisite approvals. Shall I create a PR?

- Bret

From: Wu, Hao A via groups.io
Sent: Sunday, April 11, 2021 7:23 PM
To: Bret Barkelew; 
devel@edk2.groups.io
Cc: Wang, Jian J
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Initialize 
temp variable in VarCheckPolicyLib

> -Original Message-
> From: Bret Barkelew 
> Sent: Saturday, April 10, 2021 2:25 AM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J ; Wu, Hao A 
> Subject: [PATCH v1 1/1] MdeModulePkg: Initialize temp variable in
> VarCheckPolicyLib
>
> DumpVariablePolicy() will return EFI_INVALID_PARAMETER if the Buffer
> pointer is NULL and the indirect Size is anything but 0. Since this TempSize
> was not being initialized it is very likely that this sequence would not 
> return
> the total buffer size as expected.
>
> Bugzilla: 
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3310data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cdd597013a0874fa676f708d8fd5a02e2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637537910324146700%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=qxCQ6vccJFzG8gH9qDBHD9xnl%2FCs3DdVUuMtHspanfY%3Dreserved=0
>
> Cc: Jian J Wang 
> Cc: Hao A Wu 
> Signed-off-by: Bret Barkelew 
> ---
>  MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c
> b/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c
> index 14e1904e96d3..e50edb4ffc5a 100644
> --- a/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c
> +++ b/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c
> @@ -216,6 +216,7 @@ VarCheckPolicyLibMmiHandler (
>  DumpParamsOut->TotalSize = 0;
>  DumpParamsOut->PageSize = 0;
>  DumpParamsOut->HasMore = FALSE;
> +TempSize = 0;
>  SubCommandStatus = DumpVariablePolicy (NULL, );


Reviewed-by: Hao A Wu 

Best Regards,
Hao Wu


>  if (SubCommandStatus == EFI_BUFFER_TOO_SMALL && TempSize > 0) {
>mCurrentPaginationCommand =
> VAR_CHECK_POLICY_COMMAND_DUMP;
> --
> 2.28.0.windows.1








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




Re: [EXTERNAL] Re: [edk2-devel] Build Failed for QEMU35Pkg

2021-04-09 Thread Bret Barkelew via groups.io
Andrew,
Not a scheme that I would consider a “good” scheme. You can see what we’re 
running CI against (in Mu and EDK, both), by checking for the  
“UsePythonVersion” command in the .azurepipelines/pr-gate-steps.yml file.

Shivanshi,
I just ran a build on my system with that exact version of Python (3.9.0). Did 
your build produce a “BUILD_TOOLS_REPORT.json” file? If so, can you send it?
Can you also send the exact command that you’re running when you see this issue?

Thanks!

- Bret

From: Andrew Fish<mailto:af...@apple.com>
Sent: Friday, April 9, 2021 4:54 PM
To: edk2-devel-groups-io<mailto:devel@edk2.groups.io>; Bret 
Barkelew<mailto:bret.barke...@microsoft.com>
Cc: shivanshi.pan...@dell.com<mailto:shivanshi.pan...@dell.com>
Subject: [EXTERNAL] Re: [edk2-devel] Build Failed for QEMU35Pkg




On Apr 9, 2021, at 1:55 PM, Bret Barkelew via 
groups.io<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.io%2F=04%7C01%7Cbret.barkelew%40microsoft.com%7Cc0c71205832e466e29c908d8fbb2bde2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637536092399309810%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=1%2FvcJqEl7TnYAHMADVwLYInwu9Ns2q63TLgQrA4WZ44%3D=0>
 
mailto:bret.barkelew=microsoft@groups.io>>
 wrote:

It looks like a Python 3.8.x vs 3.9.x issue.


Do we have a scheme to require a min Python version?

Thanks,

Andrew Fish


It looks as if you’re using Mu Q35 as your platform. Can you tell me what 
branch you’re on?

- Bret

From: Pandya, Shivanshi via 
groups.io<mailto:Shivanshi.Pandya=dell@groups.io>
Sent: Friday, April 9, 2021 1:52 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: [EXTERNAL] [edk2-devel] Build Failed for QEMU35Pkg

Hello,

Build failed with following call trace

build.py...
INFO -  : error C0DE: Unknown fatal error when processing 
[c:\bea\dfci\mu_tiano_platforms\Common\PRM\PrmPkg\Library\DxePrmModuleDiscoveryLib\DxePrmModuleDiscoveryLib.inf
 [X64, VS2017, DEBUG]]
INFO -
INFO - (Please send email to devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
for help, attaching following call stack trace!)
INFO -
INFO - (Python 3.9.0 on win32) Traceback (most recent call last):
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\build\build.py",
 line 2635, in Main
INFO - MyBuild.Launch()
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\build\build.py",
 line 2430, in Launch
INFO - self._MultiThreadBuildPlatform()
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\build\build.py",
 line 2238, in _MultiThreadBuildPlatform
INFO - Wa, self.BuildModules = self.PerformAutoGen(BuildTarget,ToolChain)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\build\build.py",
 line 2112, in PerformAutoGen
INFO - CmdListDict = self._GenFfsCmd(Wa.ArchList)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\build\build.py",
 line 2009, in _GenFfsCmd
INFO - GenFfsDict = GenFds.GenFfsMakefile('', GlobalData.gFdfParser, self, 
ArchList, GlobalData)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\GenFds\GenFds.py",
 line 541, in GenFfsMakefile
INFO - FdObj.GenFd(Flag=True)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\GenFds\Fd.py",
 line 131, in GenFd
INFO - RegionObj.AddToBuffer (FdBuffer, self.BaseAddress, 
self.BlockSizeList, self.ErasePolarity, GenFdsGlobalVariable.ImageBinDict, 
self.DefineVarDict, Flag=Flag)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\GenFds\Region.py",
 line 134, in AddToBuffer
INFO - FvObj.AddToBuffer(FvBuffer, FvBaseAddress, BlockSize, BlockNum, 
ErasePolarity, Flag=Flag)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\GenFds\Fv.py",
 line 127, in AddToBuffer
INFO - FileName = FfsFile.GenFfs(MacroDict, FvParentAddr=BaseAddress, 
IsMakefile=Flag, FvName=self.UiFvName)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\GenFds\FfsInfStatement.py",
 line 518, in GenFfs
INFO - InputSectList, InputSectAlignments = 
self.__GenComplexFileSection__(Rule, FvChildAddr, FvParentAddr, 
IsMakefile=IsMakefile)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\GenFds\FfsInfStatement.py",
 line 969, in __GenComplexFileSection__
INFO - SectList, Align = Sect.GenSection(self.OutputPath, self.ModuleGuid, 
SecIndex, self.KeyStringList, self, IsMakefile = IsMakefile)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\GenFds\EfiSection.py",
 line 218, in GenSection
INFO - GenFdsGlobalVariable.GenerateSectio

Re: [edk2-devel] Build Failed for QEMU35Pkg

2021-04-09 Thread Bret Barkelew via groups.io
It looks like a Python 3.8.x vs 3.9.x issue.

It looks as if you’re using Mu Q35 as your platform. Can you tell me what 
branch you’re on?

- Bret

From: Pandya, Shivanshi via 
groups.io
Sent: Friday, April 9, 2021 1:52 PM
To: devel@edk2.groups.io
Subject: [EXTERNAL] [edk2-devel] Build Failed for QEMU35Pkg

Hello,

Build failed with following call trace

build.py...
INFO -  : error C0DE: Unknown fatal error when processing 
[c:\bea\dfci\mu_tiano_platforms\Common\PRM\PrmPkg\Library\DxePrmModuleDiscoveryLib\DxePrmModuleDiscoveryLib.inf
 [X64, VS2017, DEBUG]]
INFO -
INFO - (Please send email to devel@edk2.groups.io for help, attaching following 
call stack trace!)
INFO -
INFO - (Python 3.9.0 on win32) Traceback (most recent call last):
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\build\build.py",
 line 2635, in Main
INFO - MyBuild.Launch()
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\build\build.py",
 line 2430, in Launch
INFO - self._MultiThreadBuildPlatform()
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\build\build.py",
 line 2238, in _MultiThreadBuildPlatform
INFO - Wa, self.BuildModules = self.PerformAutoGen(BuildTarget,ToolChain)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\build\build.py",
 line 2112, in PerformAutoGen
INFO - CmdListDict = self._GenFfsCmd(Wa.ArchList)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\build\build.py",
 line 2009, in _GenFfsCmd
INFO - GenFfsDict = GenFds.GenFfsMakefile('', GlobalData.gFdfParser, self, 
ArchList, GlobalData)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\GenFds\GenFds.py",
 line 541, in GenFfsMakefile
INFO - FdObj.GenFd(Flag=True)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\GenFds\Fd.py",
 line 131, in GenFd
INFO - RegionObj.AddToBuffer (FdBuffer, self.BaseAddress, 
self.BlockSizeList, self.ErasePolarity, GenFdsGlobalVariable.ImageBinDict, 
self.DefineVarDict, Flag=Flag)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\GenFds\Region.py",
 line 134, in AddToBuffer
INFO - FvObj.AddToBuffer(FvBuffer, FvBaseAddress, BlockSize, BlockNum, 
ErasePolarity, Flag=Flag)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\GenFds\Fv.py",
 line 127, in AddToBuffer
INFO - FileName = FfsFile.GenFfs(MacroDict, FvParentAddr=BaseAddress, 
IsMakefile=Flag, FvName=self.UiFvName)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\GenFds\FfsInfStatement.py",
 line 518, in GenFfs
INFO - InputSectList, InputSectAlignments = 
self.__GenComplexFileSection__(Rule, FvChildAddr, FvParentAddr, 
IsMakefile=IsMakefile)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\GenFds\FfsInfStatement.py",
 line 969, in __GenComplexFileSection__
INFO - SectList, Align = Sect.GenSection(self.OutputPath, self.ModuleGuid, 
SecIndex, self.KeyStringList, self, IsMakefile = IsMakefile)
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\GenFds\EfiSection.py",
 line 218, in GenSection
INFO - GenFdsGlobalVariable.GenerateSection(OutputFile, [], 
'EFI_SECTION_USER_INTERFACE',
INFO -   File 
"C:\BEA\DFCI\mu_tiano_platforms\MU_BASECORE\BaseTools\Source\Python\GenFds\GenFdsGlobalVariable.py",
 line 466, in GenerateSection
INFO - SectionData.fromstring(Ui.encode("utf_16_le"))
INFO - AttributeError: 'array.array' object has no attribute 'fromstring'

Kind Regards,
Shivanshi




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




Re: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Initialize temp variable in VarCheckPolicyLib

2021-04-09 Thread Bret Barkelew via groups.io
+ @Liming Gao<mailto:gaolim...@byosoft.com.cn>

- Bret

From: Bret Barkelew via groups.io<mailto:bret=corthon@groups.io>
Sent: Friday, April 9, 2021 11:25 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Jian J Wang<mailto:jian.j.w...@intel.com>; Hao A 
Wu<mailto:hao.a...@intel.com>
Subject: [EXTERNAL] [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Initialize temp 
variable in VarCheckPolicyLib

DumpVariablePolicy() will return EFI_INVALID_PARAMETER if the Buffer
pointer is NULL and the indirect Size is anything but 0. Since this
TempSize was not being initialized it is very likely that this sequence
would not return the total buffer size as expected.

Bugzilla: 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3310data=04%7C01%7CBret.Barkelew%40microsoft.com%7C3d2f574a01a048aed60708d8fb84dcbb%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637535895350828079%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=j6KmN6jcwoGJlunjspLawLJtYqCwGWw18pXNZVMNdC8%3Dreserved=0

Cc: Jian J Wang 
Cc: Hao A Wu 
Signed-off-by: Bret Barkelew 
---
 MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c 
b/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c
index 14e1904e96d3..e50edb4ffc5a 100644
--- a/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c
+++ b/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c
@@ -216,6 +216,7 @@ VarCheckPolicyLibMmiHandler (
 DumpParamsOut->TotalSize = 0;
 DumpParamsOut->PageSize = 0;
 DumpParamsOut->HasMore = FALSE;
+TempSize = 0;
 SubCommandStatus = DumpVariablePolicy (NULL, );
 if (SubCommandStatus == EFI_BUFFER_TOO_SMALL && TempSize > 0) {
   mCurrentPaginationCommand = VAR_CHECK_POLICY_COMMAND_DUMP;
--
2.28.0.windows.1








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




Re: [EXTERNAL] [edk2-devel] [PATCH 1/1] BaseTools/Ecc: Update structpcd parsing method.

2021-04-08 Thread Bret Barkelew via groups.io
Ah! Gotcha. I missed that this was specific to ECC. Thanks!

- Bret

From: Chen, Christine
Sent: Wednesday, April 7, 2021 6:42 PM
To: Bret Barkelew; 
devel@edk2.groups.io
Cc: Liang, MingyueX; Feng, Bob 
C; Liming Gao
Subject: RE: [EXTERNAL] [edk2-devel] [PATCH 1/1] BaseTools/Ecc: Update 
structpcd parsing method.


Hi Bret,



This patch adds the ECC check for structurePcd written in des/dsc file, as the 
origin check is only for non-structured Pcd.



Best Regards,

Yuwei (Christine)

From: Bret Barkelew 
Sent: Friday, April 2, 2021 12:43 AM
To: devel@edk2.groups.io; Chen, Christine 
Cc: Liang, MingyueX ; Feng, Bob C 
; Liming Gao 
Subject: RE: [EXTERNAL] [edk2-devel] [PATCH 1/1] BaseTools/Ecc: Update 
structpcd parsing method.

What does “update” mean in this context? What behavior is changing?

- Bret

From: Yuwei Chen via groups.io
Sent: Thursday, April 1, 2021 12:04 AM
To: devel@edk2.groups.io
Cc: mliang2x; Feng, Bob 
C; Liming Gao
Subject: [EXTERNAL] [edk2-devel] [PATCH 1/1] BaseTools/Ecc: Update structpcd 
parsing method.

From: mliang2x mailto:mingyuex.li...@intel.com>>

Update the pcdparser method in Dec and DSC files.

Signed-off-by: Mingyue Liang 
mailto:mingyuex.li...@intel.com>>
Cc: Bob Feng mailto:bob.c.f...@intel.com>>
Cc: Liming Gao mailto:gaolim...@byosoft.com.cn>>
Cc: Yuwei Chen mailto:yuwei.c...@intel.com>>
---
 .../Ecc/MetaFileWorkspace/MetaFileParser.py   | 464 ++
 1 file changed, 265 insertions(+), 199 deletions(-)

diff --git a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py 
b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
index 9c27c8e16a05..588d3dbe6ed5 100644
--- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
@@ -22,7 +22,7 @@ import Ecc.EccToolError as EccToolError
 from CommonDataClass.DataClass import *
 from Common.DataType import *
 from Common.StringUtils import *
-from Common.Misc import GuidStructureStringToGuidString, CheckPcdDatum, 
PathClass, AnalyzePcdData
+from Common.Misc import GuidStructureStringToGuidString, CheckPcdDatum, 
PathClass, AnalyzePcdData, AnalyzeDscPcd, AnalyzePcdExpression, 
ParseFieldValue, StructPattern
 from Common.Expression import *
 from CommonDataClass.Exceptions import *

@@ -31,6 +31,8 @@ from GenFds.FdfParser import FdfParser
 from Common.LongFilePathSupport import OpenLongFilePath as open
 from Common.LongFilePathSupport import CodecOpenLongFilePath

+CODEPattern = re.compile(r"{CODE\([a-fA-F0-9Xx\{\},\s]*\)}")
+
 ## A decorator used to parse macro definition
 def ParseMacro(Parser):
 def MacroParser(self):
@@ -174,6 +176,11 @@ class MetaFileParser(object):
 # UNI object and extra UNI object
 self._UniObj = None
 self._UniExtraObj = None
+# StructPcd var
+self._PcdCodeValue = ""
+self._PcdDataTypeCODE = False
+self._CurrentPcdName = ""
+self._GuidDict = {}  # for Parser PCD value {GUID(gTokeSpaceGuidName)}

 ## Store the parsed data in table
 def _Store(self, *Args):
@@ -395,6 +402,40 @@ class MetaFileParser(object):
 Macros.update(self._SectionsMacroDict[(self._SectionType, 
Scope1, Scope2)])
 return Macros

+def ProcessMultipleLineCODEValue(self, Content):
+CODEBegin = False
+CODELine = ""
+continuelinecount = 0
+newContent = []
+for Index in range(0, len(Content)):
+Line = Content[Index]
+if CODEBegin:
+CODELine = CODELine + Line
+continuelinecount +=1
+if ")}" in Line:
+newContent.append(CODELine)
+for _ in range(continuelinecount):
+newContent.append("")
+CODEBegin = False
+CODELine = ""
+continuelinecount = 0
+else:
+if not Line:
+newContent.append(Line)
+continue
+if "{CODE(" not in Line:
+newContent.append(Line)
+continue
+elif CODEPattern.findall(Line):
+newContent.append(Line)
+continue
+else:
+CODEBegin = True
+CODELine = Line
+
+return newContent
+
+
 _SectionParser  = {}
 Finished= property(_GetFinished, _SetFinished)
 _Macros = property(_GetMacros)
@@ -812,6 +853,8 @@ class DscParser(MetaFileParser):
 Content = 

Re: [EXTERNAL] Re: [edk2-devel] [GSoC proposal] Secure Image Loader

2021-04-06 Thread Bret Barkelew via groups.io
You’ve got my vote! This sounds amazing!

- Bret

From: Marvin Häuser via groups.io
Sent: Tuesday, April 6, 2021 3:10 AM
To: devel@edk2.groups.io; Desimone, Nathaniel 
L; Laszlo 
Ersek; Andrew Fish; Kinney, 
Michael D
Subject: [EXTERNAL] Re: [edk2-devel] [GSoC proposal] Secure Image Loader

Good day Nate,

Comments are inline.

Best regards,
Marvin

On 06.04.21 11:41, Nate DeSimone wrote:
> Hi Marvin,
>
> Great to meet you and welcome back! Glad you hear you are interested! 
> Completing a formal verification of a PE/COFF loader is certainly impressive. 
> Was this done with some sort of automated theorem proving? It would seem a 
> rather arduous task doing an inductive proof for an algorithm like that by 
> hand!

I would call it "semi-automated", a great deal of intermediate goals
(preconditions, postconditions, invariants, assertions, ...) were
required to show all interesting properties. But yes, the actual proof
steps are automated by common SMT solvers. It was done using the
AstraVer Toolset and ACSL, latter basically a language to express logic
statements with C-like syntax.

> I completely agree with you that getting a formally verified PE/COFF loader 
> into mainline is undoubtably valuable and would pay security dividends for 
> years to come.

I'm glad to hear that. :)

> Admittedly, this is an area of computer science that I don't have a great 
> deal of experience with. The furthest I have gone on this topic is writing 
> out proofs for simple algorithms on exams in my Algorithms class in college. 
> Regardless you have a much better idea of what the current status is of the 
> work that you and Vitaly have done. I guess my only question is do you think 
> there is sufficient work remaining to fill the 10 week GSoC development 
> window?

Please don't get me wrong, but I would be surprised if the UEFI
specification changes I'd like to discuss alone would be completed
within 10 weeks, let alone implementation throughout the codebase. While
I think the plain amount of code may be a bit less than say a
MinPlatform port, the changes are much deeper and require much more
caution to avoid regressions (e.g. by invalidating undocumented
assertions). This sadly is not a matter of just replacing the underlying
library implementation or "plug-in and play" at all. It furthermore
affects many parts of the stack, the core dispatchers used for all
platforms, image emulation (EBC), UEFI userland emulation (EmuPkg), and
so on. I was rather worried the scope is too broad time-wise, but it can
be narrowed/widened as you see fit really. This is one of *the* core
components used on millions of device, and many package maintainers need
to review and validate the changes, this must really be done right the
first try. :)

> Certainly we can use some of that time to perform the code reviews you 
> mention and write up formal ECRs for the UEFI spec changes that you believe 
> are needed.

I believed that was part of the workload, yes, but even without it I
think there is plenty to do.

> Thank you for sending the application and alerting us to the great work you 
> and Vitaly have done! I'll read your paper more closely and come back with 
> any questions I still have.

Thank you, I will gladly explain anything unclear. Just try to not give
Laszlo too many flashbacks. :)

>
> With Best Regards,
> Nate
>
>> -Original Message-
>> From: devel@edk2.groups.io  On Behalf Of Marvin
>> Häuser
>> Sent: Sunday, April 4, 2021 4:02 PM
>> To: devel@edk2.groups.io; Laszlo Ersek ; Andrew Fish
>> ; Kinney, Michael D 
>> Subject: [edk2-devel] [GSoC proposal] Secure Image Loader
>>
>> Good day everyone,
>>
>> I'll keep the introduction brief because I've been around for a while now. 
>> :) I'm
>> Marvin Häuser, a third-year Computer Science student from TU Kaiserslautern,
>> Germany. Late last year, my colleague Vitaly from ISP RAS and me introduced a
>> formally verified Image Loader for UEFI usage at ISP RAS Open[1] due to 
>> various
>> defects we outlined in the corresponding paper. Thank you once again Laszlo
>> for your *incredible* review work on the publication part.
>>
>> I now want to make an effort to mainline it, preferably as part of the 
>> current
>> Google Summer of Code event. To be clear, my internship at ISP RAS has
>> concluded, and while Vitaly will be available for design discussion, he has 
>> other
>> priorities at the moment and the practical part will be on me. I have 
>> previously
>> submitted a proposal via the GSoC website for your review.
>>
>> There are many things to consider:
>> 1. The Image Loader is a core component, and there needs to be a significant
>> level of quality and security assurance.
>> 2. Being consumed by many packages, the proposed patch set will take a lot of
>> time to review and 

Re: [edk2-devel] [edk2-platforms] [PATCH v2 0/4] Add Large Variable Libraries

2021-04-05 Thread Bret Barkelew via groups.io
Naïve question: if max variable size is not already configurable, why not just 
do that?

- Bret

From: Oram, Isaac W via groups.io
Sent: Monday, April 5, 2021 12:27 PM
To: Desimone, Nathaniel L; 
devel@edk2.groups.io
Cc: Chiu, Chasel; Liming 
Gao; Dong, Eric; 
Michael Kubacki
Subject: [EXTERNAL] Re: [edk2-devel] [edk2-platforms] [PATCH v2 0/4] Add Large 
Variable Libraries

Series Reviewed-by: Isaac Oram 

-Original Message-
From: Desimone, Nathaniel L 
Sent: Sunday, April 4, 2021 2:41 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Liming Gao 
; Dong, Eric ; Michael Kubacki 
; Oram, Isaac W 
Subject: [edk2-platforms] [PATCH v2 0/4] Add Large Variable Libraries

Changes from V1:
 - Changed prefix from "Min" to "VarLib"
 - Better comments
 - Added more whitespace for readability
 - Removed unused INF sections
 - Better debug messages

This patch series introduces libaries that enable large data sets to be stored 
using the UEFI Variable Services. At present, most UEFI Variable Services 
implementations have a maximum variable size of <=64KB. The exact value varies 
depending on platform.

These libaries enable a data set to use as much space as needed, up to the 
remaining space in the UEFI Variable non-volatile storage.

To implement this, I have broken the problem down into two parts:

 1. Phase angostic UEFI Variable access.
 2. Storage of data across multiple UEFI Variables.

For the first part, I have created two new LibraryClasses:
VariableReadLib and VariableWriteLib. I have provided implementation instances 
of VariableReadLib for PEI, DXE, and SMM.
For VariableWriteLib, I have provided implementation instances for DXE and SMM. 
This enables code that accesses UEFI variables to be written in a matter than 
is phase agnostic, so the same code can be used in PEI, DXE, or SMM without 
modification.

The second part involves another two new LibaryClasses:
LargeVariableReadLib and LargeVariableWriteLib. Only one BASE implementation is 
needed for both of these as the phase dependent code was seperated out in the 
first piece. These libraries provide logic to calculate the maximum size of an 
individual UEFI variable and split the data into as many smaller pieces as 
needed to store the entire data set in the UEFI Variable storage. They also 
provide the ability to stitch the data back together when it is read.
Deleting the data will delete all variables used to store it.

Cc: Chasel Chiu 
Cc: Liming Gao 
Cc: Eric Dong 
Cc: Michael Kubacki 
Cc: Isaac Oram 
Signed-off-by: Nate DeSimone 

Nate DeSimone (4):
  MinPlatformPkg: Add VariableReadLib
  MinPlatformPkg: Add VariableWriteLib
  MinPlatformPkg: Add LargeVariableReadLib
  MinPlatformPkg: Add LargeVariableWriteLib

 .../Include/Dsc/CoreCommonLib.dsc |   6 +-
 .../MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc |  12 +-
 .../MinPlatformPkg/Include/Dsc/CorePeiLib.dsc |   9 +-
 .../Include/Library/LargeVariableReadLib.h|  50 ++
 .../Include/Library/LargeVariableWriteLib.h   |  58 +++
 .../Include/Library/VariableReadLib.h |  87 
 .../Include/Library/VariableWriteLib.h| 129 +
 .../BaseLargeVariableReadLib.inf  |  44 ++
 .../LargeVariableReadLib.c| 199 
 .../BaseLargeVariableWriteLib.inf |  44 ++
 .../LargeVariableWriteLib.c   | 479 ++
 .../DxeRuntimeVariableReadLib.c   | 115 +
 .../DxeRuntimeVariableReadLib.inf |  41 ++
 .../DxeRuntimeVariableWriteLib.c  | 256 ++
 .../DxeRuntimeVariableWriteLib.inf|  49 ++
 .../PeiVariableReadLib/PeiVariableReadLib.c   | 153 ++
 .../PeiVariableReadLib/PeiVariableReadLib.inf |  42 ++
 .../SmmVariableReadCommon.c   | 114 +
 .../StandaloneMmVariableReadLib.inf   |  50 ++
 .../StandaloneMmVariableReadLibConstructor.c  |  48 ++
 .../TraditionalMmVariableReadLib.inf  |  49 ++
 .../TraditionalMmVariableReadLibConstructor.c |  48 ++
 .../SmmVariableWriteCommon.c  | 167 ++
 .../StandaloneMmVariableWriteLib.inf  |  45 ++
 .../StandaloneMmVariableWriteLibConstructor.c |  48 ++
 .../TraditionalMmVariableWriteLib.inf |  44 ++
 ...TraditionalMmVariableWriteLibConstructor.c |  48 ++
 .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |   4 +-
 28 files changed, 2428 insertions(+), 10 deletions(-)  create mode 100644 
Platform/Intel/MinPlatformPkg/Include/Library/LargeVariableReadLib.h
 create mode 100644 
Platform/Intel/MinPlatformPkg/Include/Library/LargeVariableWriteLib.h
 create mode 100644 
Platform/Intel/MinPlatformPkg/Include/Library/VariableReadLib.h
 create mode 100644 
Platform/Intel/MinPlatformPkg/Include/Library/VariableWriteLib.h
 create 

Re: [EXTERNAL] [edk2-devel] [PATCH 1/1] MdeModulePkg/BmpSupportLib: Allow BMP with extra data

2021-04-01 Thread Bret Barkelew via groups.io
I agree with the proposal for a deeper security review.

I also would suggest that we can provide tooling with BaseTools to check and/or 
correct the format of a BMP to match what the code expects (since there seems 
to be ambiguity in the spec/implementation). We’ve got a validator in Mu and 
would be happy to put together some patches to at least get this started for 
the community to hammer on.

- Bret

From: Gao, Zhichao via groups.io
Sent: Monday, March 29, 2021 6:35 PM
To: devel@edk2.groups.io; 
af...@apple.com; Laszlo Ersek
Cc: Jeff Brasen; Bret 
Barkelew; Wang, Jian 
J; Wu, Hao A; Yao, 
Jiewen; Liming 
Gao; Ni, Ray
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH 1/1] MdeModulePkg/BmpSupportLib: 
Allow BMP with extra data

The patch would let the BMP file that with a bunch of data pass the check, no 
matter the data is valid or not. Do we have other docs to descript which data 
is allowed and valid?

Correct the Cc mail address and invite more experts for security review.

Thanks,
Zhichao

From: devel@edk2.groups.io  On Behalf Of Andrew Fish via 
groups.io
Sent: Thursday, March 25, 2021 11:00 AM
To: edk2-devel-groups-io ; Laszlo Ersek 

Cc: Jeff Brasen ; bret.barke...@microsoft.com; Wang, Jian J 
; ao.a...@intel.com
Subject: Re: [EXTERNAL] [edk2-devel] [PATCH 1/1] MdeModulePkg/BmpSupportLib: 
Allow BMP with extra data



On Mar 24, 2021, at 11:26 AM, Laszlo Ersek 
mailto:ler...@redhat.com>> wrote:

On 03/24/21 16:25, Jeff Brasen wrote:
Some of the logo files we received for the group that makes our assets like 
this (not sure what tool they were created with) look like they pad the BMP 
size to 8 bytes.

TranslateBmpToGopBlt: invalid BmpImage...
  BmpHeader->Size: 0xE1038
  BmpHeader->ImageOffset: 0x36
  BmpImageSize: 0xE1038
  DataSize: 0xE1000
TranslateBmpToGopBlt: invalid BmpImage...
  BmpHeader->Size: 0x2A3038
  BmpHeader->ImageOffset: 0x36
  BmpImageSize: 0x2A3038
  DataSize: 0x2A3000
TranslateBmpToGopBlt: invalid BmpImage...
  BmpHeader->Size: 0x5EEC38
  BmpHeader->ImageOffset: 0x36
  BmpImageSize: 0x5EEC38
  DataSize: 0x5EEC00

So, each of these has 2 bytes of padding at the end of the file. We could write 
a tool that would do the same size recalculation in order to update the size in 
the header and remove the two bytes but it seems that this is a valid BMP file 
and it doesn't seem correct that UEFI is rejecting it. I can update the commit 
message with more context if needed as well.

If there's a spec describing the BMP format,

Yes and there are various flavors as at some point I had some graphics given to 
me in a format that did not work (I think it was BITMAPV4HEADER) :(.

https://en.wikipedia.org/wiki/BMP_file_format#cite_note-DIBhelp-5

edk2 supports ‘BM’ and the BITMAPINFOHEADER DIB. I seem to remember DIBs are 
defined by the size. So ‘BM' is a Microsoft Spec:
https://docs.microsoft.com/en-us/previous-versions/ms969901(v=msdn.10)?redirectedfrom=MSDN

The quote in that spec is:

The file extension of a Windows DIB file is BMP. The file consists of a 
BITMAPFILEHEADER structure followed by the DIB itself. Unfortunately, because 
the BITMAPFILEHEADER structure is never actually passed to the API, not every 
application that generates BMP files fills out the data structure carefully. To 
add to this confusion, the "proper" definition of the structure is at odds with 
the documentation. Properly, the data structure contains the following fields:

The explanation of size field is:
A DWORD that specifies the size of the file in bytes. The Microsoft Windows 
Software Development Kit (SDK) documentation claims otherwise. To be on the 
safe side, many applications calculate their own sizes for reading in a file.

I would say that is not exactly a ringing endorsement from a spec point of view 
on depending on that field. So 

Re: [EXTERNAL] [edk2-devel] [PATCH 1/1] BaseTools/Ecc: Update structpcd parsing method.

2021-04-01 Thread Bret Barkelew via groups.io
What does “update” mean in this context? What behavior is changing?

- Bret

From: Yuwei Chen via groups.io
Sent: Thursday, April 1, 2021 12:04 AM
To: devel@edk2.groups.io
Cc: mliang2x; Feng, Bob 
C; Liming Gao
Subject: [EXTERNAL] [edk2-devel] [PATCH 1/1] BaseTools/Ecc: Update structpcd 
parsing method.

From: mliang2x 

Update the pcdparser method in Dec and DSC files.

Signed-off-by: Mingyue Liang 
Cc: Bob Feng 
Cc: Liming Gao 
Cc: Yuwei Chen 
---
 .../Ecc/MetaFileWorkspace/MetaFileParser.py   | 464 ++
 1 file changed, 265 insertions(+), 199 deletions(-)

diff --git a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py 
b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
index 9c27c8e16a05..588d3dbe6ed5 100644
--- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
@@ -22,7 +22,7 @@ import Ecc.EccToolError as EccToolError
 from CommonDataClass.DataClass import *
 from Common.DataType import *
 from Common.StringUtils import *
-from Common.Misc import GuidStructureStringToGuidString, CheckPcdDatum, 
PathClass, AnalyzePcdData
+from Common.Misc import GuidStructureStringToGuidString, CheckPcdDatum, 
PathClass, AnalyzePcdData, AnalyzeDscPcd, AnalyzePcdExpression, 
ParseFieldValue, StructPattern
 from Common.Expression import *
 from CommonDataClass.Exceptions import *

@@ -31,6 +31,8 @@ from GenFds.FdfParser import FdfParser
 from Common.LongFilePathSupport import OpenLongFilePath as open
 from Common.LongFilePathSupport import CodecOpenLongFilePath

+CODEPattern = re.compile(r"{CODE\([a-fA-F0-9Xx\{\},\s]*\)}")
+
 ## A decorator used to parse macro definition
 def ParseMacro(Parser):
 def MacroParser(self):
@@ -174,6 +176,11 @@ class MetaFileParser(object):
 # UNI object and extra UNI object
 self._UniObj = None
 self._UniExtraObj = None
+# StructPcd var
+self._PcdCodeValue = ""
+self._PcdDataTypeCODE = False
+self._CurrentPcdName = ""
+self._GuidDict = {}  # for Parser PCD value {GUID(gTokeSpaceGuidName)}

 ## Store the parsed data in table
 def _Store(self, *Args):
@@ -395,6 +402,40 @@ class MetaFileParser(object):
 Macros.update(self._SectionsMacroDict[(self._SectionType, 
Scope1, Scope2)])
 return Macros

+def ProcessMultipleLineCODEValue(self, Content):
+CODEBegin = False
+CODELine = ""
+continuelinecount = 0
+newContent = []
+for Index in range(0, len(Content)):
+Line = Content[Index]
+if CODEBegin:
+CODELine = CODELine + Line
+continuelinecount +=1
+if ")}" in Line:
+newContent.append(CODELine)
+for _ in range(continuelinecount):
+newContent.append("")
+CODEBegin = False
+CODELine = ""
+continuelinecount = 0
+else:
+if not Line:
+newContent.append(Line)
+continue
+if "{CODE(" not in Line:
+newContent.append(Line)
+continue
+elif CODEPattern.findall(Line):
+newContent.append(Line)
+continue
+else:
+CODEBegin = True
+CODELine = Line
+
+return newContent
+
+
 _SectionParser  = {}
 Finished= property(_GetFinished, _SetFinished)
 _Macros = property(_GetMacros)
@@ -812,6 +853,8 @@ class DscParser(MetaFileParser):
 Content = open(str(self.MetaFile.Path), 'r').readlines()
 except:
 EdkLogger.error("Parser", FILE_READ_FAILURE, 
ExtraData=self.MetaFile)
+
+Content = self.ProcessMultipleLineCODEValue(Content)
 #
 # Insert a record for file
 #
@@ -1018,24 +1061,71 @@ class DscParser(MetaFileParser):
 #
 @ParseMacro
 def _PcdParser(self):
+if self._PcdDataTypeCODE:
+self._PcdCodeValue = self._PcdCodeValue + "\n " + self._CurrentLine
+if self._CurrentLine.endswith(")}"):
+self._CurrentLine = "|".join((self._CurrentPcdName, 
self._PcdCodeValue))
+self._PcdDataTypeCODE = False
+self._PcdCodeValue = ""
+else:
+self._ValueList = None
+return
 TokenList = GetSplitValueList(self._CurrentLine, TAB_VALUE_SPLIT, 1)
+self._CurrentPcdName = TokenList[0]
+if len(TokenList) == 2 and TokenList[1].strip().startswith("{CODE"):
+self._PcdDataTypeCODE = True
+self._PcdCodeValue = TokenList[1].strip()
+
+  

Re: [edk2-devel] GSoC 2021 (MinPlatform, Ext2, ACPICA, etc)

2021-03-28 Thread Bret Barkelew via groups.io
I agree that this does seem like a fun and useful project. Great to have you 
working with us, Pedro!

- Bret

From: Nate DeSimone via 
groups.io
Sent: Sunday, March 28, 2021 3:31 PM
To: Pedro Falcato; 
devel@edk2.groups.io
Subject: [EXTERNAL] Re: [edk2-devel] GSoC 2021 (MinPlatform, Ext2, ACPICA, etc)

Hi Pedro,

No problem, I’ve been really busy recently too . I definitely recommend 
setting up filtering rules for the edk2 mailing list(s) because there is a LOT 
of volume. Personally, set up my filter rules so that PATCH emails go in a 
separate folder, that makes the list much more readable.

For the Raspberry Pi… yeah it is more of a refactoring activity. For some of 
the other board ports it is more interesting. We already went over the x86 
board porting, which I think would be an interesting and unique project, the 
problem is finding a suitable board… and most x86 boards are expensive. The 
Qemu OpenBoard also has a bit more meat to it I think. Since it involves 
figuring out how to merge ArmVirtPkg and OvmfPkg in a way that makes sense, it 
probably involves building some new advanced features. I think it is possible 
to spice up the Raspberry Pi project a bit though. Maybe add support for the 
Raspberry Pi Zero? Right now we only support the Raspberry Pi 3 & 4.

The ext2/4 disk driver would certainly also be interesting! My understanding is 
that ext4 is pretty much the same filesystem as ext2, they just added some 
features on top of ext2. I took a quick peek and your boilerplate and it looks 
like a good start. The one thing you will have to be VERY careful about is 
keeping TianoCore GPL-free. You need to be very careful to not read a single 
line of Linux kernel source code. You can read the kernel’s ext2/3/4 
documentation but do NOT read the kernel’s source code. I think that should be 
doable since FreeBSD 12 (circa 2018) now has full read/write support for ext4 
in their ext2 driver and has had a GPL-free ext2 driver for quite some time 
(FreeBSD 9 circa 2012.) You are welcome to read (and even use) the FreeBSD 
source code (as long as it is newer than 2012 of course.) In your proposal, I 
would recommend you set an achievable target. Maybe promise read-only as a 
baseline success criteria and then make writing a stretch goal. I strongly 
prefer that everyone ends up with a successful project.

I do this this project would be useful. If full write support is achieved 
GPL-free, this driver could be integrated into the firmware distributed in OEM 
motherboards. This would make it really easy for us to boot Linux kernels 
directly from the UEFI boot manager, eliminating the need for GRUB and a 
separate EFI system partition for loading Linux.

Our disk I/O subsystem does not need to reach the performance level of an 
operating system. We usually only need to load a few MBs from disk before we 
handoff to the OS kernel. In general, UEFI is designed to favor simplicity over 
performance. The biggest bottleneck is the fact that UEFI uses exclusively 
polling I/O and does not have any interrupt handlers except for the timer 
interrupt. My guess is a disk cache is probably overkill because the filesystem 
driver is unlikely to be the bottleneck.

For comparison, currently our only filesystem driver is the FAT32 driver, and 
the FAT32 driver is definitely fast enough for our purposes. On an Intel Tiger 
Lake platform with the EFI System Partition stored on a NVMe SSD, it takes 60ms 
(milliseconds) to initialize the NVMe driver, enumerate the partition table, 
and mount the FAT32 filesystem. Out of that 60ms, only 1.4ms is directly 
consumed by the FAT32 driver, the rest of it is initialization of the lower 
level drivers. After initialization is complete, it takes the FAT32 driver 
3.5ms to load bootmgfw.efi from disk to memory. To put that into perspective, 
after bootmgfw.efi is loaded into memory it takes the DXE core 13.5ms to verify 
that the signature on the file is valid and was signed by a code signing 
certificate that is in the UEFI secure boot trusted certificate list as well as 
processing PE/COFF relocation fixups needed to execute the file.

Thinking about performance, bootmgfw.efi (the Windows boot manager) is a little 
over 1.5MB, so that works out to a disk I/O subsystem performance of roughly 
450MB/sec… while this is not the ~1000MB/sec you would expect from a high 
performance NVMe driver, it is still not bad considering it is being done using 
polling I/O and the EDK II NVMe driver doesn’t build the largest possible 
scatter gather list that the NVMe controller can handle.

If you look at all of this at the high level, we ended up spending 64ms on disk 
I/O, when the entire Tiger Lake UEFI firmware takes 1.74 sec to run. So, only 
~4% of the system boot time was spent on disk I/O, so right now the filesystem 
drivers are a small drop in the bucket of the overall 

Re: [EXTERNAL] Re: [edk2-devel] !!! DEPRECATED INTERFACE !!! VariableLockRequestToLock

2021-03-25 Thread Bret Barkelew via groups.io
Yes, this is expected behavior. The messages are to encourage code owners to 
move from using the VariableLockRequestToLock() interface to the VariablePolicy 
interface so that the RTL interface may be removed in the future.

The correct solution is to find the offending code and submit a patch that 
updates it to not use RTL. My guess is that this is the location that you’re 
hitting, if you’re using the edk2 BdsDxe:
https://github.com/tianocore/edk2/blob/4bf2a5b045ebf8b5e90d9210ad5190699bddb592/MdeModulePkg/Universal/BdsDxe/BdsEntry.c#L723

I can try to submit a patch next week (I’m slammed this week) to port this over 
to VariablePolicy.
Note, however, that the messages are not affecting the functionality. They’re 
purely nag messages.

- Bret

From: Laszlo Ersek
Sent: Thursday, March 25, 2021 12:04 PM
To: Bret Barkelew
Cc: devel@edk2.groups.io; 
m...@semihalf.com
Subject: [EXTERNAL] Re: [edk2-devel] !!! DEPRECATED INTERFACE !!! 
VariableLockRequestToLock

Hi Bret,

can you help Marcin please?

Thanks
Laszlo

On 03/25/21 10:19, Marcin Wojtas wrote:
> Hi,
>
> When booting the latest edk2 on Marvell SoCs I get a number of prints as
> below:
>
> !!! DEPRECATED INTERFACE !!! VariableLockRequestToLock() will go away soon!
> !!! DEPRECATED INTERFACE !!! Please move to use Variable Policy!
> !!! DEPRECATED INTERFACE !!! Variable: 8BE4DF61-93CA-11D2-AA0D-00E098032B8C
> PlatformLangCodes
> !!! DEPRECATED INTERFACE !!! VariableLockRequestToLock() will go away soon!
> !!! DEPRECATED INTERFACE !!! Please move to use Variable Policy!
> !!! DEPRECATED INTERFACE !!! Variable: 8BE4DF61-93CA-11D2-AA0D-00E098032B8C
> LangCodes
> ...
>
> I cleared variable storage, looked into code, compared VariablePolicy
> library resolution to other platforms (it looks the same and was updated
> along with all others in
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2-platforms%2Fcommit%2F8034e3b2ae9470adbdata=04%7C01%7Cbret.barkelew%40microsoft.com%7C98c3d9be0b2c4654874d08d8efc0cdb5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637522958656548916%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=mwHi%2BAwmh5rh%2BAfdXBBx0ZXobV1bT1%2Bsi8%2BpcLxVNsQ%3Dreserved=0),
>  but
> still don't see, how to get rid of those.
>
> Is it expected behavior? Any suggestions how to properly remove those
> messages?
>
> Best regards,
> Marcin
>
>
> 
>
>
>



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




Re: [edk2-devel] [EXTERNAL] [patch V2 27/29] UnitTestFrameworkPkg: Consume MdeLibs.dsc.inc for RegisterFilterLib

2021-03-25 Thread Bret Barkelew via groups.io
Thanks, Dandan!

Apologies if this has already been asked, but is this necessary because C 
doesn’t have any options for symbol namespacing?
In other words, would it be just as easy to do this with a new implementation 
of IoLib if we didn’t have to worry about the symbol collisions?

- Bret

From: Bi, Dandan
Sent: Monday, March 22, 2021 6:52 PM
To: Bret Barkelew; 
devel@edk2.groups.io
Cc: Kinney, Michael D; Sean 
Brogan
Subject: RE: [EXTERNAL] [patch V2 27/29] UnitTestFrameworkPkg: Consume 
MdeLibs.dsc.inc for RegisterFilterLib

Hi Bret,

Here is the branch and PR I just created for this change, please help review. 
Thanks.
https://github.com/dandanbi/edk2/tree/RegisterFilterLibV2
https://github.com/tianocore/edk2/pull/1509



Thanks,
Dandan

From: Bret Barkelew 
Sent: Tuesday, March 23, 2021 2:25 AM
To: Bi, Dandan ; devel@edk2.groups.io
Cc: Kinney, Michael D ; Sean Brogan 

Subject: RE: [EXTERNAL] [patch V2 27/29] UnitTestFrameworkPkg: Consume 
MdeLibs.dsc.inc for RegisterFilterLib

Is there a PR somewhere that has a branch with all these changes applied? I’d 
like to poke around a little.

Thanks!

- Bret

From: Dandan Bi
Sent: Monday, March 22, 2021 1:10 AM
To: devel@edk2.groups.io
Cc: Kinney, Michael D; Sean 
Brogan; Bret 
Barkelew
Subject: [EXTERNAL] [patch V2 27/29] UnitTestFrameworkPkg: Consume 
MdeLibs.dsc.inc for RegisterFilterLib

REF: 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3246data=04%7C01%7CBret.Barkelew%40microsoft.com%7C77dd99e3296941afb9b408d8ed09fd3c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637519974445661033%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=oDafPDNi1k2MRYGrp%2Frhy1dB43tk%2B0YwF8%2FxdLqBXt8%3Dreserved=0

MdeLibs.dsc.inc was added for some basic/default library
instances provided by MdePkg and RegisterFilterLibNull Library
was also added into it as the first version of MdeLibs.dsc.inc.

So update platform dsc to consume MdeLibs.dsc.inc for
RegisterFilterLibNull which will be consumed by IoLib and BaseLib.

Cc: Michael D Kinney 
mailto:michael.d.kin...@intel.com>>
Cc: Sean Brogan mailto:sean.bro...@microsoft.com>>
Cc: Bret Barkelew 
mailto:bret.barke...@microsoft.com>>
Signed-off-by: Dandan Bi mailto:dandan...@intel.com>>
---
 UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc 
b/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc
index 8adf690098..4adb98aff5 100644
--- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc
+++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc
@@ -1,14 +1,16 @@
 ## @file
 # UnitTestFrameworkPkg DSC include file for target based test DSC
 #
-# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##

 [LibraryClasses]
+  !include MdePkg/MdeLibs.dsc.inc
+
   #
   # Entry point
   #
   PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
   
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
--
2.18.0.windows.1




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#73288): https://edk2.groups.io/g/devel/message/73288
Mute This 

Re: [EXTERNAL] [edk2-devel] [PATCH 1/1] MdeModulePkg/BmpSupportLib: Allow BMP with extra data

2021-03-23 Thread Bret Barkelew via groups.io
Is this a *good* idea?

What is considered valid extra data? If it’s immaterial to the FW displaying 
the image, our policy has been to strip it off BEFORE adding it to the FW image.

- Bret

From: Jeff Brasen via groups.io
Sent: Tuesday, March 23, 2021 10:29 AM
To: devel@edk2.groups.io
Cc: jian.j.w...@intel.com; 
ao.a...@intel.com; Jeff 
Brasen
Subject: [EXTERNAL] [edk2-devel] [PATCH 1/1] MdeModulePkg/BmpSupportLib: Allow 
BMP with extra data

Add support for processing BMP data that contains extra data after the
image array, this data will not be parsed in anyway in the library but
images that contain this will not be rejected from processing.

---
 MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c 
b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
index 3ac31f6723d0..944d01fe7cdf 100644
--- a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
+++ b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
@@ -213,7 +213,7 @@ TranslateBmpToGopBlt (

   if ((BmpHeader->Size != BmpImageSize) ||
   (BmpHeader->Size < BmpHeader->ImageOffset) ||
-  (BmpHeader->Size - BmpHeader->ImageOffset != DataSize)) {
+  (BmpHeader->Size - BmpHeader->ImageOffset < DataSize)) {

 DEBUG ((DEBUG_ERROR, "TranslateBmpToGopBlt: invalid BmpImage... \n"));
 DEBUG ((DEBUG_ERROR, "   BmpHeader->Size: 0x%x\n", BmpHeader->Size));
--
2.25.1








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




Re: [edk2-devel] [EXTERNAL] [patch V2 27/29] UnitTestFrameworkPkg: Consume MdeLibs.dsc.inc for RegisterFilterLib

2021-03-22 Thread Bret Barkelew via groups.io
Is there a PR somewhere that has a branch with all these changes applied? I’d 
like to poke around a little.

Thanks!

- Bret

From: Dandan Bi
Sent: Monday, March 22, 2021 1:10 AM
To: devel@edk2.groups.io
Cc: Kinney, Michael D; Sean 
Brogan; Bret 
Barkelew
Subject: [EXTERNAL] [patch V2 27/29] UnitTestFrameworkPkg: Consume 
MdeLibs.dsc.inc for RegisterFilterLib

REF: 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3246data=04%7C01%7CBret.Barkelew%40microsoft.com%7C77dd99e3296941afb9b408d8ed09fd3c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637519974445661033%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=oDafPDNi1k2MRYGrp%2Frhy1dB43tk%2B0YwF8%2FxdLqBXt8%3Dreserved=0

MdeLibs.dsc.inc was added for some basic/default library
instances provided by MdePkg and RegisterFilterLibNull Library
was also added into it as the first version of MdeLibs.dsc.inc.

So update platform dsc to consume MdeLibs.dsc.inc for
RegisterFilterLibNull which will be consumed by IoLib and BaseLib.

Cc: Michael D Kinney 
Cc: Sean Brogan 
Cc: Bret Barkelew 
Signed-off-by: Dandan Bi 
---
 UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc 
b/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc
index 8adf690098..4adb98aff5 100644
--- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc
+++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc
@@ -1,14 +1,16 @@
 ## @file
 # UnitTestFrameworkPkg DSC include file for target based test DSC
 #
-# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##

 [LibraryClasses]
+  !include MdePkg/MdeLibs.dsc.inc
+
   #
   # Entry point
   #
   PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
   
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
--
2.18.0.windows.1



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




[edk2-devel] New Year, New PR Thread

2021-03-05 Thread Bret Barkelew via groups.io
Can we move to PRs yet? Maybe after the stabilization?

- Bret



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




Re: [EXTERNAL] Re: [edk2-devel] [PATCH v6 0/7] Add MmUnblockMemoryLib Interface and Usages

2021-03-05 Thread Bret Barkelew via groups.io
“I had to jump through hoops to collect the individual patches from my list 
folder”
Man, it’s almost like you had Outlook. *shudder*

- Bret

From: Laszlo Ersek via groups.io
Sent: Friday, March 5, 2021 7:28 AM
To: devel@edk2.groups.io; 
ku...@outlook.com
Cc: Kinney, Michael D; Liming 
Gao; Zhiguang 
Liu; Yao, Jiewen; 
Jian J Wang; Hao A Wu; 
Ard Biesheuvel; Jordan 
Justen; Qi Zhang; 
Rahul Kumar
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v6 0/7] Add MmUnblockMemoryLib 
Interface and Usages

On 03/05/21 05:59, Kun Qin wrote:
> Hi,
>
> Thanks to all the reviewers helping through this patch series. Each 
> individual patch has received reviewed-by tag in this v6 version. It has also 
> just passed all CI build tests here: Unblock mem v6 by kuqin12 · Pull Request 
> #1473 · tianocore/edk2 
> (github.com)
>  Could one of the maintainers help to merge these patches into the mainline 
> when you have a chance?
>
> Please let me know if there is anything needed from me to merge in these 
> patches. Thanks in advance!

(1) Series merged as commit range c5740f360636..59a3ccb09e7a, via
.


(2) I couldn't tell if there was a TianoCore BZ specifically associated
with this series. Some patches in the series do not reference any BZs,
while some other patches reference two different BZs, namely #3168 and
#3169.

Neither #3168 nor #3169 contains links to *all six* postings (versions)
of the patch series. So I can't decide if now, with the v6 series
merged, I should close these tickets, or not. (IOW, if other tasks
remain, for solving the BZs.)

In case the tickets should be closed at this point, please go ahead and
close them yourself, as RESOLVED|FIXED. Please also include a new
comment in each ticket, repeating my point (1) above, verbatim -- each
solved BZ should highlight the commit range and the pull request that
solved it.


(3) For the future, please fix up your email setup. I'm not sure what's
happening -- it looks like whatever SMTP server you use throws away the
Message-Id headers generated by git-send-email, and generates new
Message-Ids. Or something similar -- FWIW, the In-Reply-To headers look
questionable as well.

Whatever the background, the threading in your posted patch set is
broken; I had to jump through hoops to collect the individual patches
from my list folder. Please fix this issue for your next contribution.

Thanks,
Laszlo


>
> Regards,
> Kun
>
> From: Kun Qin
> Sent: Thursday, March 4, 2021 20:13
> To: devel@edk2.groups.io
> Cc: Michael D Kinney; Liming 
> Gao; Zhiguang 
> Liu; Jiewen Yao; 
> Jian J Wang; Hao A 
> Wu; Laszlo Ersek; Ard 
> Biesheuvel; Jordan 
> Justen; Qi 
> Zhang; Rahul Kumar
> Subject: [edk2-devel] [PATCH v6 0/7] Add MmUnblockMemoryLib Interface and 
> Usages
>
> This patch series is a follow up of previous submission:
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F72442data=04%7C01%7Cbret.barkelew%40microsoft.com%7C043a8827bad043bd7e9d08d8dfeb49ff%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637505548948688125%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=cNexu92PbyNbxrUN7l%2BdZqVcwfvHfKFohUuWPvO2Py4%3Dreserved=0
>
> v6 patches mainly focus on feedback for reviewed commits in v5 patches,
> including:
> a. Adding "Reviewed-by" and "Acked-by" tags for 

Re: [EXTERNAL] Re: [edk2-devel] generating the test matrix for local CI runs

2021-03-04 Thread Bret Barkelew via groups.io
Digging in even further, it looks like you’re asking about tests across test 
pipelines, including some of the platform pipelines. I don’t believe there’s a 
cohesive way to do that, as some of them require platform-specific parameters 
(such as the --FlashRom parameter for OvmfPkg).

Can you share the specific PR you’re failing so that we can talk in concrete 
terms?

My guess (from experience failing this myself) is that you are failing the 
spell check remotely and not running it locally (because Node, npm, or cspell 
are not installed). It’s possible that we should investigate documenting 
cross-pipeline and cross-package CI dependencies in a central place. Right now 
it’s distributed (e.g. did you follow the steps here: 
https://github.com/tianocore/edk2/tree/master/.pytool#spell-checking---cspell).

- Bret

From: Bret Barkelew via groups.io<mailto:bret.barkelew=microsoft@groups.io>
Sent: Thursday, March 4, 2021 10:22 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
rebe...@nuviainc.com<mailto:rebe...@nuviainc.com>; 
ler...@redhat.com<mailto:ler...@redhat.com>
Cc: Sean Brogan<mailto:sean.bro...@microsoft.com>; Kinney, Michael 
D<mailto:michael.d.kin...@intel.com>
Subject: Re: [EXTERNAL] Re: [edk2-devel] generating the test matrix for local 
CI runs

Thinking further, it will skip some tests if you haven’t installed the 
prerequisites (e.g. spell check). We could potentially add a single script to 
install the prerequisites, but then there are the prereqs for the prereqs (e.g. 
Node).

To more clearly address your question, the “tests” that a GitHub CI is broken 
up into are arbitrary subdivisions of the tests that run locally (when you run 
“stuart_ci_build” without parameters) so that the workload can be divided 
amongst the available worker agents. If you were to compare the individual test 
logs against your local, monolithic test log, you would find that all cases 
were covered in both (assuming the aforementioned prereqs are installed).

- Bret

From: Bret Barkelew via groups.io<mailto:bret.barkelew=microsoft@groups.io>
Sent: Thursday, March 4, 2021 9:57 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
rebe...@nuviainc.com<mailto:rebe...@nuviainc.com>; 
ler...@redhat.com<mailto:ler...@redhat.com>
Cc: Sean Brogan<mailto:sean.bro...@microsoft.com>; Kinney, Michael 
D<mailto:michael.d.kin...@intel.com>
Subject: Re: [EXTERNAL] Re: [edk2-devel] generating the test matrix for local 
CI runs

*An* answer is:
- There’s a DevOps virtual environment that you can run that will pretend to be 
a build agent. I played with it years ago, but that was before the CI tooling 
(and it was years ago) so I don’t know how the capabilities compare.

My real answer is:
- If you run the three commands -- setup, update, and build -- without any 
parameters other than your TOOL_CHAIN_TAG, it should run all tests on all 
packages for that particular OS/toolchain.

- Bret

From: Rebecca Cran via groups.io<mailto:rebecca=nuviainc@groups.io>
Sent: Thursday, March 4, 2021 9:45 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
ler...@redhat.com<mailto:ler...@redhat.com>
Cc: Sean Brogan<mailto:sean.bro...@microsoft.com>; Bret 
Barkelew<mailto:bret.barke...@microsoft.com>; Kinney, Michael 
D<mailto:michael.d.kin...@intel.com>
Subject: [EXTERNAL] Re: [edk2-devel] generating the test matrix for local CI 
runs

On 3/4/21 10:04 AM, Laszlo Ersek wrote:
> (Sigh, my address book pulled one over me -- resending to the correct
> list address now. Please ignore the previous posting that you may have
> gotten "in private".)
>
> Hi All,
>
> while I can run specific CI tests locally, using the commands listed at:
>
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Ftree%2Fmaster%2F.pytooldata=04%7C01%7Cbret.barkelew%40microsoft.com%7Ce4e5493578cf45b804c608d8df354b05%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637504767278995847%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=l8WblhD%2B7dpkFaCZ8roSfNUmj1imytHi5eUT%2F%2BKrLCo%3Dreserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Ftree%2Fmaster%2F.pytool=04%7C01%7CBret.Barkelew%40microsoft.com%7C17527a8762f346729ca508d8df3a3118%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637504789795390940%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=nKugKAbKDAjSZASwvAAnvDTvaev1IezlePOxvURGrF8%3D=0>
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Ftree%2Fmaster%2FArmVirtPkg%2FPlatformCIdata=04%7C01%7Cbret.barkelew%40microsoft.com%7Ce4e5493578cf45b804c608d8df354b05%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637504767278995847%7CUnknown%7CTWFpbGZsb

Re: [EXTERNAL] Re: [edk2-devel] generating the test matrix for local CI runs

2021-03-04 Thread Bret Barkelew via groups.io
Thinking further, it will skip some tests if you haven’t installed the 
prerequisites (e.g. spell check). We could potentially add a single script to 
install the prerequisites, but then there are the prereqs for the prereqs (e.g. 
Node).

To more clearly address your question, the “tests” that a GitHub CI is broken 
up into are arbitrary subdivisions of the tests that run locally (when you run 
“stuart_ci_build” without parameters) so that the workload can be divided 
amongst the available worker agents. If you were to compare the individual test 
logs against your local, monolithic test log, you would find that all cases 
were covered in both (assuming the aforementioned prereqs are installed).

- Bret

From: Bret Barkelew via groups.io<mailto:bret.barkelew=microsoft@groups.io>
Sent: Thursday, March 4, 2021 9:57 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
rebe...@nuviainc.com<mailto:rebe...@nuviainc.com>; 
ler...@redhat.com<mailto:ler...@redhat.com>
Cc: Sean Brogan<mailto:sean.bro...@microsoft.com>; Kinney, Michael 
D<mailto:michael.d.kin...@intel.com>
Subject: Re: [EXTERNAL] Re: [edk2-devel] generating the test matrix for local 
CI runs

*An* answer is:
- There’s a DevOps virtual environment that you can run that will pretend to be 
a build agent. I played with it years ago, but that was before the CI tooling 
(and it was years ago) so I don’t know how the capabilities compare.

My real answer is:
- If you run the three commands -- setup, update, and build -- without any 
parameters other than your TOOL_CHAIN_TAG, it should run all tests on all 
packages for that particular OS/toolchain.

- Bret

From: Rebecca Cran via groups.io<mailto:rebecca=nuviainc@groups.io>
Sent: Thursday, March 4, 2021 9:45 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
ler...@redhat.com<mailto:ler...@redhat.com>
Cc: Sean Brogan<mailto:sean.bro...@microsoft.com>; Bret 
Barkelew<mailto:bret.barke...@microsoft.com>; Kinney, Michael 
D<mailto:michael.d.kin...@intel.com>
Subject: [EXTERNAL] Re: [edk2-devel] generating the test matrix for local CI 
runs

On 3/4/21 10:04 AM, Laszlo Ersek wrote:
> (Sigh, my address book pulled one over me -- resending to the correct
> list address now. Please ignore the previous posting that you may have
> gotten "in private".)
>
> Hi All,
>
> while I can run specific CI tests locally, using the commands listed at:
>
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Ftree%2Fmaster%2F.pytooldata=04%7C01%7Cbret.barkelew%40microsoft.com%7Ce4e5493578cf45b804c608d8df354b05%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637504767278995847%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=l8WblhD%2B7dpkFaCZ8roSfNUmj1imytHi5eUT%2F%2BKrLCo%3Dreserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Ftree%2Fmaster%2F.pytool=04%7C01%7CBret.Barkelew%40microsoft.com%7C385eef1d988f4a56155a08d8df36ecce%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637504774296518259%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=UPVktVmDdChYhoc6zErhuz57Dllw21gqcwi9crhUdp8%3D=0>
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Ftree%2Fmaster%2FArmVirtPkg%2FPlatformCIdata=04%7C01%7Cbret.barkelew%40microsoft.com%7Ce4e5493578cf45b804c608d8df354b05%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637504767278995847%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=8yG7Mro9Li4XeCvfmPhfReBbipz47nyAjUmMKMGfh%2Bo%3Dreserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Ftree%2Fmaster%2FArmVirtPkg%2FPlatformCI=04%7C01%7CBret.Barkelew%40microsoft.com%7C385eef1d988f4a56155a08d8df36ecce%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637504774296518259%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=mcoSK9x7FSSJzlI86mdvs%2Btp7zdeF42IJn62mJxxozo%3D=0>
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Ftree%2Fmaster%2FOvmfPkg%2FPlatformCIdata=04%7C01%7Cbret.barkelew%40microsoft.com%7Ce4e5493578cf45b804c608d8df354b05%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637504767278995847%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=NUhAJ8zkITwPkvCrUqb7ZogSQTJuBXv0eL6Au0sYC2M%3Dreserved=0<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Ftree%2Fmaster%2FOvmfPkg%2FPlatformCI=04%7C01%7CBret.Barkelew%40microsoft.com%7C385eef1d988f4a56155a08d8df36ecce%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637504774296528219%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw

Re: [EXTERNAL] Re: [edk2-devel] generating the test matrix for local CI runs

2021-03-04 Thread Bret Barkelew via groups.io
*An* answer is:
- There’s a DevOps virtual environment that you can run that will pretend to be 
a build agent. I played with it years ago, but that was before the CI tooling 
(and it was years ago) so I don’t know how the capabilities compare.

My real answer is:
- If you run the three commands -- setup, update, and build -- without any 
parameters other than your TOOL_CHAIN_TAG, it should run all tests on all 
packages for that particular OS/toolchain.

- Bret

From: Rebecca Cran via groups.io
Sent: Thursday, March 4, 2021 9:45 AM
To: devel@edk2.groups.io; 
ler...@redhat.com
Cc: Sean Brogan; Bret 
Barkelew; Kinney, Michael 
D
Subject: [EXTERNAL] Re: [edk2-devel] generating the test matrix for local CI 
runs

On 3/4/21 10:04 AM, Laszlo Ersek wrote:
> (Sigh, my address book pulled one over me -- resending to the correct
> list address now. Please ignore the previous posting that you may have
> gotten "in private".)
>
> Hi All,
>
> while I can run specific CI tests locally, using the commands listed at:
>
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Ftree%2Fmaster%2F.pytooldata=04%7C01%7Cbret.barkelew%40microsoft.com%7Ce4e5493578cf45b804c608d8df354b05%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637504767278995847%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=l8WblhD%2B7dpkFaCZ8roSfNUmj1imytHi5eUT%2F%2BKrLCo%3Dreserved=0
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Ftree%2Fmaster%2FArmVirtPkg%2FPlatformCIdata=04%7C01%7Cbret.barkelew%40microsoft.com%7Ce4e5493578cf45b804c608d8df354b05%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637504767278995847%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=8yG7Mro9Li4XeCvfmPhfReBbipz47nyAjUmMKMGfh%2Bo%3Dreserved=0
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Ftree%2Fmaster%2FOvmfPkg%2FPlatformCIdata=04%7C01%7Cbret.barkelew%40microsoft.com%7Ce4e5493578cf45b804c608d8df354b05%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637504767278995847%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=NUhAJ8zkITwPkvCrUqb7ZogSQTJuBXv0eL6Au0sYC2M%3Dreserved=0
>
> I don't know how I can determine and drive the whole "test plan" locally.
>
> When I submit a PR to github, "something" generates (say) 83 test cases.
> How can I run that "something" locally?
>
> Assume I have the following:
> - a Linux builder VM, with up-to-date tools,
> - a Windows builder VM, with up-to-date tools,
> - a topic branch, on top of "master".
>
> How do I generate and run those same 83 tests, locally?
>
> It has happened to me that all my local CI steps succeeded (meaning both
> the Windows and the Linux builder), but github still rejected the PR --
> the reason was that I failed to think of a particular test that github
> would run. Composing 83 "stuart" command lines isn't something I'd like
> to do manually.

FWIW it looks like people have been looking for similar functionality of
testing a pipeline locally, and not found it.

e.g.:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fazure-pipelines-agent%2Fissues%2F1764data=04%7C01%7Cbret.barkelew%40microsoft.com%7Ce4e5493578cf45b804c608d8df354b05%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637504767278995847%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=XMxZesyKxVN9Wg3SyRpUbnnmKzojevHCqQhzQ1Pc4%2Bg%3Dreserved=0
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevelopercommunity.visualstudio.com%2Ft%2Fyaml-how-to-test-yaml-locally-before-commit%2F1302759data=04%7C01%7Cbret.barkelew%40microsoft.com%7Ce4e5493578cf45b804c608d8df354b05%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637504767278995847%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=gwGZAQJAIXIS0LODFpglrCf5Ua2JeMnNm3A3auCrhx8%3Dreserved=0

--
Rebecca Cran







-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72438): https://edk2.groups.io/g/devel/message/72438
Mute This Topic: https://groups.io/mt/81083112/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][RFC] SpiFlashCommonLib Refactor

2021-03-03 Thread Bret Barkelew via groups.io
Furthermore, is it the code that cannot cross the repo boundary, or the 
interface?
Is there any use in defining the interface at a lower level such as 
MdeModulePkg? Then a platform can consume the implementation from 
IntelSiliconPkg if it so chooses?

- Bret

From: Ni, Ray via groups.io
Sent: Wednesday, March 3, 2021 3:38 PM
To: Dong, Guo; Michael 
Kubacki; 
devel@edk2.groups.io
Cc: Chaganty, Rangasai V; Chiu, 
Chasel; Desimone, Nathaniel 
L; Luo, Heng; 
Agyeman, Prince; 
gaolim...@byosoft.com.cn; Dong, 
Eric
Subject: [EXTERNAL] Re: [edk2-devel] [edk2-platforms][RFC] SpiFlashCommonLib 
Refactor

Guo,
I understand your concern that UefiPayloadPkg should NOT use any components 
outside of edk2 repo (edk2-platform repo in this case).
If the two SPI drivers you are talking about are the same one, we could go back 
to put the driver to PcAtchipsetPkg.
Let's see what the driver contains and then decide where to put.

Thanks,
Ray

> -Original Message-
> From: Dong, Guo 
> Sent: Thursday, March 4, 2021 7:22 AM
> To: Michael Kubacki ; devel@edk2.groups.io; Ni, 
> Ray 
> Cc: Chaganty, Rangasai V ; Chiu, Chasel 
> ; Desimone, Nathaniel L
> ; Luo, Heng ; Agyeman, 
> Prince ;
> gaolim...@byosoft.com.cn; Dong, Eric 
> Subject: RE: [edk2-devel] [edk2-platforms][RFC] SpiFlashCommonLib Refactor
>
>
> Hi Michael,
>
> I didn't initiate any discussion on this yet. And I am not sure if this idea 
> could be accepted.
> From my view point, IntelSiliconPkg is a proper place for SPI flash library.
> But UefiPayloadPkg could not use that package since it is in another repo.
> Since these dependencies, you could go a head to put it into IntelSiliconPkg.
>
> Once I clean up my branch (expected complete next week), I could send my 
> patch for your
> reference so that we could at least share code if possible to reduce the code 
> maintenance.
>
> Thanks,
> Guo
>
> > -Original Message-
> > From: Michael Kubacki 
> > Sent: Wednesday, March 3, 2021 3:54 PM
> > To: devel@edk2.groups.io; Dong, Guo ; Ni, Ray
> > 
> > Cc: Chaganty, Rangasai V ; Chiu, Chasel
> > ; Desimone, Nathaniel L
> > ; Luo, Heng ;
> > Agyeman, Prince ; gaolim...@byosoft.com.cn;
> > Dong, Eric 
> > Subject: Re: [edk2-devel] [edk2-platforms][RFC] SpiFlashCommonLib
> > Refactor
> >
> > Hi Guo,
> >
> > That's good to hear.
> >
> > Does this new "common SPI flash library" and "SMM FVB driver" have
> > equivalent functionality to the instances being discussed here?
> >
> > For the platforms I have in mind, IntelSiliconPkg is an allowed
> > dependency whereas UefiPayloadPkg is not.
> >
> > I have begun the work (at low priority) discussed earlier in the thread,
> > please let me know if I should continue.
> >
> > Thanks,
> > Michael
> >
> > On 3/3/2021 1:58 PM, Guo Dong wrote:
> > >
> > > Hi Michael,
> > >
> > > We had created a common SPI flash library and a common SMM FVB driver
> > for all the platforms I have (including Apollo lake, Coffee lake, Kaby Lake,
> > Comet Lake, Tiger Lake, Elkhart Lake, etc.).  we plan to upstream this for 
> > UEFI
> > Payload.
> > > If this one could be upstream to UefiPayloadPkg, then each platform could
> > leverage it.
> > >
> > > BTW, together with this, we plan to upstream SMM support, secure boot
> > and measured boot for UEFI Payload.
> > > So we could use a single UEFI Payload with these advanced features  on
> > different platforms.
> > >
> > > Thanks,
> > > Guo
> > >
> > >
> > >> -Original Message-
> > >> From: Ni, Ray 
> > >> Sent: Monday, March 1, 2021 5:52 PM
> > >> To: Michael Kubacki ;
> > >> devel@edk2.groups.io
> > >> Cc: Chaganty, Rangasai V ; Chiu, Chasel
> > >> ; Desimone, Nathaniel L
> > >> ; Luo, Heng ;
> > >> Agyeman, Prince ;
> > gaolim...@byosoft.com.cn;
> > >> Dong, Eric ; Dong, Guo 
> > >> Subject: RE: [edk2-devel] [edk2-platforms][RFC] SpiFlashCommonLib
> > >> Refactor
> > >>
> > >> Michael,
> > >> I am good with that. I am also curious how you merge all the different 
> > >> SPI
> > >> flash implementation into one.
> > >>
> > >> Thanks,
> > >> Ray
> > >>
> > >>> -Original Message-
> > >>> From: Michael Kubacki 
> > >>> Sent: Tuesday, March 2, 2021 3:16 AM
> > >>> To: devel@edk2.groups.io; Ni, Ray 
> > >>> Cc: Chaganty, Rangasai V ; Chiu, Chasel
> > >> ; Desimone, Nathaniel L
> > >>> ; Luo, Heng ;
> > >> Agyeman, Prince ;
> > >>> gaolim...@byosoft.com.cn; Dong, Eric 
> > >>> Subject: Re: [edk2-devel] [edk2-platforms][RFC] SpiFlashCommonLib
> > >> Refactor
> > >>>
> > >>> Hi Ray,
> > >>>
> > >>> That sounds reasonable to me.
> > >>>
> > >>> I was attempting to preserve the design that isolates the
> > >>> silicon-specific logic to 

Re: [EXTERNAL] Re: 回复: [edk2-devel] Soft Feature Freeze starts now for edk2-stable202102

2021-03-01 Thread Bret Barkelew via groups.io
Did the NASM CI patch make it in? I never saw another response after v3.

- Bret

From: Laszlo Ersek via groups.io
Sent: Monday, March 1, 2021 7:29 AM
To: gaoliming; 
devel@edk2.groups.io; 
annou...@edk2.groups.io; 'Andrew 
Fish'; l...@nuviainc.com; 
Kinney, Michael D
Cc: 'Soumya Guptha'; Ni, 
Ray; w.sh...@intel.com; 
'Ming Huang'; Yao, 
Jiewen
Subject: [EXTERNAL] Re: 回复: [edk2-devel] Soft Feature Freeze starts now for 
edk2-stable202102

Hi Liming,

On 02/26/21 07:27, gaoliming wrote:
> Hi, Stewards and All:
>
>  So far, there are still three patch sets to be requested to catch this
> stable tag. They are bug fixes, and pass code review in soft feature freeze
> phase. Have you any comments for them?
>
>
>
> 1.  Fix two issue in ArmGicLib
> (https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F72175data=04%7C01%7Cbret.barkelew%40microsoft.com%7Ce5040db931b846722c3e08d8dcc6bb7d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637502093407405739%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=S%2FU2%2F2FBDDWs9T7gLK0vt7rcfiap1vD0LgR%2Flw55STA%3Dreserved=0)
>
> 2.  Fix CET shadow stack token busy bit clear issue
> (https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F71864data=04%7C01%7Cbret.barkelew%40microsoft.com%7Ce5040db931b846722c3e08d8dcc6bb7d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637502093407405739%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=bF9pY1HTiqIXCvps6Igp%2BAbZoBGd%2FiF5IDxOtvXd42k%3Dreserved=0)
>
> [Liming] this version uses DB for the instruction. BZ
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3227data=04%7C01%7Cbret.barkelew%40microsoft.com%7Ce5040db931b846722c3e08d8dcc6bb7d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637502093407405739%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=mhgx1IHCmtA6ro0SquHX5D4Hw2nKhw9QG7qbrb1S1J8%3Dreserved=0
>  is create for future
> enhancement.
>
> 3.  Use XADD to avoid lock acquire/release
> (https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F71516data=04%7C01%7Cbret.barkelew%40microsoft.com%7Ce5040db931b846722c3e08d8dcc6bb7d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637502093407405739%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=ZMO70jJEJEdXhxY71X5oQUoDFhb9b957%2BCVcc0od9cc%3Dreserved=0)

I agree that the first two patch sets are bugfixes, but I'm not entirely
convinced the third one is a bugfix as well -- it is a performance
optimization, to my understanding. Without that patch set, there is no
misbehavior, things are just slower.

The bugfixes can be merged of course; I wouldn't merge the 3rd series
however.

... I can see Ray pushed the first patch of the third series:


I disagree with that. Here's an excerpt from the commit message:

  With this patch, OVMF when running in a 255 threads QEMU spends about
  one second to wakeup all APs. Original implementation needs more than
  10 seconds.

I wouldn't call the pre-patch behavior a bug.

And the review for "[PATCH v3 1/4] UefiCpuPkg/MpInitLib: Use XADD to
avoid lock acquire/release" only arrived (from Mike) after the SFF, so I
don't think it should have been pushed.

On the other hand, I also won't ask for a revert.

Thanks
Laszlo


>
>
>
> Thanks
>
> Liming
>
> 发件人: bounce+27952+71922+4905953+8761...@groups.io
>  代表 gaoliming
> 发送时间: 2021年2月22日 16:23
> 收件人: devel@edk2.groups.io; annou...@edk2.groups.io
> 抄送: 'Andrew Fish' ; 'Laszlo Ersek' ;
> l...@nuviainc.com; 'Michael D Kinney' ; 'Soumya
> Guptha' 
> 主题: [edk2-devel] Soft Feature Freeze starts now for edk2-stable202102
>
>
>
> Hi, all
>
> We will enter into Soft Feature Freeze phase. In this phase, the feature
> under review will not be allowed to be merged. The feature passed review can
> still be merged.
>
>
>
> The patch review can continue without break in edk2 community. If the patch
> is sent before Soft Feature 

Re: [edk2-devel] TianoCore Community Meeting Minutes - 2/4

2021-02-05 Thread Bret Barkelew via groups.io
@Desimone, Nathaniel L, I’m interested 
in mentorship for the GSC project. Would like to talk offline about potential 
projects and past experience.

RE: ECC, we’re internally evaluating ‘uncrustify’ as an option to 1) check for 
formatting violations and 2) provide a tool to automatically format code prior 
to submission. There are changes that we’ve made to the tool to support ECC, 
but there are some small places that we’re coming up short. What would be the 
appetite to evaluate our progress and discuss possibly adjusting the ECC to be 
more flexible where we’ve come up short?

- Bret

From: Soumya Guptha via groups.io
Sent: Thursday, February 4, 2021 8:12 PM
To: annou...@edk2.groups.io; 
devel@edk2.groups.io
Subject: [EXTERNAL] Re: [edk2-announce] TianoCore Community Meeting Minutes - 
2/4

TianoCore Community Meeting Minutes (APAC/NMO)

February 4, 2021



EVENTS:

No new updates.



STABLE TAG:



edk2-stable202102 - Feature Planning freeze on 2/15

https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Ftianocore.github.io%2Fwiki%2FEDK-II-Release-Planningdata=04%7C01%7CBret.Barkelew%40microsoft.com%7Ca97d5c438d514d0859ea08d8c98c43a6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637480951557144463%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=UA13OI0UuZ2QSboHsE4dZY5J0Az1uL8Boxldw0jdtmU%3Dreserved=0





STEWARDS DOWNLOAD (Mike Kinney)

  *   Design meeting - we discussed on Automation & CI system.



  *   Community Action: Need help from the community on ECC tool (EFI code 
checker), we have critical issues, need help quickly.
 *   Kevin - will explore to see if someone has any expertise wrt ECC tool.



  *   Sean plans to send to the info to the community on the tool to help 
format the source code. Sean will send it to the mailing list.
Suggests making ECC smaller.



  *   Addressed all issues related to cmocka.



  *   Workflow for maintainers: some maintainers like to work on multiple pull 
requests, causing extra work, process issue. We are investigating on 
automation. Task is to Evaluate the automation feature and get feedback.



  *   Bugzilla Feature request - update on NASM compiler version will start 
now. This is not required by developers until after the Q1 stable tag.





Opens:

  1.  Nate - Google summer code (sponsored internship program run by google). 
Need some mentors to mentor the interns. Tianocore open source needs to apply. 
Application deadline Feb 19th. We need to develop interesting ideas for summer 
projects. Nate will start an offline thread to discuss ideas for projects. 
Couple of people have expressed some interest in becoming mentors.
Community Action: If you are interested in either mentoring or have a project 
idea, please send an email to (nathaniel.l.desim...@intel.com).



  1.  Sean - code contribution, project management - are we doing anything to 
improve.



Acknowledgments:

Community Action: Please send Soumya if you like to acknowledge anyone from the 
community, if anyone helped you close bugs or reviewed code etc..We will post 
those acknowledgements on the community page.



Soumya Guptha
Firmware Ecosystem Enabling Manager, SFP/IAGS












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




Re: [edk2-devel] [PATCH] MdePkg/Include: Add CET instructions to Nasm.inc

2021-01-29 Thread Bret Barkelew via groups.io
Agreed. Do we also want to go ahead and move the CI binary forward to get some 
hours on it?

- Bret

From: Michael D Kinney via 
groups.io
Sent: Friday, January 29, 2021 9:22 AM
To: Sheng, W; 
devel@edk2.groups.io; Kinney, Michael 
D
Cc: Liming Gao; Liu, 
Zhiguang; Yao, 
Jiewen
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH] MdePkg/Include: Add CET 
instructions to Nasm.inc

Sheng,

The following version of the NASM documentation shows support for these 
instructions.


https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fnasm.us%2Fdoc%2Fnasmdocb.htmldata=04%7C01%7CBret.Barkelew%40microsoft.com%7C64baec72ed934d46095808d8c47a7cfd%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637475377656169680%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=c5NkC4v46Pgx3Bu0KqiaM0RdQ%2FIjauW3hzzDQlfeyZg%3Dreserved=0

Do we need to increase the min NASM version requirements for EDK II to avoid 
adding macros with DB?

Thanks,

Mike

> -Original Message-
> From: Sheng, W 
> Sent: Thursday, January 28, 2021 6:35 PM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D ; Liming Gao 
> ; Liu, Zhiguang
> ; Yao, Jiewen 
> Subject: [PATCH] MdePkg/Include: Add CET instructions to Nasm.inc
>
> This is to add instruction SAVEPREVSSP, CLRSSBSY and RSTORSSP_RAX in Nasm,
> because these instructions are not supported yet.
>
> REF: 
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3192data=04%7C01%7CBret.Barkelew%40microsoft.com%7C64baec72ed934d46095808d8c47a7cfd%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637475377656169680%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=j3x2gnCcnx2E%2B8nuUrQJ7YPdWQbr4yI9yWlkFIiRrj4%3Dreserved=0
>
> Signed-off-by: Sheng Wei 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Zhiguang Liu 
> Cc: Jiewen Yao 
> ---
>  MdePkg/Include/Ia32/Nasm.inc | 14 +-
>  MdePkg/Include/X64/Nasm.inc  | 14 +-
>  2 files changed, 26 insertions(+), 2 deletions(-)
>
> diff --git a/MdePkg/Include/Ia32/Nasm.inc b/MdePkg/Include/Ia32/Nasm.inc
> index 31ce861f1e..9c1b7796ea 100644
> --- a/MdePkg/Include/Ia32/Nasm.inc
> +++ b/MdePkg/Include/Ia32/Nasm.inc
> @@ -1,6 +1,6 @@
>  
> ;--
>  ;
> -; Copyright (c) 2019, Intel Corporation. All rights reserved.
> +; Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
>  ; SPDX-License-Identifier: BSD-2-Clause-Patent
>  ;
>  ; Abstract:
> @@ -20,3 +20,15 @@
>  %macro INCSSP_EAX  0
>  DB 0xF3, 0x0F, 0xAE, 0xE8
>  %endmacro
> +
> +%macro SAVEPREVSSP 0
> +DB 0xF3, 0x0F, 0x01, 0xEA
> +%endmacro
> +
> +%macro CLRSSBSY_EAX0
> +DB 0x67, 0xF3, 0x0F, 0xAE, 0x30
> +%endmacro
> +
> +%macro RSTORSSP_EAX0
> +DB 0x67, 0xF3, 0x0F, 0x01, 0x28
> +%endmacro
> diff --git a/MdePkg/Include/X64/Nasm.inc b/MdePkg/Include/X64/Nasm.inc
> index 42412735ea..c5189982bb 100644
> --- a/MdePkg/Include/X64/Nasm.inc
> +++ b/MdePkg/Include/X64/Nasm.inc
> @@ -1,6 +1,6 @@
>  
> ;--
>  ;
> -; Copyright (c) 2019, Intel Corporation. All rights reserved.
> +; Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
>  ; SPDX-License-Identifier: BSD-2-Clause-Patent
>  ;
>  ; Abstract:
> @@ -20,3 +20,15 @@
>  %macro INCSSP_RAX  0
>  DB 0xF3, 0x48, 0x0F, 0xAE, 0xE8
>  %endmacro
> +
> +%macro SAVEPREVSSP 0
> +DB 0xF3, 0x0F, 0x01, 0xEA
> +%endmacro
> +
> +%macro CLRSSBSY_RAX0
> +DB 0xF3, 0x0F, 0xAE, 0x30
> +%endmacro
> +
> +%macro RSTORSSP_RAX0
> +DB 0xF3, 0x0F, 0x01, 0x28
> +%endmacro
> --
> 2.16.2.windows.1








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




Re: [EXTERNAL] Re: [edk2-devel] Spell check corrections, package by package

2021-01-27 Thread Bret Barkelew via groups.io
Noted. I’ll see what that looks like. Thanks!

- Bret

From: Laszlo Ersek
Sent: Wednesday, January 27, 2021 1:42 AM
To: devel@edk2.groups.io; Bret 
Barkelew
Subject: [EXTERNAL] Re: [edk2-devel] Spell check corrections, package by package

On 01/27/21 01:24, brbarkel via groups.io wrote:
> When we added the SpellCheck to CI, we intended to move through package by 
> package and turn on the PR gate checks (right now they're all in "audit 
> only"). To do this, we must first fix all the existing spelling errors and/or 
> update the ignore lists and dictionaries with expected terms.
>
> I would like to start this process so that we can get enforcement on in the 
> next couple of months. To pick a random package, I was going to start with 
> NetworkPkg. Before starting, I wanted to ask what the community would like to 
> see in terms of the number of patches and/or associated bugs. I'm comfortable 
> with whatever because I will likely automate the bug opening and patch 
> association (so beware if you want one bug per fix... there will be a LOT of 
> bugs).
>
> Thoughts?

One BZ for OvmfPkg should work, with one associated patch series for
OvmfPkg. Each patch in the OvmfPkg series should fix typos in a given
module (library or driver or application) in OvmfPkg.

Duplicate all of the above for ArmVirtPkg (one BZ, one series, one patch
per module).

Thanks!
Laszlo



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




Re: [EXTERNAL] [edk2-devel] building the shell for edk2-stable202102

2021-01-19 Thread Bret Barkelew via groups.io
We’ve definitely build release pipelines for binaries internally and would be 
happy to help with this.

I like the idea of kicking a new release after a release is tagged. Do you have 
any thoughts about how we’re possibly re-release if there were changes to one 
of the new stable/* branches, or would it be easier to just cross that bridge 
when we get there? Do you have opinions about Nuget vs other binary release 
mechanisms (our experience is with Nuget, but I know there are other feed types 
that we could publish to)? Ideally it would be something that could be 
authenticated or compared somehow.

- Bret

From: Laszlo Ersek via groups.io
Sent: Tuesday, January 19, 2021 11:30 AM
To: Liming Gao (Byosoft address); Leif 
Lindholm (Nuvia address); Ard Biesheuvel 
(TianoCore); Ni, 
Ray; Zhichao Gao; Abner 
Chang
Cc: edk2-devel-groups-io
Subject: [EXTERNAL] [edk2-devel] building the shell for edk2-stable202102

Ouch, I totally forgot to add the mailing list to the address list!
Doing that now. Apologies.

--o--

Hi All,

we've last built the UEFI shell binary for edk2-stable202002 (i.e.,
almost 1 year ago):

  
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Freleases%2Ftag%2Fedk2-stable202002data=04%7C01%7Cbret.barkelew%40microsoft.com%7C8e0e9a9a97be429c1b6c08d8bcb0bcb0%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637466814561378976%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=ObFHM4vr8SuNSLwSwBD95qIvZjt7wRCA54xinkWZeLY%3Dreserved=0

Note "ShellBinPkg.zip" under Assets -- there is no stable tag that is
(a) more recent and (b) whose Assets contain "ShellBinPkg.zip".

Contents:

> Archive:  ShellBinPkg.zip
>   Length  DateTimeName
> -  -- -   
> 0  03-06-2020 22:43   ShellBinPkg/MinUefiShell/
> 0  03-06-2020 22:41   ShellBinPkg/MinUefiShell/AArch64/
>380928  03-06-2020 17:39   ShellBinPkg/MinUefiShell/AArch64/Shell.efi
> 0  03-06-2020 22:41   ShellBinPkg/MinUefiShell/Arm/
>321568  03-06-2020 17:38   ShellBinPkg/MinUefiShell/Arm/Shell.efi
> 0  03-05-2020 09:01   ShellBinPkg/MinUefiShell/Ia32/
>339424  03-05-2020 09:01   ShellBinPkg/MinUefiShell/Ia32/Shell.efi
>   643  03-06-2020 22:43   ShellBinPkg/MinUefiShell/MinUefiShell.inf
> 0  03-05-2020 09:01   ShellBinPkg/MinUefiShell/X64/
>392352  03-05-2020 09:01   ShellBinPkg/MinUefiShell/X64/Shell.efi
> 0  03-06-2020 22:43   ShellBinPkg/UefiShell/
> 0  03-06-2020 22:41   ShellBinPkg/UefiShell/AArch64/
>892928  03-06-2020 17:40   ShellBinPkg/UefiShell/AArch64/Shell.efi
> 0  03-06-2020 22:41   ShellBinPkg/UefiShell/Arm/
>791360  03-06-2020 17:39   ShellBinPkg/UefiShell/Arm/Shell.efi
> 0  03-05-2020 09:01   ShellBinPkg/UefiShell/Ia32/
>825184  03-05-2020 09:00   ShellBinPkg/UefiShell/Ia32/Shell.efi
>   643  03-06-2020 22:43   ShellBinPkg/UefiShell/UefiShell.inf
> 0  03-05-2020 09:01   ShellBinPkg/UefiShell/X64/
>939648  03-05-2020 09:01   ShellBinPkg/UefiShell/X64/Shell.efi
> 0  03-06-2020 22:40   ShellBinPkg/
> - ---
>   4884678 21 files

I propose that we rebuild the shell for edk2-stable202102. Reasons:

(1) There are two small shell features minimally in the latest
development cycle:


https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Ftianocore.github.io%2Fwiki%2FEDK-II-Release-Planningdata=04%7C01%7Cbret.barkelew%40microsoft.com%7C8e0e9a9a97be429c1b6c08d8bcb0bcb0%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637466814561378976%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=sH5nHKgFwcykHgNKm6Nu2esq05F1dKt3t%2BEncNyRap8%3Dreserved=0

* add file buffering to the UEFI shell's COMP command

https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3123data=04%7C01%7Cbret.barkelew%40microsoft.com%7C8e0e9a9a97be429c1b6c08d8bcb0bcb0%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637466814561378976%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=Po1VBWyzo7YPioV1FUJZ2t1rB%2FhwgoofX8EH9YKJPBc%3Dreserved=0

* Shell: pathname / filename sorting


Re: [EXTERNAL] [edk2-devel] [PATCH v5 14/15] .python/SpellCheck: Add 'XIPFLAGS' to "words" section

2020-10-06 Thread Bret Barkelew via groups.io
If it’s only used in that package, I would suggest adding it to the 
CryptoPkg.ci.yaml file instead. If it’s likely to be used in multiple packages, 
the current patch looks good.

- Bret

From: Sami Mujawar
Sent: Tuesday, October 6, 2020 12:58 AM
To: Bret Barkelew; 
devel@edk2.groups.io
Cc: Ard Biesheuvel; 
l...@nuviainc.com; 
ler...@redhat.com; Matteo 
Carlini; Ben 
Adderson; nd
Subject: RE: [EXTERNAL] [edk2-devel] [PATCH v5 14/15] .python/SpellCheck: Add 
'XIPFLAGS' to "words" section

Hi Bret,

Please find my response inline marked [SAMI].

Regards,

Sami Mujawar

From: Bret Barkelew 
Sent: 05 October 2020 09:51 PM
To: devel@edk2.groups.io; Sami Mujawar 
Cc: Sami Mujawar ; Ard Biesheuvel 
; l...@nuviainc.com; ler...@redhat.com; Matteo Carlini 
; Ben Adderson ; nd 
Subject: RE: [EXTERNAL] [edk2-devel] [PATCH v5 14/15] .python/SpellCheck: Add 
'XIPFLAGS' to "words" section

I’m assuming this is used across multiple packages?
[SAMI] This flag is also used in CryptoPkg\Library\OpensslLib. [/SAMI]

If so,

Reviewed-by: Bret Barkelew 
mailto:bret.barke...@microsoft.com>>

- Bret

From: Sami Mujawar via groups.io
Sent: Friday, October 2, 2020 2:14 PM
To: devel@edk2.groups.io
Cc: Sami Mujawar; 
ard.biesheu...@arm.com; 
l...@nuviainc.com; 
ler...@redhat.com; 
matteo.carl...@arm.com; 
ben.adder...@arm.com; 
n...@arm.com
Subject: [EXTERNAL] [edk2-devel] [PATCH v5 14/15] .python/SpellCheck: Add 
'XIPFLAGS' to "words" section

The EDKII Core CI reports spelling error for XIPFLAGS. The
XIPFLAGS are typically used to specify XIP options to the
compiler. e.g. GCC:*_*_*_CC_XIPFLAGS = -fno-jump-tables

Add 'XIPFLAGS' to "words" section in cspell.base.yaml file
to avoid spelling check error.

Signed-off-by: Sami Mujawar mailto:sami.muja...@arm.com>>
Acked-by: Ard Biesheuvel mailto:ard.biesheu...@arm.com>>
---

Notes:
v5:
 - No code changes, resending patch with v5 series.   [Sami]
   Ref: 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F62162data=02%7C01%7CBret.Barkelew%40microsoft.com%7C09b7528fca35489670af08d867182f71%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637372700863446978sdata=VZm3wyCHnm9oV1HTuripLVGwPxvrLtmuXTDJk68ueCo%3Dreserved=0

 .pytool/Plugin/SpellCheck/cspell.base.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.pytool/Plugin/SpellCheck/cspell.base.yaml 
b/.pytool/Plugin/SpellCheck/cspell.base.yaml
index 
1ce5f6991104b83e41e769299b23cb3fa74c46e9..ad6f7ac06ad18efcd4ab9c2346356dfd6885d827
 100644
--- a/.pytool/Plugin/SpellCheck/cspell.base.yaml
+++ b/.pytool/Plugin/SpellCheck/cspell.base.yaml
@@ -178,5 +178,6 @@
 "vcruntimed",
 "ucrtd",
 "msvcrtd",
+"XIPFLAGS"
 ]
 }
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'








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




Re: [EXTERNAL] [edk2-devel] fatal error edk2

2020-10-06 Thread Bret Barkelew via groups.io
Well… does that include file exist under one of those directories? 

- Bret

From: Vicente Cortes via groups.io
Sent: Tuesday, October 6, 2020 8:21 AM
To: devel@edk2.groups.io
Subject: [EXTERNAL] [edk2-devel] fatal error edk2

(Python 3.9.0 on win32) Traceback (most recent call last):
  File 
"C:\Users\Vicente\Documents\hackervicente\edk2-pixel3-master\edk2\BaseTools\Source\Python\build\build.py",
 line 2635, in Main
MyBuild.Launch()
  File 
"C:\Users\Vicente\Documents\hackervicente\edk2-pixel3-master\edk2\BaseTools\Source\Python\build\build.py",
 line 2430, in Launch
self._MultiThreadBuildPlatform()
  File 
"C:\Users\Vicente\Documents\hackervicente\edk2-pixel3-master\edk2\BaseTools\Source\Python\build\build.py",
 line 2238, in _MultiThreadBuildPlatform
Wa, self.BuildModules = self.PerformAutoGen(BuildTarget,ToolChain)
  File 
"C:\Users\Vicente\Documents\hackervicente\edk2-pixel3-master\edk2\BaseTools\Source\Python\build\build.py",
 line 2087, in PerformAutoGen
Wa = WorkspaceAutoGen(
  File 
"C:\Users\Vicente\Documents\hackervicente\edk2-pixel3-master\edk2\BaseTools\Source\Python\AutoGen\WorkspaceAutoGen.py",
 line 43, in __init__
self._InitWorker(Workspace, MetaFile, Target, Toolchain, Arch, *args, 
**kwargs)
  File 
"C:\Users\Vicente\Documents\hackervicente\edk2-pixel3-master\edk2\BaseTools\Source\Python\AutoGen\WorkspaceAutoGen.py",
 line 116, in _InitWorker
self.ProcessModuleFromPdf()
  File 
"C:\Users\Vicente\Documents\hackervicente\edk2-pixel3-master\edk2\BaseTools\Source\Python\AutoGen\WorkspaceAutoGen.py",
 line 212, in ProcessModuleFromPdf
if self.FdfProfile:
  File 
"C:\Users\Vicente\Documents\hackervicente\edk2-pixel3-master\edk2\BaseTools\Source\Python\Common\caching.py",
 line 28, in __get__
Value = obj.__dict__[self._function.__name__] = self._function(obj)
  File 
"C:\Users\Vicente\Documents\hackervicente\edk2-pixel3-master\edk2\BaseTools\Source\Python\AutoGen\WorkspaceAutoGen.py",
 line 188, in FdfProfile
Fdf.ParseFile()
  File 
"C:\Users\Vicente\Documents\hackervicente\edk2-pixel3-master\edk2\BaseTools\Source\Python\GenFds\FdfParser.py",
 line 1314, in ParseFile
self.Preprocess()
  File 
"C:\Users\Vicente\Documents\hackervicente\edk2-pixel3-master\edk2\BaseTools\Source\Python\GenFds\FdfParser.py",
 line 1293, in Preprocess
self.PreprocessIncludeFile()
  File 
"C:\Users\Vicente\Documents\hackervicente\edk2-pixel3-master\edk2\BaseTools\Source\Python\GenFds\FdfParser.py",
 line 624, in PreprocessIncludeFile
raise Warning("The include file does not exist under below directories: 
\n%s\n%s\n%s\n"%(os.path.dirname(self.FileName), PlatformDir, 
GlobalData.gWorkspace),
GenFds.FdfParser.Warning: The include file does not exist under below 
directories:
C:\Users\Vicente\Documents\hackervicente\edk2-pixel3-master\Pixel3XL
C:\Users\Vicente\Documents\hackervicente\edk2-pixel3-master\Pixel3XL
c:\users\vicente\documents\hackervicente\edk2-pixel3-master\edk2
 near line 243, column 10: Pixel3XL/CommonFdf.fdf.inc




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




Re: [EXTERNAL] [edk2-devel] VSCode EDK II Syntax Highlighting

2020-10-05 Thread Bret Barkelew via groups.io
Some members of our team were writing one at one point in conjunction with 
Surface. I don’t know if it ever saw the light of day, but Matthew might be 
able to clean it up for release if the community were interested.

- Bret

From: Nate DeSimone via 
groups.io
Sent: Monday, October 5, 2020 5:36 PM
To: devel@edk2.groups.io
Subject: [EXTERNAL] [edk2-devel] VSCode EDK II Syntax Highlighting

Hi Everyone,

I just noticed that there is a vscode extension for adding syntax highlighting 
to DEC/DSC/FDF/INF/UNI/VFR files:

https://marketplace.visualstudio.com/items?itemName=walonli.edk2-vscode

Along with the following:

https://marketplace.visualstudio.com/items?itemName=Thog.vscode-asl
https://marketplace.visualstudio.com/items?itemName=13xforever.language-x86-64-assembly

If you happen to be using vscode there is actually decent syntax highlighting 
for all the file types we work with now!

Thanks,
Nate




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




Re: [EXTERNAL] [edk2-devel] [PATCH v5 14/15] .python/SpellCheck: Add 'XIPFLAGS' to "words" section

2020-10-05 Thread Bret Barkelew via groups.io
I’m assuming this is used across multiple packages?

If so,

Reviewed-by: Bret Barkelew 

- Bret

From: Sami Mujawar via groups.io
Sent: Friday, October 2, 2020 2:14 PM
To: devel@edk2.groups.io
Cc: Sami Mujawar; 
ard.biesheu...@arm.com; 
l...@nuviainc.com; 
ler...@redhat.com; 
matteo.carl...@arm.com; 
ben.adder...@arm.com; 
n...@arm.com
Subject: [EXTERNAL] [edk2-devel] [PATCH v5 14/15] .python/SpellCheck: Add 
'XIPFLAGS' to "words" section

The EDKII Core CI reports spelling error for XIPFLAGS. The
XIPFLAGS are typically used to specify XIP options to the
compiler. e.g. GCC:*_*_*_CC_XIPFLAGS = -fno-jump-tables

Add 'XIPFLAGS' to "words" section in cspell.base.yaml file
to avoid spelling check error.

Signed-off-by: Sami Mujawar 
Acked-by: Ard Biesheuvel 
---

Notes:
v5:
 - No code changes, resending patch with v5 series.   [Sami]
   Ref: 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F62162data=02%7C01%7CBret.Barkelew%40microsoft.com%7C09b7528fca35489670af08d867182f71%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637372700863446978sdata=VZm3wyCHnm9oV1HTuripLVGwPxvrLtmuXTDJk68ueCo%3Dreserved=0

 .pytool/Plugin/SpellCheck/cspell.base.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.pytool/Plugin/SpellCheck/cspell.base.yaml 
b/.pytool/Plugin/SpellCheck/cspell.base.yaml
index 
1ce5f6991104b83e41e769299b23cb3fa74c46e9..ad6f7ac06ad18efcd4ab9c2346356dfd6885d827
 100644
--- a/.pytool/Plugin/SpellCheck/cspell.base.yaml
+++ b/.pytool/Plugin/SpellCheck/cspell.base.yaml
@@ -178,5 +178,6 @@
 "vcruntimed",
 "ucrtd",
 "msvcrtd",
+"XIPFLAGS"
 ]
 }
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'








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




Re: [edk2-devel] [RFC] Request to move MinPlatformPkg out of the Intel folder

2020-10-05 Thread Bret Barkelew via groups.io
I think that to support anything larger that proofs of concept – in other 
words, to support the actual platforms that we WANT to consume this trusted, 
common code – we already have to support recursive submodules.

Our team HIGHLY recommends that platforms submodule edk2 rather than forking 
it, which means (for most) that they are already invested in repo management 
tooling of one form or another.

Perhaps this is the time we get EdkRepo and Stuart to join forces and become 
the one-true-repo-management solution for EDK.

Or we could all move to Rust and start complaining about Cargo immediately. 

- Bret

From: Nate DeSimone via 
groups.io
Sent: Sunday, October 4, 2020 2:02 PM
To: devel@edk2.groups.io; 
spbro...@outlook.com; 
r...@edk2.groups.io
Cc: Leif Lindholm; Laszlo 
Ersek; Ard Biesheuvel; 
Kirkendall, Garrett; Lendacky, 
Thomas; 
thomas.abra...@arm.com; 
frank@dell.com; Jim 
Dailey; Abner Chang; 
Wang, Sunny (HPS SW); Daniel 
Schaefer; Liming 
Gao; Tim Lewis; 
Kevin D Davis; Felix 
Polyudov; Kinney, Michael 
D; Oram, Isaac 
W; Ni, Ray
Subject: [EXTERNAL] Re: [edk2-devel] [RFC] Request to move MinPlatformPkg out 
of the Intel folder

Hey Sean,

On 10/2/20, 8:37 PM, Sean  wrote:
> I could imagine a path where edk2-platforms starts using submodules (or
> something with similar properties) and then pulls in the "new"
> MinPlatform repo.

IMHO I'm starting to get annoyed at the number of submodules in edk2 at this 
point. It's getting to the point that we are in danger of needing recursive 
submodule clones, which are a huge PITA for anyone not using either stuart or 
EdkRepo. I'd rather not get to that point.

Thanks,
Nate







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




Re: [EXTERNAL] [edk2-devel] [RedfishPkg PATCH v4 3/4] .azurepipelines/templates: Add RedfishPkg to target build

2020-10-05 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew 

- Bret


From: devel@edk2.groups.io  on behalf of Abner Chang via 
groups.io 
Sent: Sunday, October 4, 2020 9:13:45 PM
To: devel@edk2.groups.io 
Cc: Sean Brogan ; Bret Barkelew 
; Kinney, Michael D ; 
Liming Gao ; Nickle Wang 
Subject: [EXTERNAL] [edk2-devel] [RedfishPkg PATCH v4 3/4] 
.azurepipelines/templates: Add RedfishPkg to target build

Signed-off-by: Abner Chang 

Cc: Sean Brogan 
Cc: Bret Barkelew 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Nickle Wang 
---
 .azurepipelines/templates/pr-gate-build-job.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.azurepipelines/templates/pr-gate-build-job.yml 
b/.azurepipelines/templates/pr-gate-build-job.yml
index 2683687a1c..b5b09c2cca 100644
--- a/.azurepipelines/templates/pr-gate-build-job.yml
+++ b/.azurepipelines/templates/pr-gate-build-job.yml
@@ -45,6 +45,9 @@ jobs:
   TARGET_SECURITY:
 Build.Pkgs: 'SecurityPkg'
 Build.Targets: 'DEBUG,RELEASE,NO-TARGET'
+  TARGET_REDFISH:
+Build.Pkgs: 'RedfishPkg'
+Build.Targets: 'DEBUG,RELEASE,NO-TARGET'
   TARGET_PLATFORMS:
 # For Platforms only check code. Leave it to Platform CI
 # to build them.
--
2.17.1








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




Re: [EXTERNAL] [edk2-devel] [RedfishPkg PATCH v4 2/4] .pytool: Add CI on RedfishPkg

2020-10-05 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew 

- Bret

From: Abner Chang via groups.io
Sent: Sunday, October 4, 2020 9:58 PM
To: devel@edk2.groups.io
Cc: Sean Brogan; Bret 
Barkelew; Kinney, Michael 
D; Liming 
Gao; Nickle Wang
Subject: [EXTERNAL] [edk2-devel] [RedfishPkg PATCH v4 2/4] .pytool: Add CI on 
RedfishPkg

Add RedfishPkg to CI test.

Signed-off-by: Abner Chang 

Cc: Sean Brogan 
Cc: Bret Barkelew 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Nickle Wang 
---
 .pytool/CISettings.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py
index 0c2dd0181a..b337d046ae 100644
--- a/.pytool/CISettings.py
+++ b/.pytool/CISettings.py
@@ -55,7 +55,8 @@ class Settings(CiBuildSettingsManager, UpdateSettingsManager, 
SetupSettingsManag
 "FatPkg",
 "CryptoPkg",
 "UnitTestFrameworkPkg",
-"OvmfPkg"
+"OvmfPkg",
+"RedfishPkg"
 )

 def GetArchitecturesSupported(self):
--
2.17.1








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




[edk2-devel] Proposal to make EccCheck non-destructive

2020-10-04 Thread Bret Barkelew via groups.io
In regards to this bug:
2986 – EccCheck should not revert staged and local changes 
(tianocore.org)

I have a proposal:

  1.  git diff --name-only ..
  2.  Copy list of changed files to a temp directory under Build/
 *   Perhaps something like Build/EccCheck or Build/EccCheckTemp
  3.  Remove files/directories that are in the exclusion list
  4.  Run EccCheck against that directory
  5.  Filter the report to remove the temp directory path so that the reported 
errors are root-based paths

The trade off of this approach is that EccCheck will run against multiple 
patches in aggregate, but – frankly – this isn’t any different than the other 
CI plugins.

The destructive nature of this plugin has caused headaches for everyone on our 
team that has worked with the new codebase. We all use local CI to validate 
changes as we make them, and having to make “test commits” just to ensure our 
work doesn’t go away isn’t a satisfactory process.

Thoughts? If this passes muster, I’m happy to code up some quick patches (if 
for no other reason than we can stage them in Mu while we’re waiting for full 
adoption).

- Bret



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




Re: [EXTERNAL] [edk2-devel] ECC: Won't somebody PLEASE think of the... test structures.

2020-09-26 Thread Bret Barkelew via groups.io
I’m not opposed to it, but I think our team would suggest that it’s a good use 
of a multi-repo solution where each repo can have its own enforced style.

What would your thoughts be on that?

- Bret

From: Andrew Fish<mailto:af...@apple.com>
Sent: Friday, September 25, 2020 7:52 PM
To: Bret Barkelew<mailto:bret.barke...@microsoft.com>
Cc: edk2-devel-groups-io<mailto:devel@edk2.groups.io>; Ken 
Taylor<mailto:ken_tay...@phoenix.com>
Subject: Re: [EXTERNAL] [edk2-devel] ECC: Won't somebody PLEASE think of the... 
test structures.

Bret,

Details aside this ECC issue got me thinking it might be useful to some how tag 
code that follows different, subsetted, or alternate rules, or uses different 
build environments. I was kind of thinking of doing something like how we tag 
the licenses in the header comments [1]. I would say nothing means edk2 rules. 
I can see vendors maybe having different internal rules, or us wanting to 
distinguish test code from production code. The general idea if we start this 
tools can be smarter and that seems like a good thing.

 This is just a wild idea, so I’d like to see what other people think?

[1] SPDX-License-Identifier: BSD-2-Clause-Patent

Thanks,

Andrew Fish


On Sep 24, 2020, at 7:57 PM, Bret Barkelew 
mailto:bret.barke...@microsoft.com>> wrote:

Andrew,

That’s actually what got me here. EccCheck runs as part of our CI now (but it 
didn’t when I wrote these tests a year ago). I need to either figure out how to 
get this code to pass EccCheck in a reasonable way, or just not contribute the 
tests and say “go to Mu for the tests, if you want them”.

Skipping the contribution isn’t a desirable outcome at all for a number of 
reasons, not the least of which is that we (MS and others) are trying encourage 
all contributions to come with tests, so the process of writing them needs to 
be simple and painless.

- Bret

From: Andrew Fish<mailto:af...@apple.com>
Sent: Thursday, September 24, 2020 7:48 PM
To: edk2-devel-groups-io<mailto:devel@edk2.groups.io>; Bret 
Barkelew<mailto:bret.barke...@microsoft.com>
Cc: Ken Taylor<mailto:ken_tay...@phoenix.com>
Subject: [EXTERNAL] Re: [edk2-devel] ECC: Won't somebody PLEASE think of the... 
test structures.

Bret,

I’ve had this issue with EFI code too. It will compile with for DEBUG and 
RELEASE as the optimizer removes the memcpy/memset. So you only see a build 
failure when you compiler NOOPT (and there are no intrinsic libs). I mostly see 
this in platform code when I try to compile a single driver/lib NOOPT and it 
fails to link due to the missing intrinsic.

The easy to enforce this is to compile with optimizations enabled and don’t 
enable intrinsic libs. Not sure if that is really practical from the test point 
of view.

Seems the tool caught the coding style violation so I guess we could try to 
“make running that tool easier”. Maybe hooking into patchcheck.py, making some 
kind of githook, or adding a git command?

Thanks,

Andrew Fish




On Sep 24, 2020, at 7:25 PM, Bret Barkelew via 
groups.io<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.io%2F=02%7C01%7CBret.Barkelew%40microsoft.com%7Cf0f32ca53bd744c42f2308d861c7422f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637366855730968867=xEsoTWc5tpwrKQP7s24kKRKKmR768vzm3vphI7GGJQA%3D=0>
 
mailto:bret.barkelew=microsoft@groups.io>>
 wrote:

So for context, this is a new host-based test that should only run within a 
platform OS, so intrinsics aren’t the big deal that they would be in FW code.

But we do need to figure out how to simultaneously adhere to the coding 
convention while enabling test authoring.
Or we chose to not enforce quite as many things for tests.

I’d prefer the first.

- Bret

From: Ken Taylor<mailto:ken_tay...@phoenix.com>
Sent: Thursday, September 24, 2020 6:57 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Bret 
Barkelew<mailto:bret.barke...@microsoft.com>
Subject: [EXTERNAL] RE: ECC: Won't somebody PLEASE think of the... test 
structures.

If the structure is a non-static local variable, most compilers will silently 
inject an intrinsic call to memcpy in function initialization.  This leads to 
an intermittent linker error.

If the compiler you use automatically supports an intrinsic memcpy in the given 
architecture or optimizes out the memcpy, it will build for you and you won’t 
know you need to link to an intrinsic support library in order to build cross 
platform.  This leads to code that builds for you, but not for me.

Regards,
-Ken.

From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
[mailto:devel@edk2.groups.io] On Behalf Of Bret Barkelew via 
groups.io<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.io%2F=02%7C01%7CBret.Barkelew%40microsoft.com%7Cf0f32ca53bd744c42f2308d861c7422f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637366855730978863=mGjZ1q6XdEvg9JFgjHw2v%2BgFx%2BywT%2FXuQjfy2

Re: [EXTERNAL] Re: [edk2-devel] ECC: Won't somebody PLEASE think of the... test structures.

2020-09-24 Thread Bret Barkelew via groups.io
Andrew,

That’s actually what got me here. EccCheck runs as part of our CI now (but it 
didn’t when I wrote these tests a year ago). I need to either figure out how to 
get this code to pass EccCheck in a reasonable way, or just not contribute the 
tests and say “go to Mu for the tests, if you want them”.

Skipping the contribution isn’t a desirable outcome at all for a number of 
reasons, not the least of which is that we (MS and others) are trying encourage 
all contributions to come with tests, so the process of writing them needs to 
be simple and painless.

- Bret

From: Andrew Fish<mailto:af...@apple.com>
Sent: Thursday, September 24, 2020 7:48 PM
To: edk2-devel-groups-io<mailto:devel@edk2.groups.io>; Bret 
Barkelew<mailto:bret.barke...@microsoft.com>
Cc: Ken Taylor<mailto:ken_tay...@phoenix.com>
Subject: [EXTERNAL] Re: [edk2-devel] ECC: Won't somebody PLEASE think of the... 
test structures.

Bret,

I’ve had this issue with EFI code too. It will compile with for DEBUG and 
RELEASE as the optimizer removes the memcpy/memset. So you only see a build 
failure when you compiler NOOPT (and there are no intrinsic libs). I mostly see 
this in platform code when I try to compile a single driver/lib NOOPT and it 
fails to link due to the missing intrinsic.

The easy to enforce this is to compile with optimizations enabled and don’t 
enable intrinsic libs. Not sure if that is really practical from the test point 
of view.

Seems the tool caught the coding style violation so I guess we could try to 
“make running that tool easier”. Maybe hooking into patchcheck.py, making some 
kind of githook, or adding a git command?

Thanks,

Andrew Fish



On Sep 24, 2020, at 7:25 PM, Bret Barkelew via 
groups.io<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.io%2F=02%7C01%7Cbret.barkelew%40microsoft.com%7Cd438e9952e1c476285f608d860fd7e71%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637365989149774199=SaAatm8guPgl%2F63Sc%2B0AAbReBqeBPuKBJZjAmEWstU8%3D=0>
 
mailto:bret.barkelew=microsoft@groups.io>>
 wrote:

So for context, this is a new host-based test that should only run within a 
platform OS, so intrinsics aren’t the big deal that they would be in FW code.

But we do need to figure out how to simultaneously adhere to the coding 
convention while enabling test authoring.
Or we chose to not enforce quite as many things for tests.

I’d prefer the first.

- Bret

From: Ken Taylor<mailto:ken_tay...@phoenix.com>
Sent: Thursday, September 24, 2020 6:57 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Bret 
Barkelew<mailto:bret.barke...@microsoft.com>
Subject: [EXTERNAL] RE: ECC: Won't somebody PLEASE think of the... test 
structures.

If the structure is a non-static local variable, most compilers will silently 
inject an intrinsic call to memcpy in function initialization.  This leads to 
an intermittent linker error.

If the compiler you use automatically supports an intrinsic memcpy in the given 
architecture or optimizes out the memcpy, it will build for you and you won’t 
know you need to link to an intrinsic support library in order to build cross 
platform.  This leads to code that builds for you, but not for me.

Regards,
-Ken.

From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
[mailto:devel@edk2.groups.io] On Behalf Of Bret Barkelew via 
groups.io<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.io%2F=02%7C01%7Cbret.barkelew%40microsoft.com%7Cd438e9952e1c476285f608d860fd7e71%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637365989149784192=RYkXf9eJ%2B%2BAAFofHhAD2BisFsokbP28A6pyE5iaqRpo%3D=0>
Sent: Thursday, September 24, 2020 6:23 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: [edk2-devel] ECC: Won't somebody PLEASE think of the... test 
structures.

ERROR - EFI coding style error
ERROR - *Error code: 5007
ERROR - *There should be no initialization of a variable as part of its 
declaration
ERROR - *file: 
//home/corthon/_uefi/edk2_qemu_ci/edk2/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyUnitTest/VariablePolicyUnitTest.c
ERROR - *Line number: 333
ERROR - *Variable Name: MatchCheckPolicy

EccCheck no likey:
SIMPLE_VARIABLE_POLICY_ENTRY   ValidationPolicy = {
{
  VARIABLE_POLICY_ENTRY_REVISION,
  sizeof(VARIABLE_POLICY_ENTRY) + sizeof(TEST_VAR_1_NAME),
  sizeof(VARIABLE_POLICY_ENTRY),
  TEST_GUID_1,
  TEST_POLICY_MIN_SIZE_NULL,
  TEST_POLICY_MAX_SIZE_NULL,
  TEST_POLICY_ATTRIBUTES_NULL,
  TEST_POLICY_ATTRIBUTES_NULL,
  VARIABLE_POLICY_TYPE_NO_LOCK
},
TEST_VAR_1_NAME
  };

But you can’t init this structure separately without addressing each field.
Can a brother get an override?

- Bret



<95B370A7BEED49AAB797022E8F260C8F.png>




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#65604): https://edk2.groups.io/g/devel/message/65604
Mute This Topi

Re: [edk2-devel] ECC: Won't somebody PLEASE think of the... test structures.

2020-09-24 Thread Bret Barkelew via groups.io
One of the things we’re really trying to do here is make a strong case for 
contributing good tests, so I want them to be both:

  *   Good citizens of code hygiene, and
  *   Good examples of real-world, non-trivial tests (I actually used the new 
UnitTestFrameworkPkg and test-driven design while writing VarPol way back when)

So I’m happy [for some definitions of ‘happy’] to reform and reflow these as 
needed, but I’m getting the suspicion that there are walls I’m going to hit.

I also don’t want test writing to be so onerous as to prevent contributors for 
writing them. For example: I’m not going to docstring every test case. The test 
case name and framework strings should be clear enough to explain what the case 
is doing (otherwise it’s not a good test case).

- Bret

From: Bret Barkelew via groups.io<mailto:bret.barkelew=microsoft@groups.io>
Sent: Thursday, September 24, 2020 7:26 PM
To: Ken Taylor<mailto:ken_tay...@phoenix.com>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: [EXTERNAL] Re: [edk2-devel] ECC: Won't somebody PLEASE think of the... 
test structures.

So for context, this is a new host-based test that should only run within a 
platform OS, so intrinsics aren’t the big deal that they would be in FW code.

But we do need to figure out how to simultaneously adhere to the coding 
convention while enabling test authoring.
Or we chose to not enforce quite as many things for tests.

I’d prefer the first.

- Bret

From: Ken Taylor<mailto:ken_tay...@phoenix.com>
Sent: Thursday, September 24, 2020 6:57 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Bret 
Barkelew<mailto:bret.barke...@microsoft.com>
Subject: [EXTERNAL] RE: ECC: Won't somebody PLEASE think of the... test 
structures.

If the structure is a non-static local variable, most compilers will silently 
inject an intrinsic call to memcpy in function initialization.  This leads to 
an intermittent linker error.

If the compiler you use automatically supports an intrinsic memcpy in the given 
architecture or optimizes out the memcpy, it will build for you and you won’t 
know you need to link to an intrinsic support library in order to build cross 
platform.  This leads to code that builds for you, but not for me.

Regards,
-Ken.

From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Bret 
Barkelew via groups.io
Sent: Thursday, September 24, 2020 6:23 PM
To: devel@edk2.groups.io
Subject: [edk2-devel] ECC: Won't somebody PLEASE think of the... test 
structures.

ERROR - EFI coding style error
ERROR - *Error code: 5007
ERROR - *There should be no initialization of a variable as part of its 
declaration
ERROR - *file: 
//home/corthon/_uefi/edk2_qemu_ci/edk2/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyUnitTest/VariablePolicyUnitTest.c
ERROR - *Line number: 333
ERROR - *Variable Name: MatchCheckPolicy

EccCheck no likey:
SIMPLE_VARIABLE_POLICY_ENTRY   ValidationPolicy = {
{
  VARIABLE_POLICY_ENTRY_REVISION,
  sizeof(VARIABLE_POLICY_ENTRY) + sizeof(TEST_VAR_1_NAME),
  sizeof(VARIABLE_POLICY_ENTRY),
  TEST_GUID_1,
  TEST_POLICY_MIN_SIZE_NULL,
  TEST_POLICY_MAX_SIZE_NULL,
  TEST_POLICY_ATTRIBUTES_NULL,
  TEST_POLICY_ATTRIBUTES_NULL,
  VARIABLE_POLICY_TYPE_NO_LOCK
},
TEST_VAR_1_NAME
  };

But you can’t init this structure separately without addressing each field.
Can a brother get an override?

- Bret






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




[edk2-devel] ECC: main function entry point in host-based unit tests

2020-09-24 Thread Bret Barkelew via groups.io
ERROR - EFI coding style error
ERROR - *Error code: 7001
ERROR - *There should be no use of int, unsigned, char, void, long in any .c, 
.h or .asl files
ERROR - *file: 
//home/corthon/_uefi/edk2_qemu_ci/edk2/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyUnitTest/VariablePolicyUnitTest.c
ERROR - *Line number: 763
ERROR - *[main] Return type int
ERROR -
ERROR - EFI coding style error
ERROR - *Error code: 8006
ERROR - *Function name does not follow the rules: 1. First character should be 
upper case 2. Must contain lower case characters 3. No white space characters
ERROR - *file: 
//home/corthon/_uefi/edk2_qemu_ci/edk2/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyUnitTest/VariablePolicyUnitTest.c
ERROR - *Line number: 2253
ERROR - *The function name [main] does not follow the rules

Currently, the host-based unit tests are using a standard C entry point:
int
main ()

That’s going to break both of these.

Another thing to override/figure out for host-based tests

- Bret



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




Re: [edk2-devel] ECC: Won't somebody PLEASE think of the... test structures.

2020-09-24 Thread Bret Barkelew via groups.io
So for context, this is a new host-based test that should only run within a 
platform OS, so intrinsics aren’t the big deal that they would be in FW code.

But we do need to figure out how to simultaneously adhere to the coding 
convention while enabling test authoring.
Or we chose to not enforce quite as many things for tests.

I’d prefer the first.

- Bret

From: Ken Taylor<mailto:ken_tay...@phoenix.com>
Sent: Thursday, September 24, 2020 6:57 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Bret 
Barkelew<mailto:bret.barke...@microsoft.com>
Subject: [EXTERNAL] RE: ECC: Won't somebody PLEASE think of the... test 
structures.

If the structure is a non-static local variable, most compilers will silently 
inject an intrinsic call to memcpy in function initialization.  This leads to 
an intermittent linker error.

If the compiler you use automatically supports an intrinsic memcpy in the given 
architecture or optimizes out the memcpy, it will build for you and you won’t 
know you need to link to an intrinsic support library in order to build cross 
platform.  This leads to code that builds for you, but not for me.

Regards,
-Ken.

From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Bret 
Barkelew via groups.io
Sent: Thursday, September 24, 2020 6:23 PM
To: devel@edk2.groups.io
Subject: [edk2-devel] ECC: Won't somebody PLEASE think of the... test 
structures.

ERROR - EFI coding style error
ERROR - *Error code: 5007
ERROR - *There should be no initialization of a variable as part of its 
declaration
ERROR - *file: 
//home/corthon/_uefi/edk2_qemu_ci/edk2/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyUnitTest/VariablePolicyUnitTest.c
ERROR - *Line number: 333
ERROR - *Variable Name: MatchCheckPolicy

EccCheck no likey:
SIMPLE_VARIABLE_POLICY_ENTRY   ValidationPolicy = {
{
  VARIABLE_POLICY_ENTRY_REVISION,
  sizeof(VARIABLE_POLICY_ENTRY) + sizeof(TEST_VAR_1_NAME),
  sizeof(VARIABLE_POLICY_ENTRY),
  TEST_GUID_1,
  TEST_POLICY_MIN_SIZE_NULL,
  TEST_POLICY_MAX_SIZE_NULL,
  TEST_POLICY_ATTRIBUTES_NULL,
  TEST_POLICY_ATTRIBUTES_NULL,
  VARIABLE_POLICY_TYPE_NO_LOCK
},
TEST_VAR_1_NAME
  };

But you can’t init this structure separately without addressing each field.
Can a brother get an override?

- Bret





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




[edk2-devel] ECC: Won't somebody PLEASE think of the... test structures.

2020-09-24 Thread Bret Barkelew via groups.io
ERROR - EFI coding style error
ERROR - *Error code: 5007
ERROR - *There should be no initialization of a variable as part of its 
declaration
ERROR - *file: 
//home/corthon/_uefi/edk2_qemu_ci/edk2/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyUnitTest/VariablePolicyUnitTest.c
ERROR - *Line number: 333
ERROR - *Variable Name: MatchCheckPolicy

EccCheck no likey:
SIMPLE_VARIABLE_POLICY_ENTRY   ValidationPolicy = {
{
  VARIABLE_POLICY_ENTRY_REVISION,
  sizeof(VARIABLE_POLICY_ENTRY) + sizeof(TEST_VAR_1_NAME),
  sizeof(VARIABLE_POLICY_ENTRY),
  TEST_GUID_1,
  TEST_POLICY_MIN_SIZE_NULL,
  TEST_POLICY_MAX_SIZE_NULL,
  TEST_POLICY_ATTRIBUTES_NULL,
  TEST_POLICY_ATTRIBUTES_NULL,
  VARIABLE_POLICY_TYPE_NO_LOCK
},
TEST_VAR_1_NAME
  };

But you can’t init this structure separately without addressing each field.
Can a brother get an override?

- Bret



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




[edk2-devel] What is a special documentation block?

2020-09-24 Thread Bret Barkelew via groups.io
Expect a few of these questions as I update 2000+ lines of test code that was 
written prior to EccCheck.

“The function headers should follow Doxygen special documentation blocks in 
section 2.3.5”
Doxygen doesn’t have a section 2.3.5.
Nor does the EDKII coding standard.

- Bret



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




Re: [edk2-devel] [EXTERNAL] [PATCH v8 00/14] Add the VariablePolicy feature

2020-09-23 Thread Bret Barkelew via groups.io
To whom it may concern,
This is as done as it’s going to get.

Thank you all for your help!

- Bret

From: Bret Barkelew
Sent: Tuesday, September 22, 2020 11:08 PM
To: devel@edk2.groups.io
Cc: Yao, Jiewen; Dandan 
Bi; Chao Zhang; Jian 
J Wang; Hao A Wu; 
liming.gao; Jordan 
Justen; Laszlo 
Ersek; Ard Biesheuvel; 
Andrew Fish; Ni, Ray; Bret 
Barkelew
Subject: [EXTERNAL] [PATCH v8 00/14] Add the VariablePolicy feature

The 14 patches in this series add the VariablePolicy feature to the core,
deprecate Edk2VarLock (while adding a compatibility layer to reduce code
churn), and integrate the VariablePolicy libraries and protocols into
Variable Services.

Since the integration requires multiple changes, including adding libraries,
a protocol, an SMI communication handler, and VariableServices integration,
the patches are broken up by individual library additions and then a final
integration. Security-sensitive changes like bypassing Authenticated
Variable enforcement are also broken out into individual patches so that
attention can be called directly to them.

Platform porting instructions are described in this wiki entry:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Ftianocore.github.io%2Fwiki%2FVariablePolicy-Protocol---Enhanced-Method-for-Managing-Variables%23platform-portingdata=02%7C01%7CBret.Barkelew%40microsoft.com%7C1b50579a496271ae08d85f870cf2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637364380959491498sdata=n2SYXG8iUBvDc2bo0%2B%2BB9Ftut46VNtVgdpJSFnX6%2Fu4%3Dreserved=0

Discussion of the feature can be found in multiple places throughout
the last year on the RFC channel, staging branches, and in devel.

Most recently, this subject was discussed in this thread:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F53712data=02%7C01%7CBret.Barkelew%40microsoft.com%7C1b50579a496271ae08d85f870cf2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637364380959491498sdata=81ta2Tht%2FwjDjk8LqQ8wRI0I1ggK14fePhWlMxDOCGA%3Dreserved=0
(the code branches shared in that discussion are now out of date, but the
whitepapers and discussion are relevant).

Cc: Jiewen Yao 
Cc: Dandan Bi 
Cc: Chao Zhang 
Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Liming Gao 
Cc: Jordan Justen 
Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Andrew Fish 
Cc: Ray Ni 
Cc: Bret Barkelew 
Signed-off-by: Bret Barkelew 

v8 changes:
* Rebase
* Small tweaks from final PRs
* Drank a lot
* Enrolled several members and a steward in CatFacts

v7 changes:
* Address comments from Dandan about security of the MM handler
* Add readme
* Fix bug around hex characters in BOOT, etc
* Add additional testing for hex characters
* Add additional testing for authenticated variables

v6 changes:
* Fix an issue with uninitialized Status in InitVariablePolicyLib() and 
DeinitVariablePolicyLib()
* Fix GCC building in shell-based functional test
* Rebase on latest origin/master

v5 changes:
* Fix the CONST mismatch in VariablePolicy.h and VariablePolicySmmDxe.c
* Fix EFIAPI mismatches in the functional unittest
* Rebase on latest origin/master

v4 changes:
* Remove Optional PcdAllowVariablePolicyEnforcementDisable PCD from platforms
* Rebase on master
* Migrate to new MmCommunicate2 protocol
* Fix an oversight in the default return value for InitMmCommonCommBuffer
* Fix in VariablePolicyLib to allow ExtraInitRuntimeDxe to consume variables

V3 changes:
* Address all non-unittest issues with ECC
* Make additional style changes
* Include section name in hunk headers in "ini-style" files
* Remove requirement for the EdkiiPiSmmCommunicationsRegionTable driver
  (now allocates its own buffer)
* Change names from VARIABLE_POLICY_PROTOCOL and gVariablePolicyProtocolGuid
  to EDKII_VARIABLE_POLICY_PROTOCOL and gEdkiiVariablePolicyProtocolGuid
* Fix GCC warning about initializing externs
* Add UNI strings for new PCD
* Add patches for ArmVirtPkg, OvmfXen, and UefiPayloadPkg
* Reorder patches according to Liming's feedback about adding to platforms
  before changing variable driver

V2 changes:
* Fixed implementation for RuntimeDxe
* Add PCD to block DisableVariablePolicy
* Fix the DumpVariablePolicy pagination in SMM


Bret Barkelew (14):
  MdeModulePkg: Define the VariablePolicy protocol interface
  MdeModulePkg: Define the VariablePolicyLib
  MdeModulePkg: Define the VariablePolicyHelperLib
  MdeModulePkg: Define the VarCheckPolicyLib and SMM interface
  OvmfPkg: Add VariablePolicy engine to OvmfPkg platform
  EmulatorPkg: Add VariablePolicy engine to EmulatorPkg platform
  ArmVirtPkg: 

Re: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature

2020-09-21 Thread Bret Barkelew via groups.io
24 hours before Andrew Fish, Jordan Justen, and Ray Ni are enrolled in CatFacts.
You’ll learn things you never knew! (That’s the definition of learning.)

- Bret

From: Bret Barkelew via groups.io<mailto:bret.barkelew=microsoft@groups.io>
Sent: Thursday, September 17, 2020 11:55 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Wang, Jian 
J<mailto:jian.j.w...@intel.com>; b...@corthon.com<mailto:b...@corthon.com>; Bi, 
Dandan<mailto:dandan...@intel.com>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Wu, Hao 
A<mailto:hao.a...@intel.com>; liming.gao<mailto:liming@intel.com>; Justen, 
Jordan L<mailto:jordan.l.jus...@intel.com>; Laszlo 
Ersek<mailto:ler...@redhat.com>; Ard Biesheuvel<mailto:ard.biesheu...@arm.com>; 
Andrew Fish<mailto:af...@apple.com>; Ni, Ray<mailto:ray...@intel.com>
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy 
feature

Hmmm…. no response from Jordan. Maybe he’s still trying dishes to see what he 
doesn’t get sick of. It’s good to be thorough.

So, I’ll turn to you, Mr. Fish – if that is your real name and not your 
supervillain pseudonym.
While you’ve always struck me as a gentle soul, and likely not resistant to 
learning more about anything, let alone our feline cohabitants, do you REALLY 
want to deal with a CatFacts subscription? Over a small, teensy, little code 
review? Reaaally?

- Bret

From: Bret Barkelew via groups.io<mailto:bret.barkelew=microsoft@groups.io>
Sent: Tuesday, September 15, 2020 1:51 PM
To: Wang, Jian J<mailto:jian.j.w...@intel.com>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
b...@corthon.com<mailto:b...@corthon.com>; Bi, 
Dandan<mailto:dandan...@intel.com>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Wu, Hao 
A<mailto:hao.a...@intel.com>; liming.gao<mailto:liming@intel.com>; Justen, 
Jordan L<mailto:jordan.l.jus...@intel.com>; Laszlo 
Ersek<mailto:ler...@redhat.com>; Ard Biesheuvel<mailto:ard.biesheu...@arm.com>; 
Andrew Fish<mailto:af...@apple.com>; Ni, Ray<mailto:ray...@intel.com>
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy 
feature

Thanks for the update, Jian. Dandan has submitted RBs on another thread.

That leaves patches 06 and 11.

Next up, Jordan Justen. How’s it going, Jordan. We’ve never spoken directly (to 
my knowledge) and that’s a shame.
If you had to eat a single food for the rest of your life, what would it be and 
can I have a Reviewed-by?
Keep in mind that you probably don’t want it to be particularly strong flavors; 
it’s going to get disgusting eventually.
I’d probably go with some simple red beans and rice or something.

- Bret

From: Wang, Jian J<mailto:jian.j.w...@intel.com>
Sent: Sunday, September 13, 2020 11:42 PM
To: Bret Barkelew<mailto:bret.barke...@microsoft.com>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
b...@corthon.com<mailto:b...@corthon.com>; Bi, 
Dandan<mailto:dandan...@intel.com>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Wu, Hao 
A<mailto:hao.a...@intel.com>; liming.gao<mailto:liming@intel.com>; Justen, 
Jordan L<mailto:jordan.l.jus...@intel.com>; Laszlo 
Ersek<mailto:ler...@redhat.com>; Ard Biesheuvel<mailto:ard.biesheu...@arm.com>; 
Andrew Fish<mailto:af...@apple.com>; Ni, Ray<mailto:ray...@intel.com>
Subject: [EXTERNAL] RE: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy 
feature

Hi Bret,

Sorry to hear the Seattle’s situation. I’ve been there for several times and 
love the city very much. Hope everything goes back normal soon.

And sorry for slow response. This patch series have been delegated to Dandan to 
review by Liming. She has completed security review from Intel perspective, and 
given back comments to you. It seems that you forgot to include her in the 
CC-list. Sorry I didn’t notice it and told her to do review in time. She’ll 
give comments ASAP.

Since MdeModulePkg is a huge package, I cannot do detail review for each patch 
for this package. And we have already modules reviewers designated . I think, 
usually, they should do the detailed review first. The package maintainer will 
do gate-keeper works as the last step. Correct me if any misunderstanding here.

Removed Chao from cc-list (his email is not valid) and added Dandan in loop.

Regards,
Jian

From: Bret Barkelew 
Sent: Friday, September 11, 2020 11:18 PM
To: devel@edk2.groups.io; b...@corthon.com; Wang, Jian J 
Cc: Yao, Jiewen ; Zhang, Chao B ; 
Wang, Jian J ; Wu, Hao A ; Gao, 
Liming ; Justen, Jordan L ; 
Laszlo Ersek ; Ard Biesheuvel ; 
Andrew Fish ; Ni, Ray 
Subject: RE: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature

11 Days to go. I will single out an email every day…

Jian, today is your day.
How’s it going? Life good? Yeah, I know. Things are crazy here, too. Seattle is

Re: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature

2020-09-18 Thread Bret Barkelew via groups.io
Hmmm…. no response from Jordan. Maybe he’s still trying dishes to see what he 
doesn’t get sick of. It’s good to be thorough.

So, I’ll turn to you, Mr. Fish – if that is your real name and not your 
supervillain pseudonym.
While you’ve always struck me as a gentle soul, and likely not resistant to 
learning more about anything, let alone our feline cohabitants, do you REALLY 
want to deal with a CatFacts subscription? Over a small, teensy, little code 
review? Reaaally?

- Bret

From: Bret Barkelew via groups.io<mailto:bret.barkelew=microsoft@groups.io>
Sent: Tuesday, September 15, 2020 1:51 PM
To: Wang, Jian J<mailto:jian.j.w...@intel.com>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
b...@corthon.com<mailto:b...@corthon.com>; Bi, 
Dandan<mailto:dandan...@intel.com>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Wu, Hao 
A<mailto:hao.a...@intel.com>; liming.gao<mailto:liming@intel.com>; Justen, 
Jordan L<mailto:jordan.l.jus...@intel.com>; Laszlo 
Ersek<mailto:ler...@redhat.com>; Ard Biesheuvel<mailto:ard.biesheu...@arm.com>; 
Andrew Fish<mailto:af...@apple.com>; Ni, Ray<mailto:ray...@intel.com>
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy 
feature

Thanks for the update, Jian. Dandan has submitted RBs on another thread.

That leaves patches 06 and 11.

Next up, Jordan Justen. How’s it going, Jordan. We’ve never spoken directly (to 
my knowledge) and that’s a shame.
If you had to eat a single food for the rest of your life, what would it be and 
can I have a Reviewed-by?
Keep in mind that you probably don’t want it to be particularly strong flavors; 
it’s going to get disgusting eventually.
I’d probably go with some simple red beans and rice or something.

- Bret

From: Wang, Jian J<mailto:jian.j.w...@intel.com>
Sent: Sunday, September 13, 2020 11:42 PM
To: Bret Barkelew<mailto:bret.barke...@microsoft.com>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
b...@corthon.com<mailto:b...@corthon.com>; Bi, 
Dandan<mailto:dandan...@intel.com>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Wu, Hao 
A<mailto:hao.a...@intel.com>; liming.gao<mailto:liming@intel.com>; Justen, 
Jordan L<mailto:jordan.l.jus...@intel.com>; Laszlo 
Ersek<mailto:ler...@redhat.com>; Ard Biesheuvel<mailto:ard.biesheu...@arm.com>; 
Andrew Fish<mailto:af...@apple.com>; Ni, Ray<mailto:ray...@intel.com>
Subject: [EXTERNAL] RE: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy 
feature

Hi Bret,

Sorry to hear the Seattle’s situation. I’ve been there for several times and 
love the city very much. Hope everything goes back normal soon.

And sorry for slow response. This patch series have been delegated to Dandan to 
review by Liming. She has completed security review from Intel perspective, and 
given back comments to you. It seems that you forgot to include her in the 
CC-list. Sorry I didn’t notice it and told her to do review in time. She’ll 
give comments ASAP.

Since MdeModulePkg is a huge package, I cannot do detail review for each patch 
for this package. And we have already modules reviewers designated . I think, 
usually, they should do the detailed review first. The package maintainer will 
do gate-keeper works as the last step. Correct me if any misunderstanding here.

Removed Chao from cc-list (his email is not valid) and added Dandan in loop.

Regards,
Jian

From: Bret Barkelew 
Sent: Friday, September 11, 2020 11:18 PM
To: devel@edk2.groups.io; b...@corthon.com; Wang, Jian J 
Cc: Yao, Jiewen ; Zhang, Chao B ; 
Wang, Jian J ; Wu, Hao A ; Gao, 
Liming ; Justen, Jordan L ; 
Laszlo Ersek ; Ard Biesheuvel ; 
Andrew Fish ; Ni, Ray 
Subject: RE: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature

11 Days to go. I will single out an email every day…

Jian, today is your day.
How’s it going? Life good? Yeah, I know. Things are crazy here, too. Seattle is 
covered in smoke.
You know what would brighten things up, though? A nice “reviewed by”.

- Bret

From: Bret Barkelew via groups.io<mailto:bret.barkelew=microsoft@groups.io>
Sent: Tuesday, September 8, 2020 3:20 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
b...@corthon.com<mailto:b...@corthon.com>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Zhang, Chao 
B<mailto:chao.b.zh...@intel.com>; Wang, Jian J<mailto:jian.j.w...@intel.com>; 
Wu, Hao A<mailto:hao.a...@intel.com>; liming.gao<mailto:liming@intel.com>; 
Justen, Jordan L<mailto:jordan.l.jus...@intel.com>; Laszlo 
Ersek<mailto:ler...@redhat.com>; Ard Biesheuvel<mailto:ard.biesheu...@arm.com>; 
Andrew Fish<mailto:af...@apple.com>; Ni, Ray<mailto:ray...@intel.com>; 
liming.gao<mailto:liming@intel.com>
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy 
feature

Now that 2008 is labe

Re: [edk2-devel] [PATCH v7 11/14] SecurityPkg: Allow VariablePolicy state to delete authenticated variables

2020-09-16 Thread Bret Barkelew via groups.io
These are both great points and I’ll make both changes.

Thanks!

- Bret

From: Yao, Jiewen via groups.io
Sent: Tuesday, September 15, 2020 7:52 PM
To: Yao, Jiewen; 
gaoliming; 
devel@edk2.groups.io; Wang, Jian 
J; b...@corthon.com; Bi, 
Dandan
Cc: Wu, Hao A; 
liming.gao; Justen, Jordan 
L; 'Laszlo Ersek'; 
'Ard Biesheuvel'; 'Andrew 
Fish'; Ni, Ray
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v7 11/14] SecurityPkg: Allow 
VariablePolicy state to delete authenticated variables

Hi Bret
I have minor comment below. Please let me know your thought.


> -邮件原件-
> 发件人: bounce+27952+64723+4905953+8761...@groups.io
>  代表 Bret Barkelew
> 发送时间: 2020年8月28日 13:51
> 收件人: devel@edk2.groups.io
> 抄送: Jiewen Yao ; Jian J Wang
> ; Chao Zhang 
> 主题: [edk2-devel] [PATCH v7 11/14] SecurityPkg: Allow VariablePolicy state
> to delete authenticated variables
>
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2522data=02%7C01%7Cbret.barkelew%40microsoft.com%7C8f1aee9f15a14900a3d508d859eb7222%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637358215630854973sdata=JyDdXC9JRdBdqfmhAc6fI4R5xhh70wcD0NnNIgwfF3w%3Dreserved=0
>
> Causes AuthService to check
> IsVariablePolicyEnabled() before enforcing
> write protections to allow variable deletion
> when policy engine is disabled.
>
> Only allows deletion, not modification.
>
> Cc: Jiewen Yao 
> Cc: Jian J Wang 
> Cc: Chao Zhang 
> Cc: Bret Barkelew 
> Signed-off-by: Bret Barkelew 
> ---
>  SecurityPkg/Library/AuthVariableLib/AuthService.c   | 22
> 
>  SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf |  2 ++
>  2 files changed, 20 insertions(+), 4 deletions(-)
>
> diff --git a/SecurityPkg/Library/AuthVariableLib/AuthService.c
> b/SecurityPkg/Library/AuthVariableLib/AuthService.c
> index 2f60331f2c04..aca9a5620c28 100644
> --- a/SecurityPkg/Library/AuthVariableLib/AuthService.c
> +++ b/SecurityPkg/Library/AuthVariableLib/AuthService.c
> @@ -19,12 +19,16 @@
>to verify the signature.
>
>
>
>  Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
>
> +Copyright (c) Microsoft Corporation.
>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
>
>
>
>  **/
>
>
>
>  #include "AuthServiceInternal.h"
>
>
>
> +#include 
>
> +#include 
>
> +
>
>  //
>
>  // Public Exponent of RSA Key.
>
>  //
>
> @@ -217,9 +221,12 @@ NeedPhysicallyPresent(
>IN EFI_GUID   *VendorGuid
>
>)
>
>  {
>
> -  if ((CompareGuid (VendorGuid, ) &&
> (StrCmp (VariableName, EFI_SECURE_BOOT_ENABLE_NAME) == 0))
>
> -|| (CompareGuid (VendorGuid, ) && (StrCmp
> (VariableName, EFI_CUSTOM_MODE_NAME) == 0))) {
>
> -return TRUE;
>
> +  // If the VariablePolicy engine is disabled, allow deletion of any
> authenticated variables.
>
> +  if (IsVariablePolicyEnabled()) {
>
> +if ((CompareGuid (VendorGuid, ) &&
> (StrCmp (VariableName, EFI_SECURE_BOOT_ENABLE_NAME) == 0))
>
> +  || (CompareGuid (VendorGuid, ) && (StrCmp
> (VariableName, EFI_CUSTOM_MODE_NAME) == 0))) {
>
> +  return TRUE;
>
> +}
>
>}

[Jiewen] Looks good.

>
>
>return FALSE;
>
> @@ -842,7 +849,8 @@ ProcessVariable (
>   
>
>   );
>
>
>
> -  if ((!EFI_ERROR (Status)) && IsDeleteAuthVariable
> (OrgVariableInfo.Attributes, Data, DataSize, Attributes) &&
> UserPhysicalPresent()) {
>
> +  // If the VariablePolicy engine is disabled, allow deletion of any
> authenticated variables.
>
> +  if ((!EFI_ERROR (Status)) && IsDeleteAuthVariable
> (OrgVariableInfo.Attributes, Data, DataSize, Attributes) &&
> (UserPhysicalPresent() || !IsVariablePolicyEnabled())) {
>

[Jiewen] Looks good.

>  //
>
>  // Allow the delete operation of common authenticated variable(AT or
> AW) at user physical presence.
>
>  //
>
> @@ -1960,6 +1968,12 @@ VerifyTimeBasedPayload (
>
>
>CopyMem (Buffer, PayloadPtr, PayloadSize);
>
>
>
> +  // If the VariablePolicy engine is disabled, allow deletion of any
> authenticated variables.
>
> +  if (PayloadSize == 0 && (Attributes & EFI_VARIABLE_APPEND_WRITE) == 0 &&
> !IsVariablePolicyEnabled()) {
>
> +VerifyStatus = TRUE;
>
> +goto Exit;
>
> +  }
>

[Jiewen] I checked the programming context.
If we are going to skip the check, I feel the GetScratchBuffer() and CopyMem () 
may be avoided.
Also, I do not find any those data are used at Exit.

How about we move the check just after getting PayloadSize?
  //
  // Find out the new data payload which follows Pkcs7 SignedData directly.
  //
  PayloadPtr = SigData + SigDataSize;
  PayloadSize = DataSize - 

Re: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature

2020-09-15 Thread Bret Barkelew via groups.io
Ha! I was *just* about to click the button to send the patch again. Glad you 
found it.
Let me know if you have any questions!

- Bret

From: Yao, Jiewen<mailto:jiewen@intel.com>
Sent: Tuesday, September 15, 2020 6:44 PM
To: gaoliming<mailto:gaolim...@byosoft.com.cn>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Bret 
Barkelew<mailto:bret.barke...@microsoft.com>; Wang, Jian 
J<mailto:jian.j.w...@intel.com>; b...@corthon.com<mailto:b...@corthon.com>; Bi, 
Dandan<mailto:dandan...@intel.com>
Cc: Wu, Hao A<mailto:hao.a...@intel.com>; 
liming.gao<mailto:liming@intel.com>; Justen, Jordan 
L<mailto:jordan.l.jus...@intel.com>; 'Laszlo Ersek'<mailto:ler...@redhat.com>; 
'Ard Biesheuvel'<mailto:ard.biesheu...@arm.com>; 'Andrew 
Fish'<mailto:af...@apple.com>; Ni, Ray<mailto:ray...@intel.com>
Subject: [EXTERNAL] RE: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy 
feature

Got it. Thanks!

From: gaoliming 
Sent: Wednesday, September 16, 2020 9:37 AM
To: devel@edk2.groups.io; Yao, Jiewen ; 
bret.barke...@microsoft.com; Wang, Jian J ; 
b...@corthon.com; Bi, Dandan 
Cc: Wu, Hao A ; Gao, Liming ; Justen, 
Jordan L ; 'Laszlo Ersek' ; 'Ard 
Biesheuvel' ; 'Andrew Fish' ; Ni, Ray 

Subject: 回复: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature

Jiewen:
 I just forward the patch to your email address. Another way is to find the 
mail in web 
https://edk2.groups.io/g/devel/messages<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessages=02%7C01%7Cbret.barkelew%40microsoft.com%7Cf0fbd40bdbe547876f4408d859e1fa7e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637358174404880079=te9XcjnOdJl4o9KWwuFu4Aup5D410oYHzVkSTIknX1M%3D=0>

Thanks
Liming
发件人: 
bounce+27952+65298+4905953+8761...@groups.io<mailto:bounce+27952+65298+4905953+8761...@groups.io>
 
mailto:bounce+27952+65298+4905953+8761...@groups.io>>
 代表 Yao, Jiewen
发送时间: 2020年9月16日 9:05
收件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
gaolim...@byosoft.com.cn<mailto:gaolim...@byosoft.com.cn>; 
bret.barke...@microsoft.com<mailto:bret.barke...@microsoft.com>; Wang, Jian J 
mailto:jian.j.w...@intel.com>>; 
b...@corthon.com<mailto:b...@corthon.com>; Bi, Dandan 
mailto:dandan...@intel.com>>
抄送: Wu, Hao A mailto:hao.a...@intel.com>>; Gao, Liming 
mailto:liming@intel.com>>; Justen, Jordan L 
mailto:jordan.l.jus...@intel.com>>; 'Laszlo Ersek' 
mailto:ler...@redhat.com>>; 'Ard Biesheuvel' 
mailto:ard.biesheu...@arm.com>>; 'Andrew Fish' 
mailto:af...@apple.com>>; Ni, Ray 
mailto:ray...@intel.com>>
主题: Re: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature

Hi Bret/Liming
I checked my email and found that I have 9/14, 10/14, then 12/14, 13/14.
I don’t have 11/14 in my mailbox. That’s weird and embarrassing.

Could any of you forward 11/14 to me, so that I can review?
I apologize for the inconvenience.

Thank you
Yao Jiewen

From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>> On Behalf Of gaoliming
Sent: Wednesday, September 16, 2020 8:55 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
bret.barke...@microsoft.com<mailto:bret.barke...@microsoft.com>; Wang, Jian J 
mailto:jian.j.w...@intel.com>>; 
b...@corthon.com<mailto:b...@corthon.com>; Bi, Dandan 
mailto:dandan...@intel.com>>
Cc: Yao, Jiewen mailto:jiewen@intel.com>>; Wu, Hao A 
mailto:hao.a...@intel.com>>; Gao, Liming 
mailto:liming@intel.com>>; Justen, Jordan L 
mailto:jordan.l.jus...@intel.com>>; 'Laszlo Ersek' 
mailto:ler...@redhat.com>>; 'Ard Biesheuvel' 
mailto:ard.biesheu...@arm.com>>; 'Andrew Fish' 
mailto:af...@apple.com>>; Ni, Ray 
mailto:ray...@intel.com>>
Subject: 回复: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature

Bret:
 Patch 06 is for EmulatorPkg. Ray, Andrew are also the reviewers for this 
package.

Patch 11 is for SecurityPkg. Jian and Jiewen are the reviewer for this package.

Thanks
Liming
发件人: 
bounce+27952+65284+4905953+8761...@groups.io<mailto:bounce+27952+65284+4905953+8761...@groups.io>
 
mailto:bounce+27952+65284+4905953+8761...@groups.io>>
 代表 Bret Barkelew via groups.io
发送时间: 2020年9月16日 4:51
收件人: Wang, Jian J mailto:jian.j.w...@intel.com>>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
b...@corthon.com<mailto:b...@corthon.com>; Bi, Dandan 
mailto:dandan...@intel.com>>
抄送: Yao, Jiewen mailto:jiewen@intel.com>>; Wu, Hao A 
mailto:hao.a...@intel.com>>; liming.gao 
mailto:liming@intel.com>>; Justen, Jordan L 
mailto:jordan.l.jus...@intel.com>>; Laszlo Ersek 
mailto:ler...@redhat.com>>; Ard Biesheuvel 
mailto:ard.biesheu...@arm.com>>; Andrew Fish 
mailto:af...@apple.com>>; Ni, Ray 
mailto:ray...

Re: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature

2020-09-15 Thread Bret Barkelew via groups.io
Thanks for the update, Jian. Dandan has submitted RBs on another thread.

That leaves patches 06 and 11.

Next up, Jordan Justen. How’s it going, Jordan. We’ve never spoken directly (to 
my knowledge) and that’s a shame.
If you had to eat a single food for the rest of your life, what would it be and 
can I have a Reviewed-by?
Keep in mind that you probably don’t want it to be particularly strong flavors; 
it’s going to get disgusting eventually.
I’d probably go with some simple red beans and rice or something.

- Bret

From: Wang, Jian J<mailto:jian.j.w...@intel.com>
Sent: Sunday, September 13, 2020 11:42 PM
To: Bret Barkelew<mailto:bret.barke...@microsoft.com>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
b...@corthon.com<mailto:b...@corthon.com>; Bi, 
Dandan<mailto:dandan...@intel.com>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Wu, Hao 
A<mailto:hao.a...@intel.com>; liming.gao<mailto:liming@intel.com>; Justen, 
Jordan L<mailto:jordan.l.jus...@intel.com>; Laszlo 
Ersek<mailto:ler...@redhat.com>; Ard Biesheuvel<mailto:ard.biesheu...@arm.com>; 
Andrew Fish<mailto:af...@apple.com>; Ni, Ray<mailto:ray...@intel.com>
Subject: [EXTERNAL] RE: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy 
feature

Hi Bret,

Sorry to hear the Seattle’s situation. I’ve been there for several times and 
love the city very much. Hope everything goes back normal soon.

And sorry for slow response. This patch series have been delegated to Dandan to 
review by Liming. She has completed security review from Intel perspective, and 
given back comments to you. It seems that you forgot to include her in the 
CC-list. Sorry I didn’t notice it and told her to do review in time. She’ll 
give comments ASAP.

Since MdeModulePkg is a huge package, I cannot do detail review for each patch 
for this package. And we have already modules reviewers designated . I think, 
usually, they should do the detailed review first. The package maintainer will 
do gate-keeper works as the last step. Correct me if any misunderstanding here.

Removed Chao from cc-list (his email is not valid) and added Dandan in loop.

Regards,
Jian

From: Bret Barkelew 
Sent: Friday, September 11, 2020 11:18 PM
To: devel@edk2.groups.io; b...@corthon.com; Wang, Jian J 
Cc: Yao, Jiewen ; Zhang, Chao B ; 
Wang, Jian J ; Wu, Hao A ; Gao, 
Liming ; Justen, Jordan L ; 
Laszlo Ersek ; Ard Biesheuvel ; 
Andrew Fish ; Ni, Ray 
Subject: RE: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature

11 Days to go. I will single out an email every day…

Jian, today is your day.
How’s it going? Life good? Yeah, I know. Things are crazy here, too. Seattle is 
covered in smoke.
You know what would brighten things up, though? A nice “reviewed by”.

- Bret

From: Bret Barkelew via groups.io<mailto:bret.barkelew=microsoft@groups.io>
Sent: Tuesday, September 8, 2020 3:20 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
b...@corthon.com<mailto:b...@corthon.com>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Zhang, Chao 
B<mailto:chao.b.zh...@intel.com>; Wang, Jian J<mailto:jian.j.w...@intel.com>; 
Wu, Hao A<mailto:hao.a...@intel.com>; liming.gao<mailto:liming@intel.com>; 
Justen, Jordan L<mailto:jordan.l.jus...@intel.com>; Laszlo 
Ersek<mailto:ler...@redhat.com>; Ard Biesheuvel<mailto:ard.biesheu...@arm.com>; 
Andrew Fish<mailto:af...@apple.com>; Ni, Ray<mailto:ray...@intel.com>; 
liming.gao<mailto:liming@intel.com>
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy 
feature

Now that 2008 is labelled and everyone can take a breather… I still need 
reviews on the following patches (v7)…
Patch(es) 01, 02, 03,06,09,10,11,12,13,14

As such, the following email addresses may or may not be subscribed to 
CatFacts™ within the next 14 days if I get no responses:
Cc: Jian J Wang mailto:jian.j.w...@intel.com>>
Cc: Hao A Wu mailto:hao.a...@intel.com>>
Cc: Liming Gao mailto:liming@intel.com>>
Cc: Jordan Justen mailto:jordan.l.jus...@intel.com>>
Cc: Andrew Fish mailto:af...@apple.com>>
Cc: Ray Ni mailto:ray...@intel.com>>
Cc: Jiewen Yao mailto:jiewen@intel.com>>
Cc: Chao Zhang mailto:chao.b.zh...@intel.com>>

May God have mercy on your inboxes.

- Bret





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#65284): https://edk2.groups.io/g/devel/message/65284
Mute This Topic: https://groups.io/mt/75057702/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v7 00/14] Add the VariablePolicy feature

2020-09-15 Thread Bret Barkelew via groups.io
Sounds good! Thanks! Will hold for at least this week. Still need some more RBs.

- Bret

From: devel@edk2.groups.io  on behalf of Dandan Bi via 
groups.io 
Sent: Tuesday, September 15, 2020 8:44:01 AM
To: devel@edk2.groups.io ; b...@corthon.com 

Cc: Yao, Jiewen ; Chao Zhang ; 
Wang, Jian J ; Wu, Hao A ; 
liming.gao ; Justen, Jordan L 
; Laszlo Ersek ; Ard Biesheuvel 
; Andrew Fish ; Ni, Ray 

Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v7 00/14] Add the VariablePolicy 
feature

Hi Bret,

The V7 version is OK from my side.  Reviewed-by: Dandan Bi 
Please hold to see if any comments from other reviewers.


Hi Jiewen and Jian,

Do you have any comments?



Thanks,
Dandan
> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Bret
> Barkelew
> Sent: Friday, August 28, 2020 1:51 PM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen ; Chao Zhang
> ; Wang, Jian J ; Wu, Hao
> A ; Gao, Liming ; Justen,
> Jordan L ; Laszlo Ersek ;
> Ard Biesheuvel ; Andrew Fish
> ; Ni, Ray 
> Subject: [edk2-devel] [PATCH v7 00/14] Add the VariablePolicy feature
>
> The 14 patches in this series add the VariablePolicy feature to the core,
> deprecate Edk2VarLock (while adding a compatibility layer to reduce code
> churn), and integrate the VariablePolicy libraries and protocols into Variable
> Services.
>
> Since the integration requires multiple changes, including adding libraries, a
> protocol, an SMI communication handler, and VariableServices integration,
> the patches are broken up by individual library additions and then a final
> integration. Security-sensitive changes like bypassing Authenticated Variable
> enforcement are also broken out into individual patches so that attention can
> be called directly to them.
>
> Platform porting instructions are described in this wiki entry:
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Ftianocore.github.io%2Fwiki%2FVariablePolicy-data=02%7C01%7CBret.Barkelew%40microsoft.com%7C28ce33648af54aa8e07f08d8598e59e2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637357816016734689sdata=SwzfGHP86ZeenEaOIvbpU5mwrz9l25LTEuF0wPseGcY%3Dreserved=0
> Protocol---Enhanced-Method-for-Managing-Variables#platform-porting
>
> Discussion of the feature can be found in multiple places throughout the last
> year on the RFC channel, staging branches, and in devel.
>
> Most recently, this subject was discussed in this thread:
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F53712data=02%7C01%7CBret.Barkelew%40microsoft.com%7C28ce33648af54aa8e07f08d8598e59e2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637357816016734689sdata=F6Ywepo61wFPI5Cr14mHzJB6yCRyFA2JHevNGY8TwaQ%3Dreserved=0
> (the code branches shared in that discussion are now out of date, but the
> whitepapers and discussion are relevant).
>
> Cc: Jiewen Yao 
> Cc: Chao Zhang 
> Cc: Jian J Wang 
> Cc: Hao A Wu 
> Cc: Liming Gao 
> Cc: Jordan Justen 
> Cc: Laszlo Ersek 
> Cc: Ard Biesheuvel 
> Cc: Andrew Fish 
> Cc: Ray Ni 
> Cc: Bret Barkelew 
> Signed-off-by: Bret Barkelew 
>
> v7 changes:
> * Address comments from Dandan about security of the MM handler
> * Add readme
> * Fix bug around hex characters in BOOT, etc
> * Add additional testing for hex characters
> * Add additional testing for authenticated variables
>
> v6 changes:
> * Fix an issue with uninitialized Status in InitVariablePolicyLib() and
> DeinitVariablePolicyLib()
> * Fix GCC building in shell-based functional test
> * Rebase on latest origin/master
>
> v5 changes:
> * Fix the CONST mismatch in VariablePolicy.h and VariablePolicySmmDxe.c
> * Fix EFIAPI mismatches in the functional unittest
> * Rebase on latest origin/master
>
> v4 changes:
> * Remove Optional PcdAllowVariablePolicyEnforcementDisable PCD from
> platforms
> * Rebase on master
> * Migrate to new MmCommunicate2 protocol
> * Fix an oversight in the default return value for
> InitMmCommonCommBuffer
> * Fix in VariablePolicyLib to allow ExtraInitRuntimeDxe to consume variables
>
> V3 changes:
> * Address all non-unittest issues with ECC
> * Make additional style changes
> * Include section name in hunk headers in "ini-style" files
> * Remove requirement for the EdkiiPiSmmCommunicationsRegionTable
> driver
>   (now allocates its own buffer)
> * Change names from VARIABLE_POLICY_PROTOCOL and
> gVariablePolicyProtocolGuid
>   to EDKII_VARIABLE_POLICY_PROTOCOL and
> gEdkiiVariablePolicyProtocolGuid
> * Fix GCC warning about initializing externs
> * Add UNI strings for new PCD
> * Add patches for ArmVirtPkg, OvmfXen, and UefiPayloadPkg
> * Reorder patches according to Liming's feedback about adding to platforms
>   before changing variable driver
>
> V2 changes:
> * Fixed implementation for RuntimeDxe
> * Add PCD to block DisableVariablePolicy
> * Fix the DumpVariablePolicy pagination in SMM
>
>
> Bret Barkelew (14):
>   MdeModulePkg: Define the VariablePolicy protocol interface
>   

  1   2   3   >