Re: [edk2-devel] [edk2-test] [PATCH 1/1] uefi-sct/SctPkg: EFI_RNG_PROTOCOL.GetInfo check size != 0

2020-07-29 Thread Heinrich Schuchardt
Hello Eric, hello Edhaya,

probably due to a maintainer change the patch below was missed out.

Could you, please, review and merge it.

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

Best regards

Heinrich

On 12/28/19 4:37 PM, Heinrich Schuchardt wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2438
>
> The EFI_RNG_PROTOCOL conformance test checks that the size returned by
> GetInfo() is a multiple of 16. This would be fulfilled by size == 0.
>
> The UEFI specification requires that at least one algorithm is implemented.
> So we should check that size is non-zero too.
>
> Signed-off-by: Heinrich Schuchardt 
> ---
>  .../RandomNumber/BlackBoxTest/RandomNumberBBTestConformance.c  | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git 
> a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/RandomNumber/BlackBoxTest/RandomNumberBBTestConformance.c
>  
> b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/RandomNumber/BlackBoxTest/RandomNumberBBTestConformance.c
> index f0a7c030..cd419d68 100644
> --- 
> a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/RandomNumber/BlackBoxTest/RandomNumberBBTestConformance.c
> +++ 
> b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/RandomNumber/BlackBoxTest/RandomNumberBBTestConformance.c
> @@ -169,7 +169,8 @@ BBTestGetInfoConformanceTestCheckpoint1 (
>  return Status;
>}
>
> -  if (EFI_BUFFER_TOO_SMALL == Status && RNGAlgorithmListSize % 
> sizeof(EFI_RNG_ALGORITHM) == 0) {
> +  if (EFI_BUFFER_TOO_SMALL == Status && RNGAlgorithmListSize &&
> +  RNGAlgorithmListSize % sizeof(EFI_RNG_ALGORITHM) == 0) {
>  AssertionType = EFI_TEST_ASSERTION_PASSED;
>} else {
>  AssertionType = EFI_TEST_ASSERTION_FAILED;
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63467): https://edk2.groups.io/g/devel/message/63467
Mute This Topic: https://groups.io/mt/69304206/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v2 01/15] .pytool/Plugin: Add a plugin LicenseCheck

2020-07-29 Thread Liming Gao
With this update, Reviewed-by: Liming Gao  

If no other comment, I will merge this patch set tomorrow. 

Thanks
Liming
-Original Message-
From: Zhang, Shenglei  
Sent: 2020年7月30日 11:08
To: Gao, Liming ; devel@edk2.groups.io
Cc: Sean Brogan ; Bret Barkelew 
; Kinney, Michael D 
Subject: RE: [PATCH v2 01/15] .pytool/Plugin: Add a plugin LicenseCheck



> -Original Message-
> From: Gao, Liming 
> Sent: Wednesday, July 29, 2020 10:02 PM
> To: Zhang, Shenglei ; devel@edk2.groups.io
> Cc: Sean Brogan ; Bret Barkelew 
> ; Kinney, Michael D 
> 
> Subject: RE: [PATCH v2 01/15] .pytool/Plugin: Add a plugin 
> LicenseCheck
> 
> Shenglei:
> 
> > -Original Message-
> > From: Zhang, Shenglei 
> > Sent: Wednesday, July 29, 2020 8:28 PM
> > To: devel@edk2.groups.io
> > Cc: Sean Brogan ; Bret Barkelew
> ; Kinney, Michael D
> > ; Gao, Liming 
> > Subject: [PATCH v2 01/15] .pytool/Plugin: Add a plugin LicenseCheck
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
> > Add a plugin to check license conflict for new added files in a 
> > patch. It will report out errors when meeting files which are now 
> > contributed under BSD-2-Clause-Patent.
> 
> files which are now contributed under BSD-2-Clause-Patent.
> ==>
> files which are not contributed under BSD-2-Clause-Patent.
> 

Yes. It's typo.

Thanks,
Shenglei

> Thanks
> Liming
> >
> > Cc: Sean Brogan 
> > Cc: Bret Barkelew 
> > Cc: Michael D Kinney 
> > Cc: Liming Gao 
> > Signed-off-by: Shenglei Zhang 
> > ---
> >  .pytool/Plugin/LicenseCheck/LicenseCheck.py   | 115
> ++
> >  .../LicenseCheck/LicenseCheck_plug_in.yaml|  11 ++
> >  .pytool/Plugin/LicenseCheck/Readme.md |  17 +++
> >  3 files changed, 143 insertions(+)
> >  create mode 100644 .pytool/Plugin/LicenseCheck/LicenseCheck.py
> >  create mode
> 100644 .pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
> >  create mode 100644 .pytool/Plugin/LicenseCheck/Readme.md
> >
> > diff --git a/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> > new file mode 100644
> > index ..5733f7bf4ec0
> > --- /dev/null
> > +++ b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> > @@ -0,0 +1,115 @@
> > +# @file LicenseCheck.py
> > +#
> > +# Copyright (c) 2020, Intel Corporation. All rights reserved. # 
> > +SPDX-License-Identifier: BSD-2-Clause-Patent ##
> > +
> > +import os
> > +import logging
> > +import re
> > +from io import StringIO
> > +from typing import List, Tuple
> > +from edk2toolext.environment.plugintypes.ci_build_plugin import
> ICiBuildPlugin
> > +from edk2toolext.environment.var_dict import VarDict from 
> > +edk2toollib.utility_functions import RunCmd
> > +
> > +
> > +class LicenseCheck(ICiBuildPlugin):
> > +
> > +"""
> > +A CiBuildPlugin to check the license for new added files.
> > +
> > +Configuration options:
> > +"LicenseCheck": {
> > +"IgnoreFiles": []
> > +},
> > +"""
> > +
> > +license_format_preflix = 'SPDX-License-Identifier'
> > +
> > +bsd2_patent = 'BSD-2-Clause-Patent'
> > +
> > +Readdedfileformat = re.compile(r'\+\+\+ b\/(.*)')
> > +
> > +file_extension_list = [".c", ".h", ".inf", ".dsc", ".dec", 
> > + ".py", ".bat", ".sh",
> ".uni", ".yaml",
> > +   ".fdf", ".inc", "yml", ".asm", ".asm16", 
> > + ".asl", ".vfr", ".s", ".S",
> ".aslc",
> > +   ".nasm", ".nasmb", ".idf", ".Vfr", ".H"]
> > +
> > +def GetTestName(self, packagename: str, environment: VarDict) 
> > + ->
> tuple:
> > +""" Provide the testcase name and classname for use in reporting
> > +testclassname: a descriptive string for the testcase 
> > + can include
> whitespace
> > +classname: should be patterned
> ..
> > +
> > +Args:
> > +  packagename: string containing name of package to build
> > +  environment: The VarDict for the test to run in
> > +Returns:
> > +a tuple containing the testcase name and the classname
> > +(testcasename, classname)
> > +"""
> > +return ("Check for license for " + packagename, packagename 
> > + +
> ".LicenseCheck")
> > +
> > +##
> > +# External function of plugin.  This function is used to 
> > + perform the task
> of the ci_build_plugin Plugin
> > +#
> > +#   - package is the edk2 path to package.  This means
> workspace/packagepath relative.
> > +#   - edk2path object configured with workspace and packages path
> > +#   - PkgConfig Object (dict) for the pkg
> > +#   - EnvConfig Object
> > +#   - Plugin Manager Instance
> > +#   - Plugin Helper Obj Instance
> > +#   - Junit Logger
> > +#   - output_stream the StringIO output stream from this plugin via
> logging
> > +def RunBuildPlugin(self, packagename, Edk2pathObj, pkgconfig,
> environment, PLM, PLMHelper, tc, ou

Re: [edk2-devel] [PATCH v2 01/15] .pytool/Plugin: Add a plugin LicenseCheck

2020-07-29 Thread Zhang, Shenglei



> -Original Message-
> From: Gao, Liming 
> Sent: Wednesday, July 29, 2020 10:02 PM
> To: Zhang, Shenglei ; devel@edk2.groups.io
> Cc: Sean Brogan ; Bret Barkelew
> ; Kinney, Michael D
> 
> Subject: RE: [PATCH v2 01/15] .pytool/Plugin: Add a plugin LicenseCheck
> 
> Shenglei:
> 
> > -Original Message-
> > From: Zhang, Shenglei 
> > Sent: Wednesday, July 29, 2020 8:28 PM
> > To: devel@edk2.groups.io
> > Cc: Sean Brogan ; Bret Barkelew
> ; Kinney, Michael D
> > ; Gao, Liming 
> > Subject: [PATCH v2 01/15] .pytool/Plugin: Add a plugin LicenseCheck
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
> > Add a plugin to check license conflict for new added
> > files in a patch. It will report out errors when meeting
> > files which are now contributed under BSD-2-Clause-Patent.
> 
> files which are now contributed under BSD-2-Clause-Patent.
> ==>
> files which are not contributed under BSD-2-Clause-Patent.
> 

Yes. It's typo.

Thanks,
Shenglei

> Thanks
> Liming
> >
> > Cc: Sean Brogan 
> > Cc: Bret Barkelew 
> > Cc: Michael D Kinney 
> > Cc: Liming Gao 
> > Signed-off-by: Shenglei Zhang 
> > ---
> >  .pytool/Plugin/LicenseCheck/LicenseCheck.py   | 115
> ++
> >  .../LicenseCheck/LicenseCheck_plug_in.yaml|  11 ++
> >  .pytool/Plugin/LicenseCheck/Readme.md |  17 +++
> >  3 files changed, 143 insertions(+)
> >  create mode 100644 .pytool/Plugin/LicenseCheck/LicenseCheck.py
> >  create mode
> 100644 .pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
> >  create mode 100644 .pytool/Plugin/LicenseCheck/Readme.md
> >
> > diff --git a/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> > new file mode 100644
> > index ..5733f7bf4ec0
> > --- /dev/null
> > +++ b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> > @@ -0,0 +1,115 @@
> > +# @file LicenseCheck.py
> > +#
> > +# Copyright (c) 2020, Intel Corporation. All rights reserved.
> > +# SPDX-License-Identifier: BSD-2-Clause-Patent
> > +##
> > +
> > +import os
> > +import logging
> > +import re
> > +from io import StringIO
> > +from typing import List, Tuple
> > +from edk2toolext.environment.plugintypes.ci_build_plugin import
> ICiBuildPlugin
> > +from edk2toolext.environment.var_dict import VarDict
> > +from edk2toollib.utility_functions import RunCmd
> > +
> > +
> > +class LicenseCheck(ICiBuildPlugin):
> > +
> > +"""
> > +A CiBuildPlugin to check the license for new added files.
> > +
> > +Configuration options:
> > +"LicenseCheck": {
> > +"IgnoreFiles": []
> > +},
> > +"""
> > +
> > +license_format_preflix = 'SPDX-License-Identifier'
> > +
> > +bsd2_patent = 'BSD-2-Clause-Patent'
> > +
> > +Readdedfileformat = re.compile(r'\+\+\+ b\/(.*)')
> > +
> > +file_extension_list = [".c", ".h", ".inf", ".dsc", ".dec", ".py", 
> > ".bat", ".sh",
> ".uni", ".yaml",
> > +   ".fdf", ".inc", "yml", ".asm", ".asm16", 
> > ".asl", ".vfr", ".s", ".S",
> ".aslc",
> > +   ".nasm", ".nasmb", ".idf", ".Vfr", ".H"]
> > +
> > +def GetTestName(self, packagename: str, environment: VarDict) ->
> tuple:
> > +""" Provide the testcase name and classname for use in reporting
> > +testclassname: a descriptive string for the testcase can 
> > include
> whitespace
> > +classname: should be patterned
> ..
> > +
> > +Args:
> > +  packagename: string containing name of package to build
> > +  environment: The VarDict for the test to run in
> > +Returns:
> > +a tuple containing the testcase name and the classname
> > +(testcasename, classname)
> > +"""
> > +return ("Check for license for " + packagename, packagename +
> ".LicenseCheck")
> > +
> > +##
> > +# External function of plugin.  This function is used to perform the 
> > task
> of the ci_build_plugin Plugin
> > +#
> > +#   - package is the edk2 path to package.  This means
> workspace/packagepath relative.
> > +#   - edk2path object configured with workspace and packages path
> > +#   - PkgConfig Object (dict) for the pkg
> > +#   - EnvConfig Object
> > +#   - Plugin Manager Instance
> > +#   - Plugin Helper Obj Instance
> > +#   - Junit Logger
> > +#   - output_stream the StringIO output stream from this plugin via
> logging
> > +def RunBuildPlugin(self, packagename, Edk2pathObj, pkgconfig,
> environment, PLM, PLMHelper, tc, output_stream=None):
> > +return_buffer = StringIO()
> > +params = "diff --unified=0 origin/master HEAD"
> > +RunCmd("git", params, outstream=return_buffer)
> > +p = return_buffer.getvalue().strip()
> > +patch = p.split("\n")
> > +return_buffer.close()
> > +
> > +ignore_files = []
> > +if "IgnoreFiles" in pkgconfig:
> > +

Re: [EXTERNAL] [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature

2020-07-29 Thread Bret Barkelew via groups.io
I believe the ARM platforms already have the change. At least the ArmVirt does 
and some of the edk2-platforms.

This is not news. It’s been broadcast repeatedly for the last 3 months. And the 
last 6 months. And the last 15 months.

- Bret

From: Gao, Liming
Sent: Wednesday, July 29, 2020 6:36 PM
To: devel@edk2.groups.io; Bret 
Barkelew; 
b...@corthon.com; Leif 
Lindholm
Cc: Yao, Jiewen; Wang, Jian 
J; Wu, Hao A; Justen, 
Jordan L; Laszlo 
Ersek; Ard Biesheuvel; 
Andrew Fish; Ni, Ray
Subject: RE: [EXTERNAL] [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy 
feature

Include Leif. This change adds new library class dependency for the variable 
driver. So, it requires to update the platform DSC file. It will impact ARM 
platforms.

Thanks
Liming
From: devel@edk2.groups.io  On Behalf Of Bret Barkelew 
via groups.io
Sent: 2020年7月30日 3:56
To: devel@edk2.groups.io; b...@corthon.com
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: Re: [EXTERNAL] [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy 
feature

Still waiting on some R-bs.

Have a new doc that will make it into a v7, if it helps anyone with their 
review…
https://github.com/microsoft/mu_basecore/blob/release/202005/MdeModulePkg/Universal/Variable/UefiVariablePolicy/ReadMe.md

Thanks!

- Bret

From: Bret Barkelew via groups.io
Sent: Tuesday, June 23, 2020 4:19 AM
To: devel@edk2.groups.io
Cc: Yao, Jiewen; Chao 
Zhang; Jian J 
Wang; Hao A Wu; 
liming.gao; Jordan 
Justen; Laszlo 
Ersek; Ard Biesheuvel; 
Andrew Fish; Ni, Ray
Subject: [EXTERNAL] [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature

REF:https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2522&data=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdf2ee1dbc25a4810f5ce08d817674112%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637285079522114249&sdata=1%2F3MkPm5HuXeG%2FEaQgl%2F%2F8Tqu3UvgDs6Ich2ezXgjuY%3D&reserved=0

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-porting&data=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdf2ee1dbc25a4810f5ce08d817674112%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637285079522114249&sdata=b%2FFdg6Sy2pdxbk3C%2FgVzXvoOWOxW6Z60QXRQ%2BVxGfFs%3D&reserved=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%2Fd

Re: [EXTERNAL] [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature

2020-07-29 Thread Liming Gao
Include Leif. This change adds new library class dependency for the variable 
driver. So, it requires to update the platform DSC file. It will impact ARM 
platforms.

Thanks
Liming
From: devel@edk2.groups.io  On Behalf Of Bret Barkelew 
via groups.io
Sent: 2020年7月30日 3:56
To: devel@edk2.groups.io; b...@corthon.com
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: Re: [EXTERNAL] [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy 
feature

Still waiting on some R-bs.

Have a new doc that will make it into a v7, if it helps anyone with their 
review…
https://github.com/microsoft/mu_basecore/blob/release/202005/MdeModulePkg/Universal/Variable/UefiVariablePolicy/ReadMe.md

Thanks!

- Bret

From: Bret Barkelew via groups.io
Sent: Tuesday, June 23, 2020 4:19 AM
To: devel@edk2.groups.io
Cc: Yao, Jiewen; Chao 
Zhang; Jian J 
Wang; Hao A Wu; 
liming.gao; Jordan 
Justen; Laszlo 
Ersek; Ard Biesheuvel; 
Andrew Fish; Ni, Ray
Subject: [EXTERNAL] [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature

REF:https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2522&data=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdf2ee1dbc25a4810f5ce08d817674112%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637285079522114249&sdata=1%2F3MkPm5HuXeG%2FEaQgl%2F%2F8Tqu3UvgDs6Ich2ezXgjuY%3D&reserved=0

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-porting&data=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdf2ee1dbc25a4810f5ce08d817674112%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637285079522114249&sdata=b%2FFdg6Sy2pdxbk3C%2FgVzXvoOWOxW6Z60QXRQ%2BVxGfFs%3D&reserved=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%2F53712&data=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdf2ee1dbc25a4810f5ce08d817674112%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637285079522114249&sdata=epDJobMGos0As5T2JSwhs2PTy1IDt52oLqXkxEPJWLg%3D&reserved=0
(the code branches shared in that discussion are now out of date, but the
whitepapers and discussion are relevant).

Cc: Jiewen Yao mailto:jiewen@intel.com>>
Cc: Chao Zhang mailto:chao.b.zh...@intel.com>>
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: Laszlo Ersek mailto:ler...@redhat.com>>
Cc: Ard Biesheuvel mailto:ard.biesheu...@arm.com>>
Cc: Andrew Fish mailto:af...@apple.com>>
Cc: Ray Ni mailto:ray...@intel.com>>
Cc: Bret Barkelew mailto:brbar...@microsoft.com>>
Signed-off-by: Bret Barkelew 
mailto:brbar...@microsoft.com>>

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 EdkiiPiSmmCommunications

[edk2-devel] [edk2-staging/EdkRepo] [PATCH v1] EdkRepo: Fixing inconsistent win32 HOME path mapping

2020-07-29 Thread Bjorge, Erik C
In Python 3.8.x the method of mapping the users home path was changed
to look at USERPROFILE and then HOMEDRIVE\HOMEPATH.  This change removed
the check of HOME generated by git BASH based on HOMEDRIVE/HOMEPATH.
For users with a USERPROFILE environment variable that does not match
the HOMEDRIVE\HOMEPATH environment variables this can lead to
inconsistent decoding of files such as .gitconfig between BASH and
EdkRepo.

This change attempts to enforce a consistent decode order.
HOME, HOMEDRIVE\HOMEPATH and USERPROFILE.

Cc: Ashley E Desimone 
Cc: Nate DeSimone 
Cc: Puja Pandya 
Cc: Bret Barkelew 
Cc: Prince Agyeman 
Cc: Erik Bjorge 
Signed-off-by: Erik Bjorge 
---
 edkrepo/commands/sync_command.py| 46 ++---
 edkrepo/common/common_repo_functions.py |  6 +--
 edkrepo/common/pathfix.py   | 54 -
 edkrepo/common/ui_functions.py  |  6 ++-
 edkrepo/config/config_factory.py|  3 +-
 5 files changed, 85 insertions(+), 30 deletions(-)

diff --git a/edkrepo/commands/sync_command.py b/edkrepo/commands/sync_command.py
index 2cb4630..ea3eed3 100644
--- a/edkrepo/commands/sync_command.py
+++ b/edkrepo/commands/sync_command.py
@@ -31,14 +31,14 @@ from edkrepo.common.humble import NO_SYNC_DETACHED_HEAD, 
SYNC_COMMITS_ON_MASTER,
 from edkrepo.common.humble import MIRROR_BEHIND_PRIMARY_REPO, 
SYNC_NEEDS_REBASE, INCLUDED_FILE_NAME
 from edkrepo.common.humble import SYNC_BRANCH_CHANGE_ON_LOCAL, 
SYNC_INCOMPATIBLE_COMBO
 from edkrepo.common.humble import SYNC_REBASE_CALC_FAIL
-from edkrepo.common.pathfix import get_actual_path
+from edkrepo.common.pathfix import get_actual_path, expanduser
 from edkrepo.common.common_repo_functions import clone_repos, 
sparse_checkout_enabled
 from edkrepo.common.common_repo_functions import reset_sparse_checkout, 
sparse_checkout, verify_single_manifest
 from edkrepo.common.common_repo_functions import checkout_repos, 
check_dirty_repos
 from edkrepo.common.common_repo_functions import update_editor_config
 from edkrepo.common.common_repo_functions import update_repo_commit_template, 
get_latest_sha
 from edkrepo.common.common_repo_functions import has_primary_repo_remote, 
fetch_from_primary_repo, in_sync_with_primary
-from edkrepo.common.common_repo_functions import update_hooks, 
combinations_in_manifest
+from edkrepo.common.common_repo_functions import update_hooks, 
combinations_in_manifest
 from edkrepo.common.common_repo_functions import write_included_config, 
remove_included_config
 from edkrepo.common.workspace_maintenance.workspace_maintenance import 
generate_name_for_obsolete_backup
 from edkrepo.common.workspace_maintenance.manifest_repos_maintenance import 
pull_workspace_manifest_repo
@@ -48,7 +48,7 @@ from edkrepo.common.ui_functions import init_color_console
 from edkrepo.config.config_factory import get_workspace_path, 
get_workspace_manifest, get_edkrepo_global_data_directory
 from edkrepo.config.config_factory import get_workspace_manifest_file
 from edkrepo_manifest_parser.edk_manifest import CiIndexXml, ManifestXml
-from project_utils.submodule import deinit_submodules, maintain_submodules
+from project_utils.submodule import deinit_submodules, maintain_submodules
 
 
 class SyncCommand(EdkrepoCommand):
@@ -85,7 +85,7 @@ class SyncCommand(EdkrepoCommand):
 current_combo = initial_manifest.general_config.current_combo
 initial_sources = initial_manifest.get_repo_sources(current_combo)
 initial_hooks = initial_manifest.repo_hooks
-initial_combo = current_combo
+initial_combo = current_combo
 
 source_global_manifest_repo = 
find_source_manifest_repo(initial_manifest, config['cfg_file'], 
config['user_cfg_file'], args.source_manifest_repo)
 pull_workspace_manifest_repo(initial_manifest, config['cfg_file'], 
config['user_cfg_file'], args.source_manifest_repo, False)
@@ -102,7 +102,7 @@ class SyncCommand(EdkrepoCommand):
 if not args.update_local_manifest:
 self.__check_for_new_manifest(args, config, initial_manifest, 
workspace_path, global_manifest_directory)
 check_dirty_repos(initial_manifest, workspace_path)
-
+
 # Determine if sparse checkout needs to be disabled for this operation
 sparse_settings = initial_manifest.sparse_settings
 sparse_enabled = sparse_checkout_enabled(workspace_path, 
initial_sources)
@@ -116,7 +116,7 @@ class SyncCommand(EdkrepoCommand):
 reset_sparse_checkout(workspace_path, initial_sources)
 
 # Get the latest manifest if requested
-if args.update_local_manifest:  # NOTE: hyphens in arg name replaced 
with underscores due to argparse
+if args.update_local_manifest:  # NOTE: hyphens in arg name replaced 
with underscores due to argparse
 self.__update_local_manifest(args, config, initial_manifest, 
workspace_path, global_manifest_directory)
 manifest = get_workspace_manifest()
 if args.update_local_manifes

Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci

2020-07-29 Thread Liming Gao



-Original Message-
From: devel@edk2.groups.io  On Behalf Of Andrew Fish via 
groups.io
Sent: 2020年7月29日 23:22
To: edk2-devel-groups-io ; Laszlo Ersek 

Cc: Kinney, Michael D ; Gao, Liming 
; Zhang, Shenglei ; Sean Brogan 
; Bret Barkelew ; Dong, 
Eric ; Gao, Zhichao ; Yao, Jiewen 
; Chao Zhang ; Justen, Jordan L 
; Maciej Rabeda ; Wu, 
Jiaxin ; Fu, Siyuan ; Wang, Jian J 
; Wu, Hao A ; Ni, Ray 
; Lu, XiaoyuX ; Ard Biesheuvel 
; Leif Lindholm 
Subject: Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci



> On Jul 29, 2020, at 2:21 AM, Laszlo Ersek  wrote:
> 
> On 07/29/20 03:32, Kinney, Michael D wrote:
>> Hi Liming,
>> 
>> There are exception to PatchCheck as well for line endings and tabs.
>> 
>> Seems like a similar problem, and a single CI plugin could support 
>> all these cases.
> 
> The exceptions for LicenseCheck are individual files that package 
> maintainers (and contributors too) could customize. The primary use 
> case is permitting generated files to have no SPDX tag at all. 
> PatchCheck does not have a customizable exception list; it only 
> considers general rules that apply to the whole tree.
> 
> I did suggest "@file: generated" as a general marker for generated 
> files (which would opt them out of SPDX enforcement), here:
> .
> 

This sounds like a good plan for any file generated by the edk2.

[Liming] I agree this is a good suggestion. This requires all generated files 
to follow this rule. 
The first step is to enable LicenseCheck plugin (the patch has passed review 
and ready for merge, https://edk2.groups.io/g/devel/message/63447). 
Then, package maintainers can add the exception files. Next, we can continue to 
enhance LicenseCheck. 

Thanks
Liming

Thanks,

Andrew Fish

> I'm equally happy with an IgnoreFiles stanza in 
> "OvmfPkg/OvmfPkg.ci.yaml", or a marker like "@file: generated" in some 
> files under OvmfPkg. What's important to me is that we can control and 
> update the license checks for OvmfPkg/ files with OvmfPkg/ patches. 
> That is, in case we need to tweak the license check for some OvmfPkg/ 
> file, the corresponding patch should need OvmfPkg maintainer approval *only*.
> Adding exceptions to PatchCheck has been difficult, as (a) it affects 
> all of edk2, (b) technically it needs to pass BaseTools review.
> 
> With the license check, I'm happy to have the mechanism under 
> BaseTools and/or CI, but the policy should be per package. Again my 
> sole motivation at this time is generated files that we need to check 
> in for whatever reason.
> 
> Thanks!
> Laszlo
> 
> 
> 
> 





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63461): https://edk2.groups.io/g/devel/message/63461
Mute This Topic: https://groups.io/mt/75678207/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-wiki][PATCH v1 0/2] Add OVMF WinDbg Source Debug Page

2020-07-29 Thread Michael Kubacki

For your convenience, you can find a rendered version of the markdown here:

https://github.com/makubacki/tianocore.github.io/blob/add_ovmf_windbg_instructions/How-to-debug-OVMF-with-QEMU-using-WinDbg.md

Thanks,
Michael

On 7/29/2020 5:08 PM, Jiang, Guomin wrote:

Good Job!

I will test it this week and update my test not late than next weekend.

Best Regards
Guomin

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Michael
Kubacki
Sent: Thursday, July 30, 2020 6:53 AM
To: devel@edk2.groups.io
Cc: Justen, Jordan L ; Laszlo Ersek
; Ard Biesheuvel ; Kinney,
Michael D 
Subject: [edk2-devel] [edk2-wiki][PATCH v1 0/2] Add OVMF WinDbg Source
Debug Page

From: Michael Kubacki 

This patch series provides basic information about setting up a source debug
session using OvmfPkg with WinDbg and QEMU.

Cc: Jordan Justen 
Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Michael D Kinney 
Signed-off-by: Michael Kubacki 

Michael Kubacki (2):
   Add OVMF WinDbg source debug enabling instructions
   Update OVMF FAQ to include WinDbg enabling instructions

  How-to-debug-OVMF-with-QEMU-using-WinDbg.md  | 161

  OVMF-FAQ.md  |   5 +-
  images/ovmf-qemu-windbg/intel_udk_installer_windbg_dialog.png|
Bin 0 -> 48098 bytes
  images/ovmf-qemu-
windbg/unable_to_locate_windbg_error_dialog_box.png | Bin 0 -> 10852
bytes
  images/ovmf-qemu-windbg/windbg-example-locals.png| Bin 0 
->
37876 bytes
  images/ovmf-qemu-windbg/windbg-example-locals2.png   | Bin 0 
->
17826 bytes
  images/ovmf-qemu-windbg/windbg-example-multiple-panels.png   |
Bin 0 -> 320149 bytes
  images/ovmf-qemu-
windbg/windows_sdk_debugging_tools_8_1_install.png  | Bin 0 -> 45900
bytes
  8 files changed, 165 insertions(+), 1 deletion(-)  create mode 100644 How-to-
debug-OVMF-with-QEMU-using-WinDbg.md
  create mode 100644 images/ovmf-qemu-
windbg/intel_udk_installer_windbg_dialog.png
  create mode 100644 images/ovmf-qemu-
windbg/unable_to_locate_windbg_error_dialog_box.png
  create mode 100644 images/ovmf-qemu-windbg/windbg-example-
locals.png
  create mode 100644 images/ovmf-qemu-windbg/windbg-example-
locals2.png
  create mode 100644 images/ovmf-qemu-windbg/windbg-example-multiple-
panels.png
  create mode 100644 images/ovmf-qemu-
windbg/windows_sdk_debugging_tools_8_1_install.png

--
2.27.0.windows.1







-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63460): https://edk2.groups.io/g/devel/message/63460
Mute This Topic: https://groups.io/mt/75876180/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-wiki][PATCH v1 0/2] Add OVMF WinDbg Source Debug Page

2020-07-29 Thread Guomin Jiang
Good Job!

I will test it this week and update my test not late than next weekend.

Best Regards
Guomin
> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Michael
> Kubacki
> Sent: Thursday, July 30, 2020 6:53 AM
> To: devel@edk2.groups.io
> Cc: Justen, Jordan L ; Laszlo Ersek
> ; Ard Biesheuvel ; Kinney,
> Michael D 
> Subject: [edk2-devel] [edk2-wiki][PATCH v1 0/2] Add OVMF WinDbg Source
> Debug Page
> 
> From: Michael Kubacki 
> 
> This patch series provides basic information about setting up a source debug
> session using OvmfPkg with WinDbg and QEMU.
> 
> Cc: Jordan Justen 
> Cc: Laszlo Ersek 
> Cc: Ard Biesheuvel 
> Cc: Michael D Kinney 
> Signed-off-by: Michael Kubacki 
> 
> Michael Kubacki (2):
>   Add OVMF WinDbg source debug enabling instructions
>   Update OVMF FAQ to include WinDbg enabling instructions
> 
>  How-to-debug-OVMF-with-QEMU-using-WinDbg.md  | 161
> 
>  OVMF-FAQ.md  |   5 +-
>  images/ovmf-qemu-windbg/intel_udk_installer_windbg_dialog.png|
> Bin 0 -> 48098 bytes
>  images/ovmf-qemu-
> windbg/unable_to_locate_windbg_error_dialog_box.png | Bin 0 -> 10852
> bytes
>  images/ovmf-qemu-windbg/windbg-example-locals.png| Bin 0 
> ->
> 37876 bytes
>  images/ovmf-qemu-windbg/windbg-example-locals2.png   | Bin 0 
> ->
> 17826 bytes
>  images/ovmf-qemu-windbg/windbg-example-multiple-panels.png   |
> Bin 0 -> 320149 bytes
>  images/ovmf-qemu-
> windbg/windows_sdk_debugging_tools_8_1_install.png  | Bin 0 -> 45900
> bytes
>  8 files changed, 165 insertions(+), 1 deletion(-)  create mode 100644 How-to-
> debug-OVMF-with-QEMU-using-WinDbg.md
>  create mode 100644 images/ovmf-qemu-
> windbg/intel_udk_installer_windbg_dialog.png
>  create mode 100644 images/ovmf-qemu-
> windbg/unable_to_locate_windbg_error_dialog_box.png
>  create mode 100644 images/ovmf-qemu-windbg/windbg-example-
> locals.png
>  create mode 100644 images/ovmf-qemu-windbg/windbg-example-
> locals2.png
>  create mode 100644 images/ovmf-qemu-windbg/windbg-example-multiple-
> panels.png
>  create mode 100644 images/ovmf-qemu-
> windbg/windows_sdk_debugging_tools_8_1_install.png
> 
> --
> 2.27.0.windows.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63459): https://edk2.groups.io/g/devel/message/63459
Mute This Topic: https://groups.io/mt/75876180/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-wiki][PATCH v1 2/2] Update OVMF FAQ to include WinDbg enabling instructions

2020-07-29 Thread Michael Kubacki
From: Michael Kubacki 

Includes a link to the WinDbg enabling page in the OVMF FAQ and
fixes a broken link to the generic EDK II source level debug page.

Cc: Jordan Justen 
Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Michael D Kinney 
Signed-off-by: Michael Kubacki 
---
 OVMF-FAQ.md | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/OVMF-FAQ.md b/OVMF-FAQ.md
index 5fe0eb399ca9..910d92918cfc 100644
--- a/OVMF-FAQ.md
+++ b/OVMF-FAQ.md
@@ -151,4 +151,7 @@ OVMF](How_to_build_OVMF "wikilink") wiki page.
 
 ### How do I enable source level debugging with OVMF?
 
-Please refer to [EDK II-Source Level Debug](EDK_II-Source_Level_Debug 
"wikilink") & [[How to debug OVMF with QEMU using GDB]].
+Please refer to:
+  1. [[EDK II Source Level Debug]]
+  2. [[How to debug OVMF with QEMU using GDB]]
+  3. [[How to debug OVMF with QEMU using WinDbg]]
-- 
2.27.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63458): https://edk2.groups.io/g/devel/message/63458
Mute This Topic: https://groups.io/mt/75876183/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-wiki][PATCH v1 0/2] Add OVMF WinDbg Source Debug Page

2020-07-29 Thread Michael Kubacki
From: Michael Kubacki 

This patch series provides basic information about setting up a
source debug session using OvmfPkg with WinDbg and QEMU.

Cc: Jordan Justen 
Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Michael D Kinney 
Signed-off-by: Michael Kubacki 

Michael Kubacki (2):
  Add OVMF WinDbg source debug enabling instructions
  Update OVMF FAQ to include WinDbg enabling instructions

 How-to-debug-OVMF-with-QEMU-using-WinDbg.md  | 161 

 OVMF-FAQ.md  |   5 +-
 images/ovmf-qemu-windbg/intel_udk_installer_windbg_dialog.png| Bin 0 
-> 48098 bytes
 images/ovmf-qemu-windbg/unable_to_locate_windbg_error_dialog_box.png | Bin 0 
-> 10852 bytes
 images/ovmf-qemu-windbg/windbg-example-locals.png| Bin 0 
-> 37876 bytes
 images/ovmf-qemu-windbg/windbg-example-locals2.png   | Bin 0 
-> 17826 bytes
 images/ovmf-qemu-windbg/windbg-example-multiple-panels.png   | Bin 0 
-> 320149 bytes
 images/ovmf-qemu-windbg/windows_sdk_debugging_tools_8_1_install.png  | Bin 0 
-> 45900 bytes
 8 files changed, 165 insertions(+), 1 deletion(-)
 create mode 100644 How-to-debug-OVMF-with-QEMU-using-WinDbg.md
 create mode 100644 
images/ovmf-qemu-windbg/intel_udk_installer_windbg_dialog.png
 create mode 100644 
images/ovmf-qemu-windbg/unable_to_locate_windbg_error_dialog_box.png
 create mode 100644 images/ovmf-qemu-windbg/windbg-example-locals.png
 create mode 100644 images/ovmf-qemu-windbg/windbg-example-locals2.png
 create mode 100644 images/ovmf-qemu-windbg/windbg-example-multiple-panels.png
 create mode 100644 
images/ovmf-qemu-windbg/windows_sdk_debugging_tools_8_1_install.png

-- 
2.27.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63456): https://edk2.groups.io/g/devel/message/63456
Mute This Topic: https://groups.io/mt/75876180/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 v6 00/14] Add the VariablePolicy feature

2020-07-29 Thread Bret Barkelew via groups.io
Still waiting on some R-bs.

Have a new doc that will make it into a v7, if it helps anyone with their 
review…
https://github.com/microsoft/mu_basecore/blob/release/202005/MdeModulePkg/Universal/Variable/UefiVariablePolicy/ReadMe.md

Thanks!

- Bret

From: Bret Barkelew via groups.io
Sent: Tuesday, June 23, 2020 4:19 AM
To: devel@edk2.groups.io
Cc: Yao, Jiewen; Chao 
Zhang; Jian J 
Wang; Hao A Wu; 
liming.gao; Jordan 
Justen; Laszlo 
Ersek; Ard Biesheuvel; 
Andrew Fish; Ni, Ray
Subject: [EXTERNAL] [edk2-devel] [PATCH v6 00/14] Add the VariablePolicy feature

REF:https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2522&data=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdf2ee1dbc25a4810f5ce08d817674112%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637285079522114249&sdata=1%2F3MkPm5HuXeG%2FEaQgl%2F%2F8Tqu3UvgDs6Ich2ezXgjuY%3D&reserved=0

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-porting&data=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdf2ee1dbc25a4810f5ce08d817674112%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637285079522114249&sdata=b%2FFdg6Sy2pdxbk3C%2FgVzXvoOWOxW6Z60QXRQ%2BVxGfFs%3D&reserved=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%2F53712&data=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdf2ee1dbc25a4810f5ce08d817674112%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637285079522114249&sdata=epDJobMGos0As5T2JSwhs2PTy1IDt52oLqXkxEPJWLg%3D&reserved=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 

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 Va

[edk2-devel] [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: pause in WaitForSemaphore() before re-fetch

2020-07-29 Thread Laszlo Ersek
Most busy waits (spinlocks) in "UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c"
already call CpuPause() in their loop bodies; see SmmWaitForApArrival(),
APHandler(), and SmiRendezvous(). However, the "main wait" within
APHandler():

> //
> // Wait for something to happen
> //
> WaitForSemaphore (mSmmMpSyncData->CpuData[CpuIndex].Run);

doesn't do so, as WaitForSemaphore() keeps trying to acquire the semaphore
without pausing.

The performance impact is especially notable in QEMU/KVM + OVMF
virtualization with CPU overcommit (that is, when the guest has
significantly more VCPUs than the host has physical CPUs). The guest BSP
is working heavily in:

  BSPHandler()  [MpService.c]
PerformRemainingTasks() [PiSmmCpuDxeSmm.c]
  SetUefiMemMapAttributes() [SmmCpuMemoryManagement.c]

while the many guest APs are spinning in the "Wait for something to
happen" semaphore acquisition, in APHandler(). The guest APs are
generating useless memory traffic and saturating host CPUs, hindering the
guest BSP's progress in SetUefiMemMapAttributes().

Rework the loop in WaitForSemaphore(): call CpuPause() in every iteration
after the first check fails. Due to Pause Loop Exiting (known as Pause
Filter on AMD), the host scheduler can favor the guest BSP over the guest
APs.

Running a 16 GB RAM + 512 VCPU guest on a 448 PCPU host, this patch
reduces OVMF boot time (counted until reaching grub) from 20-30 minutes to
less than 4 minutes.

The patch should benefit physical machines as well -- according to the
Intel SDM, PAUSE "Improves the performance of spin-wait loops". Adding
PAUSE to the generic WaitForSemaphore() function is considered a general
improvement.

Cc: Eric Dong 
Cc: Philippe Mathieu-Daudé 
Cc: Rahul Kumar 
Cc: Ray Ni 
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1861718
Signed-off-by: Laszlo Ersek 
---

Notes:
Repo:   https://pagure.io/lersek/edk2.git
Branch: sem_wait_pause_rhbz1861718

 UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c 
b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
index 57e788c01b1f..4bcd217917d7 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
@@ -40,14 +40,18 @@ WaitForSemaphore (
 {
   UINT32Value;
 
-  do {
+  for (;;) {
 Value = *Sem;
-  } while (Value == 0 ||
-   InterlockedCompareExchange32 (
- (UINT32*)Sem,
- Value,
- Value - 1
- ) != Value);
+if (Value != 0 &&
+InterlockedCompareExchange32 (
+  (UINT32*)Sem,
+  Value,
+  Value - 1
+  ) == Value) {
+  break;
+}
+CpuPause ();
+  }
   return Value - 1;
 }
 
-- 
2.19.1.3.g30247aa5d201


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63454): https://edk2.groups.io/g/devel/message/63454
Mute This Topic: https://groups.io/mt/75871294/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU generic bug fix

2020-07-29 Thread De Leon Vasquez, Lorena R
I've attached patch with modifications suggested

From: Gao, Liming 
Sent: Thursday, July 9, 2020 7:45 AM
To: De Leon Vazquez, Lorena R ; 
devel@edk2.groups.io; Lohr, Paul A ; Yao, Jiewen 

Cc: Kinney, Michael D 
Subject: RE: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU 
generic bug fix

Lorena:
  I have one minor comment on this patch. The error return status should be 
EFI_UNSUPPORTED.

+  return error;
==>
return EFI_UNSUPPORTED;

Thanks
Liming
From: De Leon Vazquez, Lorena R 
mailto:lorena.r.de.leon.vazq...@intel.com>>
Sent: Tuesday, July 7, 2020 1:24 AM
To: Gao, Liming mailto:liming@intel.com>>; 
devel@edk2.groups.io; Lohr, Paul A 
mailto:paul.a.l...@intel.com>>; Yao, Jiewen 
mailto:jiewen@intel.com>>
Cc: Kinney, Michael D 
mailto:michael.d.kin...@intel.com>>
Subject: RE: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU 
generic bug fix

Hi Liming,
I've attached the patch

Thanks,
Lorena

From: Gao, Liming mailto:liming@intel.com>>
Sent: Thursday, July 2, 2020 8:54 PM
To: devel@edk2.groups.io; Lohr, Paul A 
mailto:paul.a.l...@intel.com>>; Yao, Jiewen 
mailto:jiewen@intel.com>>; De Leon Vazquez, Lorena R 
mailto:lorena.r.de.leon.vazq...@intel.com>>
Cc: Kinney, Michael D 
mailto:michael.d.kin...@intel.com>>
Subject: RE: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU 
generic bug fix

Paul:
  This patch is missing to be merged.

Lorena:
  I can't extract the patch from the mail. Can you send the patch to me? I can 
help merge it.

Thanks
Liming
From: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>> On Behalf Of Lohr, Paul A
Sent: Thursday, July 2, 2020 9:56 PM
To: devel@edk2.groups.io; Yao, Jiewen 
mailto:jiewen@intel.com>>; De Leon Vazquez, Lorena R 
mailto:lorena.r.de.leon.vazq...@intel.com>>
Cc: Kinney, Michael D 
mailto:michael.d.kin...@intel.com>>
Subject: Re: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU 
generic bug fix

Hello,

It seems this did not get checked in.  Is there something wrong with the patch 
itself?  Or was this simply submitted incorrectly?  I don't see a Bugzilla 
associated with it is why I ask.

Paul A. Lohr - Server Firmware Enabling
512.239.9073 (cell)
512.794.5044 (work)

From: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>> On Behalf Of Yao, Jiewen
Sent: Monday, March 2, 2020 5:46 PM
To: De Leon Vazquez, Lorena R 
mailto:lorena.r.de.leon.vazq...@intel.com>>;
 devel@edk2.groups.io
Cc: Kinney, Michael D 
mailto:michael.d.kin...@intel.com>>
Subject: Re: [edk2-devel] [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU 
generic bug fix

Reviewed-by: jiewen@intel.com

From: De Leon Vazquez, Lorena R 
mailto:lorena.r.de.leon.vazq...@intel.com>>
Sent: Tuesday, March 3, 2020 7:04 AM
To: devel@edk2.groups.io
Cc: Yao, Jiewen mailto:jiewen@intel.com>>; Kinney, 
Michael D mailto:michael.d.kin...@intel.com>>
Subject: [edk2-platforms] [PATCH] IntelSiliconPkg: IOMMU generic bug fix

Looks like Addresswidth is BIT wise values. Right now these values are not used 
any

Suggested-by: Star Zeng star.z...@intel.com
Signed-off-by: 
lorena.r.de.leon.vazq...@intel.com

--
.../Feature/VTd/IntelVTdDxe/TranslationTable.c| 11 ---
.../Feature/VTd/IntelVTdDxe/TranslationTableEx.c  | 11 ---
2 files changed, 8 insertions(+), 14 deletions(-)

diff --git 
a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c 
b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c
index cc970c0..61fbb4a 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c
@@ -128,14 +128,11 @@ CreateContextEntry (

 DEBUG ((DEBUG_INFO,"Source: S%04x B%02x D%02x F%02x\n", 
mVtdUnitInformation[VtdIndex].Segment, SourceId.Bits.Bus, SourceId.Bits.Device, 
SourceId.Bits.Function));

-switch (mVtdUnitInformation[VtdIndex].CapReg.Bits.SAGAW) {
-case BIT1:
-  ContextEntry->Bits.AddressWidth = 0x1;
-  break;
-case BIT2:
-  ContextEntry->Bits.AddressWidth = 0x2;
-  break;
+if ((mVtdUnitInformation[VtdIndex].CapReg.Bits.SAGAW & BIT2) == 0) {
+  DEBUG((DEBUG_ERROR, " 4-level page-table is not supported on VTD %d 
\n", VtdIndex));
+  return error;
 }
+ContextEntry->Bits.AddressWidth = 0x2;
   }

   FlushPageTableMemory (VtdIndex, 
(UINTN)mVtdUnitInformation[VtdIndex].RootEntryTable, 
EFI_PAGES_TO_SIZE(EntryTablePages));
diff --git 
a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTableEx.c 
b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTableEx.c
index 0da1611..6bd31b7 100644
--- a/Silicon/Int

Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci

2020-07-29 Thread Andrew Fish via groups.io



> On Jul 29, 2020, at 2:21 AM, Laszlo Ersek  wrote:
> 
> On 07/29/20 03:32, Kinney, Michael D wrote:
>> Hi Liming,
>> 
>> There are exception to PatchCheck as well for line endings and tabs.
>> 
>> Seems like a similar problem, and a single CI plugin could
>> support all these cases.
> 
> The exceptions for LicenseCheck are individual files that package
> maintainers (and contributors too) could customize. The primary use case
> is permitting generated files to have no SPDX tag at all. PatchCheck
> does not have a customizable exception list; it only considers general
> rules that apply to the whole tree.
> 
> I did suggest "@file: generated" as a general marker for generated files
> (which would opt them out of SPDX enforcement), here:
> .
> 

This sounds like a good plan for any file generated by the edk2.

Thanks,

Andrew Fish

> I'm equally happy with an IgnoreFiles stanza in
> "OvmfPkg/OvmfPkg.ci.yaml", or a marker like "@file: generated" in some
> files under OvmfPkg. What's important to me is that we can control and
> update the license checks for OvmfPkg/ files with OvmfPkg/ patches. That
> is, in case we need to tweak the license check for some OvmfPkg/ file,
> the corresponding patch should need OvmfPkg maintainer approval *only*.
> Adding exceptions to PatchCheck has been difficult, as (a) it affects
> all of edk2, (b) technically it needs to pass BaseTools review.
> 
> With the license check, I'm happy to have the mechanism under BaseTools
> and/or CI, but the policy should be per package. Again my sole
> motivation at this time is generated files that we need to check in for
> whatever reason.
> 
> Thanks!
> Laszlo
> 
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63452): https://edk2.groups.io/g/devel/message/63452
Mute This Topic: https://groups.io/mt/75678207/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v2 01/15] .pytool/Plugin: Add a plugin LicenseCheck

2020-07-29 Thread Liming Gao
Shenglei:

> -Original Message-
> From: Zhang, Shenglei 
> Sent: Wednesday, July 29, 2020 8:28 PM
> To: devel@edk2.groups.io
> Cc: Sean Brogan ; Bret Barkelew 
> ; Kinney, Michael D
> ; Gao, Liming 
> Subject: [PATCH v2 01/15] .pytool/Plugin: Add a plugin LicenseCheck
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
> Add a plugin to check license conflict for new added
> files in a patch. It will report out errors when meeting
> files which are now contributed under BSD-2-Clause-Patent.

files which are now contributed under BSD-2-Clause-Patent.
==>
files which are not contributed under BSD-2-Clause-Patent.

Thanks
Liming
> 
> Cc: Sean Brogan 
> Cc: Bret Barkelew 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Signed-off-by: Shenglei Zhang 
> ---
>  .pytool/Plugin/LicenseCheck/LicenseCheck.py   | 115 ++
>  .../LicenseCheck/LicenseCheck_plug_in.yaml|  11 ++
>  .pytool/Plugin/LicenseCheck/Readme.md |  17 +++
>  3 files changed, 143 insertions(+)
>  create mode 100644 .pytool/Plugin/LicenseCheck/LicenseCheck.py
>  create mode 100644 .pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
>  create mode 100644 .pytool/Plugin/LicenseCheck/Readme.md
> 
> diff --git a/.pytool/Plugin/LicenseCheck/LicenseCheck.py 
> b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> new file mode 100644
> index ..5733f7bf4ec0
> --- /dev/null
> +++ b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> @@ -0,0 +1,115 @@
> +# @file LicenseCheck.py
> +#
> +# Copyright (c) 2020, Intel Corporation. All rights reserved.
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +##
> +
> +import os
> +import logging
> +import re
> +from io import StringIO
> +from typing import List, Tuple
> +from edk2toolext.environment.plugintypes.ci_build_plugin import 
> ICiBuildPlugin
> +from edk2toolext.environment.var_dict import VarDict
> +from edk2toollib.utility_functions import RunCmd
> +
> +
> +class LicenseCheck(ICiBuildPlugin):
> +
> +"""
> +A CiBuildPlugin to check the license for new added files.
> +
> +Configuration options:
> +"LicenseCheck": {
> +"IgnoreFiles": []
> +},
> +"""
> +
> +license_format_preflix = 'SPDX-License-Identifier'
> +
> +bsd2_patent = 'BSD-2-Clause-Patent'
> +
> +Readdedfileformat = re.compile(r'\+\+\+ b\/(.*)')
> +
> +file_extension_list = [".c", ".h", ".inf", ".dsc", ".dec", ".py", 
> ".bat", ".sh", ".uni", ".yaml",
> +   ".fdf", ".inc", "yml", ".asm", ".asm16", ".asl", 
> ".vfr", ".s", ".S", ".aslc",
> +   ".nasm", ".nasmb", ".idf", ".Vfr", ".H"]
> +
> +def GetTestName(self, packagename: str, environment: VarDict) -> tuple:
> +""" Provide the testcase name and classname for use in reporting
> +testclassname: a descriptive string for the testcase can include 
> whitespace
> +classname: should be patterned 
> ..
> +
> +Args:
> +  packagename: string containing name of package to build
> +  environment: The VarDict for the test to run in
> +Returns:
> +a tuple containing the testcase name and the classname
> +(testcasename, classname)
> +"""
> +return ("Check for license for " + packagename, packagename + 
> ".LicenseCheck")
> +
> +##
> +# External function of plugin.  This function is used to perform the 
> task of the ci_build_plugin Plugin
> +#
> +#   - package is the edk2 path to package.  This means 
> workspace/packagepath relative.
> +#   - edk2path object configured with workspace and packages path
> +#   - PkgConfig Object (dict) for the pkg
> +#   - EnvConfig Object
> +#   - Plugin Manager Instance
> +#   - Plugin Helper Obj Instance
> +#   - Junit Logger
> +#   - output_stream the StringIO output stream from this plugin via 
> logging
> +def RunBuildPlugin(self, packagename, Edk2pathObj, pkgconfig, 
> environment, PLM, PLMHelper, tc, output_stream=None):
> +return_buffer = StringIO()
> +params = "diff --unified=0 origin/master HEAD"
> +RunCmd("git", params, outstream=return_buffer)
> +p = return_buffer.getvalue().strip()
> +patch = p.split("\n")
> +return_buffer.close()
> +
> +ignore_files = []
> +if "IgnoreFiles" in pkgconfig:
> +ignore_files = pkgconfig["IgnoreFiles"]
> +
> +self.ok = True
> +self.startcheck = False
> +self.license = True
> +self.all_file_pass = True
> +count = len(patch)
> +line_index = 0
> +for line in patch:
> +if line.startswith('--- /dev/null'):
> +nextline = patch[line_index + 1]
> +added_file = self.Readdedfileformat.search(nextline).group(1)
> +added_file_extension = os.path.splitext(added_file)[1]
> +if add

Re: [edk2-devel] [PATCH 1/1] Maintainers.txt: Add "Guomin Jiang" as reviewer for Crypto and Capsule

2020-07-29 Thread Liming Gao
Reviewed-by: Liming Gao  for FmpDevicePkg and 
MdeModulePkg.

> -Original Message-
> From: Laszlo Ersek 
> Sent: Wednesday, July 29, 2020 5:10 PM
> To: Jiang, Guomin ; devel@edk2.groups.io
> Cc: Andrew Fish ; Leif Lindholm ; Kinney, 
> Michael D ; Yao,
> Jiewen ; Wang, Jian J ; Gao, 
> Liming ; Kinney, Michael D
> ; Wu, Hao A 
> Subject: Re: [PATCH 1/1] Maintainers.txt: Add "Guomin Jiang" as reviewer for 
> Crypto and Capsule
> 
> On 07/29/20 09:00, Guomin Jiang wrote:
> > Add myself as reviewer for CryptoPkg/ and *Capsule* and FmpDevicePkg/.
> >
> > Signed-off-by: Guomin Jiang 
> > Cc: Andrew Fish 
> > Cc: Laszlo Ersek 
> > Cc: Leif Lindholm 
> > Cc: Michael D Kinney 
> > ---
> >  Maintainers.txt | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/Maintainers.txt b/Maintainers.txt
> > index 5504bb3d17cc..8c27094e433e 100644
> > --- a/Maintainers.txt
> > +++ b/Maintainers.txt
> > @@ -164,6 +164,7 @@ W: 
> > https://github.com/tianocore/tianocore.github.io/wiki/CryptoPkg
> >  M: Jiewen Yao 
> >  M: Jian J Wang 
> >  R: Xiaoyu Lu 
> > +R: Guomin Jiang 
> >
> >  DynamicTablesPkg
> >  F: DynamicTablesPkg/
> > @@ -197,6 +198,7 @@ F: FmpDevicePkg/
> >  W: https://github.com/tianocore/tianocore.github.io/wiki/FmpDevicePkg
> >  M: Liming Gao 
> >  M: Michael D Kinney 
> > +R: Guomin Jiang 
> >
> >  IntelFsp2Pkg
> >  F: IntelFsp2Pkg/
> > @@ -321,6 +323,7 @@ F: MdeModulePkg/Library/FmpAuthenticationLibNull/
> >  F: MdeModulePkg/Universal/Esrt*/
> >  R: Hao A Wu 
> >  R: Liming Gao 
> > +R: Guomin Jiang 
> >
> >  MdeModulePkg: HII and UI modules
> >  F: MdeModulePkg/*FileExplorer*/
> >
> 
> From my side:
> 
> Acked-by: Laszlo Ersek 
> 
> But, before merging this patch, one "M" person from each of the affected
> packages should respond with a Reviewed-by:
> 
> - CryptoPkg: Jiewen or Jian
> - FmpDevicePkg: Liming or Mike
> - MdeModulePkg (Firmware Update modules): Jian or Hao
> 
> I've CC'd these maintainers now.
> 
> Thanks
> Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63450): https://edk2.groups.io/g/devel/message/63450
Mute This Topic: https://groups.io/mt/75860380/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: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES

2020-07-29 Thread Leif Lindholm
Right, so the following platforms break once this patch is merged:

- AMD Overdrive, Overdrive 1000, Cello
- Hisilicon D03, D05, D06 (some of these due to binary drivers in
  edk2-non-osi)
- Marvell Armada 78x0/80x0, MacchiatoBIN
- Raspberry Pi 3/4

I think this provides enough argument to push this patch at least
until after August stable tag.

As far as I can tell, all of these are due to the PcdSet And
UnicodeStrToAsciiStr functions/macros disappearing. Presumably these
should be replaced with their S-suffixed counterparts.

Maintainers/reviewers on cc. I'd appreciate if you could update and
sanity check your platforms and send out patches.

Best Regards,

Leif

On Wed, Jul 29, 2020 at 13:24:15 +0100, Leif Lindholm wrote:
> Thanks Liming,
> 
> Yes, this does affect several ARM platforms. Currently running a build
> test to determine just how many. My preference would be for a change
> of this magnitude to go in just after a stable tag - what, if any, are
> the plans for this patch?
> 
> Best Regards,
> 
> Leif
> 
> On Wed, Jul 29, 2020 at 07:55:09 +, Gao, Liming wrote:
> > Include Leif and Ard. This change may impact ARM platform. 
> > 
> > Thanks
> > Liming
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of Liming Gao
> > Sent: 2020年6月9日 21:08
> > To: Zhang, Shenglei ; devel@edk2.groups.io
> > Cc: Kinney, Michael D 
> > Subject: Re: [edk2-devel] [PATCH] MdePkg: Remove code wrapped by 
> > DISABLE_NEW_DEPRECATED_INTERFACES
> > 
> > Shenglei:
> >   Please also remove the deprecated code in MdeModulePkg.
> > 
> > Thanks
> > Liming
> > > -Original Message-
> > > From: Zhang, Shenglei 
> > > Sent: Friday, June 5, 2020 4:13 PM
> > > To: devel@edk2.groups.io
> > > Cc: Kinney, Michael D ; Gao, Liming 
> > > 
> > > Subject: [PATCH] MdePkg: Remove code wrapped by 
> > > DISABLE_NEW_DEPRECATED_INTERFACES
> > > 
> > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2777
> > > Code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES is deprecated.
> > > So remove it.
> > > 
> > > Cc: Michael D Kinney 
> > > Cc: Liming Gao 
> > > Signed-off-by: Shenglei Zhang 
> > > ---
> > >  MdePkg/Library/BaseLib/String.c| 626 -
> > >  MdePkg/Library/BasePcdLibNull/PcdLib.c | 361 --
> > >  MdePkg/Library/BasePrintLib/PrintLib.c | 118 -
> > >  MdePkg/Library/DxePcdLib/DxePcdLib.c   | 399 
> > >  MdePkg/Library/PeiPcdLib/PeiPcdLib.c   | 397 
> > >  MdePkg/Library/UefiLib/UefiLib.c   |  92 
> > >  MdePkg/Include/Library/BaseLib.h   | 409 
> > >  MdePkg/Include/Library/PcdLib.h| 520 
> > >  MdePkg/Include/Library/PrintLib.h  | 110 -
> > >  MdePkg/Include/Library/UefiLib.h   |  53 ---
> > >  MdePkg/MdePkg.dsc  |   1 -
> > >  11 files changed, 3086 deletions(-)
> > > 
> > > diff --git a/MdePkg/Library/BaseLib/String.c 
> > > b/MdePkg/Library/BaseLib/String.c
> > > index 45198373f25c..f4854f357e3a 100644
> > > --- a/MdePkg/Library/BaseLib/String.c
> > > +++ b/MdePkg/Library/BaseLib/String.c
> > > @@ -8,135 +8,6 @@
> > > 
> > >  #include "BaseLibInternals.h"
> > > 
> > > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
> > > -
> > > -/**
> > > -  [ATTENTION] This function will be deprecated for security reason.
> > > -
> > > -  Copies one Null-terminated Unicode string to another Null-terminated 
> > > Unicode
> > > -  string and returns the new Unicode string.
> > > -
> > > -  This function copies the contents of the Unicode string Source to the 
> > > Unicode
> > > -  string Destination, and returns Destination. If Source and Destination
> > > -  overlap, then the results are undefined.
> > > -
> > > -  If Destination is NULL, then ASSERT().
> > > -  If Destination is not aligned on a 16-bit boundary, then ASSERT().
> > > -  If Source is NULL, then ASSERT().
> > > -  If Source is not aligned on a 16-bit boundary, then ASSERT().
> > > -  If Source and Destination overlap, then ASSERT().
> > > -  If PcdMaximumUnicodeStringLength is not zero, and Source contains more 
> > > than
> > > -  PcdMaximumUnicodeStringLength Unicode characters, not including the
> > > -  Null-terminator, then ASSERT().
> > > -
> > > -  @param  Destination A pointer to a Null-terminated Unicode string.
> > > -  @param  Source  A pointer to a Null-terminated Unicode string.
> > > -
> > > -  @return Destination.
> > > -
> > > -**/
> > > -CHAR16 *
> > > -EFIAPI
> > > -StrCpy (
> > > -  OUT CHAR16*Destination,
> > > -  IN  CONST CHAR16  *Source
> > > -  )
> > > -{
> > > -  CHAR16*ReturnValue;
> > > -
> > > -  //
> > > -  // Destination cannot be NULL
> > > -  //
> > > -  ASSERT (Destination != NULL);
> > > -  ASSERT (((UINTN) Destination & BIT0) == 0);
> > > -
> > > -  //
> > > -  // Destination and source cannot overlap
> > > -  //
> > > -  ASSERT ((UINTN)(Destination - Source) > StrLen (Source));
> > > 

[edk2-devel] [PATCH v2 01/15] .pytool/Plugin: Add a plugin LicenseCheck

2020-07-29 Thread Zhang, Shenglei
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
Add a plugin to check license conflict for new added
files in a patch. It will report out errors when meeting
files which are now contributed under BSD-2-Clause-Patent.

Cc: Sean Brogan 
Cc: Bret Barkelew 
Cc: Michael D Kinney 
Cc: Liming Gao 
Signed-off-by: Shenglei Zhang 
---
 .pytool/Plugin/LicenseCheck/LicenseCheck.py   | 115 ++
 .../LicenseCheck/LicenseCheck_plug_in.yaml|  11 ++
 .pytool/Plugin/LicenseCheck/Readme.md |  17 +++
 3 files changed, 143 insertions(+)
 create mode 100644 .pytool/Plugin/LicenseCheck/LicenseCheck.py
 create mode 100644 .pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
 create mode 100644 .pytool/Plugin/LicenseCheck/Readme.md

diff --git a/.pytool/Plugin/LicenseCheck/LicenseCheck.py 
b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
new file mode 100644
index ..5733f7bf4ec0
--- /dev/null
+++ b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
@@ -0,0 +1,115 @@
+# @file LicenseCheck.py
+#
+# Copyright (c) 2020, Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+import os
+import logging
+import re
+from io import StringIO
+from typing import List, Tuple
+from edk2toolext.environment.plugintypes.ci_build_plugin import ICiBuildPlugin
+from edk2toolext.environment.var_dict import VarDict
+from edk2toollib.utility_functions import RunCmd
+
+
+class LicenseCheck(ICiBuildPlugin):
+
+"""
+A CiBuildPlugin to check the license for new added files.
+
+Configuration options:
+"LicenseCheck": {
+"IgnoreFiles": []
+},
+"""
+
+license_format_preflix = 'SPDX-License-Identifier'
+
+bsd2_patent = 'BSD-2-Clause-Patent'
+
+Readdedfileformat = re.compile(r'\+\+\+ b\/(.*)')
+
+file_extension_list = [".c", ".h", ".inf", ".dsc", ".dec", ".py", ".bat", 
".sh", ".uni", ".yaml",
+   ".fdf", ".inc", "yml", ".asm", ".asm16", ".asl", 
".vfr", ".s", ".S", ".aslc",
+   ".nasm", ".nasmb", ".idf", ".Vfr", ".H"]
+
+def GetTestName(self, packagename: str, environment: VarDict) -> tuple:
+""" Provide the testcase name and classname for use in reporting
+testclassname: a descriptive string for the testcase can include 
whitespace
+classname: should be patterned ..
+
+Args:
+  packagename: string containing name of package to build
+  environment: The VarDict for the test to run in
+Returns:
+a tuple containing the testcase name and the classname
+(testcasename, classname)
+"""
+return ("Check for license for " + packagename, packagename + 
".LicenseCheck")
+
+##
+# External function of plugin.  This function is used to perform the task 
of the ci_build_plugin Plugin
+#
+#   - package is the edk2 path to package.  This means 
workspace/packagepath relative.
+#   - edk2path object configured with workspace and packages path
+#   - PkgConfig Object (dict) for the pkg
+#   - EnvConfig Object
+#   - Plugin Manager Instance
+#   - Plugin Helper Obj Instance
+#   - Junit Logger
+#   - output_stream the StringIO output stream from this plugin via logging
+def RunBuildPlugin(self, packagename, Edk2pathObj, pkgconfig, environment, 
PLM, PLMHelper, tc, output_stream=None):
+return_buffer = StringIO()
+params = "diff --unified=0 origin/master HEAD"
+RunCmd("git", params, outstream=return_buffer)
+p = return_buffer.getvalue().strip()
+patch = p.split("\n")
+return_buffer.close()
+
+ignore_files = []
+if "IgnoreFiles" in pkgconfig:
+ignore_files = pkgconfig["IgnoreFiles"]
+
+self.ok = True
+self.startcheck = False
+self.license = True
+self.all_file_pass = True
+count = len(patch)
+line_index = 0
+for line in patch:
+if line.startswith('--- /dev/null'):
+nextline = patch[line_index + 1]
+added_file = self.Readdedfileformat.search(nextline).group(1)
+added_file_extension = os.path.splitext(added_file)[1]
+if added_file_extension in self.file_extension_list and 
packagename in added_file:
+if (self.IsIgnoreFile(added_file, ignore_files)):
+line_index = line_index + 1
+continue
+self.startcheck = True
+self.license = False
+if self.startcheck and self.license_format_preflix in line:
+if self.bsd2_patent in line:
+self.license = True
+if line_index + 1 == count or patch[line_index + 
1].startswith('diff --') and self.startcheck:
+if not self.license:
+self.all_file_pas

[edk2-devel] [PATCHv v2 00/15] Add a plugin LicenseCheck in open ci

2020-07-29 Thread Zhang, Shenglei
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
LicenseCheck is now enabled in PatchCheck.py. But there's
a patch "Revert 'BaseTools/PatchCheck.py: Add LicenseCheck'"
to suggest revert the change.These patch series introduce
a plugin LicenseCheck into open ci so that license issues can
still be checked after the checker is disabled in PatchCheck.py.
1/15 is the plugin implementation.
2/15 ~ 15/15 introduce sections "IgnoreFiles" to allow developers
to skip license check for some files like generated files.

Only BSD-2-Clause-Patent can pass this checker.

v2: BSD-3-Clause-Patent can not pass this checker in v2 patch.
  * 2/15~15/15 have been given reviewed-by. To avoid making noise,
I only send out cover letter and 1/15.

Cc: Michael D Kinney 
Cc: Sean Brogan 
Cc: Bret Barkelew 
Cc: Eric Dong 
Cc: Laszlo Ersek 
Cc: Zhichao Gao 
Cc: Jiewen Yao 
Cc: Chao Zhang 
Cc: Jordan Justen 
Cc: Maciej Rabeda 
Cc: Jiaxin Wu 
Cc: Siyuan Fu 
Cc: Liming Gao 
Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Jordan Justen 
Cc: Andrew Fish 
Cc: Ray Ni 
Cc: Jian J Wang 
Cc: Xiaoyu Lu 
Cc: Ard Biesheuvel 
Cc: Leif Lindholm 


Shenglei Zhang (15):
  .pytool/Plugin: Add a plugin LicenseCheck
  FatPkg/FatPkg.ci.yaml: Add configuration for LicenseCheck
  ArmVirtPkg/ArmVirtPkg.ci.yaml: Add configuration for LicenseCheck
  CryptoPkg/CryptoPkg.ci.yaml: Add configuration for LicenseCheck
  EmulatorPkg/EmulatorPkg.ci.yaml: Add configuration for LicenseCheck
  FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration for LicenseCheck
  MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration for LicenseCheck
  MdePkg/MdePkg.ci.yaml: Add configuration for LicenseCheck
  NetworkPkg/NetworkPkg.ci.yaml: Add configuration for LicenseCheck
  OvmfPkg/OvmfPkg.ci.yaml: Add configuration for LicenseCheck
  PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml: Add configuration for
LicenseCheck
  SecurityPkg/SecurityPkg.ci.yaml: Add configuration for LicenseCheck
  ShellPkg/ShellPkg.ci.yaml: Add configuration for LicenseCheck
  UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for LicenseCheck
  UnitTestFrameworkPkg: Add configuration for LicenseCheck in yaml file

 .pytool/Plugin/LicenseCheck/LicenseCheck.py   | 115 ++
 .../LicenseCheck/LicenseCheck_plug_in.yaml|  11 ++
 .pytool/Plugin/LicenseCheck/Readme.md |  17 +++
 ArmVirtPkg/ArmVirtPkg.ci.yaml |   4 +
 CryptoPkg/CryptoPkg.ci.yaml   |   3 +
 EmulatorPkg/EmulatorPkg.ci.yaml   |   4 +
 FatPkg/FatPkg.ci.yaml |   3 +
 FmpDevicePkg/FmpDevicePkg.ci.yaml |   3 +
 MdeModulePkg/MdeModulePkg.ci.yaml |   4 +
 MdePkg/MdePkg.ci.yaml |   4 +
 NetworkPkg/NetworkPkg.ci.yaml |   3 +
 OvmfPkg/OvmfPkg.ci.yaml   |   4 +
 PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml |   3 +
 SecurityPkg/SecurityPkg.ci.yaml   |   3 +
 ShellPkg/ShellPkg.ci.yaml |   3 +
 UefiCpuPkg/UefiCpuPkg.ci.yaml |   3 +
 .../UnitTestFrameworkPkg.ci.yaml  |   4 +
 17 files changed, 191 insertions(+)
 create mode 100644 .pytool/Plugin/LicenseCheck/LicenseCheck.py
 create mode 100644 .pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
 create mode 100644 .pytool/Plugin/LicenseCheck/Readme.md

-- 
2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63447): https://edk2.groups.io/g/devel/message/63447
Mute This Topic: https://groups.io/mt/75863474/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: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES

2020-07-29 Thread Leif Lindholm
Thanks Liming,

Yes, this does affect several ARM platforms. Currently running a build
test to determine just how many. My preference would be for a change
of this magnitude to go in just after a stable tag - what, if any, are
the plans for this patch?

Best Regards,

Leif

On Wed, Jul 29, 2020 at 07:55:09 +, Gao, Liming wrote:
> Include Leif and Ard. This change may impact ARM platform. 
> 
> Thanks
> Liming
> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Liming Gao
> Sent: 2020年6月9日 21:08
> To: Zhang, Shenglei ; devel@edk2.groups.io
> Cc: Kinney, Michael D 
> Subject: Re: [edk2-devel] [PATCH] MdePkg: Remove code wrapped by 
> DISABLE_NEW_DEPRECATED_INTERFACES
> 
> Shenglei:
>   Please also remove the deprecated code in MdeModulePkg.
> 
> Thanks
> Liming
> > -Original Message-
> > From: Zhang, Shenglei 
> > Sent: Friday, June 5, 2020 4:13 PM
> > To: devel@edk2.groups.io
> > Cc: Kinney, Michael D ; Gao, Liming 
> > 
> > Subject: [PATCH] MdePkg: Remove code wrapped by 
> > DISABLE_NEW_DEPRECATED_INTERFACES
> > 
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2777
> > Code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES is deprecated.
> > So remove it.
> > 
> > Cc: Michael D Kinney 
> > Cc: Liming Gao 
> > Signed-off-by: Shenglei Zhang 
> > ---
> >  MdePkg/Library/BaseLib/String.c| 626 -
> >  MdePkg/Library/BasePcdLibNull/PcdLib.c | 361 --
> >  MdePkg/Library/BasePrintLib/PrintLib.c | 118 -
> >  MdePkg/Library/DxePcdLib/DxePcdLib.c   | 399 
> >  MdePkg/Library/PeiPcdLib/PeiPcdLib.c   | 397 
> >  MdePkg/Library/UefiLib/UefiLib.c   |  92 
> >  MdePkg/Include/Library/BaseLib.h   | 409 
> >  MdePkg/Include/Library/PcdLib.h| 520 
> >  MdePkg/Include/Library/PrintLib.h  | 110 -
> >  MdePkg/Include/Library/UefiLib.h   |  53 ---
> >  MdePkg/MdePkg.dsc  |   1 -
> >  11 files changed, 3086 deletions(-)
> > 
> > diff --git a/MdePkg/Library/BaseLib/String.c 
> > b/MdePkg/Library/BaseLib/String.c
> > index 45198373f25c..f4854f357e3a 100644
> > --- a/MdePkg/Library/BaseLib/String.c
> > +++ b/MdePkg/Library/BaseLib/String.c
> > @@ -8,135 +8,6 @@
> > 
> >  #include "BaseLibInternals.h"
> > 
> > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
> > -
> > -/**
> > -  [ATTENTION] This function will be deprecated for security reason.
> > -
> > -  Copies one Null-terminated Unicode string to another Null-terminated 
> > Unicode
> > -  string and returns the new Unicode string.
> > -
> > -  This function copies the contents of the Unicode string Source to the 
> > Unicode
> > -  string Destination, and returns Destination. If Source and Destination
> > -  overlap, then the results are undefined.
> > -
> > -  If Destination is NULL, then ASSERT().
> > -  If Destination is not aligned on a 16-bit boundary, then ASSERT().
> > -  If Source is NULL, then ASSERT().
> > -  If Source is not aligned on a 16-bit boundary, then ASSERT().
> > -  If Source and Destination overlap, then ASSERT().
> > -  If PcdMaximumUnicodeStringLength is not zero, and Source contains more 
> > than
> > -  PcdMaximumUnicodeStringLength Unicode characters, not including the
> > -  Null-terminator, then ASSERT().
> > -
> > -  @param  Destination A pointer to a Null-terminated Unicode string.
> > -  @param  Source  A pointer to a Null-terminated Unicode string.
> > -
> > -  @return Destination.
> > -
> > -**/
> > -CHAR16 *
> > -EFIAPI
> > -StrCpy (
> > -  OUT CHAR16*Destination,
> > -  IN  CONST CHAR16  *Source
> > -  )
> > -{
> > -  CHAR16*ReturnValue;
> > -
> > -  //
> > -  // Destination cannot be NULL
> > -  //
> > -  ASSERT (Destination != NULL);
> > -  ASSERT (((UINTN) Destination & BIT0) == 0);
> > -
> > -  //
> > -  // Destination and source cannot overlap
> > -  //
> > -  ASSERT ((UINTN)(Destination - Source) > StrLen (Source));
> > -  ASSERT ((UINTN)(Source - Destination) > StrLen (Source));
> > -
> > -  ReturnValue = Destination;
> > -  while (*Source != 0) {
> > -*(Destination++) = *(Source++);
> > -  }
> > -  *Destination = 0;
> > -  return ReturnValue;
> > -}
> > -
> > -/**
> > -  [ATTENTION] This function will be deprecated for security reason.
> > -
> > -  Copies up to a specified length from one Null-terminated Unicode string  
> > to
> > -  another Null-terminated Unicode string and returns the new Unicode 
> > string.
> > -
> > -  This function copies the contents of the Unicode string Source to the 
> > Unicode
> > -  string Destination, and returns Destination. At most, Length Unicode
> > -  characters are copied from Source to Destination. If Length is 0, then
> > -  Destination is returned unmodified. If Length is greater that the number 
> > of
> > -  Unicode characters in Source, then Destination is padded with Null 
> > Unicode
> > -  characters. If Source and Dest

Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci

2020-07-29 Thread Leif Lindholm
On Wed, Jul 29, 2020 at 11:12:02 +0200, Laszlo Ersek wrote:
> On 07/29/20 01:33, Kinney, Michael D wrote:
> > CI already runs PatchCheck.  If we ported PatchCheck to
> > a CI plugin, then the plugin could perform both the 
> > current PatchCheck features and the license check.
> > 
> > What this option evaluated?
> > 
> > If we did provide PatchCheck as a CI plugin, developers
> > I believe developers could run a stuart command likely
> > for the NOOPT target to run a PatchCheck CI plugin locally.
> 
> Not sure if I understand correctly, but I very much like the ability to
> run PatchCheck without needing anything else than a local Python binary.

Likewise.

/
Leif

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63445): https://edk2.groups.io/g/devel/message/63445
Mute This Topic: https://groups.io/mt/75678207/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH edk2-platforms 1/1] Silicon/Socionext: rename Emmc.c to fix build error

2020-07-29 Thread Leif Lindholm
On Wed, Jul 29, 2020 at 09:58:20 +0900, Masahisa Kojima wrote:
> Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/ has both an Emmc.asl
> and an Emmc.c file, which the patch(edk2 commit:0a4aa20e8d446 "BaseTools:
> Compile AML bytecode arrays into .obj file") both generate an Emmc.obj
> in the same output directory.
> 
> To fix the build error for Developerbox platform, this patch renames
> the Emmc.c.
> 
> Suggested-by: Leif Lindholm 
> Cc: Pierre Gondois 
> Signed-off-by: Masahisa Kojima 

Reviewed-by: Leif Lindholm 

I have pushed this one, followed by
- Silicon/SynQuacer: add ACPI descriptor of MMIO TPM
- Silicon/SynQuacer: CRLF fixup for Acpi.dsc.inc
as a8eecf187198..deb1988e3b18.

Thanks!

> ---
>  Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf   | 2 +-
>  Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/{Emmc.c => EmmcDxe.c} | 0
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf 
> b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
> index aa3cbdf35c73..74bbd2d48b30 100644
> --- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
> +++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
> @@ -18,7 +18,7 @@ [Defines]
>  
>  [Sources]
>Emmc.asl
> -  Emmc.c
> +  EmmcDxe.c
>Optee.asl
>Pci.c
>PlatformDxe.c
> diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.c 
> b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/EmmcDxe.c
> similarity index 100%
> rename from Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.c
> rename to Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/EmmcDxe.c
> -- 
> 2.17.1
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63444): https://edk2.groups.io/g/devel/message/63444
Mute This Topic: https://groups.io/mt/75856685/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] acpiview error handling patches

2020-07-29 Thread Tomas Pilar (tpilar)
(change of email)

Hi Zhichao,

I've amended the patches and respun a v3 version. Any chance you could have a 
look to see if I've fixed the issues correctly?

Cheers,
Tom

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63443): https://edk2.groups.io/g/devel/message/63443
Mute This Topic: https://groups.io/mt/75329821/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH 2/2] IntelVTdPmrPei: Fix PMR enabling setting confilct

2020-07-29 Thread Sheng Wei
PMR enabling set by pre-boot DMA protection is cleared by RC
when boot guard is enabled. Pre-boot DMA protection should only
reset VT-d BAR when it is 0 and reset PMR region when it is
not programmed to protect all memory address.

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

Cc: Ray Ni 
Cc: Rangasai V Chaganty 
Signed-off-by: Sheng Wei 
---
 .../Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.c| 14 ++
 .../Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.h| 15 +++
 .../Feature/VTd/IntelVTdPmrPei/VtdReg.c| 50 ++
 3 files changed, 79 insertions(+)

diff --git 
a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.c 
b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.c
index ea944aa40c..31a14f2852 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.c
@@ -745,7 +745,21 @@ VTdInfoNotify (
 // Protect all system memory
 //
 InitVTdInfo ();
+
+Hob = GetFirstGuidHob (&mVTdInfoGuid);
+VTdInfo = GET_GUID_HOB_DATA(Hob);
+
+//
+// NOTE: We need check if PMR is enabled or not.
+//
+EnabledEngineMask = GetDmaProtectionEnabledEngineMask (VTdInfo, 
VTdInfo->EngineMask);
+if (EnabledEngineMask != 0) {
+  Status = PreMemoryEnableVTdTranslationProtection (VTdInfo, 
EnabledEngineMask);
+}
 InitVTdPmrForAll ();
+if (((EnabledEngineMask != 0) && (!EFI_ERROR (Status {
+  DisableVTdTranslationProtection (VTdInfo, EnabledEngineMask);
+}
 
 //
 // Install PPI.
diff --git 
a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.h 
b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.h
index 58e6afad08..ffed2c5b6c 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.h
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.h
@@ -97,6 +97,21 @@ GetHighMemoryAlignment (
   IN UINT64EngineMask
   );
 
+/**
+  Enable VTd translation table protection in pre-memory phase.
+
+  @param VTdInfoThe VTd engine context information.
+  @param EngineMask The mask of the VTd engine to be accessed.
+
+  @retval EFI_SUCCESS   DMAR translation protection is enabled.
+  @retval EFI_UNSUPPORTED   Null Root Entry Table is not supported.
+**/
+EFI_STATUS
+PreMemoryEnableVTdTranslationProtection (
+  IN VTD_INFO  *VTdInfo,
+  IN UINT64EngineMask
+  );
+
 /**
   Enable VTd translation table protection.
 
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/VtdReg.c 
b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/VtdReg.c
index c9669426aa..e4b027ac57 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/VtdReg.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/VtdReg.c
@@ -13,11 +13,16 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
 #include "IntelVTdPmrPei.h"
 
+EFI_GUID gVTdNullRootEntryTableGuid = {
+  0x3de0593f, 0x6e3e, 0x4542, { 0xa1, 0xcb, 0xcb, 0xb2, 0xdb, 0xeb, 0xd8, 0xff 
}
+};
+
 /**
   Flush VTD page table and context table memory.
 
@@ -246,6 +251,51 @@ DisableDmar (
   return EFI_SUCCESS;
 }
 
+/**
+  Enable VTd translation table protection in pre-memory phase.
+
+  @param VTdInfoThe VTd engine context information.
+  @param EngineMask The mask of the VTd engine to be accessed.
+
+  @retval EFI_SUCCESS   DMAR translation protection is enabled.
+  @retval EFI_UNSUPPORTED   Null Root Entry Table is not supported.
+**/
+EFI_STATUS
+PreMemoryEnableVTdTranslationProtection (
+  IN VTD_INFO  *VTdInfo,
+  IN UINT64EngineMask
+  )
+{
+  EFI_STATUS  Status;
+  UINTN   Index;
+  UINT64  *RootEntryTable;
+
+  DEBUG ((DEBUG_INFO, "PreMemoryEnableVTdTranslationProtection - 0x%lx\n", 
EngineMask));
+
+  Status = PeiServicesLocatePpi (
+ &gVTdNullRootEntryTableGuid,
+ 0,
+ NULL,
+ (VOID **)&RootEntryTable
+ );
+
+  if (EFI_ERROR(Status)) {
+DEBUG((DEBUG_ERROR, "Locate NullRootEntryTable Ppi : %r\n", Status));
+return EFI_UNSUPPORTED;
+  }
+
+  DEBUG ((DEBUG_INFO, "NullRootEntryTable - 0x%lx\n", *RootEntryTable));
+
+  for (Index = 0; Index < VTdInfo->VTdEngineCount; Index++) {
+if ((EngineMask & LShiftU64(1, Index)) == 0) {
+  continue;
+}
+EnableDmar ((UINTN)VTdInfo->VTdEngineAddress[Index], 
(UINTN)*RootEntryTable);
+  }
+
+  return EFI_SUCCESS;
+}
+
 /**
   Enable VTd translation table protection.
 
-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63442): https://edk2.groups.io/g/devel/message/63442
Mute This Topic: https://groups.io/mt/75861788/21656
Group Owner: devel+ow...@edk2.groups.io
Un

[edk2-devel] [PATCH 1/2] PlatformVTdInfoSamplePei: Install Null Root Entry Table PPI

2020-07-29 Thread Sheng Wei
BIOS uses TE with a null root entry table to block VT-d engine access
to block any DMA traffic in pre-memory phase.

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

Cc: Ray Ni 
Cc: Rangasai V Chaganty 
Signed-off-by: Sheng Wei 
---
 .../PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePei.c  | 16 
 1 file changed, 16 insertions(+)

diff --git 
a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePei.c
 
b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePei.c
index 6f6c14f7a9..1399f4238d 100644
--- 
a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePei.c
+++ 
b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePei.c
@@ -164,6 +164,17 @@ EFI_PEI_PPI_DESCRIPTOR mPlatformVTdNoIgdInfoSampleDesc = {
   &mPlatformVTdNoIgdSample
 };
 
+EFI_GUID gVTdNullRootEntryTableGuid = { 0x3de0593f, 0x6e3e, 0x4542, { 0xa1, 
0xcb, 0xcb, 0xb2, 0xdb, 0xeb, 0xd8, 0xff }};
+
+// BIOS uses TE with a null root entry table to block VT-d engine access to 
block any DMA traffic in pre-memory phase.
+UINT64 mNullRootEntryTable = 0xFED2;
+
+EFI_PEI_PPI_DESCRIPTOR mPlatformNullRootEntryTableDesc = {
+  (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
+  &gVTdNullRootEntryTableGuid,
+  &mNullRootEntryTable
+};
+
 /**
   Initialize VTd register.
   Initialize the VTd hardware unit which has INCLUDE_PCI_ALL set
@@ -349,6 +360,11 @@ PlatformVTdInfoSampleInitialize (
 Status = PeiServicesNotifyPpi (&mSiliconInitializedNotifyList);
 InitGlobalVtd ();
 
+Status = PeiServicesInstallPpi (&mPlatformNullRootEntryTableDesc);
+if (EFI_ERROR (Status)) {
+  DEBUG ((DEBUG_ERROR , "Failed to install the NullRootEntryTable ppi - 
%r\n", Status));
+}
+
 Status = PeiServicesInstallPpi (&mPlatformVTdNoIgdInfoSampleDesc);
 ASSERT_EFI_ERROR (Status);
   } else {
-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63441): https://edk2.groups.io/g/devel/message/63441
Mute This Topic: https://groups.io/mt/75861787/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH 0/2] VTd Pei : Fix PMR enabling setting confilct

2020-07-29 Thread Sheng Wei
PMR enabling set by pre-boot DMA protection is cleared by RC
when boot guard is enabled. Pre-boot DMA protection should only
reset VT-d BAR when it is 0 and reset PMR region when it is
not programmed to protect all memory address.
PlatformVTdInfoSamplePei driver installs the null root entry table ppi.
BIOS uses TE with a null root entry table to block VT-d engine access
to block any DMA traffic in pre-memory phase.

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

Cc: Ray Ni 
Cc: Rangasai V Chaganty 

Sheng Wei (2):
  PlatformVTdInfoSamplePei: Install Null Root Entry Table PPI
  IntelVTdPmrPei: Fix PMR enabling setting confilct

 .../Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.c| 14 ++
 .../Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.h| 15 +++
 .../Feature/VTd/IntelVTdPmrPei/VtdReg.c| 50 ++
 .../PlatformVTdInfoSamplePei.c | 16 +++
 4 files changed, 95 insertions(+)

-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63440): https://edk2.groups.io/g/devel/message/63440
Mute This Topic: https://groups.io/mt/75861786/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci

2020-07-29 Thread Laszlo Ersek
On 07/29/20 03:32, Kinney, Michael D wrote:
> Hi Liming,
> 
> There are exception to PatchCheck as well for line endings and tabs.
> 
> Seems like a similar problem, and a single CI plugin could
> support all these cases.

The exceptions for LicenseCheck are individual files that package
maintainers (and contributors too) could customize. The primary use case
is permitting generated files to have no SPDX tag at all. PatchCheck
does not have a customizable exception list; it only considers general
rules that apply to the whole tree.

I did suggest "@file: generated" as a general marker for generated files
(which would opt them out of SPDX enforcement), here:
.

I'm equally happy with an IgnoreFiles stanza in
"OvmfPkg/OvmfPkg.ci.yaml", or a marker like "@file: generated" in some
files under OvmfPkg. What's important to me is that we can control and
update the license checks for OvmfPkg/ files with OvmfPkg/ patches. That
is, in case we need to tweak the license check for some OvmfPkg/ file,
the corresponding patch should need OvmfPkg maintainer approval *only*.
Adding exceptions to PatchCheck has been difficult, as (a) it affects
all of edk2, (b) technically it needs to pass BaseTools review.

With the license check, I'm happy to have the mechanism under BaseTools
and/or CI, but the policy should be per package. Again my sole
motivation at this time is generated files that we need to check in for
whatever reason.

Thanks!
Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63439): https://edk2.groups.io/g/devel/message/63439
Mute This Topic: https://groups.io/mt/75678207/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci

2020-07-29 Thread Laszlo Ersek
On 07/29/20 01:33, Kinney, Michael D wrote:
> CI already runs PatchCheck.  If we ported PatchCheck to
> a CI plugin, then the plugin could perform both the 
> current PatchCheck features and the license check.
> 
> What this option evaluated?
> 
> If we did provide PatchCheck as a CI plugin, developers
> I believe developers could run a stuart command likely
> for the NOOPT target to run a PatchCheck CI plugin locally.

Not sure if I understand correctly, but I very much like the ability to
run PatchCheck without needing anything else than a local Python binary.

Thanks!
Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63438): https://edk2.groups.io/g/devel/message/63438
Mute This Topic: https://groups.io/mt/75678207/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 1/1] Maintainers.txt: Add "Guomin Jiang" as reviewer for Crypto and Capsule

2020-07-29 Thread Laszlo Ersek
On 07/29/20 09:00, Guomin Jiang wrote:
> Add myself as reviewer for CryptoPkg/ and *Capsule* and FmpDevicePkg/.
> 
> Signed-off-by: Guomin Jiang 
> Cc: Andrew Fish 
> Cc: Laszlo Ersek 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> ---
>  Maintainers.txt | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index 5504bb3d17cc..8c27094e433e 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -164,6 +164,7 @@ W: 
> https://github.com/tianocore/tianocore.github.io/wiki/CryptoPkg
>  M: Jiewen Yao 
>  M: Jian J Wang 
>  R: Xiaoyu Lu 
> +R: Guomin Jiang 
>  
>  DynamicTablesPkg
>  F: DynamicTablesPkg/
> @@ -197,6 +198,7 @@ F: FmpDevicePkg/
>  W: https://github.com/tianocore/tianocore.github.io/wiki/FmpDevicePkg
>  M: Liming Gao 
>  M: Michael D Kinney 
> +R: Guomin Jiang 
>  
>  IntelFsp2Pkg
>  F: IntelFsp2Pkg/
> @@ -321,6 +323,7 @@ F: MdeModulePkg/Library/FmpAuthenticationLibNull/
>  F: MdeModulePkg/Universal/Esrt*/
>  R: Hao A Wu 
>  R: Liming Gao 
> +R: Guomin Jiang 
>  
>  MdeModulePkg: HII and UI modules
>  F: MdeModulePkg/*FileExplorer*/
> 

>From my side:

Acked-by: Laszlo Ersek 

But, before merging this patch, one "M" person from each of the affected
packages should respond with a Reviewed-by:

- CryptoPkg: Jiewen or Jian
- FmpDevicePkg: Liming or Mike
- MdeModulePkg (Firmware Update modules): Jian or Hao

I've CC'd these maintainers now.

Thanks
Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63437): https://edk2.groups.io/g/devel/message/63437
Mute This Topic: https://groups.io/mt/75860380/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 00/16] OvmfPkg: support VCPU hotplug with -D SMM_REQUIRE

2020-07-29 Thread Wu, Jiaxin
Hi Laszlo,

Appreciate your feedback! Thank you very much.

Jiaxin

> -Original Message-
> From: Laszlo Ersek 
> Sent: Saturday, July 25, 2020 12:02 AM
> To: Wu, Jiaxin 
> Cc: devel@edk2.groups.io
> Subject: Re: [edk2-devel] [PATCH 00/16] OvmfPkg: support VCPU hotplug
> with -D SMM_REQUIRE
> 
> On 07/24/20 08:26, Wu, Jiaxin wrote:
> > Hi Laszlo,
> >
> > Looks OVMF supports the CPU hotplug with those series patches.
> >
> > Could you provide some guide how to enable the OVMF CPU hotplug
> > verification? Is there any general work flow introduction how it
> > works? For example, how to do the hot add CPU initialization (e.g.
> > Register setting / Microcode update, etc.)? I'm very interested in
> > this feature on OVMF.
> 
> Long version:
> -
> 
> (1) There are three pieces missing:
> 
> (1a) The QEMU side changes for the ACPI (DSDT) content that QEMU
> generates for the OS.
> 
> The ACPI GPE handler for CPU hotplug is being modified by my colleague
> Igor Mammedov to raise the SMI (command value 4) on CPU hotplug.
> 
> For developing the OVMF series for TianoCore#1512 (which is now merged),
> I used a prototype QEMU patch, from Igor. But that patch is not suitable
> for upstreaming to QEMU. SO Igor is now developing the real patches for
> QEMU's ACPI generator.
> 
> (1b) The related feature negotiation patches in QEMU.
> 
> In order for "CPU hotplug with SMM" to work, both OVMF and QEMU need
> to
> perform specific things. In order to deal with cross-version
> compatibility problems, the "CPU hotplug with SMI" feature is
> dynamically negotiated between OVMF and QEMU. For this negotiation,
> both
> QEMU and OVMF need additional patches. These patches are not related to
> the actual plugging activities; instead they control whether plugging is
> permitted at all, or not.
> 
> Igor's QEMU series covers both purposes (1a) and (1b). It's work in
> progress. The first posting was an RFC series:
> 
> (1b1) [RFC 0/3] x86: fix cpu hotplug with secure boot
>   https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg03746.html
>   http://mid.mail-archive.com/20200710161704.309824-1-
> imamm...@redhat.com
> 
> The latest posting has been a PATCH series:
> 
> (1b2) [qemu-devel] [PATCH 0/6] x86: fix cpu hotplug with secure boot
>   https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg05850.html
>   http://mid.mail-archive.com/20200720141610.574308-1-
> imamm...@redhat.com
> 
> (1c) The feature negotiation patch for OVMF is here:
> 
> * [edk2-devel] [PATCH] OvmfPkg/SmmControl2Dxe: negotiate
> ICH9_LPC_SMI_F_CPU_HOTPLUG
>   https://edk2.groups.io/g/devel/message/62561
>   20200714184305.9814-1-lersek@redhat.com">http://mid.mail-archive.com/20200714184305.9814-1-lersek@redhat.com
> 
> 
> (2) Special register setting and microcode stuff are not needed.
> 
> 
> (3) As I mentioned before, I strongly suggest using QEMU and OVMF with
> libvirt. I had written an article about that here:
> 
>   https://github.com/tianocore/tianocore.github.io/wiki/Testing-SMM-with-
> QEMU,-KVM-and-libvirt
> 
> I wrote this article specifically for "Windows-based" developers. The
> article is written from such a perspective that you don't need a
> personal Linux workstation, only a single Linux workstation *per team*.
> So you can continue using a Windows workstation, just set up one Linux
> box for your team (if you don't yet have one).
> 
> This article remains relevant.
> 
> (3a) In order to set up a guest for VCPU hotplug, simply go through the
> article, initially.
> 
> (3b) Once you're done with that, power down the guest, and modify the
> domain XML as follows:
> 
>   virsh edit 
> 
> (3b1) replace the "pc-q35-2.9" machine type with "pc-q35-5.1"
> 
> (3b2) replace the following stanza:
> 
>   4
> 
> with:
> 
>   4
>   
> 
> 
> 
> 
>   
> 
> This will create a VCPU topology where:
> 
> - CPU#0 is present up-front, and is not hot-pluggable (this is a QEMU
> requirement),
> 
> - CPU#1, CPU#2, and CPU#3 are hot-pluggable,
> 
> - CPU#2 is present up-front ("cold-plugged"), while CPU#1 and CPU#3 are
> absent initially.
> 
> 
> (4) Boot the guest. Once you have a root prompt in the guest, you can
> use one of two libvirt commands for hot-plugging a CPU:
> 
> (4a) the singular "virsh setvcpu" command:
> 
>   virsh setvcpu   --enable --live
> 
> where you can pass in 1 or 3 for .
> 
> This command lets you specify the precise ID of the processor to be
> hot-plugged; IOW, the command lets you control topology.
> 
> (4b) the plural "virsh setvcpus" command:
> 
>   virsh setvcpus   --live
> 
> This command lets you specify the desired number of total active CPUs.
> It does not let you control topology. (My understanding is that it keeps
> the topology populated at the "front".)
> 
> Regarding the current QEMU status, we need to do more work for
> supporting (4b). The RFC series (1b1) enables (4a) to work. The PATCH
> series (1b2) intended to make (4b) work, but unfortunately it broke even
> (4a).

Re: [edk2-devel] [PATCH v4 2/3] MdePkg/BasePciExpressLib: Support variable size MMCONF

2020-07-29 Thread Marcello Sylvester Bauer
I only updated BasePciExpressLib because it is the only library used by
UefiPayloadPkg, where the change is mandatory for the patch series.
Do I have to adapt DxeRuntimePciExpressLib and SmmPciExpressLib too ?

Best regards,
Marcello

On Tue, Jul 28, 2020 at 3:55 AM Gao, Liming  wrote:

> Thanks for your update.
>
> This patch updates PciExpressLib library class to depend on
> PcdPciExpressBaseAddress and PcdPciExpressBaseSize both. So, all
> PciExpressLib library instances (BasePciExpressLib, DxeRuntimePciExpressLib
> and SmmPciExpressLib) should be updated. Otherwise, the developer may be
> confused when he finds PcdPciExpressBaseSize doesn't work. Can you let me
> know why you only update BasePciExpressLib library instance?
>
> Thanks
> Liming
> -Original Message-
> From: Marcello Sylvester Bauer 
> Sent: 2020年7月27日 16:19
> To: devel@edk2.groups.io
> Cc: Patrick Rudolph ; Christian Walter <
> christian.wal...@9elements.com>; Kinney, Michael D <
> michael.d.kin...@intel.com>; Gao, Liming 
> Subject: [PATCH v4 2/3] MdePkg/BasePciExpressLib: Support variable size
> MMCONF
>
> Add support for arbitrary sized MMCONF by introducing a new PCD.
>
> Signed-off-by: Patrick Rudolph 
> Signed-off-by: Marcello Sylvester Bauer 
> Cc: Patrick Rudolph 
> Cc: Christian Walter 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> ---
>  MdePkg/MdePkg.dec  |   4 +
>  MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf |   6 +-
>  MdePkg/Include/Library/PciExpressLib.h |   5 +-
>  MdePkg/Library/BasePciExpressLib/PciExpressLib.c   | 216
> +---
>  4 files changed, 193 insertions(+), 38 deletions(-)
>
> diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index
> 73f6c2407357..812be75fb3b2 100644
> --- a/MdePkg/MdePkg.dec
> +++ b/MdePkg/MdePkg.dec
> @@ -2274,6 +2274,10 @@ [PcdsFixedAtBuild, PcdsPatchableInModule,
> PcdsDynamic, PcdsDynamicEx]
># @Prompt PCI Express Base Address.
>  
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE000|UINT64|0x000a
> +  ## This value is used to set the size of PCI express hierarchy. The
> default is 256 MB.+  # @Prompt PCI Express Base Size.+
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|0x1000|UINT64|0x000f+
>  ## Default current ISO 639-2 language: English & French.   # @Prompt
> Default Value of LangCodes Variable.
>  
> gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangCodes|"engfraengfra"|VOID*|0x001cdiff
> --git a/MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
> b/MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
> index a7edb74cde71..12734b022ac7 100644
> --- a/MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
> +++ b/MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
> @@ -1,7 +1,7 @@
>  ## @file-#  Instance of PCI Express Library using the 256 MB PCI Express
> MMIO window.+#  Instance of PCI Express Library using the variable size PCI
> Express MMIO window. #-#  PCI Express Library that uses the 256 MB PCI
> Express MMIO window to perform+#  PCI Express Library that uses the
> variable size PCI Express MMIO window to perform #  PCI Configuration
> cycles. Layers on top of an I/O Library instance. # #  Copyright (c) 2007 -
> 2018, Intel Corporation. All rights reserved.@@ -38,4 +38,4 @@
> [LibraryClasses]
>   [Pcd]   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress  ##
> CONSUMES-+  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize  ## CONSUMESdiff
> --git a/MdePkg/Include/Library/PciExpressLib.h
> b/MdePkg/Include/Library/PciExpressLib.h
> index 826fdcf7db6c..d78193a0a352 100644
> --- a/MdePkg/Include/Library/PciExpressLib.h
> +++ b/MdePkg/Include/Library/PciExpressLib.h
> @@ -2,8 +2,9 @@
>Provides services to access PCI Configuration Space using the MMIO PCI
> Express window.This library is identical to the PCI Library, except the
> access method for performing PCI-  configuration cycles must be through the
> 256 MB PCI Express MMIO window whose base address-  is defined by
> PcdPciExpressBaseAddress.+  configuration cycles must be through the PCI
> Express MMIO window whose base address+  is defined by
> PcdPciExpressBaseAddress and size defined by PcdPciExpressBaseSize.+
> Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patentdiff --git
> a/MdePkg/Library/BasePciExpressLib/PciExpressLib.c
> b/MdePkg/Library/BasePciExpressLib/PciExpressLib.c
> index 99a166c3609b..0311ecb3025f 100644
> --- a/MdePkg/Library/BasePciExpressLib/PciExpressLib.c
> +++ b/MdePkg/Library/BasePciExpressLib/PciExpressLib.c
> @@ -22,7 +22,8 @@
>   /**   Assert the validity of a PCI address. A valid PCI address should
> contain 1's-  only in the low 28 bits.+  only in the low 28 bits.
> PcdPciExpressBaseSize limits the size to the real+  number of PCI busses in
> this segment.@param  A The address to validate. @@ -79,6 +80,24 @@
> GetPciExpressBaseAddress (
>return (VOID*)(UINTN) PcdGet64 (PcdPciExpressBaseAddress

Re: [edk2-devel] [PATCH] MdePkg: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES

2020-07-29 Thread Liming Gao
Include Leif and Ard. This change may impact ARM platform. 

Thanks
Liming
-Original Message-
From: devel@edk2.groups.io  On Behalf Of Liming Gao
Sent: 2020年6月9日 21:08
To: Zhang, Shenglei ; devel@edk2.groups.io
Cc: Kinney, Michael D 
Subject: Re: [edk2-devel] [PATCH] MdePkg: Remove code wrapped by 
DISABLE_NEW_DEPRECATED_INTERFACES

Shenglei:
  Please also remove the deprecated code in MdeModulePkg.

Thanks
Liming
> -Original Message-
> From: Zhang, Shenglei 
> Sent: Friday, June 5, 2020 4:13 PM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D ; Gao, Liming 
> 
> Subject: [PATCH] MdePkg: Remove code wrapped by 
> DISABLE_NEW_DEPRECATED_INTERFACES
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2777
> Code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES is deprecated.
> So remove it.
> 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Signed-off-by: Shenglei Zhang 
> ---
>  MdePkg/Library/BaseLib/String.c| 626 -
>  MdePkg/Library/BasePcdLibNull/PcdLib.c | 361 --
>  MdePkg/Library/BasePrintLib/PrintLib.c | 118 -
>  MdePkg/Library/DxePcdLib/DxePcdLib.c   | 399 
>  MdePkg/Library/PeiPcdLib/PeiPcdLib.c   | 397 
>  MdePkg/Library/UefiLib/UefiLib.c   |  92 
>  MdePkg/Include/Library/BaseLib.h   | 409 
>  MdePkg/Include/Library/PcdLib.h| 520 
>  MdePkg/Include/Library/PrintLib.h  | 110 -
>  MdePkg/Include/Library/UefiLib.h   |  53 ---
>  MdePkg/MdePkg.dsc  |   1 -
>  11 files changed, 3086 deletions(-)
> 
> diff --git a/MdePkg/Library/BaseLib/String.c b/MdePkg/Library/BaseLib/String.c
> index 45198373f25c..f4854f357e3a 100644
> --- a/MdePkg/Library/BaseLib/String.c
> +++ b/MdePkg/Library/BaseLib/String.c
> @@ -8,135 +8,6 @@
> 
>  #include "BaseLibInternals.h"
> 
> -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
> -
> -/**
> -  [ATTENTION] This function will be deprecated for security reason.
> -
> -  Copies one Null-terminated Unicode string to another Null-terminated 
> Unicode
> -  string and returns the new Unicode string.
> -
> -  This function copies the contents of the Unicode string Source to the 
> Unicode
> -  string Destination, and returns Destination. If Source and Destination
> -  overlap, then the results are undefined.
> -
> -  If Destination is NULL, then ASSERT().
> -  If Destination is not aligned on a 16-bit boundary, then ASSERT().
> -  If Source is NULL, then ASSERT().
> -  If Source is not aligned on a 16-bit boundary, then ASSERT().
> -  If Source and Destination overlap, then ASSERT().
> -  If PcdMaximumUnicodeStringLength is not zero, and Source contains more than
> -  PcdMaximumUnicodeStringLength Unicode characters, not including the
> -  Null-terminator, then ASSERT().
> -
> -  @param  Destination A pointer to a Null-terminated Unicode string.
> -  @param  Source  A pointer to a Null-terminated Unicode string.
> -
> -  @return Destination.
> -
> -**/
> -CHAR16 *
> -EFIAPI
> -StrCpy (
> -  OUT CHAR16*Destination,
> -  IN  CONST CHAR16  *Source
> -  )
> -{
> -  CHAR16*ReturnValue;
> -
> -  //
> -  // Destination cannot be NULL
> -  //
> -  ASSERT (Destination != NULL);
> -  ASSERT (((UINTN) Destination & BIT0) == 0);
> -
> -  //
> -  // Destination and source cannot overlap
> -  //
> -  ASSERT ((UINTN)(Destination - Source) > StrLen (Source));
> -  ASSERT ((UINTN)(Source - Destination) > StrLen (Source));
> -
> -  ReturnValue = Destination;
> -  while (*Source != 0) {
> -*(Destination++) = *(Source++);
> -  }
> -  *Destination = 0;
> -  return ReturnValue;
> -}
> -
> -/**
> -  [ATTENTION] This function will be deprecated for security reason.
> -
> -  Copies up to a specified length from one Null-terminated Unicode string  to
> -  another Null-terminated Unicode string and returns the new Unicode string.
> -
> -  This function copies the contents of the Unicode string Source to the 
> Unicode
> -  string Destination, and returns Destination. At most, Length Unicode
> -  characters are copied from Source to Destination. If Length is 0, then
> -  Destination is returned unmodified. If Length is greater that the number of
> -  Unicode characters in Source, then Destination is padded with Null Unicode
> -  characters. If Source and Destination overlap, then the results are
> -  undefined.
> -
> -  If Length > 0 and Destination is NULL, then ASSERT().
> -  If Length > 0 and Destination is not aligned on a 16-bit boundary, then 
> ASSERT().
> -  If Length > 0 and Source is NULL, then ASSERT().
> -  If Length > 0 and Source is not aligned on a 16-bit boundary, then 
> ASSERT().
> -  If Source and Destination overlap, then ASSERT().
> -  If PcdMaximumUnicodeStringLength is not zero, and Length is greater than
> -  PcdMaximumUnicodeStringLength, then ASSERT().
> -  If PcdMaximumUnicodeStringLength is not zero, and Source contains more than
> -  

Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci

2020-07-29 Thread Liming Gao
Mike:
  I think this is a separate request. I submit BZ 
https://bugzilla.tianocore.org/show_bug.cgi?id=2868 for it. 

Thanks
Liming
-Original Message-
From: Kinney, Michael D  
Sent: 2020年7月29日 9:33
To: Gao, Liming ; Zhang, Shenglei 
; devel@edk2.groups.io; Kinney, Michael D 

Cc: Sean Brogan ; Bret Barkelew 
; Dong, Eric ; Laszlo Ersek 
; Gao, Zhichao ; Yao, Jiewen 
; Chao Zhang ; Justen, Jordan L 
; Maciej Rabeda ; Wu, 
Jiaxin ; Fu, Siyuan ; Wang, Jian J 
; Wu, Hao A ; Andrew Fish 
; Ni, Ray ; Lu, XiaoyuX 
; Ard Biesheuvel ; Leif Lindholm 

Subject: RE: [PATCH 00/15] Add a plugin LicenseCheck in open ci

Hi Liming,

There are exception to PatchCheck as well for line endings and tabs.

Seems like a similar problem, and a single CI plugin could support all these 
cases.

Mike

> -Original Message-
> From: Gao, Liming 
> Sent: Tuesday, July 28, 2020 6:12 PM
> To: Kinney, Michael D ; Zhang, Shenglei 
> ; devel@edk2.groups.io
> Cc: Sean Brogan ; Bret Barkelew 
> ; Dong, Eric ; 
> Laszlo Ersek ; Gao, Zhichao 
> ; Yao, Jiewen ; Chao 
> Zhang ; Justen, Jordan L 
> ; Maciej Rabeda 
> ; Wu, Jiaxin ; Fu, 
> Siyuan ; Wang, Jian J ; 
> Wu, Hao A ; Andrew Fish ; Ni, Ray 
> ; Lu, XiaoyuX ; Ard Biesheuvel 
> ; Leif Lindholm ; Gao, 
> Liming 
> Subject: RE: [PATCH 00/15] Add a plugin LicenseCheck in open ci
> 
> Mike:
>   Previous discussion
> (https://edk2.groups.io/g/devel/message/62494) is to revert the 
> license check change in PatchCheck, and enable license check as 
> plugin. If so, the package maintainers can configure the package level 
> exception list to allow some special cases, such as autogen file.
> 
> Thanks
> Liming
> -Original Message-
> From: Kinney, Michael D 
> Sent: 2020年7月29日 7:34
> To: Zhang, Shenglei ; devel@edk2.groups.io; 
> Kinney, Michael D 
> Cc: Sean Brogan ; Bret Barkelew 
> ; Dong, Eric ; 
> Laszlo Ersek ; Gao, Zhichao 
> ; Yao, Jiewen ; Chao 
> Zhang ; Justen, Jordan L 
> ; Maciej Rabeda 
> ; Wu, Jiaxin ; Fu, 
> Siyuan ; Gao, Liming ; 
> Wang, Jian J ; Wu, Hao A ; 
> Andrew Fish ; Ni, Ray ; Lu, XiaoyuX 
> ; Ard Biesheuvel ; Leif 
> Lindholm 
> Subject: RE: [PATCH 00/15] Add a plugin LicenseCheck in open ci
> 
> CI already runs PatchCheck.  If we ported PatchCheck to a CI plugin, 
> then the plugin could perform both the current PatchCheck features and 
> the license check.
> 
> What this option evaluated?
> 
> If we did provide PatchCheck as a CI plugin, developers I believe 
> developers could run a stuart command likely for the NOOPT target to 
> run a PatchCheck CI plugin locally.
> 
> Thanks,
> 
> Mike
> 
> > -Original Message-
> > From: Zhang, Shenglei 
> > Sent: Monday, July 20, 2020 1:37 AM
> > To: devel@edk2.groups.io
> > Cc: Kinney, Michael D ;
> Sean Brogan
> > ; Bret Barkelew 
> > ; Dong, Eric
> ;
> > Laszlo Ersek ; Gao, Zhichao 
> > ; Yao, Jiewen
> ; Chao
> > Zhang ; Justen, Jordan L 
> > ; Maciej Rabeda 
> > ; Wu, Jiaxin
> ; Fu,
> > Siyuan ; Gao, Liming
> ;
> > Wang, Jian J ; Wu, Hao A
> ;
> > Andrew Fish ; Ni, Ray
> ; Lu, XiaoyuX
> > ; Ard Biesheuvel
> ; Leif
> > Lindholm 
> > Subject: [PATCH 00/15] Add a plugin LicenseCheck in
> open ci
> >
> > REF:
> https://bugzilla.tianocore.org/show_bug.cgi?id=2691
> > REF:
> https://bugzilla.tianocore.org/show_bug.cgi?id=2833
> > LicenseCheck is now enabled in PatchCheck.py. But
> there's a patch
> > "Revert 'BaseTools/PatchCheck.py: Add LicenseCheck'"
> > to suggest revert the change.These patch series
> introduce a plugin
> > LicenseCheck into open ci so that license issues can
> still be checked
> > after the checker is disabled in PatchCheck.py.
> > 1/15 is the plugin implementation.
> > 2/15 ~ 15/15 introduce sections "IgnoreFiles" to allow
> developers to
> > skip license check for some files like generated
> files.
> >
> > Only BSD-2-Clause-Patent and BSD-3-Clause-Patent can
> pass this
> > checker.
> >
> > Cc: Michael D Kinney 
> > Cc: Sean Brogan 
> > Cc: Bret Barkelew 
> > Cc: Eric Dong 
> > Cc: Laszlo Ersek 
> > Cc: Zhichao Gao 
> > Cc: Jiewen Yao 
> > Cc: Chao Zhang 
> > Cc: Jordan Justen 
> > Cc: Maciej Rabeda 
> > Cc: Jiaxin Wu 
> > Cc: Siyuan Fu 
> > Cc: Liming Gao 
> > Cc: Jian J Wang 
> > Cc: Hao A Wu 
> > Cc: Jordan Justen 
> > Cc: Andrew Fish 
> > Cc: Ray Ni 
> > Cc: Jian J Wang 
> > Cc: Xiaoyu Lu 
> > Cc: Ard Biesheuvel 
> > Cc: Leif Lindholm  Shenglei Zhang (15):
> >   .pytool/Plugin: Add a plugin LicenseCheck
> >   FatPkg/FatPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   ArmVirtPkg/ArmVirtPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   CryptoPkg/CryptoPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   EmulatorPkg/EmulatorPkg.ci.yaml: Add configuration
> for LicenseCheck
> >   FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration
> for
> > LicenseCheck
> >   MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration
> for
> > LicenseCheck
> >   MdePkg/MdePkg.ci.yaml: Add configuration for
> LicenseCheck
> >   NetworkPkg/NetworkPkg.ci.yaml: Add configuration for
> Lic

Re: [edk2-devel] [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck

2020-07-29 Thread Liming Gao
Shenglei:
  Readme mentions BSD-2-Clause Plus Patent License, but no BSD-3-Clause Plus 
Patent License. So, please check BSD-2-Clause Plus Patent License only. 

Thanks
Liming
-Original Message-
From: Zhang, Shenglei  
Sent: 2020年7月29日 14:07
To: Kinney, Michael D ; devel@edk2.groups.io
Cc: Sean Brogan ; Bret Barkelew 
; Gao, Liming 
Subject: RE: [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck

Five sorts of license are accepted in edk2(described in readme). They are BSD 
(2-clause), BSD (3-clause), MIT, Python-2.0 and zlib.
Minus non bsd plus patent license, they are BSD (2-clause) and BSD (3-clause).

Thanks,
Shenglei

> -Original Message-
> From: Kinney, Michael D 
> Sent: Wednesday, July 29, 2020 7:29 AM
> To: Zhang, Shenglei ; devel@edk2.groups.io; 
> Kinney, Michael D 
> Cc: Sean Brogan ; Bret Barkelew 
> ; Gao, Liming 
> Subject: RE: [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck
> 
> Where did the requirement for BSD-3-Clause-Patent come from?
> 
> Thanks,
> 
> Mike
> 
> > -Original Message-
> > From: Zhang, Shenglei 
> > Sent: Monday, July 20, 2020 1:37 AM
> > To: devel@edk2.groups.io
> > Cc: Sean Brogan ; Bret Barkelew 
> > ; Kinney, Michael D 
> > ; Gao, Liming 
> > Subject: [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
> > Add a plugin to check license conflict for new added files in a 
> > patch. It will report out errors when meeting files which are now 
> > contributed under BSD-2-Clause- Patent or BSD-3-Clause-Patent.
> >
> > Cc: Sean Brogan 
> > Cc: Bret Barkelew 
> > Cc: Michael D Kinney 
> > Cc: Liming Gao 
> > Signed-off-by: Shenglei Zhang 
> > ---
> >  .pytool/Plugin/LicenseCheck/LicenseCheck.py   | 118
> > ++
> >  .../LicenseCheck/LicenseCheck_plug_in.yaml|  11 ++
> >  .pytool/Plugin/LicenseCheck/Readme.md |  17 +++
> >  3 files changed, 146 insertions(+)
> >  create mode 100644
> > .pytool/Plugin/LicenseCheck/LicenseCheck.py
> >  create mode 100644
> > .pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
> >  create mode 100644
> > .pytool/Plugin/LicenseCheck/Readme.md
> >
> > diff --git a/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> > b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> > new file mode 100644
> > index ..98941ddda758
> > --- /dev/null
> > +++ b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> > @@ -0,0 +1,118 @@
> > +# @file LicenseCheck.py
> > +#
> > +# Copyright (c) 2020, Intel Corporation. All rights
> > reserved.
> > +# SPDX-License-Identifier: BSD-2-Clause-Patent ##
> > +
> > +import os
> > +import logging
> > +import re
> > +from io import StringIO
> > +from typing import List, Tuple
> > +from
> > edk2toolext.environment.plugintypes.ci_build_plugin
> > import ICiBuildPlugin
> > +from edk2toolext.environment.var_dict import VarDict from 
> > +edk2toollib.utility_functions import RunCmd
> > +
> > +
> > +class LicenseCheck(ICiBuildPlugin):
> > +
> > +"""
> > +A CiBuildPlugin to check the license for new added
> > files.
> > +
> > +Configuration options:
> > +"LicenseCheck": {
> > +"IgnoreFiles": []
> > +},
> > +"""
> > +
> > +license_format_preflix = 'SPDX-License-Identifier'
> > +
> > +bsd2_patent = 'BSD-2-Clause-Patent'
> > +
> > +bsd3_patent = 'BSD-3-Clause-Patent'
> > +
> > +Readdedfileformat = re.compile(r'\+\+\+ b\/(.*)')
> > +
> > +file_extension_list = [".c", ".h", ".inf", ".dsc",
> > ".dec", ".py", ".bat", ".sh", ".uni", ".yaml",
> > +   ".fdf", ".inc", "yml",
> > ".asm", ".asm16", ".asl", ".vfr", ".s", ".S", ".aslc",
> > +   ".nasm", ".nasmb", ".idf",
> > ".Vfr", ".H"]
> > +
> > +def GetTestName(self, packagename: str,
> > environment: VarDict) -> tuple:
> > +""" Provide the testcase name and classname for
> > use in reporting
> > +testclassname: a descriptive string for the
> > testcase can include whitespace
> > +classname: should be patterned
> > ..
> > +
> > +Args:
> > +  packagename: string containing name of
> > package to build
> > +  environment: The VarDict for the test to
> > run in
> > +Returns:
> > +a tuple containing the testcase name
> > and the classname
> > +(testcasename, classname)
> > +"""
> > +return ("Check for license for " + packagename,
> > packagename + ".LicenseCheck")
> > +
> > +##
> > +# External function of plugin.  This function is
> > used to perform the task of the ci_build_plugin Plugin
> > +#
> > +#   - package is the edk2 path to package.  This
> > means workspace/packagepath relative.
> > +#   - edk2path object configured with workspace and
> > packages path
> > +#   - PkgConfig Object (dict) for the pkg
> > +#   - EnvConfig Object
> > +#   - Plugin Man

[edk2-devel] [PATCH 1/1] Maintainers.txt: Add "Guomin Jiang" as reviewer for Crypto and Capsule

2020-07-29 Thread Guomin Jiang
Add myself as reviewer for CryptoPkg/ and *Capsule* and FmpDevicePkg/.

Signed-off-by: Guomin Jiang 
Cc: Andrew Fish 
Cc: Laszlo Ersek 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
---
 Maintainers.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Maintainers.txt b/Maintainers.txt
index 5504bb3d17cc..8c27094e433e 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -164,6 +164,7 @@ W: 
https://github.com/tianocore/tianocore.github.io/wiki/CryptoPkg
 M: Jiewen Yao 
 M: Jian J Wang 
 R: Xiaoyu Lu 
+R: Guomin Jiang 
 
 DynamicTablesPkg
 F: DynamicTablesPkg/
@@ -197,6 +198,7 @@ F: FmpDevicePkg/
 W: https://github.com/tianocore/tianocore.github.io/wiki/FmpDevicePkg
 M: Liming Gao 
 M: Michael D Kinney 
+R: Guomin Jiang 
 
 IntelFsp2Pkg
 F: IntelFsp2Pkg/
@@ -321,6 +323,7 @@ F: MdeModulePkg/Library/FmpAuthenticationLibNull/
 F: MdeModulePkg/Universal/Esrt*/
 R: Hao A Wu 
 R: Liming Gao 
+R: Guomin Jiang 
 
 MdeModulePkg: HII and UI modules
 F: MdeModulePkg/*FileExplorer*/
-- 
2.25.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63431): https://edk2.groups.io/g/devel/message/63431
Mute This Topic: https://groups.io/mt/75860380/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-