Re: [edk2-devel] Patch List for 202008 stable tag

2020-08-20 Thread Liming Gao
Abner:
 I plan to wait 1~2 days and collect the feedback about delay 202008 stable 
tag. If no objection, I will help merge this change.

Thanks
Liming
From: devel@edk2.groups.io  On Behalf Of Abner Chang
Sent: 2020年8月21日 11:22
To: Gao, Liming ; Leif Lindholm ; 
Laszlo Ersek ; af...@apple.com; Kinney, Michael D 
; Guptha, Soumya K ; 
Vladimir Olovyannikov ; Tom Lendacky 

Cc: devel@edk2.groups.io
Subject: Re: [edk2-devel] Patch List for 202008 stable tag

Hi Liming, I didn’t see https://edk2.groups.io/g/devel/message/63767 [PATCH] 
EmbeddedPkg/libfdt: Add strncmp macro to use AsciiStrnCmp
push to edk2 master and today is 8/12. Could you please help to push this 
commit?

Thanks
Abner

From: Gao, Liming [mailto:liming@intel.com]
Sent: Thursday, August 20, 2020 7:31 PM
To: Leif Lindholm mailto:l...@nuviainc.com>>; Laszlo Ersek 
mailto:ler...@redhat.com>>; 
af...@apple.com; Kinney, Michael D 
mailto:michael.d.kin...@intel.com>>; Guptha, Soumya 
K mailto:soumya.k.gup...@intel.com>>; Chang, Abner 
(HPS SW/FW Technologist) mailto:abner.ch...@hpe.com>>; 
Vladimir Olovyannikov 
mailto:vladimir.olovyanni...@broadcom.com>>;
 Tom Lendacky mailto:thomas.lenda...@amd.com>>
Cc: devel@edk2.groups.io
Subject: Patch List for 202008 stable tag

Hi Stewards and all:
  I collect current patch lists in devel mail list. Those patch contributors 
request to add them for 202008 stable tag. Because we have enter into Soft 
Feature Freeze, I want to collect your feedback for them. If any patches are 
missing, please reply this mail to add them.

Feature List:
https://edk2.groups.io/g/devel/message/63767 [PATCH] EmbeddedPkg/libfdt: Add 
strncmp macro to use AsciiStrnCmp
[Liming] This patch pass code review after Soft Feature Freeze (SFF) starts. 
According to SFF definition, it should not be merged for this stable tag. But, 
the patch submitter says this patch is important to RISC-V community. To catch 
it for this stable tag, Laszlo proposed the solution to defer SFF start day 
from 2020-08-14 to 2020-08-21, then hard feature freeze and release date will 
also defer one week. Any patches those pass review before new SFF start day can 
be merged. @ Stewards, please give your comments to defer this stable tag 
release by one week.

https://edk2.groups.io/g/devel/message/63348 [PATCH v5 1/1] 
ShellPkg/DynamicCommand: add HttpDynamicCommand
[Liming] This patch has collected the review comment. New version will be sent. 
I have no information how important it is. @Vladimir, does this patch must 
catch this stable tag? If yes, can you give the reason?

Bug List:
https://edk2.groups.io/g/devel/message/64383 [PATCH 1/1] UefiCpuPkg/MpInitLib: 
Always initialize the DoDecrement variable
[Liming] This patch has collected the review comment. New version will be sent.

https://edk2.groups.io/g/devel/message/50406 [PATCH 1/1] MdePkg/Include: Add 
missing definitions of SMBIOS type 42h in SmBios.h
[Liming] This patch passed review early. But, it is not merged. I will merge it.

Thanks
Liming


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

View/Reply Online (#64520): https://edk2.groups.io/g/devel/message/64520
Mute This Topic: https://groups.io/mt/76306021/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 1/1] UefiCpuPkg/MpInitLib: Always initialize the DoDecrement variable

2020-08-20 Thread Liming Gao
Tested-by: Liming Gao 

-Original Message-
From: Dong, Eric  
Sent: 2020年8月21日 8:39
To: devel@edk2.groups.io; thomas.lenda...@amd.com
Cc: Gao, Liming ; Ni, Ray ; Laszlo 
Ersek ; Kumar, Rahul1 
Subject: RE: [edk2-devel] [PATCH v2 1/1] UefiCpuPkg/MpInitLib: Always 
initialize the DoDecrement variable

Reviewed-by: Eric Dong 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of 
> Lendacky, Thomas
> Sent: Thursday, August 20, 2020 10:53 PM
> To: devel@edk2.groups.io
> Cc: Gao, Liming ; Dong, Eric 
> ; Ni, Ray ; Laszlo Ersek 
> ; Kumar,
> Rahul1 
> Subject: [edk2-devel] [PATCH v2 1/1] UefiCpuPkg/MpInitLib: Always 
> initialize the DoDecrement variable
> 
> From: Tom Lendacky 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2901
> 
> The DoDecrement variable in ApWakeupFunction () wasn't always being 
> initialized. Update the code to always fully initialize it.
> 
> Cc: Eric Dong 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 
> Cc: Rahul Kumar 
> Signed-off-by: Tom Lendacky 
> ---
>  UefiCpuPkg/Library/MpInitLib/MpLib.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c
> b/UefiCpuPkg/Library/MpInitLib/MpLib.c
> index 90416c81b616..07426274f639 100644
> --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
> +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
> @@ -885,9 +885,7 @@ ApWakeupFunction (
>UINT64Status;
>BOOLEAN   DoDecrement;
> 
> -  if (CpuMpData->InitFlag == ApInitConfig) {
> -DoDecrement = TRUE;
> -  }
> +  DoDecrement = (BOOLEAN) (CpuMpData->InitFlag == 
> + ApInitConfig);
> 
>while (TRUE) {
>  Msr.GhcbPhysicalAddress = AsmReadMsr64 (MSR_SEV_ES_GHCB);
> --
> 2.28.0
> 
> 
> 


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

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



[edk2-devel] Patch List for 202008 stable tag

2020-08-20 Thread Liming Gao
Hi Stewards and all:
  I collect current patch lists in devel mail list. Those patch contributors 
request to add them for 202008 stable tag. Because we have enter into Soft 
Feature Freeze, I want to collect your feedback for them. If any patches are 
missing, please reply this mail to add them.

Feature List:
https://edk2.groups.io/g/devel/message/63767 [PATCH] EmbeddedPkg/libfdt: Add 
strncmp macro to use AsciiStrnCmp
[Liming] This patch pass code review after Soft Feature Freeze (SFF) starts. 
According to SFF definition, it should not be merged for this stable tag. But, 
the patch submitter says this patch is important to RISC-V community. To catch 
it for this stable tag, Laszlo proposed the solution to defer SFF start day 
from 2020-08-14 to 2020-08-21, then hard feature freeze and release date will 
also defer one week. Any patches those pass review before new SFF start day can 
be merged. @ Stewards, please give your comments to defer this stable tag 
release by one week.

https://edk2.groups.io/g/devel/message/63348 [PATCH v5 1/1] 
ShellPkg/DynamicCommand: add HttpDynamicCommand
[Liming] This patch has collected the review comment. New version will be sent. 
I have no information how important it is. @Vladimir, does this patch must 
catch this stable tag? If yes, can you give the reason?

Bug List:
https://edk2.groups.io/g/devel/message/64383 [PATCH 1/1] UefiCpuPkg/MpInitLib: 
Always initialize the DoDecrement variable
[Liming] This patch has collected the review comment. New version will be sent.

https://edk2.groups.io/g/devel/message/50406 [PATCH 1/1] MdePkg/Include: Add 
missing definitions of SMBIOS type 42h in SmBios.h
[Liming] This patch passed review early. But, it is not merged. I will merge it.

Thanks
Liming

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

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



Re: [edk2-devel] [PATCH v5 2/3] MdePkg: PciExpressLib support variable size MMCONF

2020-08-20 Thread Liming Gao
Thanks for your updates. This version is good to me. Reviewed-by: Liming Gao 


-Original Message-
From: Marcello Sylvester Bauer  
Sent: 2020年8月18日 16:24
To: devel@edk2.groups.io
Cc: Patrick Rudolph ; Christian Walter 
; Kinney, Michael D 
; Gao, Liming 
Subject: [PATCH v5 2/3] MdePkg: PciExpressLib support variable size MMCONF

Add support for arbitrary sized MMCONF by introducing a new PCD.
Add a return value to point out invalid PCI addresses.

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: Support variable size MMCONF

* ASSERT if pci address is out of bound
* Add return value for invalid address

Signed-off-by: Marcello Sylvester Bauer 

MdePkg: remove out of bound assertion

Signed-off-by: Marcello Sylvester Bauer 
---
 MdePkg/MdePkg.dec  |   4 +
 MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf |   6 +-
 MdePkg/Library/DxeRuntimePciExpressLib/DxeRuntimePciExpressLib.inf |   1 +
 MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf   |   1 +
 MdePkg/Include/Library/PciExpressLib.h |   5 +-
 MdePkg/Library/BasePciExpressLib/PciExpressLib.c   | 216 
++---
 MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c | 247 

 MdePkg/Library/SmmPciExpressLib/PciExpressLib.c| 218 
++---
 8 files changed, 584 insertions(+), 114 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*|0x001c

diff --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  ## CONSUMES

diff --git a/MdePkg/Library/DxeRuntimePciExpressLib/DxeRuntimePciExpressLib.inf 
b/MdePkg/Library/DxeRuntimePciExpressLib/DxeRuntimePciExpressLib.inf
index 8d2ba1d18735..26a59bda1948 100644
--- a/MdePkg/Library/DxeRuntimePciExpressLib/DxeRuntimePciExpressLib.inf
+++ b/MdePkg/Library/DxeRuntimePciExpressLib/DxeRuntimePciExpressLib.inf
@@ -47,3 +47,4 @@ [LibraryClasses]
 

 [Pcd]

   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress  ## CONSUMES

+  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize  ## CONSUMES

diff --git a/MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf 
b/MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf
index 729f6a3083ba..78cab6352fac 100644
--- a/MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf
+++ b/MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf
@@ -35,3 +35,4 @@ [LibraryClasses]
 

 [Pcd]

  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress ## CONSUMES

+ gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize  ## CONSUMES

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

Re: [edk2-devel] [edk2-announce] Re: Soft Feature Freeze starts now for edk2-stable202008

2020-08-19 Thread Liming Gao

> -Original Message-
> From: Chang, Abner (HPS SW/FW Technologist) 
> Sent: Wednesday, August 19, 2020 10:59 PM
> To: Laszlo Ersek ; Leif Lindholm 
> Cc: devel@edk2.groups.io; Gao, Liming ; 
> annou...@edk2.groups.io; af...@apple.com; Kinney, Michael D
> 
> Subject: RE: [edk2-announce] Re: Soft Feature Freeze starts now for 
> edk2-stable202008
> 
> 
> 
> > -Original Message-
> > From: Laszlo Ersek [mailto:ler...@redhat.com]
> > Sent: Wednesday, August 19, 2020 10:30 PM
> > To: Chang, Abner (HPS SW/FW Technologist) ; Leif
> > Lindholm 
> > Cc: devel@edk2.groups.io; liming.gao ;
> > annou...@edk2.groups.io; af...@apple.com; Kinney, Michael D
> > 
> > Subject: Re: [edk2-announce] Re: Soft Feature Freeze starts now for edk2-
> > stable202008
> >
> > On 08/19/20 15:34, Chang, Abner (HPS SW/FW Technologist) wrote:
> > >
> > >
> > >> -Original Message-
> > >> From: Laszlo Ersek [mailto:ler...@redhat.com]
> > >> Sent: Wednesday, August 19, 2020 9:19 PM
> > >> To: Leif Lindholm ; Chang, Abner (HPS SW/FW
> > >> Technologist) 
> > >> Cc: devel@edk2.groups.io; liming.gao ;
> > >> annou...@edk2.groups.io; af...@apple.com; Kinney, Michael D
> > >> 
> > >> Subject: Re: [edk2-announce] Re: Soft Feature Freeze starts now for
> > >> edk2-
> > >> stable202008
> > >>
> > >> On 08/19/20 13:48, Leif Lindholm wrote:
> > >>> (Slightly trimmed recipient list due to different patch being
> > >>> discussed.)
> > >>>
> > >>> So, I can't make this call, because I'm the one who messed up.
> > >>>
> > >>> This patch does exactly what I had requested Abner to do some time
> > >>> back (off-list, unfortunately), and I was *convinced* I gave it an
> > >>> R-b as soon as it hit my inbox - until Abner nudged me about it 
> > >>> yesterday.
> > >>>
> > >>> The patch in question is
> > >>> https://edk2.groups.io/g/devel/topic/76021725
> > >>
> > >> My understanding is:
> > >>
> > >> (1) there is an external project that consumes the FDT library in
> > >> EmbeddedPkg, meaning the lib class header
> > >> "EmbeddedPkg/Include/libfdt.h"
> > >> and the lib instance "EmbeddedPkg/Library/FdtLib/FdtLib.inf",
> > > [Chang, Abner] Yes
> > >>
> > >> (2) the lib class header pulls in "fdt.h" and "libfdt_env.h",
> > > [Chang, Abner] yes
> > >>
> > >> (3) the external project is not edk2-platforms,
> > > [Chang, Abner] yes
> > >>
> > >> (4) the external project wants -- for some strange reason -- edk2's
> > >> "libfdt_env.h" to provide an strncmp() function (or function-like
> > >> macro), with that particular stncmp() implementation not being needed
> > >> in either edk2- platforms or edk2 itself,
> > > [Chang, Abner] yes, at least so far
> > >>
> > >> (5) the patch for adding said strncmp() was posted on Aug 6th (at
> > >> least when viewed from my time zone), i.e., before the SFF,
> > > [Chang, Abner] Yes
> > >>
> > >> (6) it was reviewed 12 days later (within the SFF)
> > > [Chang, Abner] yes.
> > >>
> > >> If my understanding is correct, then I don't see how this patch could
> > >> be considered a bugfix -- even as a feature addition, it seems hardly
> > >> justified to me --, and there would have been ~8 days before the SFF to
> > review it.
> > >>
> > >> I think we should postpone the patch until after the stable tag.
> > > This patch is important because the edk2-stable202008 would be the stable
> > tag (if this patch is accepted) for booting RISC-V platform to Linux kernel 
> > with
> > EFI Runtime service on either real platform and QEMU. We can publish this
> > information in RISC-V community which is considered as a valuable milestone
> > for RISC-V edk2 port.
> >
> > Let's move out the dates for the stable tag then, by one week:
> >
> > - let the SFF start on 2020-08-21
> > - let the HFF start on 2020-08-28
> > - let's release edk2-stable202008 on 2020-09-04
> >
> > Release slips are permitted and there have been examples.
> Appreciate for this.

Previous stable tags (202005/202002/201905) extended SFF or HFF period to let 
the critical bug fix catch the stable tag. 
Today case is like a new feature. According to Abner comment, it is important 
to RISC-V community.
If SFF start time is changed, more features may catch this stable, such as 
VariableLock feature.
> 
> >
> > What doesn't make sense is making rules and then breaking them
> > opportunistically, whenever they're uncomfortable. If that's a frequent
> > occurrence, we should pick different rules, or -- again -- if this is a very
> > important patch, we should delay the release for it.

I suggest to define the process on delay the release. The initial process is 
specified here.
The requestor provides the justification why his patch needs to catch the 
stable tag after SFF phase. 
All stewards make the decision whether delay the stable tag to include his 
patch.  
If stewards agree to delay the stable tag, and there is no objection from the 
community, 
the release maintainer will update edk2 release planning with new date. 
If stewards rejects to this 

Re: [edk2-devel] [PATCH 1/1] UefiCpuPkg/MpInitLib: Always initialize the DoDecrement variable

2020-08-19 Thread Liming Gao
Laszlo:

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Laszlo Ersek
> Sent: Wednesday, August 19, 2020 5:24 PM
> To: Tom Lendacky ; devel@edk2.groups.io
> Cc: Gao, Liming ; Dong, Eric ; Ni, 
> Ray ; Kumar, Rahul1
> 
> Subject: Re: [edk2-devel] [PATCH 1/1] UefiCpuPkg/MpInitLib: Always initialize 
> the DoDecrement variable
> 
> On 08/18/20 15:10, Tom Lendacky wrote:
> > From: Tom Lendacky 
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2901
> >
> > The DoDecrement variable in ApWakeupFunction () wasn't always being
> > initialized. Update the code to always fully initialize it.
> >
> > Cc: Eric Dong 
> > Cc: Ray Ni 
> > Cc: Laszlo Ersek 
> > Cc: Rahul Kumar 
> > Signed-off-by: Tom Lendacky 
> > ---
> >  UefiCpuPkg/Library/MpInitLib/MpLib.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c 
> > b/UefiCpuPkg/Library/MpInitLib/MpLib.c
> > index 90416c81b616..e24bdc64f930 100644
> > --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
> > +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
> > @@ -885,9 +885,7 @@ ApWakeupFunction (
> >UINT64Status;
> >BOOLEAN   DoDecrement;
> >
> > -  if (CpuMpData->InitFlag == ApInitConfig) {
> > -DoDecrement = TRUE;
> > -  }
> > +  DoDecrement = (CpuMpData->InitFlag == ApInitConfig) ? TRUE : 
> > FALSE;
> >
> >while (TRUE) {
> >  Msr.GhcbPhysicalAddress = AsmReadMsr64 (MSR_SEV_ES_GHCB);
> >
> 
> Not that I want to obsess about style, but
> 
>   (condition) ? TRUE : FALSE
> 
> is an anti-patter that's similar to
> 
>   (condition) == TRUE
> 
> Instead, I suggest:
> 
>   DoDecrement = (BOOLEAN)(CpuMpData->InitFlag == ApInitConfig);
> 
> (The (BOOLEAN) cast is necessary, or at least used to be necessary,
> becasue the == operator returns "int" (INT32), but BOOLEAN (i.e., the
> type of "DoDecrement") is UINT8 -- and some VS toolchains perceive (or
> used to perceive) this implicit conversion as a "potential loss of
> precision". That warning is of course bogus, as the == operator only
> produces 0 or 1, each of which values fits comfortably into a UINT8. But
> still the explicit (BOOLEAN) cast is how we suppress the warning.)

I agree this style is simpler than before. 
> 
> Different question: who's supposed to merge (v2 of) this? Per
> "Maintainers.txt", it should be Eric or Ray; OTOH, maybe the fix is
> urgent (build failure with CLANGPDB) and anyone with push access could
> qualify.
This fix needs to catch this stable tag. Once the package maintainer reviews 
it, I will merge it. 

Thanks
Liming
> 
> Thanks,
> Laszlo
> 
> 
> 


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

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



Re: [edk2-devel] [PATCH v4 0/2] Enable EDKII CI support for DynamicTablesPkg

2020-08-19 Thread Liming Gao
Merged 
a048af3c9073e4b8108e6cf920bbb35574059639..5a6d764e1d073d28e8f398289ccb5592bf9a72ba

Thanks
Liming
-Original Message-
From: devel@edk2.groups.io  On Behalf Of Leif Lindholm
Sent: 2020年8月18日 19:34
To: Gao, Liming 
Cc: Sami Mujawar ; devel@edk2.groups.io; 
bret.barke...@microsoft.com; sean.bro...@microsoft.com; Kinney, Michael D 
; af...@apple.com; Laszlo Ersek 
; Alexei Fedorov ; Ard Biesheuvel 
; Matteo Carlini ; Ben Adderson 
; nd 
Subject: Re: [edk2-devel] [PATCH v4 0/2] Enable EDKII CI support for 
DynamicTablesPkg

No objections from me.

On Mon, Aug 17, 2020 at 06:37:02 +, Gao, Liming wrote:
> Sami:
>   I think this change is OK. And, Shenglei and Alexei gave reviewed-by before 
> soft feature freeze. 
> 
> Mike, Leif, Andrew and Laszlo:
>   Have you any comments to merge this patch to edk2-stable202008 stable tag. 
> 
> Thanks
> Liming
> -Original Message-
> From: Sami Mujawar 
> Sent: 2020年8月14日 21:24
> To: Gao, Liming ; devel@edk2.groups.io; 
> bret.barke...@microsoft.com; sean.bro...@microsoft.com; Kinney, 
> Michael D 
> Cc: Alexei Fedorov ; Sami Mujawar 
> ; Ard Biesheuvel ; 
> Matteo Carlini ; Ben Adderson 
> ; nd 
> Subject: RE: [PATCH v4 0/2] Enable EDKII CI support for 
> DynamicTablesPkg
> 
> Hi All,
> 
> Is there anything else needed before this patch series can be merged?
> If possible, we would like this feature enabled in the edk2-stable202008.
> 
> Regards,
> 
> Sami Mujawar
> 
> -Original Message-
> From: Sami Mujawar 
> Sent: 07 August 2020 06:30 PM
> To: devel@edk2.groups.io
> Cc: Sami Mujawar ; Alexei Fedorov 
> ; sean.bro...@microsoft.com; 
> liming@intel.com; michael.d.kin...@intel.com; 
> bret.barke...@microsoft.com; Ard Biesheuvel ; 
> Matteo Carlini ; Laura Moretta 
> ; nd 
> Subject: [PATCH v4 0/2] Enable EDKII CI support for DynamicTablesPkg
> 
> The TianoCore EDKII project has introduced a Core CI infrastructure using 
> TianoCore EDKII Tools PIP modules.
> 
> The v2 patch series at https://edk2.groups.io/g/devel/message/63259
> adds support for building DynamicTablesPkg using the EKDII Core CI.
> 
> Splitting the v2 patch series into 2 separate series. This v4 series contains 
> the patches for enabling Core CI for DynamicTablesPkg in .pytools and 
> .azurepipelines i.e. the last two patches from the v2 series.
> 
> The v3 series containing the patches for DynamicTablesPkg has already been 
> merged in edk2 master at:
> - 
> https://github.com/tianocore/edk2/commit/2d0c42fdf2cf1855b0a042ef82d84
> 8c7716adefe
> - 
> https://github.com/tianocore/edk2/commit/e3f8605a23ebe9c54ae2b17819d00
> e185069667d Ref (v3 series): 
> https://edk2.groups.io/g/devel/topic/patch_v3_0_2_add_edkii_ci/7605235
> 1
> 
> There is no code change other than splitting the v2 series.
> 
> The changes for this v4 series can be seen at:
> https://github.com/samimujawar/edk2/tree/839_dynamictablespkg_ci_v4
> 
> Sami Mujawar (2):
>   .pytool: CI Settings to support DynamicTablesPkg
>   .azurepipelines: Add DynamicTablesPkg to CI matrix
> 
>  .azurepipelines/templates/pr-gate-build-job.yml | 3 ++-
>  .pytool/CISettings.py   | 2 ++
>  .pytool/Readme.md   | 2 +-
>  3 files changed, 5 insertions(+), 2 deletions(-) 
> 
> --
> 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
> 




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

View/Reply Online (#64419): https://edk2.groups.io/g/devel/message/64419
Mute This Topic: https://groups.io/mt/76053995/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] UefiCpuPkg/MpInitLib: Always initialize the DoDecrement variable

2020-08-19 Thread Liming Gao
Tested-by: Liming Gao 
Reviewed-by: Liming Gao 

-Original Message-
From: Tom Lendacky  
Sent: 2020年8月18日 21:10
To: devel@edk2.groups.io
Cc: Gao, Liming ; Dong, Eric ; Ni, 
Ray ; Laszlo Ersek ; Kumar, Rahul1 

Subject: [PATCH 1/1] UefiCpuPkg/MpInitLib: Always initialize the DoDecrement 
variable

From: Tom Lendacky 

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

The DoDecrement variable in ApWakeupFunction () wasn't always being 
initialized. Update the code to always fully initialize it.

Cc: Eric Dong 
Cc: Ray Ni 
Cc: Laszlo Ersek 
Cc: Rahul Kumar 
Signed-off-by: Tom Lendacky 
---
 UefiCpuPkg/Library/MpInitLib/MpLib.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c 
b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index 90416c81b616..e24bdc64f930 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
@@ -885,9 +885,7 @@ ApWakeupFunction (
   UINT64Status;
   BOOLEAN   DoDecrement;
 
-  if (CpuMpData->InitFlag == ApInitConfig) {
-DoDecrement = TRUE;
-  }
+  DoDecrement = (CpuMpData->InitFlag == ApInitConfig) ? TRUE : 
+ FALSE;
 
   while (TRUE) {
 Msr.GhcbPhysicalAddress = AsmReadMsr64 (MSR_SEV_ES_GHCB);
--
2.28.0


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

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



Re: [edk2-devel] TianoCore Bug Triage - APAC / NAMO - Tue, 08/11/2020 6:30pm-7:30pm #cal-reminder

2020-08-18 Thread Liming Gao
Below issues will be discussed this week. Welcome the submitter to attend the 
meeting and provide the detail background.

2903
EDK2 Pla
Placehol
unassig...@tianocore.org
UNCO
Platform\ARM\VExpressPkg\DeviceTree: some files still use BSD 
license
liming@intel.com
23:00:10
2902
EDK2 Pla
Placehol
unassig...@tianocore.org
UNCO
Platform/ARM/SgiPkg: some files still use BSD 
license
liming@intel.com
22:49:39
2876
EDK2
Code
unassig...@tianocore.org
UNCO
SVN#15047
seven.d...@lcfuturecenter.com
Mon 14:02
2893
EDK2
Code
unassig...@tianocore.org
UNCO
Acpiview: Standardise error log output 
format
sami.muja...@arm.com
Mon 00:44
2444
Tianocor
Code
michael.d.kin...@intel.com
UNCO
Add support for USB4
dick_wilk...@phoenix.com
Fri 08:35
2897
EDK2
Code
unassig...@tianocore.org
UNCO
RDSEED concerns
mac...@microsoft.com
Thu 19:05
2895
EDK2
Code
zhiguang@intel.com
UNCO
MdePkgHostTest.dsc build fail with 
LLVM/CLANG
jiewen@intel.com
Thu 02:30
2894
EDK2
Code
unassig...@tianocore.org
UNCO
enable Intel CET shadow stack (control flow) in DXE 
phase
jiewen@intel.com
Wed 19:09
2892
EDK2
Code
unassig...@tianocore.org
UNCO
MdeModulePkg: AhciPei doesn't convert port multiplier 
value
anbazha...@hp.com
Wed 11:18
2891
EDK2 Pla
IntelSil
unassig...@tianocore.org
UNCO
Add support for shadowing all microcode patch to 
memory.
aaron...@intel.com
2020-08-12
2885
EDK2
Code
unassig...@tianocore.org
UNCO
CD command failed with Trailing period end of folder 
name
debdipta@gmail.com
2020-08-11
2875
EDK2
Code
unassig...@tianocore.org
UNCO
Digest Algorithm update for Authenticated 
Variables
divneil.r.wadha...@intel.com
2020-08-11
2883
Tianocor
Code
unassig...@tianocore.org
UNCO
UefiCpuPkg: MpServices2Ppi and MpServicesPpi compatibility 
support.
chasel.c...@intel.com
2020-08-09
2882
EDK2
Tools
bob.c.f...@intel.com
UNCO
Incremental build error triggered by changing name of source code 
file
yuwei.c...@intel.com
2020-08-09
2831
EDK2
Code
zhichao@intel.com
UNCO
UefiBootManagerLib is not specs compliant with regards to 
EFI_EVENT_GROUP_READY_TO_BOOT
p...@akeo.ie
2020-08-07
2881
EDK2
Tools
bob.c.f...@intel.com
UNCO
Incremental build issue as macro value change in 
Makefile
yuwei.c...@intel.com
2020-08-07
2880
EDK2
Tools
bob.c.f...@intel.com
UNCO
Incremental build issue as directory macros extended in 
Makefile
yuwei.c...@intel.com
2020-08-07
2879
EDK2
Code
unassig...@tianocore.org
UNCO
Hardware error record variable quota calculation 
update
kun@microsoft.com
2020-08-06
2878
EDK2
Code
michael.d.kin...@intel.com
UNCO
Update FMP function descriptions to match UEFI 2.8B 
spec
michael.kuba...@microsoft.com
2020-08-06
2424
Tianocor
Code
yonghong@intel.com
UNCO
TLSv1.3 support
prarthan...@amiindia.co.in
2020-08-06
2877
EDK2
Code
unassig...@tianocore.org
UNCO
Bug Capsule date 

[edk2-devel] [edk2-platforms] Platform/Intel: Remove unnecessary comments in file header

2020-08-17 Thread Liming Gao
Signed-off-by: Liming Gao 
Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Eric Dong 
---
 .../PlatformDxe/Observable/Observable.c  | 12 
 .../SecBoardInitLibNull/Ia32/SecBoardInit.nasm   |  6 --
 .../PlatformInitPei/PlatformEarlyInit.h  |  8 
 3 files changed, 4 insertions(+), 22 deletions(-)

diff --git 
a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Observable/Observable.c 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Observable/Observable.c
index af466ce96d..eeedfc22ee 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Observable/Observable.c
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Observable/Observable.c
@@ -1,16 +1,12 @@
-/*++
-  This file contains 'Framework Code' and is licensed as such
-  under the terms of your license agreement with Intel or your
-  vendor.  This file may not be modified, except as allowed by
-  additional terms of your license agreement.
---*/
 /*++
 
 Copyright (c)  2010  - 2014, Intel Corporation. All rights reserved
-   


+   

+
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
-   


+   

+
 
 
 Module Name:
diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/SecBoardInitLibNull/Ia32/SecBoardInit.nasm
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/SecBoardInitLibNull/Ia32/SecBoardInit.nasm
index 404c03fe06..ffc738fd49 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/SecBoardInitLibNull/Ia32/SecBoardInit.nasm
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/SecBoardInitLibNull/Ia32/SecBoardInit.nasm
@@ -1,9 +1,3 @@
-;
-; This file contains an 'Intel Peripheral Driver' and is
-; licensed for Intel CPUs and chipsets under the terms of your
-; license agreement with Intel or your vendor.  This file may
-; be modified by the user, subject to additional terms of the
-; license agreement
 ;; @file
 ; This is the code that goes from real-mode to protected mode.
 ; It consumes the reset vector, calls TempRamInit API from FSP binary.
diff --git 
a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.h 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.h
index 4c6b0795ec..9d9854abe4 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.h
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.h
@@ -16,14 +16,6 @@ Abstract:
 
 --*/
 
-/*++
- This file contains an 'Intel Peripheral Driver' and is
- licensed for Intel CPUs and chipsets under the terms of your
- license agreement with Intel or your vendor.  This file may
- be modified by the user, subject to additional terms of the
- license agreement
---*/
-
 #ifndef _EFI_PLATFORM_EARLY_INIT_H_
 #define _EFI_PLATFORM_EARLY_INIT_H_
 
-- 
2.27.0.windows.1


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

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



Re: [edk2-devel] [PATCH v15 00/46] SEV-ES guest support

2020-08-17 Thread Liming Gao
Tom:
  One build issue is found with CLANGPDB and XCODE tool chain. BZ has been 
submitted https://bugzilla.tianocore.org/show_bug.cgi?id=2901. Can you fix it 
for this stable tag?

Thanks
Liming
> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Lendacky, 
> Thomas
> Sent: Tuesday, August 18, 2020 1:56 AM
> To: Laszlo Ersek ; Gao, Liming ; 
> devel@edk2.groups.io
> Cc: Brijesh Singh ; Ard Biesheuvel 
> ; Dong, Eric ; Justen,
> Jordan L ; Kinney, Michael D 
> ; Ni, Ray ; Andrew Fish
> ; Anthony Perard ; You, Benjamin 
> ; Bi, Dandan
> ; Dong, Guo ; Wu, Hao A 
> ; Wang, Jian J ;
> Julien Grall ; Leif Lindholm ; Ma, Maurice 
> 
> Subject: Re: [edk2-devel] [PATCH v15 00/46] SEV-ES guest support
> 
> Yes, a big thank you to everyone involved!
> 
> Tom
> 
> On 8/17/20 12:03 PM, Laszlo Ersek wrote:
> > On 08/17/20 06:09, Gao, Liming wrote:
> >> This patch set have been merged edk2
> 7f7f511c5a74676523ed48435350f6e35282b62b..7f0b28415cb464832155d5b3ff6eb63612f58645
> >
> > Thank you!
> > Laszlo
> >
> >> -Original Message-
> >> From: devel@edk2.groups.io  On Behalf Of Liming Gao
> >> Sent: 2020年8月14日 9:20
> >> To: Laszlo Ersek ; Tom Lendacky 
> >> ; devel@edk2.groups.io
> >> Cc: Brijesh Singh ; Ard Biesheuvel 
> >> ; Dong, Eric ; Justen,
> Jordan L ; Kinney, Michael D 
> ; Ni, Ray ; Andrew Fish
> ; Anthony Perard ; You, Benjamin 
> ; Bi, Dandan
> ; Dong, Guo ; Wu, Hao A 
> ; Wang, Jian J ;
> Julien Grall ; Leif Lindholm ; Ma, Maurice 
> 
> >> Subject: Re: [edk2-devel] [PATCH v15 00/46] SEV-ES guest support
> >>
> >> Laszlo:
> >>
> >> -Original Message-
> >> From: Laszlo Ersek 
> >> Sent: 2020年8月14日 3:54
> >> To: Tom Lendacky ; devel@edk2.groups.io
> >> Cc: Brijesh Singh ; Ard Biesheuvel 
> >> ; Dong, Eric ; Justen,
> Jordan L ; Gao, Liming ; 
> Kinney, Michael D ; Ni, Ray
> ; Andrew Fish ; Anthony Perard 
> ; You, Benjamin
> ; Bi, Dandan ; Dong, Guo 
> ; Wu, Hao A
> ; Wang, Jian J ; Julien Grall 
> ; Leif Lindholm ; Ma,
> Maurice 
> >> Subject: Re: [PATCH v15 00/46] SEV-ES guest support
> >>
> >> On 08/13/20 15:22, Tom Lendacky wrote:
> >>> From: Tom Lendacky 
> >>>
> >>> This patch series provides support for running EDK2/OVMF under SEV-ES.
> >>>
> >>> Secure Encrypted Virtualization - Encrypted State (SEV-ES) expands on
> >>> the SEV support to protect the guest register state from the
> >>> hypervisor. See
> >>> "AMD64 Architecture Programmer's Manual Volume 2: System Programming",
> >>> section "15.35 Encrypted State (SEV-ES)" [1].
> >>>
> >>> In order to allow a hypervisor to perform functions on behalf of a
> >>> guest, there is architectural support for notifying a guest's
> >>> operating system when certain types of VMEXITs are about to occur.
> >>> This allows the guest to selectively share information with the
> >>> hypervisor to satisfy the requested function. The notification is
> >>> performed using a new exception, the VMM Communication exception
> >>> (#VC). The information is shared through the Guest-Hypervisor 
> >>> Communication Block (GHCB) using the VMGEXIT instruction.
> >>> The GHCB format and the protocol for using it is documented in "SEV-ES
> >>> Guest-Hypervisor Communication Block Standardization" [2].
> >>>
> >>> The main areas of the EDK2 code that are updated to support SEV-ES are
> >>> around the exception handling support and the AP boot support.
> >>>
> >>> Exception support is required starting in Sec, continuing through Pei
> >>> and into Dxe in order to handle #VC exceptions that are generated.
> >>> Each AP requires it's own GHCB page as well as a page to hold values
> >>> specific to that AP.
> >>>
> >>> AP booting poses some interesting challenges. The INIT-SIPI-SIPI
> >>> sequence is typically used to boot the APs. However, the hypervisor is
> >>> not allowed to update the guest registers. The GHCB document [2] talks
> >>> about how SMP booting under SEV-ES is performed.
> >>>
> >>> Since the GHCB page must be a shared (unencrypted) page, the processor
> >>> must be running in long mode in order for the guest and hypervisor to
> >>> communicate with each other. As a result, SEV-ES is only supported
> >>> under the X64 arc

Re: [edk2-devel] [PATCH v4 0/2] Enable EDKII CI support for DynamicTablesPkg

2020-08-17 Thread Liming Gao
Sami:
  I think this change is OK. And, Shenglei and Alexei gave reviewed-by before 
soft feature freeze. 

Mike, Leif, Andrew and Laszlo:
  Have you any comments to merge this patch to edk2-stable202008 stable tag. 

Thanks
Liming
-Original Message-
From: Sami Mujawar  
Sent: 2020年8月14日 21:24
To: Gao, Liming ; devel@edk2.groups.io; 
bret.barke...@microsoft.com; sean.bro...@microsoft.com; Kinney, Michael D 

Cc: Alexei Fedorov ; Sami Mujawar 
; Ard Biesheuvel ; Matteo Carlini 
; Ben Adderson ; nd 
Subject: RE: [PATCH v4 0/2] Enable EDKII CI support for DynamicTablesPkg

Hi All,

Is there anything else needed before this patch series can be merged?
If possible, we would like this feature enabled in the edk2-stable202008.

Regards,

Sami Mujawar

-Original Message-
From: Sami Mujawar  
Sent: 07 August 2020 06:30 PM
To: devel@edk2.groups.io
Cc: Sami Mujawar ; Alexei Fedorov 
; sean.bro...@microsoft.com; liming@intel.com; 
michael.d.kin...@intel.com; bret.barke...@microsoft.com; Ard Biesheuvel 
; Matteo Carlini ; Laura 
Moretta ; nd 
Subject: [PATCH v4 0/2] Enable EDKII CI support for DynamicTablesPkg

The TianoCore EDKII project has introduced a Core CI infrastructure using 
TianoCore EDKII Tools PIP modules.

The v2 patch series at https://edk2.groups.io/g/devel/message/63259
adds support for building DynamicTablesPkg using the EKDII Core CI.

Splitting the v2 patch series into 2 separate series. This v4 series contains 
the patches for enabling Core CI for DynamicTablesPkg in .pytools and 
.azurepipelines i.e. the last two patches from the v2 series.

The v3 series containing the patches for DynamicTablesPkg has already been 
merged in edk2 master at:
- 
https://github.com/tianocore/edk2/commit/2d0c42fdf2cf1855b0a042ef82d848c7716adefe
- 
https://github.com/tianocore/edk2/commit/e3f8605a23ebe9c54ae2b17819d00e185069667d
Ref (v3 series): 
https://edk2.groups.io/g/devel/topic/patch_v3_0_2_add_edkii_ci/76052351

There is no code change other than splitting the v2 series.

The changes for this v4 series can be seen at:
https://github.com/samimujawar/edk2/tree/839_dynamictablespkg_ci_v4

Sami Mujawar (2):
  .pytool: CI Settings to support DynamicTablesPkg
  .azurepipelines: Add DynamicTablesPkg to CI matrix

 .azurepipelines/templates/pr-gate-build-job.yml | 3 ++-
 .pytool/CISettings.py   | 2 ++
 .pytool/Readme.md   | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)   

--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'


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

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



Re: [edk2-devel] [PATCH v10 02/16] .pytool/Plugin: Add a plugin EccCheck

2020-08-16 Thread Liming Gao
This patch set have been merged 
7f0b28415cb464832155d5b3ff6eb63612f58645..98946ef352238ac233dbf8df34510fc4e30d9e02.

Thanks
Liming
-Original Message-
From: devel@edk2.groups.io  On Behalf Of Liming Gao
Sent: 2020年8月14日 16:12
To: Zhang, Shenglei ; devel@edk2.groups.io
Cc: Sean Brogan ; Bret Barkelew 
; Kinney, Michael D 
Subject: Re: [edk2-devel] [PATCH v10 02/16] .pytool/Plugin: Add a plugin 
EccCheck

Reviewed-by: Liming Gao 

-Original Message-
From: Zhang, Shenglei 
Sent: 2020年8月14日 15:44
To: devel@edk2.groups.io
Cc: Sean Brogan ; Bret Barkelew 
; Kinney, Michael D ; 
Gao, Liming 
Subject: [PATCH v10 02/16] .pytool/Plugin: Add a plugin EccCheck

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2606
EccCheck is a plugin to report Ecc issues for code in pull request , which will 
be run on open ci.
But note not each kind of issue could be reported out.
It can only handle the issues, whose line number in CSV report accurately map 
with their code in source code files. And Ecc issues about comments can also be 
handled.

Cc: Sean Brogan 
Cc: Bret Barkelew 
Cc: Michael D Kinney 
Cc: Liming Gao 
Signed-off-by: Shenglei Zhang 
---
 .pytool/Plugin/EccCheck/EccCheck.py   | 309 ++
 .pytool/Plugin/EccCheck/EccCheck_plug_in.yaml |  11 +
 .pytool/Plugin/EccCheck/Readme.md |  15 +
 3 files changed, 335 insertions(+)
 create mode 100644 .pytool/Plugin/EccCheck/EccCheck.py
 create mode 100644 .pytool/Plugin/EccCheck/EccCheck_plug_in.yaml
 create mode 100644 .pytool/Plugin/EccCheck/Readme.md

diff --git a/.pytool/Plugin/EccCheck/EccCheck.py 
b/.pytool/Plugin/EccCheck/EccCheck.py
new file mode 100644
index 00..eee1ff7a77
--- /dev/null
+++ b/.pytool/Plugin/EccCheck/EccCheck.py
@@ -0,0 +1,309 @@
+# @file EccCheck.py
+#
+# Copyright (c) 2020, Intel Corporation. All rights reserved. #
+SPDX-License-Identifier: BSD-2-Clause-Patent ##
+
+import os
+import shutil
+import re
+import csv
+import xml.dom.minidom
+from typing import List, Dict, Tuple
+import logging
+from io import StringIO
+from edk2toolext.environment import shell_environment from 
+edk2toolext.environment.plugintypes.ci_build_plugin import 
+ICiBuildPlugin from edk2toolext.environment.var_dict import VarDict 
+from edk2toollib.utility_functions import RunCmd
+
+
+class EccCheck(ICiBuildPlugin):
+"""
+A CiBuildPlugin that finds the Ecc issues of newly added code in pull 
request.
+
+Configuration options:
+"EccCheck": {
+"ExceptionList": [],
+"IgnoreFiles": []
+},
+"""
+
+ReModifyFile = re.compile(r'[B-Q,S-Z]+[\d]*\t(.*)')
+FindModifyFile = re.compile(r'\+\+\+ b\/(.*)')
+LineScopePattern = (r'@@ -\d*\,*\d* \+\d*\,*\d* @@.*')
+LineNumRange = re.compile(r'@@ -\d*\,*\d* \+(\d*)\,*(\d*) @@.*')
+
+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 efi coding style for " + packagename, 
+ packagename + ".EccCheck")
+
+##
+# 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):
+edk2_path = Edk2pathObj.WorkspacePath
+python_path = os.path.join(edk2_path, "BaseTools", "Source", "Python")
+env = shell_environment.GetEnvironment()
+env.set_shell_var('PYTHONPATH', python_path)
+env.set_shell_var('WORKSPACE', edk2_path)
+self.ECC_PASS = True
+self.ApplyConfig(pkgconfig, edk2_path, packagename)
+modify_dir_list = self.GetModifyDir(packagename)
+patch = self.GetDiff(packagename)
+ecc_diff_range = self.GetDiffRange(patch, packagename, edk2_path)
+self.GenerateEccReport(modify_dir_list, ecc_diff_range, edk2_path)
+ecc_log = os.path.join(edk2_path, "Ecc.log")
+  

Re: [edk2-devel] [PATCH v15 00/46] SEV-ES guest support

2020-08-16 Thread Liming Gao
This patch set have been merged edk2 
7f7f511c5a74676523ed48435350f6e35282b62b..7f0b28415cb464832155d5b3ff6eb63612f58645

Thanks
Liming
-Original Message-
From: devel@edk2.groups.io  On Behalf Of Liming Gao
Sent: 2020年8月14日 9:20
To: Laszlo Ersek ; Tom Lendacky ; 
devel@edk2.groups.io
Cc: Brijesh Singh ; Ard Biesheuvel 
; Dong, Eric ; Justen, Jordan L 
; Kinney, Michael D ; 
Ni, Ray ; Andrew Fish ; Anthony Perard 
; You, Benjamin ; Bi, Dandan 
; Dong, Guo ; Wu, Hao A 
; Wang, Jian J ; Julien Grall 
; Leif Lindholm ; Ma, Maurice 

Subject: Re: [edk2-devel] [PATCH v15 00/46] SEV-ES guest support

Laszlo:

-Original Message-
From: Laszlo Ersek 
Sent: 2020年8月14日 3:54
To: Tom Lendacky ; devel@edk2.groups.io
Cc: Brijesh Singh ; Ard Biesheuvel 
; Dong, Eric ; Justen, Jordan L 
; Gao, Liming ; Kinney, 
Michael D ; Ni, Ray ; Andrew Fish 
; Anthony Perard ; You, Benjamin 
; Bi, Dandan ; Dong, Guo 
; Wu, Hao A ; Wang, Jian J 
; Julien Grall ; Leif Lindholm 
; Ma, Maurice 
Subject: Re: [PATCH v15 00/46] SEV-ES guest support

On 08/13/20 15:22, Tom Lendacky wrote:
> From: Tom Lendacky 
> 
> This patch series provides support for running EDK2/OVMF under SEV-ES.
> 
> Secure Encrypted Virtualization - Encrypted State (SEV-ES) expands on 
> the SEV support to protect the guest register state from the 
> hypervisor. See
> "AMD64 Architecture Programmer's Manual Volume 2: System Programming", 
> section "15.35 Encrypted State (SEV-ES)" [1].
> 
> In order to allow a hypervisor to perform functions on behalf of a 
> guest, there is architectural support for notifying a guest's 
> operating system when certain types of VMEXITs are about to occur.
> This allows the guest to selectively share information with the 
> hypervisor to satisfy the requested function. The notification is 
> performed using a new exception, the VMM Communication exception 
> (#VC). The information is shared through the Guest-Hypervisor Communication 
> Block (GHCB) using the VMGEXIT instruction.
> The GHCB format and the protocol for using it is documented in "SEV-ES 
> Guest-Hypervisor Communication Block Standardization" [2].
> 
> The main areas of the EDK2 code that are updated to support SEV-ES are 
> around the exception handling support and the AP boot support.
> 
> Exception support is required starting in Sec, continuing through Pei 
> and into Dxe in order to handle #VC exceptions that are generated.
> Each AP requires it's own GHCB page as well as a page to hold values 
> specific to that AP.
> 
> AP booting poses some interesting challenges. The INIT-SIPI-SIPI 
> sequence is typically used to boot the APs. However, the hypervisor is 
> not allowed to update the guest registers. The GHCB document [2] talks 
> about how SMP booting under SEV-ES is performed.
> 
> Since the GHCB page must be a shared (unencrypted) page, the processor 
> must be running in long mode in order for the guest and hypervisor to 
> communicate with each other. As a result, SEV-ES is only supported 
> under the X64 architecture.
> 
> This series adds a new library requirement for the VmgExitLib library 
> against the UefiCpuPkg CpuExceptionHandlerLib library and the 
> UefiCpuPkg MpInitLib library. The edk2-platforms repo requires 
> updates/patches to add the new library requirement. To accomodate 
> that, this series could be split between:
> 
> patch number 10:
>   UefiPayloadPkg: Prepare UefiPayloadPkg to use the VmgExitLib library
> 
> and patch number 11:
>   UefiCpuPkg/CpuExceptionHandler: Add base support for the #VC 
> exception
> 
> The updates to edk2-platforms can be applied at the split.
> 
> [1] https://www.amd.com/system/files/TechDocs/24593.pdf
> [2] https://developer.amd.com/wp-content/resources/56421.pdf
> 
> ---
> 
> These patches are based on commit:
> 65904cdbb33c ("UefiCpuPkg/MtrrLibUnitTest: Change to use static array 
> for CI test")
> 
> A version of the tree can be found at:
> https://github.com/AMDESE/ovmf/tree/sev-es-v24
> 
> Cc: Andrew Fish 
> Cc: Anthony Perard 
> Cc: Ard Biesheuvel 
> Cc: Benjamin You 
> Cc: Dandan Bi 
> Cc: Eric Dong 
> Cc: Guo Dong 
> Cc: Hao A Wu 
> Cc: Jian J Wang 
> Cc: Jordan Justen 
> Cc: Julien Grall 
> Cc: Laszlo Ersek 
> Cc: Leif Lindholm 
> Cc: Liming Gao 
> Cc: Maurice Ma 
> Cc: Michael D Kinney 
> Cc: Ray Ni 
> 
> Changes since v14:
> - Address ECC errors
>   - Fix non-boolean comparison to use a comparison operator
>   - Separate declaration and initialization of variables
>   - Add period to first line of block comments
>   - Split single-line multiple declaration into multiple lines

The changes look good to me, thanks!

In this particular case, the updates do not invalidate my 
"

[edk2-devel] Soft Feature Freeze starts now for edk2-stable202008

2020-08-14 Thread Liming Gao
Hi, all
  We will enter into Soft Feature Freeze phase. In this phase, the feature 
under review will not be allowed to be pushed. The feature passed review can 
still be merged. Now, two features have passed code review. If no other 
comments, I will merge them into this stable tag. They are: 
https://edk2.groups.io/g/devel/message/64176 SEV-ES guest support, 
https://edk2.groups.io/g/devel/message/64283 Add a plugin to check Ecc issues 
for edk2 on open ci.

The patch review can continue without break in edk2 community. If the patch is 
sent before Soft Feature Freeze, and plans to catch this stable tag, the patch 
contributor need reply to his patch and notify edk2 community. If the patch is 
sent after Soft Feature Freeze, and plans to catch this stable tag, please add 
edk2-stable202008 key words in the patch title and BZ, so the community know 
this patch target and give the feedback.

Below is edk2-stable202008 tag planning 
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Release-Planning 
Proposed Schedule
Date (00:00:00 UTC-8) Description
2020-06-03  Beginning of development
2020-08-07  Feature Planning Freeze
2020-08-14  Soft Feature Freeze
2020-08-21  Hard Feature Freeze
2020-08-28  Release

Thanks
Liming

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

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



Re: [edk2-devel] [PATCH v10 02/16] .pytool/Plugin: Add a plugin EccCheck

2020-08-14 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: Zhang, Shenglei  
Sent: 2020年8月14日 15:44
To: devel@edk2.groups.io
Cc: Sean Brogan ; Bret Barkelew 
; Kinney, Michael D ; 
Gao, Liming 
Subject: [PATCH v10 02/16] .pytool/Plugin: Add a plugin EccCheck

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2606
EccCheck is a plugin to report Ecc issues for code in pull request , which will 
be run on open ci.
But note not each kind of issue could be reported out.
It can only handle the issues, whose line number in CSV report accurately map 
with their code in source code files. And Ecc issues about comments can also be 
handled.

Cc: Sean Brogan 
Cc: Bret Barkelew 
Cc: Michael D Kinney 
Cc: Liming Gao 
Signed-off-by: Shenglei Zhang 
---
 .pytool/Plugin/EccCheck/EccCheck.py   | 309 ++
 .pytool/Plugin/EccCheck/EccCheck_plug_in.yaml |  11 +
 .pytool/Plugin/EccCheck/Readme.md |  15 +
 3 files changed, 335 insertions(+)
 create mode 100644 .pytool/Plugin/EccCheck/EccCheck.py
 create mode 100644 .pytool/Plugin/EccCheck/EccCheck_plug_in.yaml
 create mode 100644 .pytool/Plugin/EccCheck/Readme.md

diff --git a/.pytool/Plugin/EccCheck/EccCheck.py 
b/.pytool/Plugin/EccCheck/EccCheck.py
new file mode 100644
index 00..eee1ff7a77
--- /dev/null
+++ b/.pytool/Plugin/EccCheck/EccCheck.py
@@ -0,0 +1,309 @@
+# @file EccCheck.py
+#
+# Copyright (c) 2020, Intel Corporation. All rights reserved. # 
+SPDX-License-Identifier: BSD-2-Clause-Patent ##
+
+import os
+import shutil
+import re
+import csv
+import xml.dom.minidom
+from typing import List, Dict, Tuple
+import logging
+from io import StringIO
+from edk2toolext.environment import shell_environment from 
+edk2toolext.environment.plugintypes.ci_build_plugin import 
+ICiBuildPlugin from edk2toolext.environment.var_dict import VarDict 
+from edk2toollib.utility_functions import RunCmd
+
+
+class EccCheck(ICiBuildPlugin):
+"""
+A CiBuildPlugin that finds the Ecc issues of newly added code in pull 
request.
+
+Configuration options:
+"EccCheck": {
+"ExceptionList": [],
+"IgnoreFiles": []
+},
+"""
+
+ReModifyFile = re.compile(r'[B-Q,S-Z]+[\d]*\t(.*)')
+FindModifyFile = re.compile(r'\+\+\+ b\/(.*)')
+LineScopePattern = (r'@@ -\d*\,*\d* \+\d*\,*\d* @@.*')
+LineNumRange = re.compile(r'@@ -\d*\,*\d* \+(\d*)\,*(\d*) @@.*')
+
+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 efi coding style for " + packagename, 
+ packagename + ".EccCheck")
+
+##
+# 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):
+edk2_path = Edk2pathObj.WorkspacePath
+python_path = os.path.join(edk2_path, "BaseTools", "Source", "Python")
+env = shell_environment.GetEnvironment()
+env.set_shell_var('PYTHONPATH', python_path)
+env.set_shell_var('WORKSPACE', edk2_path)
+self.ECC_PASS = True
+self.ApplyConfig(pkgconfig, edk2_path, packagename)
+modify_dir_list = self.GetModifyDir(packagename)
+patch = self.GetDiff(packagename)
+ecc_diff_range = self.GetDiffRange(patch, packagename, edk2_path)
+self.GenerateEccReport(modify_dir_list, ecc_diff_range, edk2_path)
+ecc_log = os.path.join(edk2_path, "Ecc.log")
+self.RevertCode()
+if self.ECC_PASS:
+tc.SetSuccess()
+self.RemoveFile(ecc_log)
+return 0
+else:
+with open(ecc_log, encoding='utf8') as output:
+ecc_output = output.readlines()
+for line in ecc_output:
+logging.error(line.strip())
+self.RemoveFile(ecc_log)
+

Re: [edk2-devel] [edk2-wiki][PATCH v3] Update the Boot Guard TOCTOU wiki page.

2020-08-13 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: Jiang, Guomin  
Sent: 2020年8月12日 15:21
To: devel@edk2.groups.io
Cc: Wang, Jian J ; Gao, Liming 
Subject: [edk2-wiki][PATCH v3] Update the Boot Guard TOCTOU wiki page.

The Boot Guard TOCTOU have been migrated into edk2/master.
Update the document to meet the change.

Signed-off-by: Guomin Jiang 
Cc: Jian J Wang 
Cc: Liming Gao 
---
 Boot-Guard-TOCTOU-Vulnerability-Mitigation.md | 30 +++
 1 file changed, 10 insertions(+), 20 deletions(-)

diff --git a/Boot-Guard-TOCTOU-Vulnerability-Mitigation.md 
b/Boot-Guard-TOCTOU-Vulnerability-Mitigation.md
index e59c7b1..3fce589 100644
--- a/Boot-Guard-TOCTOU-Vulnerability-Mitigation.md
+++ b/Boot-Guard-TOCTOU-Vulnerability-Mitigation.md
@@ -45,32 +45,22 @@ references must be updated. In this mitigation, the process 
of performing these  The changes described in this mitigation are intended to 
simply integrate into firmware solutions. For the changes to  function as 
intended, the platform firmware implementation should follow these guidelines.
 
-The changes are currently being staged in the following EDK II fork for 
additional validation before being -sent to the EDK II mailing list: 
https://github.com/makubacki/edk2/tree/btg_toctou_mitigation_staging
-
-The changes should not be considered final or production ready until they are 
reviewed and pushed onto edk2/master.
-
-1. Always ensure PcdShadowPeimOnBoot and PcdShadowPeimOnS3Boot
-   (if platform supports S3) are set to TRUE if Boot Guard is
-   enabled and V=1 or M=1.
-2. Always ensure PcdMigrateTemporaryRamFirmwareVolumes is set to TRUE.
-3. Ensure that all PEIMs are relocatable. Relocation tables should
+1. Always ensure PcdMigrateTemporaryRamFirmwareVolumes is set to TRUE
+   if Boot Guard is enabled and V=1 or M=1.
+2. Ensure that all PEIMs are relocatable. Relocation tables should
not be stripped.
-4. If an Intel Firmware Support Package (FSP) binary solution is
+3. If an Intel Firmware Support Package (FSP) binary solution is
used, the binary must have these mitigation changes integrated.
-5. Avoid maintaining pointers to pre-memory addresses inside embedded
+4. Avoid maintaining pointers to pre-memory addresses inside embedded
structures or other non-standard structures that the automatic
migration code introduced in this change cannot identify.
-6. Migrate the FIT table based on platform requirements for FIT
+5. Migrate the FIT table based on platform requirements for FIT
access in post-memory.
+6. Add the SecMigrationPei.inf component to migrate the pointer from
+   the SEC phase.
 
-**Very Important**
-
-7. Enable paging after memory initialization and mark the IBB range
-   as Not Present (NP).
-
-   This will cause a page fault on access to the IBB region. This CR2 register 
can be used to identify the address
-   accessed and the IP.
+Notes: IBB will be set Not Present, you will see a page fault if any code 
access to the IBB region after migration.
+   the address where the code access can be identified in the CR2 register.
 
 # High-Level Migration Required
 Resources that must be migrated can be categorized as code or data.
--
2.25.1.windows.1


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

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



Re: [edk2-devel] [PATCH 0/2] Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES

2020-08-13 Thread Liming Gao
Shenglei:
  Thanks for your update. The change is good. Reviewed-by: Liming Gao 


  Per Leif change, this patch will be merged after stable tag 202008 is 
created. 

Thanks
Liming
-Original Message-
From: Zhang, Shenglei  
Sent: 2020年8月5日 14:08
To: devel@edk2.groups.io
Cc: Wang, Jian J ; Wu, Hao A ; 
Kinney, Michael D ; Gao, Liming 

Subject: [PATCH 0/2] 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 from MdePkg and MdeModulePkg.

Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Michael D Kinney 
Cc: Liming Gao 
Shenglei Zhang (2):
  MdePkg: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
  MdeModulePkg: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES

 .../DxePrintLibPrint2Protocol/PrintLib.c  | 145 
 MdeModulePkg/Universal/PrintDxe/Print.c   |  37 +-
 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 ---
 MdeModulePkg/MdeModulePkg.dsc |   1 -
 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 -
 14 files changed, 6 insertions(+), 3263 deletions(-)

-- 
2.18.0.windows.1


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

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



Re: [edk2-devel] [PATCH v15 00/46] SEV-ES guest support

2020-08-13 Thread Liming Gao
Laszlo:

-Original Message-
From: Laszlo Ersek  
Sent: 2020年8月14日 3:54
To: Tom Lendacky ; devel@edk2.groups.io
Cc: Brijesh Singh ; Ard Biesheuvel 
; Dong, Eric ; Justen, Jordan L 
; Gao, Liming ; Kinney, 
Michael D ; Ni, Ray ; Andrew Fish 
; Anthony Perard ; You, Benjamin 
; Bi, Dandan ; Dong, Guo 
; Wu, Hao A ; Wang, Jian J 
; Julien Grall ; Leif Lindholm 
; Ma, Maurice 
Subject: Re: [PATCH v15 00/46] SEV-ES guest support

On 08/13/20 15:22, Tom Lendacky wrote:
> From: Tom Lendacky 
> 
> This patch series provides support for running EDK2/OVMF under SEV-ES.
> 
> Secure Encrypted Virtualization - Encrypted State (SEV-ES) expands on 
> the SEV support to protect the guest register state from the 
> hypervisor. See
> "AMD64 Architecture Programmer's Manual Volume 2: System Programming", 
> section "15.35 Encrypted State (SEV-ES)" [1].
> 
> In order to allow a hypervisor to perform functions on behalf of a 
> guest, there is architectural support for notifying a guest's 
> operating system when certain types of VMEXITs are about to occur. 
> This allows the guest to selectively share information with the 
> hypervisor to satisfy the requested function. The notification is 
> performed using a new exception, the VMM Communication exception 
> (#VC). The information is shared through the Guest-Hypervisor Communication 
> Block (GHCB) using the VMGEXIT instruction.
> The GHCB format and the protocol for using it is documented in "SEV-ES 
> Guest-Hypervisor Communication Block Standardization" [2].
> 
> The main areas of the EDK2 code that are updated to support SEV-ES are 
> around the exception handling support and the AP boot support.
> 
> Exception support is required starting in Sec, continuing through Pei 
> and into Dxe in order to handle #VC exceptions that are generated.  
> Each AP requires it's own GHCB page as well as a page to hold values 
> specific to that AP.
> 
> AP booting poses some interesting challenges. The INIT-SIPI-SIPI 
> sequence is typically used to boot the APs. However, the hypervisor is 
> not allowed to update the guest registers. The GHCB document [2] talks 
> about how SMP booting under SEV-ES is performed.
> 
> Since the GHCB page must be a shared (unencrypted) page, the processor 
> must be running in long mode in order for the guest and hypervisor to 
> communicate with each other. As a result, SEV-ES is only supported 
> under the X64 architecture.
> 
> This series adds a new library requirement for the VmgExitLib library 
> against the UefiCpuPkg CpuExceptionHandlerLib library and the 
> UefiCpuPkg MpInitLib library. The edk2-platforms repo requires 
> updates/patches to add the new library requirement. To accomodate 
> that, this series could be split between:
> 
> patch number 10:
>   UefiPayloadPkg: Prepare UefiPayloadPkg to use the VmgExitLib library
> 
> and patch number 11:
>   UefiCpuPkg/CpuExceptionHandler: Add base support for the #VC 
> exception
> 
> The updates to edk2-platforms can be applied at the split.
> 
> [1] https://www.amd.com/system/files/TechDocs/24593.pdf
> [2] https://developer.amd.com/wp-content/resources/56421.pdf
> 
> ---
> 
> These patches are based on commit:
> 65904cdbb33c ("UefiCpuPkg/MtrrLibUnitTest: Change to use static array 
> for CI test")
> 
> A version of the tree can be found at:
> https://github.com/AMDESE/ovmf/tree/sev-es-v24
> 
> Cc: Andrew Fish 
> Cc: Anthony Perard 
> Cc: Ard Biesheuvel 
> Cc: Benjamin You 
> Cc: Dandan Bi 
> Cc: Eric Dong 
> Cc: Guo Dong 
> Cc: Hao A Wu 
> Cc: Jian J Wang 
> Cc: Jordan Justen 
> Cc: Julien Grall 
> Cc: Laszlo Ersek 
> Cc: Leif Lindholm 
> Cc: Liming Gao 
> Cc: Maurice Ma 
> Cc: Michael D Kinney 
> Cc: Ray Ni 
> 
> Changes since v14:
> - Address ECC errors
>   - Fix non-boolean comparison to use a comparison operator
>   - Separate declaration and initialization of variables
>   - Add period to first line of block comments
>   - Split single-line multiple declaration into multiple lines

The changes look good to me, thanks!

In this particular case, the updates do not invalidate my 
"Regression-tested-by" given under v14:

https://edk2.groups.io/g/devel/message/63921

"""
For all patches except #10 ("UefiPayloadPkg: Prepare UefiPayloadPkg to use the 
VmgExitLib library") and #46 ("Maintainers.txt: Add reviewers for the OvmfPkg 
SEV-related files"):

Regression-tested-by: Laszlo Ersek  """

So whoever merges this series should please apply that to the respective 
patches.

[Liming] Got it. This patch set has passed all review. I will help merge it for 
this stable tag stable202008. 

Thanks!
Laszlo


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

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



Re: [edk2-devel] [Patch] BaseTools: Move CreateAsBuiltInf into AutoGenWorker for parallel

2020-08-13 Thread Liming Gao
A little better is also OK. Reviewed-by: Liming Gao 

-Original Message-
From: Feng, Bob C  
Sent: 2020年8月13日 17:01
To: Gao, Liming ; devel@edk2.groups.io
Cc: Chen, Christine 
Subject: RE: [Patch] BaseTools: Move CreateAsBuiltInf into AutoGenWorker for 
parallel

Liming, I did the test on Ovmf, there is some improvement but not much.

Thanks,
Bob

-Original Message-
From: Gao, Liming 
Sent: Wednesday, August 12, 2020 10:35 PM
To: Feng, Bob C ; devel@edk2.groups.io
Cc: Chen, Christine 
Subject: RE: [Patch] BaseTools: Move CreateAsBuiltInf into AutoGenWorker for 
parallel

I like this idea. Is there any build performance improvement?

> -Original Message-
> From: Feng, Bob C 
> Sent: Wednesday, August 12, 2020 2:09 PM
> To: devel@edk2.groups.io
> Cc: Gao, Liming ; Chen, Christine 
> 
> Subject: [Patch] BaseTools: Move CreateAsBuiltInf into AutoGenWorker 
> for parallel
> 
> AsBuiltInf can be created during AutoGen phase. Move CreateAsBuiltInf 
> into AutoGenWorker to make this step run in parallel.
> 
> Signed-off-by: Bob Feng 
> Cc: Liming Gao 
> Cc: Yuwei Chen 
> ---
>  BaseTools/Source/Python/AutoGen/AutoGenWorker.py | 2 +-
>  BaseTools/Source/Python/build/build.py   | 4 +---
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
> b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
> index 017f676399..0425f1ab0b 100755
> --- a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
> +++ b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
> @@ -278,11 +278,11 @@ class AutoGenWorkerInProcess(mp.Process):
>  else:
>  self.cache_q.put((Ma.MetaFile.Path, Ma.Arch, 
> "PreMakeCache", False))
> 
>  Ma.CreateCodeFile(False)
>
> Ma.CreateMakeFile(False,GenFfsList=FfsCmd.get((Ma.MetaFile.Path,
> Ma.Arch),[]))
> -
> +Ma.CreateAsBuiltInf()
>  if GlobalData.gBinCacheSource and CommandTarget in [None, 
> "", "all"]:
>  try:
>  CacheResult = Ma.CanSkipbyMakeCache()
>  except:
>  CacheResult = False diff --git 
> a/BaseTools/Source/Python/build/build.py
> b/BaseTools/Source/Python/build/build.py
> index 59ceacfed0..c4cfe38ad9 100755
> --- a/BaseTools/Source/Python/build/build.py
> +++ b/BaseTools/Source/Python/build/build.py
> @@ -871,11 +871,11 @@ class Build():
>  if GlobalData.gUseHashCache and not 
> GlobalData.gBinCacheDest and self.Target in [None, "", "all"]:
>  cqueue.put((PcdMa.MetaFile.Path, PcdMa.Arch, 
> "PreMakeCache", False))
> 
>  PcdMa.CreateCodeFile(False)
>  PcdMa.CreateMakeFile(False,GenFfsList = 
> DataPipe.Get("FfsCommand").get((PcdMa.MetaFile.Path, PcdMa.Arch),[]))
> -
> +PcdMa.CreateAsBuiltInf()
>  # Force cache miss for PCD driver
>  if GlobalData.gBinCacheSource and self.Target in [None, 
> "", "all"]:
>  cqueue.put((PcdMa.MetaFile.Path, PcdMa.Arch, 
> "MakeCache", False))
> 
>  self.AutoGenMgr.join()
> @@ -1263,11 +1263,10 @@ class Build():
> 
>  # build modules
>  if BuildModule:
>  BuildCommand = BuildCommand + [Target]
>  LaunchCommand(BuildCommand, AutoGenObject.MakeFileDir)
> -self.CreateAsBuiltInf()
>  if GlobalData.gBinCacheDest:
>  self.GenDestCache()
>  elif GlobalData.gUseHashCache and not GlobalData.gBinCacheSource:
>  # Only for --hash
>  # Update PreMakeCacheChain files @@ -2274,11 +2273,10 
> @@ class Build():
>  # All modules have been put in build tasks queue. Tell task 
> scheduler
>  # to exit if all tasks are completed
>  #
>  ExitFlag.set()
>  BuildTask.WaitForComplete()
> -self.CreateAsBuiltInf()
>  if GlobalData.gBinCacheDest:
>  self.GenDestCache()
>  elif GlobalData.gUseHashCache and not 
> GlobalData.gBinCacheSource:
>  # Only for --hash
>  # Update PreMakeCacheChain files
> --
> 2.20.1.windows.1


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

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



Re: [edk2-devel] [PATCH v6 2/5] MdePkg: BaseRngLibDxe: Add RngLib that uses RngDxe

2020-08-13 Thread Liming Gao
Matthew:
  Based on the naming rule for the libraries in MdePkg, this new library 
instance name should be DxeRngLib or DxeRngLibRngProtocol.

Thanks
Liming
-Original Message-
From: matthewfcarl...@gmail.com  
Sent: 2020年8月13日 6:44
To: devel@edk2.groups.io
Cc: Ard Biesheuvel ; Kinney, Michael D 
; Gao, Liming ; Liu, Zhiguang 
; Matthew Carlson 
Subject: [PATCH v6 2/5] MdePkg: BaseRngLibDxe: Add RngLib that uses RngDxe

From: Matthew Carlson 

This adds a RngLib that uses the RngProtocol to provide randomness.
This means that the RngLib is meant to be used with DXE_DRIVERS.

Ref: https://github.com/tianocore/edk2/pull/845
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1871

Cc: Ard Biesheuvel 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Signed-off-by: Matthew Carlson 
---
 MdePkg/Library/BaseRngLibDxe/RngDxeLib.c   | 200 
 MdePkg/Library/BaseRngLibDxe/BaseRngLibDxe.inf |  38 
 MdePkg/MdePkg.dsc  |   4 +-
 3 files changed, 241 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Library/BaseRngLibDxe/RngDxeLib.c 
b/MdePkg/Library/BaseRngLibDxe/RngDxeLib.c
new file mode 100644
index ..8ee29329de13
--- /dev/null
+++ b/MdePkg/Library/BaseRngLibDxe/RngDxeLib.c
@@ -0,0 +1,200 @@
+/** @file

+ Provides an implementation of the library class RngLib that uses the Rng 
protocol.

+

+Copyright (c) Microsoft Corporation. All rights reserved.

+SPDX-License-Identifier: BSD-2-Clause-Patent

+

+**/

+#include 

+#include 

+#include 

+#include 

+#include 

+

+/**

+Routine Description:

+

+Generates a random number via the NIST

+800-9A algorithm.  Refer to

+http://csrc.nist.gov/groups/STM/cavp/documents/drbg/DRBGVS.pdf

+for more information.

+

+Arguments:

+

+Buffer  -- Buffer to receive the random number.

+BufferSize  -- Number of bytes in Buffer.

+

+Return Value:

+

+EFI_SUCCESS or underlying failure code.

+

+**/

+EFI_STATUS

+EFIAPI

+GenerateRandomNumberViaNist800Algorithm(

+  OUT UINT8* Buffer,

+  IN  UINTN  BufferSize

+  )

+{

+  EFI_STATUSStatus;

+  EFI_RNG_PROTOCOL* RngProtocol;

+

+  RngProtocol = NULL;

+

+  if (Buffer == NULL) {

+  DEBUG((DEBUG_ERROR, "[%a] Buffer == NULL.\n", __FUNCTION__));

+  return EFI_INVALID_PARAMETER;

+  }

+

+  Status = gBS->LocateProtocol(, NULL, (VOID 
**));

+  if (EFI_ERROR(Status) || RngProtocol == NULL) {

+  DEBUG((DEBUG_ERROR, "[%a] Could not locate RNG prototocol, Status = 
%r\n", __FUNCTION__, Status));

+  return Status;

+  }

+

+  Status = RngProtocol->GetRNG(RngProtocol, 
, BufferSize, Buffer);

+  DEBUG((DEBUG_INFO, "[%a] GetRNG algorithm CTR-256 - Status = %r\n", 
__FUNCTION__, Status));

+  if(!EFI_ERROR(Status)) {

+return Status;

+  }

+

+  Status = RngProtocol->GetRNG(RngProtocol, 
, BufferSize, Buffer);

+  DEBUG((DEBUG_INFO, "[%a] GetRNG algorithm HMAC-256 - Status = %r\n", 
__FUNCTION__, Status));

+  if(!EFI_ERROR(Status)) {

+return Status;

+  }

+

+  Status = RngProtocol->GetRNG(RngProtocol, 
, BufferSize, Buffer);

+  DEBUG((DEBUG_INFO, "[%a] GetRNG algorithm Hash-256 - Status = %r\n", 
__FUNCTION__, Status));

+  if(!EFI_ERROR(Status)) {

+return Status;

+  }

+  // If we get to this point, we have failed

+  DEBUG((DEBUG_ERROR, "[%a] GetRNG() failed, staus = %r\n", __FUNCTION__, 
Status));

+

+  return Status;

+}// GenerateRandomNumberViaNist800Algorithm()

+

+

+/**

+  Generates a 16-bit random number.

+

+  if Rand is NULL, return FALSE.

+

+  @param[out] Rand Buffer pointer to store the 16-bit random value.

+

+  @retval TRUE Random number generated successfully.

+  @retval FALSEFailed to generate the random number.

+

+**/

+BOOLEAN

+EFIAPI

+GetRandomNumber16 (

+  OUT UINT16*Rand

+  )

+{

+  EFI_STATUS Status;

+

+  if (Rand == NULL)

+  {

+return FALSE;

+  }

+

+  Status = GenerateRandomNumberViaNist800Algorithm ((UINT8 *)Rand, 2);

+  if (EFI_ERROR(Status))

+  {

+return FALSE;

+  }

+  return TRUE;

+}

+

+/**

+  Generates a 32-bit random number.

+

+  if Rand is NULL, return FALSE.

+

+  @param[out] Rand Buffer pointer to store the 32-bit random value.

+

+  @retval TRUE Random number generated successfully.

+  @retval FALSEFailed to generate the random number.

+

+**/

+BOOLEAN

+EFIAPI

+GetRandomNumber32 (

+  OUT UINT32*Rand

+  )

+{

+  EFI_STATUS Status;

+

+  if (Rand == NULL) {

+return FALSE;

+  }

+

+  Status = GenerateRandomNumberViaNist800Algorithm ((UINT8 *)Rand, 4);

+  if (EFI_ERROR(Status)) {

+return FALSE;

+  }

+  return TRUE;

+}

+

+/**

+  Generates a 64-bit random number.

+

+  if Rand is NULL, return FALSE.

+

+  @param[out] Rand Buffer pointer to store the 64-bit random value.

+

+  @retval TRUE Random nu

[edk2-devel] [Patch] BaseTools: Fix the issue in VS2017/VS2019 setting

2020-08-13 Thread Liming Gao
edksetup.bat VS2017 should set VS2017 only. But now,
it will set VS2017/VS2019 both. This patch corrects it.

Signed-off-by: Liming Gao 
Cc: Bob Feng 
Cc: Yuwei Chen 
---
 This patch bases on the change https://edk2.groups.io/g/devel/message/64138

 BaseTools/set_vsprefix_envs.bat | 4 
 1 file changed, 4 insertions(+)

diff --git a/BaseTools/set_vsprefix_envs.bat b/BaseTools/set_vsprefix_envs.bat
index 2627587ba3..d4eb84f064 100644
--- a/BaseTools/set_vsprefix_envs.bat
+++ b/BaseTools/set_vsprefix_envs.bat
@@ -167,6 +167,8 @@ if not defined WINSDK_PATH_FOR_RC_EXE (
   )
 )
 
+if /I "%1"=="VS2017" goto SetWinDDK
+
 :SetVS2019
 if not defined VS160COMNTOOLS (
   @REM clear two envs so that vcvars32.bat can run successfully.
@@ -226,6 +228,8 @@ if not defined WINSDK_PATH_FOR_RC_EXE (
   )
 )
 
+if /I "%1"=="VS2019" goto SetWinDDK
+
 :SetWinDDK
 if not defined WINDDK3790_PREFIX (
   set WINDDK3790_PREFIX=C:\WINDDK\3790.1830\bin\
-- 
2.27.0.windows.1


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

View/Reply Online (#64142): https://edk2.groups.io/g/devel/message/64142
Mute This Topic: https://groups.io/mt/76163640/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] BaseTools: Fix the issue in VS prefix setting for VS2017/VS2019

2020-08-13 Thread Liming Gao
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2896

When VS2017/VS2019 are both installed. VS prefix setting will
wrongly be set. VS2017_PREFIX is set to the same value of VS2019.

This patch clears VSINSTALLDIR and VCToolsVersion env, then
the different vcvars32 can set the correct VS env.

Signed-off-by: Liming Gao 
Cc: Bob Feng 
Cc: Yuwei Chen 
---
 BaseTools/set_vsprefix_envs.bat | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/BaseTools/set_vsprefix_envs.bat b/BaseTools/set_vsprefix_envs.bat
index 38fb0eb260..2627587ba3 100644
--- a/BaseTools/set_vsprefix_envs.bat
+++ b/BaseTools/set_vsprefix_envs.bat
@@ -110,6 +110,9 @@ if /I "%1"=="VS2015" goto SetWinDDK
 
 :SetVS2017
 if not defined VS150COMNTOOLS (
+  @REM clear two envs so that vcvars32.bat can run successfully.
+  set VSINSTALLDIR=
+  set VCToolsVersion=
   if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" 
(
 if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" (
   call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" 
-products Microsoft.VisualStudio.Product.BuildTools -version 15,16 > vswhereInfo
@@ -166,6 +169,9 @@ if not defined WINSDK_PATH_FOR_RC_EXE (
 
 :SetVS2019
 if not defined VS160COMNTOOLS (
+  @REM clear two envs so that vcvars32.bat can run successfully.
+  set VSINSTALLDIR=
+  set VCToolsVersion=
   if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" 
(
 if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools" (
   call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" 
-products Microsoft.VisualStudio.Product.BuildTools -version 16,17 > vswhereInfo
-- 
2.27.0.windows.1


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

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



[edk2-devel] [Patch 1/2] BaseTools: Move VS2019 env setting after VS2017 env setting

2020-08-13 Thread Liming Gao
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2896

Keep the latest VS version as the last one

Signed-off-by: Liming Gao 
Cc: Bob Feng 
Cc: Yuwei Chen 
---
 BaseTools/set_vsprefix_envs.bat | 46 -
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/BaseTools/set_vsprefix_envs.bat b/BaseTools/set_vsprefix_envs.bat
index 9966a5a4ed..38fb0eb260 100644
--- a/BaseTools/set_vsprefix_envs.bat
+++ b/BaseTools/set_vsprefix_envs.bat
@@ -3,7 +3,7 @@
 @REM   however it may be executed directly from the BaseTools project folder
 @REM   if the file is not executed within a WORKSPACE\BaseTools folder.
 @REM
-@REM Copyright (c) 2016-2019, Intel Corporation. All rights reserved.
+@REM Copyright (c) 2016-2020, Intel Corporation. All rights reserved.
 @REM
 @REM SPDX-License-Identifier: BSD-2-Clause-Patent
 @REM
@@ -108,45 +108,45 @@ if defined VS140COMNTOOLS (
 )
 if /I "%1"=="VS2015" goto SetWinDDK
 
-:SetVS2019
-if not defined VS160COMNTOOLS (
+:SetVS2017
+if not defined VS150COMNTOOLS (
   if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" 
(
-if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools" (
-  call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" 
-products Microsoft.VisualStudio.Product.BuildTools -version 16,17 > vswhereInfo
+if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" (
+  call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" 
-products Microsoft.VisualStudio.Product.BuildTools -version 15,16 > vswhereInfo
   for /f "usebackq tokens=1* delims=: " %%i in (vswhereInfo) do (
 if /i "%%i"=="installationPath" call 
"%%j\VC\Auxiliary\Build\vcvars32.bat"
   )
   del vswhereInfo
 ) else (
-  call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" 
-version 16,17 > vswhereInfo
+  call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" 
-version 15,16 > vswhereInfo
   for /f "usebackq tokens=1* delims=: " %%i in (vswhereInfo) do (
 if /i "%%i"=="installationPath" call 
"%%j\VC\Auxiliary\Build\vcvars32.bat"
   )
   del vswhereInfo
 )
   ) else if exist "%ProgramFiles%\Microsoft Visual 
Studio\Installer\vswhere.exe" (
-if exist "%ProgramFiles%\Microsoft Visual Studio\2019\BuildTools" (
-  call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" 
-products Microsoft.VisualStudio.Product.BuildTools -version 16,17 > vswhereInfo
+if exist "%ProgramFiles%\Microsoft Visual Studio\2017\BuildTools" (
+  call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" 
-products Microsoft.VisualStudio.Product.BuildTools -version 15,16 > vswhereInfo
   for /f "usebackq tokens=1* delims=: " %%i in (vswhereInfo) do (
 if /i "%%i"=="installationPath" call 
"%%j\VC\Auxiliary\Build\vcvars32.bat"
   )
   del vswhereInfo
 ) else (
-  call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" 
-version 16,17 > vswhereInfo
+  call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" 
-version 15,16 > vswhereInfo
   for /f "usebackq tokens=1* delims=: " %%i in (vswhereInfo) do (
 if /i "%%i"=="installationPath" call 
"%%j\VC\Auxiliary\Build\vcvars32.bat"
   )
   del vswhereInfo
 )
   ) else (
-if /I "%1"=="VS2019" goto ToolNotInstall
+if /I "%1"=="VS2017" goto ToolNotInstall
 goto SetWinDDK
   )
 )
 
 if defined VCToolsInstallDir (
-  if not defined VS2019_PREFIX (
-set "VS2019_PREFIX=%VCToolsInstallDir%"
+  if not defined VS2017_PREFIX (
+set "VS2017_PREFIX=%VCToolsInstallDir%"
   )
   if not defined WINSDK10_PREFIX (
 if defined WindowsSdkVerBinPath (
@@ -164,45 +164,45 @@ if not defined WINSDK_PATH_FOR_RC_EXE (
   )
 )
 
-:SetVS2017
-if not defined VS150COMNTOOLS (
+:SetVS2019
+if not defined VS160COMNTOOLS (
   if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" 
(
-if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" (
-  call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" 
-products Microsoft.VisualStudio.Product.BuildTools -version 15,16 > vswhereInfo
+if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools" (
+  call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" 
-products Microsoft.VisualStudio.Product.BuildTools -version 16,17 > vswhereInfo
   for /f "usebackq t

[edk2-devel] [Patch 0/2] Fix the issue to set VS2017 and VS2019 prefix env

2020-08-13 Thread Liming Gao
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2896

Cc: Bob Feng 
Cc: Yuwei Chen 

Liming Gao (2):
  BaseTools: Move VS2019 env setting after VS2017 env setting
  BaseTools: Fix the issue in VS prefix setting for VS2017/VS2019

 BaseTools/set_vsprefix_envs.bat | 52 ++---
 1 file changed, 29 insertions(+), 23 deletions(-)

-- 
2.27.0.windows.1


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

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



Re: [edk2-devel] [PATCH v14 00/46] SEV-ES guest support

2020-08-12 Thread Liming Gao
t;>
> >>>>>> This patch series provides support for running EDK2/OVMF under SEV-ES.
> >>>>>>
> >>>>>> Secure Encrypted Virtualization - Encrypted State (SEV-ES) expands
> >>>>>> on the SEV support to protect the guest register state from the
> >>>>>> hypervisor. See
> >>>>>> "AMD64 Architecture Programmer's Manual Volume 2: System
> >>>>>> Programming", section "15.35 Encrypted State (SEV-ES)" [1].
> >>>>>>
> >>>>>> In order to allow a hypervisor to perform functions on behalf of a
> >>>>>> guest, there is architectural support for notifying a guest's
> >>>>>> operating system when certain types of VMEXITs are about to occur.
> >>>>>> This allows the guest to selectively share information with the
> >>>>>> hypervisor to satisfy the requested function. The notification is
> >>>>>> performed using a new exception, the VMM Communication exception
> >>>>>> (#VC). The information is shared through the Guest-Hypervisor 
> >>>>>> Communication Block (GHCB) using the VMGEXIT instruction.
> >>>>>> The GHCB format and the protocol for using it is documented in
> >>>>>> "SEV-ES Guest-Hypervisor Communication Block Standardization" [2].
> >>>>>>
> >>>>>> The main areas of the EDK2 code that are updated to support SEV-ES
> >>>>>> are around the exception handling support and the AP boot support.
> >>>>>>
> >>>>>> Exception support is required starting in Sec, continuing through
> >>>>>> Pei and into Dxe in order to handle #VC exceptions that are generated.
> >>>>>> Each AP requires it's own GHCB page as well as a page to hold values
> >>>>>> specific to that AP.
> >>>>>>
> >>>>>> AP booting poses some interesting challenges. The INIT-SIPI-SIPI
> >>>>>> sequence is typically used to boot the APs. However, the hypervisor
> >>>>>> is not allowed to update the guest registers. The GHCB document [2]
> >>>>>> talks about how SMP booting under SEV-ES is performed.
> >>>>>>
> >>>>>> Since the GHCB page must be a shared (unencrypted) page, the
> >>>>>> processor must be running in long mode in order for the guest and
> >>>>>> hypervisor to communicate with each other. As a result, SEV-ES is
> >>>>>> only supported under the X64 architecture.
> >>>>>>
> >>>>>> This series adds a new library requirement for the VmgExitLib
> >>>>>> library against the UefiCpuPkg CpuExceptionHandlerLib library and
> >>>>>> the UefiCpuPkg MpInitLib library. The edk2-platforms repo requires
> >>>>>> updates/patches to add the new library requirement. To accomodate
> >>>>>> that, this series could be split between:
> >>>>>>
> >>>>>> patch number 10:
> >>>>>>   UefiPayloadPkg: Prepare UefiPayloadPkg to use the VmgExitLib
> >>>>>> library
> >>>>>>
> >>>>>> and patch number 11:
> >>>>>>   UefiCpuPkg/CpuExceptionHandler: Add base support for the #VC
> >>>>>> exception
> >>>>>>
> >>>>>> The updates to edk2-platforms can be applied at the split.
> >>>>>>
> >>>>>> [1]
> >>>>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
> >>>>>> w.amd.com%2Fsystem%2Ffiles%2FTechDocs%2F24593.pdfdata=02%7C01%7
> >>>>>> Cthomas.lendacky%40amd.com%7C9c0fb2b16af248090fdb08d83e05c821%7C3dd8
> >>>>>> 961fe4884e608e11a82d994e183d%7C0%7C0%7C637327542159394484sdata=
> >>>>>> zusPC5xFZWfLxt6T5Psxb1%2Fw4mrVWnkrrECkuKSsxLk%3Dreserved=0
> >>>>>> [2]
> >>>>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fde
> >>>>>> veloper.amd.com%2Fwp-content%2Fresources%2F56421.pdfdata=02%7C0
> >>>>>> 1%7Cthomas.lendacky%40amd.com%7C9c0fb2b16af248090fdb08d83e05c821%7C3
> >>>>>> dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637327542159394484sda
> >>>>>> ta=yk7o8h1lajI449tZfX

Re: [edk2-devel] [PATCH v14 00/46] SEV-ES guest support

2020-08-12 Thread Liming Gao
 tool fails for me as I described in another post. The reason 
> I say that is, for example, the issue about the comment
> description ending with a period was actually in multiple spots of the 
> commit, even though the tool only flagged one. I'd hate to
> think I've fixed everything only to have the tool find more issues after I've 
> submitted another series, all because I couldn't run the
> tool.
> >
> > Thanks,
> > Tom
> >
> > [Liming] ECC checker will be merged in open CI to check the patch and 
> > report the issues. Then, you don't need to run it in your local
> machine. I use this patch set as test case to verify ECC checker 
> functionality. And, it reports those issues. I think they are valuable for
> this patch set, so I raise them. Sorry for the late notice.
> >
> > Thanks
> > Liming
> >>
> >> Thanks!
> >> Laszlo
> >>
> >>>
> >>> Thanks
> >>> Liming
> >>> -Original Message-
> >>> From: Laszlo Ersek 
> >>> Sent: 2020年8月11日 3:36
> >>> To: devel@edk2.groups.io; thomas.lenda...@amd.com
> >>> Cc: Brijesh Singh ; Ard Biesheuvel
> >>> ; Dong, Eric ; Justen,
> >>> Jordan L ; Gao, Liming
> >>> ; Kinney, Michael D
> >>> ; Ni, Ray ; Andrew Fish
> >>> ; Anthony Perard ; You,
> >>> Benjamin ; Bi, Dandan ;
> >>> Dong, Guo ; Wu, Hao A ; Wang,
> >>> Jian J ; Julien Grall ; Leif
> >>> Lindholm ; Ma, Maurice 
> >>> Subject: Re: [edk2-devel] [PATCH v14 00/46] SEV-ES guest support
> >>>
> >>> On 08/07/20 21:38, Lendacky, Thomas wrote:
> >>>> From: Tom Lendacky 
> >>>>
> >>>> This patch series provides support for running EDK2/OVMF under SEV-ES.
> >>>>
> >>>> Secure Encrypted Virtualization - Encrypted State (SEV-ES) expands
> >>>> on the SEV support to protect the guest register state from the
> >>>> hypervisor. See
> >>>> "AMD64 Architecture Programmer's Manual Volume 2: System
> >>>> Programming", section "15.35 Encrypted State (SEV-ES)" [1].
> >>>>
> >>>> In order to allow a hypervisor to perform functions on behalf of a
> >>>> guest, there is architectural support for notifying a guest's
> >>>> operating system when certain types of VMEXITs are about to occur.
> >>>> This allows the guest to selectively share information with the
> >>>> hypervisor to satisfy the requested function. The notification is
> >>>> performed using a new exception, the VMM Communication exception
> >>>> (#VC). The information is shared through the Guest-Hypervisor 
> >>>> Communication Block (GHCB) using the VMGEXIT instruction.
> >>>> The GHCB format and the protocol for using it is documented in
> >>>> "SEV-ES Guest-Hypervisor Communication Block Standardization" [2].
> >>>>
> >>>> The main areas of the EDK2 code that are updated to support SEV-ES
> >>>> are around the exception handling support and the AP boot support.
> >>>>
> >>>> Exception support is required starting in Sec, continuing through
> >>>> Pei and into Dxe in order to handle #VC exceptions that are generated.
> >>>> Each AP requires it's own GHCB page as well as a page to hold values
> >>>> specific to that AP.
> >>>>
> >>>> AP booting poses some interesting challenges. The INIT-SIPI-SIPI
> >>>> sequence is typically used to boot the APs. However, the hypervisor
> >>>> is not allowed to update the guest registers. The GHCB document [2]
> >>>> talks about how SMP booting under SEV-ES is performed.
> >>>>
> >>>> Since the GHCB page must be a shared (unencrypted) page, the
> >>>> processor must be running in long mode in order for the guest and
> >>>> hypervisor to communicate with each other. As a result, SEV-ES is
> >>>> only supported under the X64 architecture.
> >>>>
> >>>> This series adds a new library requirement for the VmgExitLib
> >>>> library against the UefiCpuPkg CpuExceptionHandlerLib library and
> >>>> the UefiCpuPkg MpInitLib library. The edk2-platforms repo requires
> >>>> updates/patches to add the new library requirement. To accomodate
> >>>> that, this series could be split between:
> >>>>
> >&

Re: [edk2-devel] [Patch] BaseTools: Move CreateAsBuiltInf into AutoGenWorker for parallel

2020-08-12 Thread Liming Gao
I like this idea. Is there any build performance improvement?

> -Original Message-
> From: Feng, Bob C 
> Sent: Wednesday, August 12, 2020 2:09 PM
> To: devel@edk2.groups.io
> Cc: Gao, Liming ; Chen, Christine 
> Subject: [Patch] BaseTools: Move CreateAsBuiltInf into AutoGenWorker for 
> parallel
> 
> AsBuiltInf can be created during AutoGen phase. Move CreateAsBuiltInf
> into AutoGenWorker to make this step run in parallel.
> 
> Signed-off-by: Bob Feng 
> Cc: Liming Gao 
> Cc: Yuwei Chen 
> ---
>  BaseTools/Source/Python/AutoGen/AutoGenWorker.py | 2 +-
>  BaseTools/Source/Python/build/build.py   | 4 +---
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py 
> b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
> index 017f676399..0425f1ab0b 100755
> --- a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
> +++ b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
> @@ -278,11 +278,11 @@ class AutoGenWorkerInProcess(mp.Process):
>  else:
>  self.cache_q.put((Ma.MetaFile.Path, Ma.Arch, 
> "PreMakeCache", False))
> 
>  Ma.CreateCodeFile(False)
>  
> Ma.CreateMakeFile(False,GenFfsList=FfsCmd.get((Ma.MetaFile.Path, Ma.Arch),[]))
> -
> +Ma.CreateAsBuiltInf()
>  if GlobalData.gBinCacheSource and CommandTarget in [None, 
> "", "all"]:
>  try:
>  CacheResult = Ma.CanSkipbyMakeCache()
>  except:
>  CacheResult = False
> diff --git a/BaseTools/Source/Python/build/build.py 
> b/BaseTools/Source/Python/build/build.py
> index 59ceacfed0..c4cfe38ad9 100755
> --- a/BaseTools/Source/Python/build/build.py
> +++ b/BaseTools/Source/Python/build/build.py
> @@ -871,11 +871,11 @@ class Build():
>  if GlobalData.gUseHashCache and not 
> GlobalData.gBinCacheDest and self.Target in [None, "", "all"]:
>  cqueue.put((PcdMa.MetaFile.Path, PcdMa.Arch, 
> "PreMakeCache", False))
> 
>  PcdMa.CreateCodeFile(False)
>  PcdMa.CreateMakeFile(False,GenFfsList = 
> DataPipe.Get("FfsCommand").get((PcdMa.MetaFile.Path, PcdMa.Arch),[]))
> -
> +PcdMa.CreateAsBuiltInf()
>  # Force cache miss for PCD driver
>  if GlobalData.gBinCacheSource and self.Target in [None, 
> "", "all"]:
>  cqueue.put((PcdMa.MetaFile.Path, PcdMa.Arch, 
> "MakeCache", False))
> 
>  self.AutoGenMgr.join()
> @@ -1263,11 +1263,10 @@ class Build():
> 
>  # build modules
>  if BuildModule:
>  BuildCommand = BuildCommand + [Target]
>  LaunchCommand(BuildCommand, AutoGenObject.MakeFileDir)
> -self.CreateAsBuiltInf()
>  if GlobalData.gBinCacheDest:
>  self.GenDestCache()
>  elif GlobalData.gUseHashCache and not GlobalData.gBinCacheSource:
>  # Only for --hash
>  # Update PreMakeCacheChain files
> @@ -2274,11 +2273,10 @@ class Build():
>  # All modules have been put in build tasks queue. Tell task 
> scheduler
>  # to exit if all tasks are completed
>  #
>  ExitFlag.set()
>  BuildTask.WaitForComplete()
> -self.CreateAsBuiltInf()
>  if GlobalData.gBinCacheDest:
>  self.GenDestCache()
>  elif GlobalData.gUseHashCache and not 
> GlobalData.gBinCacheSource:
>  # Only for --hash
>  # Update PreMakeCacheChain files
> --
> 2.20.1.windows.1


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

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



Re: [edk2-devel] [PATCH v14 00/46] SEV-ES guest support

2020-08-12 Thread Liming Gao
dling support and the AP boot support.
>>>
>>> Exception support is required starting in Sec, continuing through 
>>> Pei and into Dxe in order to handle #VC exceptions that are generated.
>>> Each AP requires it's own GHCB page as well as a page to hold values 
>>> specific to that AP.
>>>
>>> AP booting poses some interesting challenges. The INIT-SIPI-SIPI 
>>> sequence is typically used to boot the APs. However, the hypervisor 
>>> is not allowed to update the guest registers. The GHCB document [2] 
>>> talks about how SMP booting under SEV-ES is performed.
>>>
>>> Since the GHCB page must be a shared (unencrypted) page, the 
>>> processor must be running in long mode in order for the guest and 
>>> hypervisor to communicate with each other. As a result, SEV-ES is 
>>> only supported under the X64 architecture.
>>>
>>> This series adds a new library requirement for the VmgExitLib 
>>> library against the UefiCpuPkg CpuExceptionHandlerLib library and 
>>> the UefiCpuPkg MpInitLib library. The edk2-platforms repo requires 
>>> updates/patches to add the new library requirement. To accomodate 
>>> that, this series could be split between:
>>>
>>> patch number 10:
>>>   UefiPayloadPkg: Prepare UefiPayloadPkg to use the VmgExitLib 
>>> library
>>>
>>> and patch number 11:
>>>   UefiCpuPkg/CpuExceptionHandler: Add base support for the #VC 
>>> exception
>>>
>>> The updates to edk2-platforms can be applied at the split.
>>>
>>> [1] 
>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
>>> w.amd.com%2Fsystem%2Ffiles%2FTechDocs%2F24593.pdfdata=02%7C01%7
>>> Cthomas.lendacky%40amd.com%7C9c0fb2b16af248090fdb08d83e05c821%7C3dd8
>>> 961fe4884e608e11a82d994e183d%7C0%7C0%7C637327542159394484sdata=
>>> zusPC5xFZWfLxt6T5Psxb1%2Fw4mrVWnkrrECkuKSsxLk%3Dreserved=0
>>> [2] 
>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fde
>>> veloper.amd.com%2Fwp-content%2Fresources%2F56421.pdfdata=02%7C0
>>> 1%7Cthomas.lendacky%40amd.com%7C9c0fb2b16af248090fdb08d83e05c821%7C3
>>> dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637327542159394484sda
>>> ta=yk7o8h1lajI449tZfXGbPumnkvRjswKp1FRmSUdewh4%3Dreserved=0
>>>
>>> ---
>>>
>>> These patches are based on commit:
>>> 9565ab67c209 ("ShellPkg: smbiosview - Change some type 17 field 
>>> values
>>> format")
>>>
>>> A version of the tree can be found at:
>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgi
>>> thub.com%2FAMDESE%2Fovmf%2Ftree%2Fsev-es-v22data=02%7C01%7Cthom
>>> as.lendacky%40amd.com%7C9c0fb2b16af248090fdb08d83e05c821%7C3dd8961fe
>>> 4884e608e11a82d994e183d%7C0%7C0%7C637327542159404476sdata=6b9Eq
>>> EVAy1VK38oMSuAPJhOourJpPXUnRIgMcSWRMQc%3Dreserved=0
>>>
>>> Cc: Andrew Fish 
>>> Cc: Anthony Perard 
>>> Cc: Ard Biesheuvel 
>>> Cc: Benjamin You 
>>> Cc: Dandan Bi 
>>> Cc: Eric Dong 
>>> Cc: Guo Dong 
>>> Cc: Hao A Wu 
>>> Cc: Jian J Wang 
>>> Cc: Jordan Justen 
>>> Cc: Julien Grall 
>>> Cc: Laszlo Ersek 
>>> Cc: Leif Lindholm 
>>> Cc: Liming Gao 
>>> Cc: Maurice Ma 
>>> Cc: Michael D Kinney 
>>> Cc: Ray Ni 
>>>
>>> Changes since v13:
>>> - Fixup the AsmRelocateApLoop() call site so IA32 successfully boots APs.
>>>   Do this by appending the three new parameters without altering the
>>>   original parameter passing order.
>>> - Minor updates to description text and help text to expand the GHCB
>>>   acronym.
>>>
>>> Changes since v12:
>>> - Change IA32 VMGEXIT .nasm file to issue an int 3. Depending on the
>>>   version of NASM, the "BITS 64" trick to get NASM to recognize the
>>>   VMMCALL instruction (VMGEXIT is a REP VMMCALL) caused an error. Since
>>>   SEV-ES is X64 only, VMGEXIT should never be called in IA32.
>>>
>>> Changes since v11:
>>> - Make the XGETBV and VMGEXIT .nasm files buildable for all environments
>>>   and remove the updates that add these instructions to GccInline.c
>>>
>>> Changes since v10:
>>> - Fix conflicts around GccInline.c file after moving to latest 
>>> commit
>>> - Fix conflicts with OVMF PCD values after moving to latest commit
>>>
>>> Changes since v9:
>>> - Fixed bit field declara

Re: [edk2-devel] [PATCH v1 1/1] FmpDevicePkg/FmpDxe: Fix Clang build error

2020-08-11 Thread Liming Gao
Tested-by: Liming Gao 
Reviewed-by: Liming Gao 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Michael Kubacki
Sent: 2020年8月12日 8:24
To: devel@edk2.groups.io
Cc: Gao, Liming ; Kinney, Michael D 
; Jiang, Guomin ; Xu, Wei6 

Subject: [edk2-devel] [PATCH v1 1/1] FmpDevicePkg/FmpDxe: Fix Clang build error

From: Michael Kubacki 

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

The local Private pointer variable in SetTheImage() is initialized based on the 
caller provided This pointer argument. The cleanup label path uses the Private 
pointer which will not be initialized if This is NULL.

This change initializes Private to NULL and accounts for Private potentially 
being NULL in the cleanup label path.

Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Guomin Jiang 
Cc: Wei6 Xu 
Signed-off-by: Michael Kubacki 
---
 FmpDevicePkg/FmpDxe/FmpDxe.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c b/FmpDevicePkg/FmpDxe/FmpDxe.c index 
854feec0a162..427b215ddc5f 100644
--- a/FmpDevicePkg/FmpDxe/FmpDxe.c
+++ b/FmpDevicePkg/FmpDxe/FmpDxe.c
@@ -1043,6 +1043,7 @@ SetTheImage (
   UINT32DependenciesSize;
 
   Status = EFI_SUCCESS;
+  Private= NULL;
   Updateable = 0;
   BooleanValue   = FALSE;
   FmpHeaderSize  = 0;
@@ -1293,7 +1294,10 @@ SetTheImage (
 
 cleanup:
   mProgressFunc = NULL;
-  SetLastAttemptStatusInVariable (Private, LastAttemptStatus);
+
+  if (Private != NULL) {
+SetLastAttemptStatusInVariable (Private, LastAttemptStatus);  }
 
   if (Progress != NULL) {
 //
@@ -1306,7 +1310,9 @@ SetTheImage (
   // Need repopulate after SetImage is called to
   // update LastAttemptVersion and LastAttemptStatus.
   //
-  Private->DescriptorPopulated = FALSE;
+  if (Private != NULL) {
+Private->DescriptorPopulated = FALSE;  }
 
   return Status;
 }
--
2.28.0.windows.1





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

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



Re: [edk2-devel] [PATCH v9 00/16] Add a plugin to check Ecc issues for edk2 on open ci

2020-08-11 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: Zhang, Shenglei  
Sent: 2020年8月11日 15:02
To: devel@edk2.groups.io
Cc: Feng, Bob C ; Bret Barkelew 
; Kinney, Michael D ; 
Gao, Liming ; Sean Brogan 
Subject: [PATCH v9 00/16] Add a plugin to check Ecc issues for edk2 on open ci

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2606
As planed we will enable Ecc check for edk2 on open ci. And they are ready now. 
I appreciate receiving feedback and comments if someone find errors or false 
positive issues.

I created a pipline of EccCheck for my forked edk2. Welcome everyone to create 
pull request to test the quality of this plugin.
My forked tree: https://github.com/shenglei10/edk2

And I also created some test cases for ECC plugin. Below are test cases.
https://github.com/shenglei10/edk2/tree/ECC
Results can be view in below azure server.
https://dev.azure.com/shengleizhang/shengleizhang/_build?definitionId=12&_a=summary

Patches
1/16: It's a lib necessary for py3 to run Ecc on azure servers.

2/16: EccCheck.py is a plugin to report Ecc issues for commits. It can be run
 on azure servers for open ci, or a local virtual environment.

3/16~16/16: We consider some cases that will report out Ecc issues but they 
won't
 be fixed, like submodule and industry standard related things. So we
 add two configuration fields "Exception" and "IgnoreFiles" for people
 to use. These patches add configuration in yaml files for Ecc check.

Cc: Bob Feng 
Cc: Bret Barkelew 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Sean Brogan 

v2: Update 1/17, fix the bug that the script can't hanlde multiple commits.

v3: Update 1/17, set the only workalbe workspace is edk2 root directory.
Update 2/17, designate the version of antlr4 is 4.7.1.
Add 4/17~17/17.

v4. Update 1/17, remove the function EdksetupRebuild(), instead add
function SetupEnvironment(). Update variables' format and type hints
to pass flake8 and mypy.

v5. Conver the former method to plugin solution, to align with
other check points on open ci.

v6. The 1/16 patch is missed in v5 series. Now add it in v6.

v7. Fix a bug that Ecc plugin can not be run correctly under Linux OS.

v8. Enable error code config section to ignore certain kinds of issues,
which are always false positive in partial Ecc scaning.
All patches except 2/16 have been R-B and are not updated in v8 series.
To avoid making noise in community, I only send cover letter and 2/16 patch.

v9. Update 2/16, 3/16, 5/16 and 16/16.
1. Enable directory path for "IgnoreFiles" section in xxxPkg.yaml. So that
   users can skip a certain directory and don't need to fill in with file 
names.
2. Add submodule pathes in "IgnoreFiles" in MdeModulePkg.ci.yaml,
   CryptoPkg.ci.yaml and UnitTestFrameworkPkg.ci.yaml.

Shenglei Zhang (16):
  pip-requirements.txt: Add Ecc required lib
  .pytool/Plugin: Add a plugin EccCheck
  MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration for Ecc check
  ArmVirtPkg/ArmVirtPkg.ci.yaml: Add configuration for Ecc check
  CryptoPkg/CryptoPkg.ci.yaml: Add configuration for Ecc check
  EmulatorPkg/EmulatorPkg.ci.yaml: Add configuration for Ecc check
  FatPkg/FatPkg.ci.yaml: Add configuration for Ecc check
  FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration for Ecc check
  MdePkg/MdePkg.ci.yaml: Add configuration for Ecc check
  NetworkPkg/NetworkPkg.ci.yaml: Add configuration for Ecc check
  OvmfPkg/OvmfPkg.ci.yaml: Add configuration for Ecc check
  PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml: Add configuration for Ecc check
  SecurityPkg/SecurityPkg.ci.yaml: Add configuration for Ecc check
  ShellPkg/ShellPkg.ci.yaml: Add configuration for Ecc check
  UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for Ecc check
  UnitTestFrameworkPkg: Add configuration for Ecc check in yaml file

 .pytool/Plugin/EccCheck/EccCheck.py   | 302 ++
 .pytool/Plugin/EccCheck/EccCheck_plug_in.yaml |  11 +
 .pytool/Plugin/EccCheck/Readme.md |  15 +
 ArmVirtPkg/ArmVirtPkg.ci.yaml |  11 +
 CryptoPkg/CryptoPkg.ci.yaml   |  13 +
 EmulatorPkg/EmulatorPkg.ci.yaml   |  11 +
 FatPkg/FatPkg.ci.yaml |  12 +
 FmpDevicePkg/FmpDevicePkg.ci.yaml |  12 +
 MdeModulePkg/MdeModulePkg.ci.yaml |  13 +
 MdePkg/MdePkg.ci.yaml |  11 +
 NetworkPkg/NetworkPkg.ci.yaml |  12 +
 OvmfPkg/OvmfPkg.ci.yaml   |  11 +
 PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml |  12 +
 SecurityPkg/SecurityPkg.ci.yaml   |  12 +
 ShellPkg/ShellPkg.ci.yaml |  12 +
 UefiCpuPkg/UefiCpuPkg.ci.yaml |  12 +
 .../UnitTestFrameworkPkg.ci.yaml  |  11 +
 pip-requirements.txt  |   1 +
 18 files changed, 494 insertions(+)
 create mode 100644 .pytool/Plugin/EccCheck/EccCheck.py

Re: [edk2-devel] TianoCore Bug Triage - APAC / NAMO - Tue, 08/11/2020 6:30pm-7:30pm #cal-reminder

2020-08-10 Thread Liming Gao
Below issues are submitted recently. They will be reviewed in this week 
meeting. Welcome the reporter join the meeting to introduce the more background 
and detail.

2886
EDK2
Code
unassig...@tianocore.org
UNCO
---
EmbeddedPkg PrePiHobLib SetBootMode wrong return 
type
15:25:43
eug...@nuviainc.com
2885
EDK2
Code
unassig...@tianocore.org
UNCO
---
CD command failed with Trailing period end of folder 
name
Mon 07:49
debdipta@gmail.com
2883
Tianocor
Code
unassig...@tianocore.org
UNCO
---
UefiCpuPkg: MpServices2Ppi and MpServicesPpi compatibility 
support.
Sun 23:00
chasel.c...@intel.com
2882
EDK2
Tools
bob.c.f...@intel.com
UNCO
---
Incremental build error triggered by changing name of source code 
file
Sun 22:25
yuwei.c...@intel.com
2831
EDK2
Code
zhichao@intel.com
UNCO
---
UefiBootManagerLib is not specs compliant with regards to 
EFI_EVENT_GROUP_READY_TO_BOOT
Fri 06:48
p...@akeo.ie
2876
EDK2
Code
unassig...@tianocore.org
UNCO
---
SVN#15047
Fri 06:44
seven.d...@lcfuturecenter.com
2881
EDK2
Tools
bob.c.f...@intel.com
UNCO
---
Incremental build issue as macro value change in 
Makefile
Fri 03:21
yuwei.c...@intel.com
2880
EDK2
Tools
bob.c.f...@intel.com
UNCO
---
Incremental build issue as directory macros extended in 
Makefile
Fri 03:05
yuwei.c...@intel.com
2879
EDK2
Code
unassig...@tianocore.org
UNCO
---
Hardware error record variable quota calculation 
update
Thu 17:06
kun@microsoft.com
2878
EDK2
Code
michael.d.kin...@intel.com
UNCO
---
Update FMP function descriptions to match UEFI 2.8B 
spec
Thu 14:21
michael.kuba...@microsoft.com
2424
Tianocor
Code
yonghong@intel.com
UNCO
---
TLSv1.3 support
Thu 06:40
prarthan...@amiindia.co.in
2877
EDK2
Code
unassig...@tianocore.org
UNCO
---
Bug Capsule date error
Thu 02:40
bo90g...@163.com
2873
EDK2
Code
unassig...@tianocore.org
UNCO
---
IP is getting Configured when IP Configuration is 
disabled
Wed 22:34
sivaram...@amiindia.co.in
2828
EDK2
Code
deric.c...@intel.com
UNCO
---
Option to make DSC [Packages] section limit what INFs can 
include
Wed 13:41
deric.c...@intel.com
2875
EDK2
Code
unassig...@tianocore.org
UNCO
---
Digest Algorithm update for Authenticated 
Variables
Wed 12:55
divneil.r.wadha...@intel.com
2874
EDK2
Code
unassig...@tianocore.org
UNCO
---
QuarkPlatformPkg compilation 
problem
Wed 07:27
bo90g...@163.com
2872
EDK2 Pla
SimicsOp
unassig...@tianocore.org
UNCO
---
GCC 5 build error: unused 
value
2020-08-04
prince.agye...@intel.com
2238
EDK2 Tes
UEFI-SCT
edhaya.chand...@arm.com
UNCO
---
NULL dereference in 
BBTestQueryFunctionAutoTest()
2020-07-30
xypron.g...@gmx.de
2868
EDK2
Code
unassig...@tianocore.org
UNCO
---
Request to add PatchCheck as CI 
Plugin
2020-07-29
liming@intel.com


From: devel@edk2.groups.io 
Sent: 2020年8月11日 9:30
To: devel@edk2.groups.io
Subject: [edk2-devel] TianoCore Bug Triage - APAC / NAMO - Tue, 08/11/2020 
6:30pm-7:30pm #cal-reminder


Reminder: TianoCore Bug Triage - APAC / NAMO

When: Tuesday, 11 August 2020, 6:30pm to 7:30pm, 

Re: [edk2-devel] [PATCH v2 9/9] SecurityPkg/Tcg2: handle PRE HASH and LOG ONLY

2020-08-10 Thread Liming Gao
Qi:
  EccPlugin will be enabled in open CI. Then, ECC result can be checked in open 
CI result. Now, I use the standalone EccCheck.py from 
https://github.com/shenglei10/edk2/tree/ecc_script to check the patch set. 

Thanks
Liming
-Original Message-
From: Zhang, Qi1  
Sent: 2020年8月11日 8:54
To: Gao, Liming ; devel@edk2.groups.io
Cc: Yao, Jiewen ; Wang, Jian J ; 
Kumar, Rahul1 
Subject: RE: [edk2-devel] [PATCH v2 9/9] SecurityPkg/Tcg2: handle PRE HASH and 
LOG ONLY

Hi, Liming

Thanks for your comments! Is there any wiki of how to run ECC plugin?

BRs
Qi Zhang

> -Original Message-
> From: Gao, Liming 
> Sent: Tuesday, August 11, 2020 8:19 AM
> To: devel@edk2.groups.io; Zhang, Qi1 
> Cc: Yao, Jiewen ; Wang, Jian J 
> ; Kumar, Rahul1 
> Subject: RE: [edk2-devel] [PATCH v2 9/9] SecurityPkg/Tcg2: handle PRE 
> HASH and LOG ONLY
> 
> Qi:
>   I run ECC plugin (https://edk2.groups.io/g/devel/message/63271) for 
> this patch set. It reports below issues. Can you help update the patches to 
> fix them?
> 
> EFI coding style error
>   *Error code: 3002
>   *Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=)
>   *file: D:\AllPkg\edk2\SecurityPkg\Tcg\Tcg2Pei\Tcg2Pei.c
>   *Line number: 456
>   *Predicate Expression: (Flags & EDKII_TCG_PRE_HASH EFI coding style error
>   *Error code: 3002
>   *Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=)
>   *file: D:\AllPkg\edk2\SecurityPkg\Tcg\Tcg2Pei\Tcg2Pei.c
>   *Line number: 456
>   *Predicate Expression: Flags & EDKII_TCG_PRE_HASH_LOG_ONLY EFI 
> coding style error
>   *Error code: 3002
>   *Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=)
>   *file: D:\AllPkg\edk2\SecurityPkg\Tcg\Tcg2Pei\Tcg2Pei.c
>   *Line number: 459
>   *Predicate Expression: Flags & EDKII_TCG_PRE_HASH EFI coding style error
>   *Error code: 4002
>   *Function header doesn't exist
>   *file:
> D:\AllPkg\edk2\IntelFsp2WrapperPkg\Library\BaseFspMeasurementLib\FspMe
> asurementLib.c
>   *Line number: 279
>   *Function [mFspFindFspHeader] has NO comment immediately preceding it.
> EFI coding style error
>   *Error code: 8005
>   *Variable name does not follow the rules: 1. First character should 
> be upper case 2. Must contain lower case characters 3. No white space 
> characters 4.
> Global variable name must start with a 'g'
>   *file:
> D:\AllPkg\edk2\IntelFsp2WrapperPkg\Library\BaseFspMeasurementLib\FspMe
> asurementLib.c
>   *Line number: 178
>   *The variable name [*UPDEventLo] does not follow the rules EFI 
> coding style error
>   *Error code: 8006
>   *Function name does not follow the rules: 1. First character should 
> be upper case 2. Must contain lower case characters 3. No white space 
> characters
>   *file:
> D:\AllPkg\edk2\IntelFsp2WrapperPkg\Library\BaseFspMeasurementLib\FspMe
> asurementLib.c
>   *Line number: 279
>   *The function name [mFspFindFspHeader] does not follow the rules EFI 
> coding style error
>   *Error code: 9002
>   *The function headers should follow Doxygen special documentation 
> blocks in section 2.3.5
>   *file:
> D:\AllPkg\edk2\IntelFsp2WrapperPkg\Library\BaseFspMeasurementLib\FspMe
> asurementLib.c
>   *Line number: 149
>   *Comment does NOT have tail **/
> EFI coding style error
>   *Error code: 9002
>   *The function headers should follow Doxygen special documentation 
> blocks in section 2.3.5
>   *file:
> D:\AllPkg\edk2\IntelFsp2WrapperPkg\Library\BaseFspMeasurementLib\FspMe
> asurementLib.c
>   *Line number: 312
>   *Comment does NOT have tail **/
> EFI coding style error
>   *Error code: 9002
>   *The function headers should follow Doxygen special documentation 
> blocks in section 2.3.5
>   *file:
> D:\AllPkg\edk2\SecurityPkg\Library\PeiTpmMeasurementLib\EventLogRecord.c
>   *Line number: 86
>   *Comment does NOT have tail **/
> EFI coding style error
>   *Error code: 9002
>   *The function headers should follow Doxygen special documentation 
> blocks in section 2.3.5
>   *file:
> D:\AllPkg\edk2\SecurityPkg\Library\PeiTpmMeasurementLib\EventLogRecord.c
>   *Line number: 155
>   *Comment does NOT have tail **/
> EFI coding style error
>   *Error code: 9002
>   *The function headers should follow Doxygen special documentation 
> blocks in section 2.3.5
>   *file:
> D:\AllPkg\edk2\SecurityPkg\Library\DxeTpmMeasurementLib\EventLogRecord.
> c
>   *Line number: 86
>   *Comment does NOT have tail **/
> EFI coding style error
>   *Error code: 9002
>   *The function headers should follow Doxygen special documentation 
> blocks in section 2.3.5
>   *file:
> D:\AllPkg\edk2\SecurityPkg\Library\DxeTpmMeasurementLib\EventLogRecord.
> c
>   *Line number: 155
>   *Comment does NOT have tail **/
> EFI coding style error
>   *Error code: 9002
>   *The function headers should follow Doxygen special documentation 
> blocks in section 2.3.5
>   *file:
> D:\AllPkg\edk2\MdeModulePkg\Library\TpmMeasurementLibNull\TpmMeasur
> ementLibNull.c
>   *Line number: 43
>   *Comment does NOT have 

Re: [edk2-devel] [PATCH v14 00/46] SEV-ES guest support

2020-08-10 Thread Liming Gao
cs/24593.pdf
> [2] https://developer.amd.com/wp-content/resources/56421.pdf
> 
> ---
> 
> These patches are based on commit:
> 9565ab67c209 ("ShellPkg: smbiosview - Change some type 17 field values 
> format")
> 
> A version of the tree can be found at:
> https://github.com/AMDESE/ovmf/tree/sev-es-v22
> 
> Cc: Andrew Fish 
> Cc: Anthony Perard 
> Cc: Ard Biesheuvel 
> Cc: Benjamin You 
> Cc: Dandan Bi 
> Cc: Eric Dong 
> Cc: Guo Dong 
> Cc: Hao A Wu 
> Cc: Jian J Wang 
> Cc: Jordan Justen 
> Cc: Julien Grall 
> Cc: Laszlo Ersek 
> Cc: Leif Lindholm 
> Cc: Liming Gao 
> Cc: Maurice Ma 
> Cc: Michael D Kinney 
> Cc: Ray Ni 
> 
> Changes since v13:
> - Fixup the AsmRelocateApLoop() call site so IA32 successfully boots APs.
>   Do this by appending the three new parameters without altering the
>   original parameter passing order.
> - Minor updates to description text and help text to expand the GHCB
>   acronym.
> 
> Changes since v12:
> - Change IA32 VMGEXIT .nasm file to issue an int 3. Depending on the
>   version of NASM, the "BITS 64" trick to get NASM to recognize the
>   VMMCALL instruction (VMGEXIT is a REP VMMCALL) caused an error. Since
>   SEV-ES is X64 only, VMGEXIT should never be called in IA32.
> 
> Changes since v11:
> - Make the XGETBV and VMGEXIT .nasm files buildable for all environments
>   and remove the updates that add these instructions to GccInline.c
> 
> Changes since v10:
> - Fix conflicts around GccInline.c file after moving to latest commit
> - Fix conflicts with OVMF PCD values after moving to latest commit
> 
> Changes since v9:
> - Fixed bit field declarations in the GHCB structure to use UINT32
>   and not UINT64.
> - Fixed a warning produced by VS2019 in the instruction parsing code
>   by expliciting casting a bit shift to an INT64.
> - Sorted section entries in the OVMF VmgExitLib INF file.
> - Moved the new Maintainers.txt entry so entries remain sorted.
> - Documentation style fixes for return values.
> - Miscellaneous code style fixes.
> 
> Changes since v8:
> - Move IOIO exit info definitions into Ghcb.h file
>   - Add a macro for calculating IO instruction bytes (IOIO_DATA_BYTES)
> - Exception handler support for debug registers
>   - Moved the DRx register saving changes into the UefiCpuPkg patch for
> base #VC support in CpuExceptionHandlerLib.
> - OvmfPkg VmgExitLib
>   - Remove the .uni file
>   - Update .inf file:
> - New file location for VmgExitVcHandler.c
> - Add additional Packages and LibraryClasses
> - Introduce a header file to hold the #VC instruction parsing related
>   definitions
>   - Include additional #defines for instruction decoding to replace
> hard coded values for things like instruction prefixes and escapes.
> - Replace hardcoded CPUID values with values from existing header files
>   and use existing CR4 definition for accessing CR4 data.
> - Change the type used for obtaining data addresses in the instruction
>   parsing
>   - Switch from INTN to UINT64 and use compiler conversions and casting
> to perform the correct address calculation
> - ResetVector code:
>   - Revert some inadvertant changes introduced in v7 for reserving the
> SEV-ES work area memory and for checking the status of SEV-ES.
> - AP Booting
>   - Provide support for non-broadcast INIT-SIPI-SIPI AP boot (minimize
> code duplication by creating a function to set the AP jump table
> vector address).
> - Fix file/directory entry in maintainer changes.
> - Various coding style fixes
>   - Commenting, if statements, etc.
> - Various documentation style fixes
> 
> Changes since v7:
> - Reserve the SEV-ES workarea when S3 is enabled
> - Fix warnings issued by the Visual Studio compiler
> - Create a NULL VmgExitLib instance that is used for VMGEXIT
>   related operations as well as #VC handling. Then create the full
>   VmgExitLib support only in OvmfPkg - where it will be used. This
>   removes a bunch of implementation code from platforms that will
>   not be using the functionality.
> - Remove single use interfaces from the VmgExitLib (VmgMmioWrite
>   and VmgSetApJumpTable)
> 
> Changes since v6:
> - Add function comments to all functions, including local functions
> - Add function parameter direction to all functions (in/out)
> - Add support for MMIO MOVZX/MOVSX instructions
> - Ensure the per-CPU variable page remains encrypted
> - Coding-style fixes as identified by Ecc
> 
> Changes since v5:
> - Remove extraneous VmgExitLib usage
> - Miscellaneous changes to address feedback (coding style, etc.)
> 
> Changes since v4:
> - Move the SEV-ES protocol negotiation out of the SEC exception ha

Re: [edk2-devel] TianoCore Community Meeting Minutes - August

2020-08-10 Thread Liming Gao
Soumya:
 I add my comments.

Thanks
Liming
From: devel@edk2.groups.io  On Behalf Of Soumya Guptha
Sent: 2020年8月7日 11:42
To: annou...@edk2.groups.io; devel@edk2.groups.io
Subject: [edk2-devel] TianoCore Community Meeting Minutes - August


TianoCore Community Meeting Minutes

August 6, 2020



Events

UEFI Plugfest:

Virtual sessions via bright talk are being offered during spring.

Trending towards virtual webinars for October plugfest.

Visit UEFI website, events page to learn more.



Stable Tag Updates
edk2-stable202008 tag initial planning is added here - 
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Release-Planning

Soft Feature Freeze on Aug 14; Hard Feature Freeze on Aug 21.

Features:

  1.  BootGuard TOCTOU vulnerability (CVE-2019-11098)
  2.  Ensure NV Variable Confidentiality and Integrity for Platforms Supporting 
RPMC.
 *   Open: Verify with Liming if this feature is still in plan for August 
stable tag
[Liming] I confirm with the feature owner Wang, Jian. There is no plan to 
enable it in Q3 stable tag. I will remove it from the planning.

Thanks
Liming

  1.  Provide a pcd to disable SHA1 support
  2.  ShellPkg: add HttpDynamicCommand


Stewards Meeting download (Mike Kinney)

  1.  License usage - few files in the EDK2 repository are not using the 
default license (BSD 2 clause + patent). Stewards are looking into those files 
that are not using the default license and working on explicitly calling them 
out in the readme file so that the downstream consumers are aware of those 
files and helping them to consume those files appropriately.
  2.  Covered community opens on previously discussed topics:

 *   GitHub Pull Request based Code Review Process: Status: Mike plans to 
update RFC with the feedback. Community action: Community feedback is needed 
before the service can go live. Mike will send the revised RFC in the next week 
or two for the vote on these options - 1) Yes, I will use the GitHub pull 
request, 2) No, I won’t use it, 3) It doesn’t make any difference.
 *   Line ending conversion - Community Request: we don’t have much 
resources. We have a set of tasks (including setting up of fork of EDK2, 
converting CRLF to LF etc..) everyone in the downstream can identify issues. We 
need volunteers to perform the task. Send an email to Mike Kinney 
mailto:michael.d.kin...@intel.com>>
 *   Open: Feedback from the community regarding the Git commit message RFC 
posted to the rfc mailing list.

*   Action: Felix to converse in the mail list, there is already an ongoing 
discussion.

 *   Open from Felix: Code base fragmentation.

*   I noticed that some of the generic features are getting committed 
to a platform specific packages, which leads to multiple implementations of the 
same functionality, which, in turn, makes edk2 codebase less coherent. We, as a 
community, should think about ways to reduce that. A couple of examples: 
https://github.com/tianocore/edk2-platforms/tree/master/Features/Intel, 
https://github.com/tianocore/edk2/tree/master/ArmPlatformPkg/Drivers/NorFlashDxe

*   Discussion around adding new features / components and where should 
it land in the repo.

*   Discussed review process for Bugzilla. Bugzilla has email 
conversations on code reviews. Owner of the bug needs to summarize. Lack of 
community engagement in discussing the feature entered in Bugzilla.

*   Action: how to use Bugzilla for TianoCore? Liming to start with a 
wiki page to train the community.


Status on Community Opens from June:

  *   Package movement for RISC-V - Mike Kinney has put up package rules/specs 
etc.. Action from stewards to provide update within next week. Status: Work in 
progress.
  *   New RFC - base tools as a Python PIP module (update from Mike). Community 
Action: Reminder, RFC is on the mailing list, please review the RFC. Status: 
repository has been created (Mike). Expect some communication (in the upcoming 
weeks) around how to change to set up the developer environment. Community to 
evaluate the use of base tools.



Acknowledgments:
Community Action: Please send Soumya if you like to acknowledge anyone from the 
community, if anyone helped you close bugs or reviewed code etc..Soumya will 
post those acknowledgements on the community page.


Regards,
Soumya
Soumya Guptha
Open Source Firmware Program Manager
Intel Corporation




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

View/Reply Online (#63936): https://edk2.groups.io/g/devel/message/63936
Mute This Topic: https://groups.io/mt/76042872/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 9/9] SecurityPkg/Tcg2: handle PRE HASH and LOG ONLY

2020-08-10 Thread Liming Gao
Qi:
  I run ECC plugin (https://edk2.groups.io/g/devel/message/63271) for this 
patch set. It reports below issues. Can you help update the patches to fix them?

EFI coding style error
  *Error code: 3002
  *Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=)
  *file: D:\AllPkg\edk2\SecurityPkg\Tcg\Tcg2Pei\Tcg2Pei.c
  *Line number: 456
  *Predicate Expression: (Flags & EDKII_TCG_PRE_HASH 
EFI coding style error
  *Error code: 3002
  *Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=)
  *file: D:\AllPkg\edk2\SecurityPkg\Tcg\Tcg2Pei\Tcg2Pei.c
  *Line number: 456
  *Predicate Expression: Flags & EDKII_TCG_PRE_HASH_LOG_ONLY 
EFI coding style error
  *Error code: 3002
  *Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=)
  *file: D:\AllPkg\edk2\SecurityPkg\Tcg\Tcg2Pei\Tcg2Pei.c
  *Line number: 459
  *Predicate Expression: Flags & EDKII_TCG_PRE_HASH 
EFI coding style error
  *Error code: 4002
  *Function header doesn't exist
  *file: 
D:\AllPkg\edk2\IntelFsp2WrapperPkg\Library\BaseFspMeasurementLib\FspMeasurementLib.c
  *Line number: 279
  *Function [mFspFindFspHeader] has NO comment immediately preceding it. 
EFI coding style error
  *Error code: 8005
  *Variable name does not follow the rules: 1. First character should be upper 
case 2. Must contain lower case characters 3. No white space characters 4. 
Global variable name must start with a 'g'
  *file: 
D:\AllPkg\edk2\IntelFsp2WrapperPkg\Library\BaseFspMeasurementLib\FspMeasurementLib.c
  *Line number: 178
  *The variable name [*UPDEventLo] does not follow the rules
EFI coding style error
  *Error code: 8006
  *Function name does not follow the rules: 1. First character should be upper 
case 2. Must contain lower case characters 3. No white space characters
  *file: 
D:\AllPkg\edk2\IntelFsp2WrapperPkg\Library\BaseFspMeasurementLib\FspMeasurementLib.c
  *Line number: 279
  *The function name [mFspFindFspHeader] does not follow the rules
EFI coding style error
  *Error code: 9002
  *The function headers should follow Doxygen special documentation blocks in 
section 2.3.5
  *file: 
D:\AllPkg\edk2\IntelFsp2WrapperPkg\Library\BaseFspMeasurementLib\FspMeasurementLib.c
  *Line number: 149
  *Comment does NOT have tail **/ 
EFI coding style error
  *Error code: 9002
  *The function headers should follow Doxygen special documentation blocks in 
section 2.3.5
  *file: 
D:\AllPkg\edk2\IntelFsp2WrapperPkg\Library\BaseFspMeasurementLib\FspMeasurementLib.c
  *Line number: 312
  *Comment does NOT have tail **/ 
EFI coding style error
  *Error code: 9002
  *The function headers should follow Doxygen special documentation blocks in 
section 2.3.5
  *file: 
D:\AllPkg\edk2\SecurityPkg\Library\PeiTpmMeasurementLib\EventLogRecord.c
  *Line number: 86
  *Comment does NOT have tail **/ 
EFI coding style error
  *Error code: 9002
  *The function headers should follow Doxygen special documentation blocks in 
section 2.3.5
  *file: 
D:\AllPkg\edk2\SecurityPkg\Library\PeiTpmMeasurementLib\EventLogRecord.c
  *Line number: 155
  *Comment does NOT have tail **/ 
EFI coding style error
  *Error code: 9002
  *The function headers should follow Doxygen special documentation blocks in 
section 2.3.5
  *file: 
D:\AllPkg\edk2\SecurityPkg\Library\DxeTpmMeasurementLib\EventLogRecord.c
  *Line number: 86
  *Comment does NOT have tail **/ 
EFI coding style error
  *Error code: 9002
  *The function headers should follow Doxygen special documentation blocks in 
section 2.3.5
  *file: 
D:\AllPkg\edk2\SecurityPkg\Library\DxeTpmMeasurementLib\EventLogRecord.c
  *Line number: 155
  *Comment does NOT have tail **/ 
EFI coding style error
  *Error code: 9002
  *The function headers should follow Doxygen special documentation blocks in 
section 2.3.5
  *file: 
D:\AllPkg\edk2\MdeModulePkg\Library\TpmMeasurementLibNull\TpmMeasurementLibNull.c
  *Line number: 43
  *Comment does NOT have tail **/ 
EFI coding style error
  *Error code: 9002
  *The function headers should follow Doxygen special documentation blocks in 
section 2.3.5
  *file: 
D:\AllPkg\edk2\MdeModulePkg\Library\TpmMeasurementLibNull\TpmMeasurementLibNull.c
  *Line number: 43
  *in Comment, <@param[in] Descrption> does NOT consistent with parameter name 
PcrIndex 
EFI coding style error
  *Error code: 9002
  *The function headers should follow Doxygen special documentation blocks in 
section 2.3.5
  *file: 
D:\AllPkg\edk2\MdeModulePkg\Library\TpmMeasurementLibNull\TpmMeasurementLibNull.c
  *Line number: 43
  *in Comment, <@param[in] FirmwareBlobBase> does NOT consistent with parameter 
name Description 
EFI coding style error
  *Error code: 9002
  *The function headers should follow Doxygen special documentation blocks in 
section 2.3.5
  *file: 
D:\AllPkg\edk2\MdeModulePkg\Library\TpmMeasurementLibNull\TpmMeasurementLibNull.c
  *Line number: 43
  *in Comment, <@param[in] FirmwareBlobLength> does NOT consistent with 
parameter name FirmwareBlobBase 
EFI coding style error
 

Re: [edk2-devel] [PATCH 1/1] Platform/Intel: Add VmgExitLib to required DSC files

2020-08-10 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: Tom Lendacky  
Sent: 2020年8月10日 21:22
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Dong, Eric ; Gao, Liming 
; Kinney, Michael D ; 
Agyeman, Prince ; Qian, Yi ; 
Steele, Kelly ; Sun, Zailiang ; 
Laszlo Ersek ; Brijesh Singh 
Subject: [PATCH 1/1] Platform/Intel: Add VmgExitLib to required DSC files

From: Tom Lendacky 

Any DSC file that uses the UefiCpuPkg MpInitLib or CpuExeptionHandlerLib 
libraries, now requires the VmgExitLib library. Update the DSC files to include 
the VmgExitLib NULL library implementation.

Signed-off-by: Tom Lendacky 
---
 Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc | 2 ++
 Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc | 2 ++
 Platform/Intel/QuarkPlatformPkg/Quark.dsc| 1 +
 Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc | 1 +
 Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 1 +
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 1 +
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc  | 1 +
 7 files changed, 9 insertions(+)

diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc 
b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
index 0f0f15d3f6..026ddf4cd7 100644
--- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
@@ -44,6 +44,8 @@
   
HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf
   
Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf
 
+  VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+
 [LibraryClasses.common.DXE_CORE]
   HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
   
MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc 
b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
index 3f784d58c9..8e1869078c 100644
--- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
@@ -32,6 +32,8 @@
 
   TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf
 
+  VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+
 [LibraryClasses.common.SEC]
   
ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
   
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
diff --git a/Platform/Intel/QuarkPlatformPkg/Quark.dsc 
b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
index a02adb64e6..e352aed49f 100644
--- a/Platform/Intel/QuarkPlatformPkg/Quark.dsc
+++ b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
@@ -102,6 +102,7 @@
 !endif
   DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
+  VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
 
   #
   # UEFI & PI
diff --git a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc 
b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
index 3dbf616c66..d1e2c0f437 100644
--- a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
+++ b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
@@ -90,6 +90,7 @@
 !endif
   DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
+  VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
 
   #
   # UEFI & PI
diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc 
b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
index 3cf6e12cdf..77c408a326 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
+++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
@@ -135,6 +135,7 @@
   ###
   
PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
   MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
+  VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
 
   #
   # Platform Package
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index 1cb0b9230a..69758e8f36 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -160,6 +160,7 @@
   LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
   
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
   MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
+  VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
 
   #
   # ICH
di

Re: [edk2-devel] [PATCH v13 00/46] SEV-ES guest support

2020-08-09 Thread Liming Gao


-Original Message-
From: Laszlo Ersek  
Sent: 2020年8月6日 23:39
To: Tom Lendacky ; devel@edk2.groups.io
Cc: Brijesh Singh ; Ard Biesheuvel 
; Dong, Eric ; Justen, Jordan L 
; Gao, Liming ; Kinney, 
Michael D ; Ni, Ray ; Andrew Fish 
; Anthony Perard ; You, Benjamin 
; Bi, Dandan ; Dong, Guo 
; Wu, Hao A ; Wang, Jian J 
; Julien Grall ; Leif Lindholm 
; Ma, Maurice 
Subject: Re: [edk2-devel] [PATCH v13 00/46] SEV-ES guest support

On 08/06/20 17:12, Tom Lendacky wrote:
> It looks like all the patches will have a Reviewed-by: or Acked-by: 
> tag now. I just need to submit another version with the fix to address 
> the
> IA32 issue that Laszlo found. After that, assuming it is looking good 
> to include this series, there is still the question of the 
> edk2-platform changes that are needed because of the library prereqs 
> introduced by this series.
> 
> I've updated the appropriate .dsc files in the edk2-platform tree 
> locally and successfully test built some of the configs in the Intel 
> sub-directory (KabylakeRvp3, WhiskeylakeURvp, CometlakeURvp).
> 
> How would we approach applying this series and providing the updates 
> to the edk2-platform at the same time?

I don't have much experience with edk2-platforms. If I recall correctly, the 
edk2 series is supposed to be merged in two parts, between which edk2-platforms 
is supposed to be updated (meaning various edk2-platform patches and an edk2 
submodule update). In other words, if there is a way to lay out the edk2 and 
edk2-platforms patches as one grand series, then that order should be followed 
with the merges.

In your v14 blurb, you can perhaps identify this split point (if there is one), 
plus the edk2-platforms series that should be merged there, in the middle.

Thanks
Laszlo

[Liming] First, please send the patches to edk2-platform tree, and make sure 
they pass review also. The merge process is just Laszlo propose. The first 10 
patches in Edk2 will be merged first, then edk2-platforms changes will be 
merged, last the remaining changes in Edk2 will be merged. After your patches 
are ready for merge, I can help merge them in edk2 and edk2-platforms.

Thanks
Liming


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

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



Re: [edk2-devel] 你好我来寻求帮助 Hello, I'm here for help

2020-08-09 Thread Liming Gao
The problem may be in the source directory "edk2-2020.05". Please don't use '.' 
in the directory name. You can try the directory name with "edk2_202005".

Thanks
Liming
-Original Message-
From: devel@edk2.groups.io  On Behalf Of Andrew Fish via 
groups.io
Sent: 2020年8月8日 1:30
To: devel@edk2.groups.io; ler...@redhat.com
Cc: wanweiy...@uniontech.com
Subject: Re: [edk2-devel] 你好我来寻求帮助 Hello, I'm here for help



> On Aug 7, 2020, at 10:10 AM, Laszlo Ersek  wrote:
> 
> Hi,
> 
> On 08/07/20 05:06, 弯威仰 wrote:
> 
>> Hello, I have this problem in compiling ovmf, as shown in the figure 
>> below. Do you have any good solutions to it?
> 
> The problem doesn't seem particularly related to OVMF. I suggest 
> filing a bug at , and pasting the 
> Python stack dump as text (not as an image).
> 

Also a Python “KeyError:” means something was missing in a dictionary so this 
could just be bad error handling in Python and something else broke. Thus 
please attach the the output for the entire build to the BZ. 

Thanks,

Andrew Fish

> Thanks
> Laszlo
> 
> 
> 
> 





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

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



Re: [edk2-devel] question about MSFT compiler/link option

2020-08-04 Thread Liming Gao
If this global variable is used by code, it will be linked into the final EFI 
image. You can check whether the generate map file includes it. 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Tiger 
> Liu(BJ-RD)
> Sent: Tuesday, August 4, 2020 5:34 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] question about MSFT compiler/link option
> 
> Hi, Experts:
> I have a question about MSFT compiler/link option.
> 
> I wrote a PEIM, which had a large global data array definition in a C file.
> Such as:
> PRI_DATA_STRUCT  PdataStructTable[] = {
> {01,   0x75,0xF0, 0x0, 0x0, 0x0 },
> {02,   0x77,0xF0, 0x0, 0x0, 0x0 },
> {03,   0x79,0xF0, 0x0, 0x0, 0x0 },
> {04,   0x7B,0xF0, 0x0, 0x0, 0x0 },
> {05,   0x7D,0xF0, 0x0, 0x0, 0x0 },
> {06,   0x7F,0xF0, 0x0, 0x0, 0x0 },
> ..
> };
> 
> This global data array is very large, about 20KB.
> 
> But I found the PEIM's compiled size is about 5KB, it seems not include this 
> global data array in the efi binary statically.
> Even the release version PEIM's size is larger than debug version.
> 
> I found when compiling release version, the link option has : 
> /MERGE:.rdata=.data
> It seems release binary included the global data array in the final efi image.
> 
> So, my question is:
> Will the global data array be in linked into the final efi binary image when 
> compiling debug version?
> 
> Thanks
> 
> 
> 保密声明:
> 本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
> CONFIDENTIAL NOTE:
> This email contains confidential or legally privileged information and is for 
> the sole use of its intended recipient. Any unauthorized
> review, use, copying or forwarding of this email or the content of this email 
> is strictly prohibited.
> 
> 


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

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



Re: [edk2-devel] [Patch] BaseTools: Improve the method of checking queue empty

2020-08-04 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Bob Feng
Sent: 2020年8月3日 10:04
To: devel@edk2.groups.io
Cc: Feng, Bob C ; Gao, Liming ; 
Chen, Christine ; Lucy Yan 
Subject: [edk2-devel] [Patch] BaseTools: Improve the method of checking queue 
empty

From: "Feng, Bob C" 

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2807

The Queue.empty() method is not reliable in the multiple process runtime 
environment. This patch uses a new method to check if all modules are processed 
and workers need to be stopped. That is to add a None item at the bottom of the 
queue. Worker check if it gets that None item to know if all the module is 
processed.

Signed-off-by: Bob Feng 
Cc: Liming Gao 
Cc: Yuwei Chen 
Cc: Lucy Yan 
---
 .../Source/Python/AutoGen/AutoGenWorker.py| 26 ++-
 BaseTools/Source/Python/build/build.py|  3 ++-
 2 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py 
b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
index 563d91b421..017f676399 100755
--- a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
@@ -22,10 +22,11 @@ except:
 from Queue import Empty
 import traceback
 import sys
 from AutoGen.DataPipe import MemoryDataPipe  import logging
+import time
 
 def clearQ(q):
 try:
 while True:
 q.get_nowait()
@@ -109,11 +110,15 @@ class AutoGenManager(threading.Thread):
 badnews = self.feedback_q.get()
 if badnews is None:
 break
 if badnews == "Done":
 fin_num += 1
+elif badnews == "QueueEmpty":
+EdkLogger.debug(EdkLogger.DEBUG_9, "Worker %s: %s" % 
(os.getpid(), badnews))
+self.TerminateWorkers()
 else:
+EdkLogger.debug(EdkLogger.DEBUG_9, "Worker %s: %s" 
+ % (os.getpid(), badnews))
 self.Status = False
 self.TerminateWorkers()
 if fin_num == len(self.autogen_workers):
 self.clearQueue()
 for w in self.autogen_workers:
@@ -225,16 +230,25 @@ class AutoGenWorkerInProcess(mp.Process):
 FfsCmd = {}
 GlobalData.FfsCmd = FfsCmd
 PlatformMetaFile = 
self.GetPlatformMetaFile(self.data_pipe.Get("P_Info").get("ActivePlatform"),
  
self.data_pipe.Get("P_Info").get("WorkspaceDir"))
 while True:
-if self.module_queue.empty():
-break
 if self.error_event.is_set():
 break
 module_count += 1
-
module_file,module_root,module_path,module_basename,module_originalpath,module_arch,IsLib
 = self.module_queue.get_nowait()
+try:
+
module_file,module_root,module_path,module_basename,module_originalpath,module_arch,IsLib
 = self.module_queue.get_nowait()
+except Empty:
+EdkLogger.debug(EdkLogger.DEBUG_9, "Worker %s: %s" % 
(os.getpid(), "Fake Empty."))
+time.sleep(0.01)
+continue
+if module_file is None:
+EdkLogger.debug(EdkLogger.DEBUG_9, "Worker %s: %s" % 
(os.getpid(), "Worker get the last item in the queue."))
+self.feedback_q.put("QueueEmpty")
+time.sleep(0.01)
+continue
+
 modulefullpath = os.path.join(module_root,module_file)
 taskname = " : ".join((modulefullpath,module_arch))
 module_metafile = PathClass(module_file,module_root)
 if module_path:
 module_metafile.Path = module_path @@ -278,15 +292,15 @@ 
class AutoGenWorkerInProcess(mp.Process):
 self.cache_q.put((Ma.MetaFile.Path, Ma.Arch, 
"MakeCache", True))
 continue
 else:
 self.cache_q.put((Ma.MetaFile.Path, Ma.Arch, 
"MakeCache", False))
 
-except Empty:
-pass
-except:
+except Exception as e:
+EdkLogger.debug(EdkLogger.DEBUG_9, "Worker %s: %s" % 
+ (os.getpid(), str(e)))
 self.feedback_q.put(taskname)
 finally:
+EdkLogger.debug(EdkLogger.DEBUG_9, "Worker %s: %s" % 
+ (os.getpid(), "Done"))
 self.feedback_q.put("Done")
 self.cache_q.put("CacheDone")
 
 def printStatus(self):
 print("Processs ID: %d Run %d modules in AutoGen " % 
(os.getpid(),len(AutoGen.

Re: [edk2-devel] [PATCH v3 0/3] Use RngLib instead of TimerLib for OpensslLib

2020-08-03 Thread Liming Gao
Hi Matt: 
  With this change, which library instance should be used for the platform? 
BaseRngLibTimerLib?

  And, this patch introduces the dependency for RngLib. Then, NetworkPkg and 
FmpDevicePkg package level build will break. Will you update them?

Thanks
Liming
-Original Message-
From: devel@edk2.groups.io  On Behalf Of Michael D Kinney
Sent: 2020年8月1日 5:17
To: devel@edk2.groups.io; matthewfcarl...@gmail.com; Kinney, Michael D 

Subject: Re: [edk2-devel] [PATCH v3 0/3] Use RngLib instead of TimerLib for 
OpensslLib

Hi Matt,

1) BaseRngLibTimerLib
  a) The comments incorrectly list delays in ms instead of us.
  b) Did you consider use of GetPerformanceCounterProperties()?
 I also do not seen an explanation of the delay values used.
 (why not smaller or larger values).  At a minimum, the file
 header should state it only works if the rate of the perf
 counter from TimerLib is much greater than 1MHz.
2) BaseRngLibDxe
   a) This is not a lib of type Base.  I recommend the name
  DxeRngLibRngProtocol.
   b) Has a "MU_CHANGE" comment that can be removed
   c) GenerateRandomNumberViaNist800Algorithm() assigns values in
  declaration.  Init should be moved into statements.
   d) How would gBS aver be NULL?  The INF lists the BootServicesTableLib
  as a dependency, so the constructer is always run before the
  services are used.  I think these checks can be removed.
   e) Minor code style issues.  if statements should have { as end of line.

With the addition of DxeRngLibRngProtocol to MdePkg, I think the CryptoPkg DSC 
can be updated to use this RngLib instance from the Crypto DXE mododule.

Best regards,

Mike

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Matthew 
> Carlson
> Sent: Friday, July 31, 2020 1:27 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH v3 0/3] Use RngLib instead of TimerLib 
> for OpensslLib
> 
> From: Matthew Carlson 
> 
> Fixes Bugzilla#1871
> https://github.com/tianocore/edk2/pull/845
> 
> 
> Matthew Carlson (3):
>   CryptoPkg: OpensslLib: Use RngLib to generate entropy in rand_pool
>   MdePkg: TimerRngLib: Added RngLib that uses TimerLib
>   MdePkg: BaseRngLibDxe: Add RngLib that uses RngDxe
> 
>  CryptoPkg/Library/OpensslLib/rand_pool.c
> | 203 ++
>  CryptoPkg/Library/OpensslLib/rand_pool_noise.c
> |  29 ---
>  CryptoPkg/Library/OpensslLib/rand_pool_noise_tsc.c
> |  43 
>  MdePkg/Library/BaseRngLibDxe/RngDxeLib.c
> | 216 
>  MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c
> | 154 ++
>  CryptoPkg/CryptoPkg.dsc
> |   1 +
>  CryptoPkg/Library/OpensslLib/OpensslLib.inf
> |  15 +-
>  CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
> |  15 +-
>  CryptoPkg/Library/OpensslLib/rand_pool_noise.h
> |  29 ---
>  MdePkg/Library/BaseRngLibDxe/BaseRngLibDxe.inf
> |  38 
> 
> MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.in
> f |  38 
> 
> MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.un
> i |  17 ++
>  MdePkg/MdePkg.dsc
> |   5 +-
>  13 files changed, 489 insertions(+), 314 deletions(-)  delete mode 
> 100644 CryptoPkg/Library/OpensslLib/rand_pool_noise.c
>  delete mode 100644
> CryptoPkg/Library/OpensslLib/rand_pool_noise_tsc.c
>  create mode 100644
> MdePkg/Library/BaseRngLibDxe/RngDxeLib.c
>  create mode 100644
> MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c
>  delete mode 100644
> CryptoPkg/Library/OpensslLib/rand_pool_noise.h
>  create mode 100644
> MdePkg/Library/BaseRngLibDxe/BaseRngLibDxe.inf
>  create mode 100644
> MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.in
> f
>  create mode 100644
> MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.un
> i
> 
> --
> 2.27.0.windows.1
> 
> 
> 





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

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



Re: [edk2-devel] [PATCH v5 1/1] ShellPkg/DynamicCommand: add HttpDynamicCommand

2020-08-02 Thread Liming Gao
Maciej, Jiaxin and Siyuan:
  As you are network exporters, could you give the comments for this change?

Thanks
Liming
-Original Message-
From: Vladimir Olovyannikov  
Sent: 2020年7月28日 0:49
To: devel@edk2.groups.io
Cc: Laszlo Ersek ; Vladimir Olovyannikov 
; Samer El-Haj-Mahmoud 
; Gao, Zhichao ; Maciej 
Rabeda ; Wu, Jiaxin ; Fu, 
Siyuan ; Ni, Ray ; Gao, Liming 
; Nd 
Subject: [PATCH v5 1/1] ShellPkg/DynamicCommand: add HttpDynamicCommand

Introduce an http client utilizing EDK2 HTTP protocol, to
allow fast image downloading from http/https servers.
HTTP download speed is usually faster than tftp.
The client is based on the same approach as tftp dynamic command, and
uses the same UEFI Shell command line parameters. This makes it easy
integrating http into existing UEFI Shell scripts.
Note that to enable HTTP download, feature Pcd
gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections must
be set to TRUE.
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2860

Signed-off-by: Vladimir Olovyannikov 
CC: Samer El-Haj-Mahmoud 
CC: Laszlo Ersek 
Cc: Zhichao Gao 
Cc: Maciej Rabeda 
Cc: Jiaxin Wu 
Cc: Siyuan Fu 
Cc: Ray Ni 
Cc: Liming Gao 
Cc: Nd 
---
 CryptoPkg/Library/OpensslLib/openssl  |2 +-
 .../DynamicCommand/HttpDynamicCommand/Http.c  | 1715 +
 .../DynamicCommand/HttpDynamicCommand/Http.h  |   89 +
 .../HttpDynamicCommand/Http.uni   |  117 ++
 .../HttpDynamicCommand/HttpApp.c  |   53 +
 .../HttpDynamicCommand/HttpApp.inf|   58 +
 .../HttpDynamicCommand/HttpDynamicCommand.c   |  134 ++
 .../HttpDynamicCommand/HttpDynamicCommand.inf |   63 +
 ShellPkg/Include/Guid/ShellLibHiiGuid.h   |5 +
 ShellPkg/ShellPkg.dec |1 +
 ShellPkg/ShellPkg.dsc |5 +
 11 files changed, 2241 insertions(+), 1 deletion(-)
 create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c
 create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/Http.h
 create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/Http.uni
 create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/HttpApp.c
 create mode 100644 ShellPkg/DynamicCommand/HttpDynamicCommand/HttpApp.inf
 create mode 100644 
ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.c
 create mode 100644 
ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf

diff --git a/CryptoPkg/Library/OpensslLib/openssl 
b/CryptoPkg/Library/OpensslLib/openssl
index e2e09d9fba11..c3656cc594da 16
--- a/CryptoPkg/Library/OpensslLib/openssl
+++ b/CryptoPkg/Library/OpensslLib/openssl
@@ -1 +1 @@
-Subproject commit e2e09d9fba1187f8d6aafaa34d4172f56f1ffb72
+Subproject commit c3656cc594daac8167721dde7220f0e59ae146fc
diff --git a/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c 
b/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c
new file mode 100644
index ..0565b07c3570
--- /dev/null
+++ b/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c
@@ -0,0 +1,1715 @@
+/** @file

+  The implementation for the 'http' Shell command.

+

+  Copyright (c) 2015, ARM Ltd. All rights reserved.

+  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved. 

+  (C) Copyright 2015 Hewlett Packard Enterprise Development LP

+  Copyright (c) 2020, Broadcom. All rights reserved. 

+

+  SPDX-License-Identifier: BSD-2-Clause-Patent

+**/

+

+#include "Http.h"

+

+#define IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH 32

+EFI_HII_HANDLE   mHttpHiiHandle;

+

+/*

+   Constant strings and definitions related to the message

+   indicating the amount of progress in the dowloading of a HTTP file.

+*/

+

+// Number of steps in the progression slider

+#define HTTP_PROGRESS_SLIDER_STEPS  \

+  ((sizeof (HTTP_PROGR_FRAME) / sizeof (CHAR16)) - 3)

+

+// Size in number of characters plus one (final zero) of the message to

+// indicate the progress of an HTTP download. The format is "[(progress slider:

+// 40 characters)] (nb of KBytes downloaded so far: 7 characters) Kb". There

+// are thus the number of characters in HTTP_PROGR_FRAME[] plus 11 characters

+// (2 // spaces, "Kb" and seven characters for the number of KBytes).

+#define HTTP_PROGRESS_MESSAGE_SIZE  \

+  ((sizeof (HTTP_PROGR_FRAME) / sizeof (CHAR16)) + 12)

+

+//

+// Buffer size. Note that larger buffer does not mean better speed!

+//

+#define DEFAULT_BUF_SIZE  SIZE_32KB

+#define MAX_BUF_SIZE  SIZE_4MB

+

+#define MIN_PARAM_COUNT   2

+#define MAX_PARAM_COUNT   4

+

+#define TIMER_MAX_TIMEOUT_S   10

+

+// File name to use when URI ends with "/"

+#define DEFAULT_HTML_FILE L"index.html"

+#define DEFAULT_HTTP_PROTOL"http"

+

+// String to delete the HTTP progress message to be able to update it :

+// (HTTP_PROGRESS_MESSAGE_SIZE-1) '\b'

+#define HTTP_PROGRESS_DEL \

+  L"\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\

+\b\b\b\b\b\b\b\b\b\b\b\b\b\b\

Re: [edk2-devel] [PATCH v13 07/46] MdePkg/BaseLib: Add support for the VMGEXIT instruction

2020-08-02 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Lendacky, Thomas
Sent: 2020年7月31日 2:43
To: devel@edk2.groups.io
Cc: Brijesh Singh ; Ard Biesheuvel 
; Dong, Eric ; Justen, Jordan L 
; Laszlo Ersek ; Gao, Liming 
; Kinney, Michael D ; Ni, Ray 

Subject: [edk2-devel] [PATCH v13 07/46] MdePkg/BaseLib: Add support for the 
VMGEXIT instruction

From: Tom Lendacky 

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198

VMGEXIT is a new instruction used for Hypervisor/Guest communication when 
running as an SEV-ES guest. A VMGEXIT will cause an automatic exit (AE) to 
occur, resulting in a #VMEXIT with an exit code value of 0x403.

Since SEV-ES is only supported in X64, provide the necessary X64 support to 
execute the VMGEXIT instruction, which is coded as "rep vmmcall". For IA32, 
since "vmmcall" is not supported in NASM 32-bit mode and VMGEXIT should never 
be called, provide a stub implementation that is identical to CpuBreakpoint().

Cc: Michael D Kinney 
Cc: Liming Gao 
Signed-off-by: Tom Lendacky 
---
 MdePkg/Library/BaseLib/BaseLib.inf   |  2 ++
 MdePkg/Include/Library/BaseLib.h | 14 +
 MdePkg/Library/BaseLib/Ia32/VmgExit.nasm | 38   
MdePkg/Library/BaseLib/X64/VmgExit.nasm  | 32 
 4 files changed, 86 insertions(+)
 create mode 100644 MdePkg/Library/BaseLib/Ia32/VmgExit.nasm
 create mode 100644 MdePkg/Library/BaseLib/X64/VmgExit.nasm

diff --git a/MdePkg/Library/BaseLib/BaseLib.inf 
b/MdePkg/Library/BaseLib/BaseLib.inf
index 3b93b5db8d24..3b85c56c3c03 100644
--- a/MdePkg/Library/BaseLib/BaseLib.inf
+++ b/MdePkg/Library/BaseLib/BaseLib.inf
@@ -184,6 +184,7 @@ [Sources.Ia32]
   Ia32/DisableCache.nasm| GCC
   Ia32/RdRand.nasm
   Ia32/XGetBv.nasm
+  Ia32/VmgExit.nasm
 
   Ia32/DivS64x64Remainder.c
   Ia32/InternalSwitchStack.c | MSFT
@@ -317,6 +318,7 @@ [Sources.X64]
   X64/DisablePaging64.nasm
   X64/RdRand.nasm
   X64/XGetBv.nasm
+  X64/VmgExit.nasm
   ChkStkGcc.c  | GCC
 
 [Sources.EBC]
diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h
index 7edf0051a0a0..04fb329eaabb 100644
--- a/MdePkg/Include/Library/BaseLib.h
+++ b/MdePkg/Include/Library/BaseLib.h
@@ -7848,6 +7848,20 @@ AsmXGetBv (
   );
 
 
+/**
+  Executes a VMGEXIT instruction (VMMCALL with a REP prefix)
+
+  Executes a VMGEXIT instruction. This function is only available on 
+ IA-32 and  x64.
+
+**/
+VOID
+EFIAPI
+AsmVmgExit (
+  VOID
+  );
+
+
 /**
   Patch the immediate operand of an IA32 or X64 instruction such that the byte,
   word, dword or qword operand is encoded at the end of the instruction's diff 
--git a/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm 
b/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm
new file mode 100644
index ..69f7fbf3506a
--- /dev/null
+++ b/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm
@@ -0,0 +1,38 @@
+;--
+
+;
+; Copyright (C) 2020, Advanced Micro Devices, Inc. All rights 
+reserved. ; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module 
+Name:
+;
+;   VmgExit.Asm
+;
+; Abstract:
+;
+;   AsmVmgExit function
+;
+; Notes:
+;
+;--
+
+
+SECTION .text
+
+;--
+
+; VOID
+; EFIAPI
+; AsmVmgExit (
+;   VOID
+;   );
+;--
+
+global ASM_PFX(AsmVmgExit)
+ASM_PFX(AsmVmgExit):
+;
+; NASM doesn't support the vmmcall instruction in 32-bit mode and NASM 
+versions ; before 2.12 cannot translate the 64-bit "rep vmmcall" 
+instruction into elf32 ; format. Given that VMGEXIT does not make sense 
+on IA32, provide a stub ; implementation that is identical to 
+CpuBreakpoint(). In practice, AsmVmgExit() ; should never be called on IA32.
+;
+int  3
+ret
+
diff --git a/MdePkg/Library/BaseLib/X64/VmgExit.nasm 
b/MdePkg/Library/BaseLib/X64/VmgExit.nasm
new file mode 100644
index ..26f034593c67
--- /dev/null
+++ b/MdePkg/Library/BaseLib/X64/VmgExit.nasm
@@ -0,0 +1,32 @@
+;--
+
+;
+; Copyright (C) 2020, Advanced Micro Devices, Inc. All rights 
+reserved. ; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module 
+Name:
+;
+;   VmgExit.Asm
+;
+; Abstract:
+;
+;   AsmVmgExit function
+;
+; Notes:
+;
+;--
+
+
+DEFAULT REL
+SECTION .text
+
+;--
+
+; VOID
+; EFIAPI
+; AsmVmgExit (
+;   VOID
+;   );
+;--
+
+global ASM_PFX(AsmVmgExit)
+ASM_PFX(AsmVmgExit):
+rep vmmcall
+ret
+
--
2.27.0





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links:

Re: [edk2-devel] [PATCH v13 06/46] MdePkg/BaseLib: Add support for the XGETBV instruction

2020-08-02 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: Tom Lendacky  
Sent: 2020年7月31日 2:43
To: devel@edk2.groups.io
Cc: Brijesh Singh ; Ard Biesheuvel 
; Dong, Eric ; Justen, Jordan L 
; Laszlo Ersek ; Gao, Liming 
; Kinney, Michael D ; Ni, Ray 

Subject: [PATCH v13 06/46] MdePkg/BaseLib: Add support for the XGETBV 
instruction

From: Tom Lendacky 

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198

Under SEV-ES, a CPUID instruction requires the current value of the XCR0 
register. In order to retrieve that value, the XGETBV instruction needs to be 
executed.

Provide the necessary support to execute the XGETBV instruction.

Cc: Michael D Kinney 
Cc: Liming Gao 
Signed-off-by: Tom Lendacky 
---
 MdePkg/Library/BaseLib/BaseLib.inf  |  2 ++
 MdePkg/Include/Library/BaseLib.h| 17 +
 MdePkg/Library/BaseLib/Ia32/XGetBv.nasm | 31 ++  
MdePkg/Library/BaseLib/X64/XGetBv.nasm  | 34 +
 4 files changed, 84 insertions(+)
 create mode 100644 MdePkg/Library/BaseLib/Ia32/XGetBv.nasm
 create mode 100644 MdePkg/Library/BaseLib/X64/XGetBv.nasm

diff --git a/MdePkg/Library/BaseLib/BaseLib.inf 
b/MdePkg/Library/BaseLib/BaseLib.inf
index c740a819cacf..3b93b5db8d24 100644
--- a/MdePkg/Library/BaseLib/BaseLib.inf
+++ b/MdePkg/Library/BaseLib/BaseLib.inf
@@ -183,6 +183,7 @@ [Sources.Ia32]
   Ia32/EnableCache.nasm| GCC
   Ia32/DisableCache.nasm| GCC
   Ia32/RdRand.nasm
+  Ia32/XGetBv.nasm
 
   Ia32/DivS64x64Remainder.c
   Ia32/InternalSwitchStack.c | MSFT
@@ -315,6 +316,7 @@ [Sources.X64]
   X64/EnableDisableInterrupts.nasm
   X64/DisablePaging64.nasm
   X64/RdRand.nasm
+  X64/XGetBv.nasm
   ChkStkGcc.c  | GCC
 
 [Sources.EBC]
diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h
index 8e7b87cbda4e..7edf0051a0a0 100644
--- a/MdePkg/Include/Library/BaseLib.h
+++ b/MdePkg/Include/Library/BaseLib.h
@@ -7831,6 +7831,23 @@ AsmLfence (
   VOID
   );
 
+/**
+  Executes a XGETBV instruction
+
+  Executes a XGETBV instruction. This function is only available on 
+ IA-32 and  x64.
+
+  @param[in] IndexExtended control register index
+
+  @return The current value of the extended control register
+**/
+UINT64
+EFIAPI
+AsmXGetBv (
+  IN UINT32  Index
+  );
+
+
 /**
   Patch the immediate operand of an IA32 or X64 instruction such that the byte,
   word, dword or qword operand is encoded at the end of the instruction's diff 
--git a/MdePkg/Library/BaseLib/Ia32/XGetBv.nasm 
b/MdePkg/Library/BaseLib/Ia32/XGetBv.nasm
new file mode 100644
index ..9f7b03bbff35
--- /dev/null
+++ b/MdePkg/Library/BaseLib/Ia32/XGetBv.nasm
@@ -0,0 +1,31 @@
+;--
+
+;
+; Copyright (C) 2020, Advanced Micro Devices, Inc. All rights 
+reserved. ; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module 
+Name:
+;
+;   XGetBv.Asm
+;
+; Abstract:
+;
+;   AsmXgetBv function
+;
+; Notes:
+;
+;--
+
+
+SECTION .text
+
+;--
+
+; UINT64
+; EFIAPI
+; AsmXGetBv (
+;   IN UINT32  Index
+;   );
+;--
+
+global ASM_PFX(AsmXGetBv)
+ASM_PFX(AsmXGetBv):
+mov ecx, [esp + 4]
+xgetbv
+ret
diff --git a/MdePkg/Library/BaseLib/X64/XGetBv.nasm 
b/MdePkg/Library/BaseLib/X64/XGetBv.nasm
new file mode 100644
index ..09f3be8ae0a8
--- /dev/null
+++ b/MdePkg/Library/BaseLib/X64/XGetBv.nasm
@@ -0,0 +1,34 @@
+;--
+
+;
+; Copyright (C) 2020, Advanced Micro Devices, Inc. All rights 
+reserved. ; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module 
+Name:
+;
+;   XGetBv.Asm
+;
+; Abstract:
+;
+;   AsmXgetBv function
+;
+; Notes:
+;
+;--
+
+
+DEFAULT REL
+SECTION .text
+
+;--
+
+; UINT64
+; EFIAPI
+; AsmXGetBv (
+;   IN UINT32  Index
+;   );
+;--
+
+global ASM_PFX(AsmXGetBv)
+ASM_PFX(AsmXGetBv):
+xgetbv
+shl rdx, 32
+or  rax, rdx
+ret
+
--
2.27.0


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

View/Reply Online (#63646): https://edk2.groups.io/g/devel/message/63646
Mute This Topic: https://groups.io/mt/75892690/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/6] EmulatorPkg: Fix spelling mistake for occurred

2020-08-02 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Michael D Kinney
Sent: 2020年8月1日 9:05
To: devel@edk2.groups.io
Cc: Justen, Jordan L ; Andrew Fish 
; Ni, Ray 
Subject: [edk2-devel] [Patch 1/6] EmulatorPkg: Fix spelling mistake for occurred

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

Cc: Jordan Justen 
Cc: Andrew Fish 
Cc: Ray Ni 
Signed-off-by: Michael D Kinney 
---
 EmulatorPkg/EmuGopDxe/GopScreen.c | 2 +-
 EmulatorPkg/TimerDxe/Timer.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/EmulatorPkg/EmuGopDxe/GopScreen.c 
b/EmulatorPkg/EmuGopDxe/GopScreen.c
index fbac649f8b..cbbb0db07f 100644
--- a/EmulatorPkg/EmuGopDxe/GopScreen.c
+++ b/EmulatorPkg/EmuGopDxe/GopScreen.c
@@ -177,7 +177,7 @@ EmuGopSetMode (
 
   @retval EFI_SUCCESS   The Blt operation completed.
   @retval EFI_INVALID_PARAMETER BltOperation is not valid.
-  @retval EFI_DEVICE_ERROR  A hardware error occured writting to the video 
buffer.
+  @retval EFI_DEVICE_ERROR  A hardware error occurred writting to the 
video buffer.
 
 **/
 EFI_STATUS
diff --git a/EmulatorPkg/TimerDxe/Timer.c b/EmulatorPkg/TimerDxe/Timer.c index 
dfd92acc8c..8e2b5b 100644
--- a/EmulatorPkg/TimerDxe/Timer.c
+++ b/EmulatorPkg/TimerDxe/Timer.c
@@ -301,7 +301,7 @@ Returns:
 
   EFI_OUT_OF_RESOURCES  - Not enough resources available to initialize driver.
 
-  EFI_DEVICE_ERROR  - A device error occured attempting to initialize the 
driver.
+  EFI_DEVICE_ERROR  - A device error occurred attempting to initialize the 
driver.
 
 **/
 {
--
2.21.0.windows.1





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

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



Re: [edk2-devel] [Patch] BaseTools/GenSec: Fix spelling mistake

2020-08-02 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Michael D Kinney
Sent: 2020年8月1日 9:25
To: devel@edk2.groups.io
Cc: Feng, Bob C ; Gao, Liming 
Subject: [edk2-devel] [Patch] BaseTools/GenSec: Fix spelling mistake

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

Cc: Bob Feng 
Cc: Liming Gao 
Signed-off-by: Michael D Kinney 
---
 BaseTools/Source/C/GenSec/GenSec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/C/GenSec/GenSec.c 
b/BaseTools/Source/C/GenSec/GenSec.c
index a0d6293ee1..d54a4f9e0a 100644
--- a/BaseTools/Source/C/GenSec/GenSec.c
+++ b/BaseTools/Source/C/GenSec/GenSec.c
@@ -177,7 +177,7 @@ Returns:
   fprintf (stdout, "  -l GuidHeaderLength, --HeaderLength GuidHeaderLength\n\
 GuidHeaderLength is the size of header of guided 
data\n");
   fprintf (stdout, "  -r GuidAttr, --attributes GuidAttr\n\
-GuidAttr is guid section atttributes, which may be\n\
+GuidAttr is guid section attributes, which may be\n\
 PROCESSING_REQUIRED, AUTH_STATUS_VALID and NONE. \n\
 if -r option is not given, default 
PROCESSING_REQUIRED\n");
   fprintf (stdout, "  -n String, --name String\n\
-- 
2.21.0.windows.1





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

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



Re: [edk2-devel] [Patch 3/6] MdePkg: Fix spelling mistake for occurred

2020-08-02 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Michael D Kinney
Sent: 2020年8月1日 9:05
To: devel@edk2.groups.io
Cc: Gao, Liming ; Liu, Zhiguang 
Subject: [edk2-devel] [Patch 3/6] MdePkg: Fix spelling mistake for occurred

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

Cc: Liming Gao 
Cc: Zhiguang Liu 
Signed-off-by: Michael D Kinney 
---
 MdePkg/Include/Protocol/UgaDraw.h  | 2 +-  MdePkg/Library/BaseLib/FilePaths.c 
| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdePkg/Include/Protocol/UgaDraw.h 
b/MdePkg/Include/Protocol/UgaDraw.h
index 3d423be052..47286bb684 100644
--- a/MdePkg/Include/Protocol/UgaDraw.h
+++ b/MdePkg/Include/Protocol/UgaDraw.h
@@ -127,7 +127,7 @@ typedef enum {
 
 @retval EFI_SUCCESS   - The Blt operation completed.
 @retval EFI_INVALID_PARAMETER - BltOperation is not valid.
-@retval EFI_DEVICE_ERROR  - A hardware error occured writting to the 
video buffer.
+@retval EFI_DEVICE_ERROR  - A hardware error occurred writting to the 
video buffer.
 
 **/
 typedef
diff --git a/MdePkg/Library/BaseLib/FilePaths.c 
b/MdePkg/Library/BaseLib/FilePaths.c
index 40e8d773ce..c2c561ac64 100644
--- a/MdePkg/Library/BaseLib/FilePaths.c
+++ b/MdePkg/Library/BaseLib/FilePaths.c
@@ -57,7 +57,7 @@ PathRemoveLastItem(
 
   @param[in] Path   The pointer to the string containing the path.
 
-  @return   Returns Path, otherwise returns NULL to indicate that an error 
has occured.
+  @return   Returns Path, otherwise returns NULL to indicate that an error 
has occurred.
 **/
 CHAR16*
 EFIAPI
--
2.21.0.windows.1





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

View/Reply Online (#63642): https://edk2.groups.io/g/devel/message/63642
Mute This Topic: https://groups.io/mt/75919238/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-31 Thread Liming Gao
Lorena:
  Thanks for your update. Can you correct name style as Star Zeng 
 for below message?

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

Thanks
Liming
From: De Leon Vasquez, Lorena R 
Sent: 2020年7月29日 23:23
To: Gao, Liming ; 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

I’ve attached patch with modifications suggested

From: Gao, Liming mailto:liming@intel.com>>
Sent: Thursday, July 9, 2020 7:45 AM
To: De Leon Vazquez, Lorena R 
mailto:lorena.r.de.leon.vazq...@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

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

Re: [edk2-devel] [PATCH 1/1] Maintainers.txt: Add reviewer for FmpDevicePkg.

2020-07-31 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: Xu, Wei6  
Sent: 2020年7月31日 15:29
To: devel@edk2.groups.io
Cc: Kinney, Michael D ; Gao, Liming 

Subject: [edk2-devel] [PATCH 1/1] Maintainers.txt: Add reviewer for 
FmpDevicePkg.

Add "Wei6 Xu" as reviewer for FmpDevicePkg.

Cc: Michael D Kinney 
Cc: Liming Gao 
Signed-off-by: Wei6 Xu 
---
 Maintainers.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Maintainers.txt b/Maintainers.txt index 5504bb3d17..1eb6cb377e 
100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -195,10 +195,11 @@ T: git - https://github.com/tianocore/edk2-FatPkg.git
 FmpDevicePkg
 F: FmpDevicePkg/
 W: https://github.com/tianocore/tianocore.github.io/wiki/FmpDevicePkg
 M: Liming Gao 
 M: Michael D Kinney 
+R: Wei6 Xu 
 
 IntelFsp2Pkg
 F: IntelFsp2Pkg/
 W: https://github.com/tianocore/tianocore.github.io/wiki/IntelFsp2Pkg
 M: Chasel Chiu 
--
2.16.2.windows.1


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

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



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

2020-07-30 Thread Liming Gao
Marcello:
 I know your case only uses BasePciExpressLib. But, this change updates library 
class. All library instances should match the library class. So, you have to 
update DxeRuntimePciExpressLib and SmmPciExpressLib too.

Thanks
Liming
From: devel@edk2.groups.io  On Behalf Of Marcello 
Sylvester Bauer
Sent: 2020年7月29日 16:02
To: Gao, Liming 
Cc: devel@edk2.groups.io; Patrick Rudolph ; 
Christian Walter ; Kinney, Michael D 

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

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 
mailto:liming@intel.com>> 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 
mailto:marcello.ba...@9elements.com>>
Sent: 2020年7月27日 16:19
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Patrick Rudolph 
mailto:patrick.rudo...@9elements.com>>; 
Christian Walter 
mailto:christian.wal...@9elements.com>>; 
Kinney, Michael D 
mailto:michael.d.kin...@intel.com>>; Gao, Liming 
mailto:liming@intel.com>>
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 
mailto:patrick.rudo...@9elements.com>>
Signed-off-by: Marcello Sylvester Bauer 
mailto:marcello.ba...@9elements.com>>
Cc: Patrick Rudolph 
mailto:patrick.rudo...@9elements.com>>
Cc: Christian Walter 
mailto:christian.wal...@9elements.com>>
Cc: Michael D Kinney 
mailto:michael.d.kin...@intel.com>>
Cc: Liming Gao mailto:liming@intel.com>>
---
 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 
Expre

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

2020-07-30 Thread Liming Gao
Rebecca:
  I have merged all changes of LicenseCheck. You can continue your work. If you 
meet with any issue, please let me know. 

Thanks
Liming
-Original Message-
From: devel@edk2.groups.io  On Behalf Of Liming Gao
Sent: 2020年7月27日 10:35
To: Rebecca Cran ; devel@edk2.groups.io; Zhang, Shenglei 

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 ; Wang, Jian J ; Wu, Hao A 
; Andrew Fish ; Ni, Ray 
; Lu, XiaoyuX ; Ard Biesheuvel 
; Leif Lindholm 
Subject: Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci

Rebecca:
  I see Shenglei patch. I plan to finish review early of this week, then merge 
this patch set, and revert the original change in PatchCheck.py. 

Thanks
Liming
-Original Message-
From: Rebecca Cran 
Sent: 2020年7月25日 9:38
To: devel@edk2.groups.io; Zhang, Shenglei 
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: Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci

On 7/20/20 2:36 AM, Zhang, Shenglei wrote:
> 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.

Has there been any progress on this? I'm waiting for it because it's required 
for my bhyve changes.


-- 

Rebecca Cran






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

View/Reply Online (#63545): https://edk2.groups.io/g/devel/message/63545
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-30 Thread Liming Gao
Merged at 
e848b58d7c85293cd4121287abcea2d22a4f0620..7f79b736b0a57da71d87c987357db0227cd16ac6

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

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 descri

Re: [edk2-devel] [PATCH 1/2] Revert "BaseTools/PatchCheck.py: Add LicenseCheck"

2020-07-30 Thread Liming Gao
Merged at 137c2c6eff67f4750d77e8e40af6683c412d3ed0

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Liming Gao
Sent: 2020年7月31日 11:14
To: Leif Lindholm 
Cc: devel@edk2.groups.io; ler...@redhat.com; Andrew Fish ; 
Kinney, Michael D ; Zhang, Shenglei 
; Chen, Christine 
Subject: Re: [edk2-devel] [PATCH 1/2] Revert "BaseTools/PatchCheck.py: Add 
LicenseCheck"

Reviewed-by: Liming Gao 

-Original Message-
From: Leif Lindholm 
Sent: 2020年7月14日 19:25
To: Gao, Liming 
Cc: devel@edk2.groups.io; ler...@redhat.com; Andrew Fish ; 
Kinney, Michael D ; Zhang, Shenglei 
; Chen, Yuwei 
Subject: Re: [edk2-devel] [PATCH 1/2] Revert "BaseTools/PatchCheck.py: Add 
LicenseCheck"

Hi Liming,

Thanks, this solves my concern.

/
Leif

On Tue, Jul 14, 2020 at 02:28:59 +, Gao, Liming wrote:
> Leif:
>   Shenglei is working on new patch to add license checker as open CI
>   plug-in (BZ 2833). This way allows to add the exception. So, the
>   autogen file can be handled. Based on current statement, only
>   BSD-2-Clause-Patent license will be allowed. Other license can be
>   added as the exception case if necessary. With new license checker
>   in open CI, I agree to revert this checker in
>   BaseTools/PatchCheck.py.
> 
> Thanks
> Liming
> -Original Message-
> From: Leif Lindholm 
> Sent: 2020年7月7日 23:57
> To: devel@edk2.groups.io; ler...@redhat.com
> Cc: Andrew Fish ; Kinney, Michael D 
> ; Zhang, Shenglei 
> ; Chen, Yuwei ; Gao, 
> Liming 
> Subject: Re: [edk2-devel] [PATCH 1/2] Revert "BaseTools/PatchCheck.py: Add 
> LicenseCheck"
> 
> On Fri, Jul 03, 2020 at 18:20:26 +0200, Laszlo Ersek wrote:
> > On 07/02/20 13:24, Leif Lindholm wrote:
> > > This reverts commit a4cfb842fca9693a330cb5435284c1ee8bfbbace.
> > > This commit suggests inclusion of non-edk2+license content without
> > 
> > The expression "non-edk2+license" is a typo.
> > 
> > I think you meant "non-BSD-2-Clause-Patent".
> 
> Err, yes. Sorry.
> 
> > > a contribution agreement is something the community has made a 
> > > decision on, which is incorrect.
> > 
> > I'm OK with commit a4cfb842fca9 being reverted, as this solves the 
> > practical problem of adding generated files.
> > 
> > Acked-by: Laszlo Ersek 
> > 
> > That said, I *still* don't grasp the more general problem you refer to.
> > 
> > Can we express it as follows (using commits 6b621f958123 and 
> > 6f21d772aa6b as reference):
> > 
> > (1) Content under OvmfPkg/Include/IndustryStandard/Xen was 
> > introduced under the MIT license in commit 6b621f958123. That commit was 
> > marked with:
> > 
> > > License: This patch adds many files under the MIT licence.
> > > Contributed-under: TianoCore Contribution Agreement 1.0
> > 
> > and the header files also contained open-coded instances of the MIT 
> > license. (These would later be replaced with SPDX identifiers in 
> > commit
> > 6f21d772aa6b.)
> > 
> > As a result, these files effectively granted use and distribution 
> > rights under the MIT license, *plus* a patent grant (per TCA).
> 
> Correct.
> 
> > (2) If we did the same today (that is, add new MIT-licensed files, 
> > but no "Contributed-under: TCA" line on the commit message), then 
> > that would grant use and distribution rights under the "MIT 
> > license", and
> > *no* patent grant.
> > 
> > Is this the issue you're thinking of?
> 
> Yes.
> 
> > So are we basically looking to replace (for example):
> > 
> >   SPDX-License-Identifier: MIT
> > 
> > with *something* like:
> > 
> >   SPDX-License-Identifier: MIT-Patent
> > 
> > ? (Assuming the latter exists -- which it doesn't, at the moment?)
> 
> It doesn't.
> 
> For BSD3/BSD4, we can do what the BSD distros do and use (for example)
> SPDX-License-Identifier: BSD-3-Clause AND BSD-2-Clause-Patent
> 
> It is not clear to me if (for example) "MIT AND BSD-2-Clause-Patent"
> is a valid expression. But what about "public domain"? Do we figure out a 
> jurisdiction in which public domain content can clearly have arbitrary 
> licenses applied to it and ask someone there to relicense it to something we 
> can accept?
> 
> If we decide the explicit patent grant isn't important, why did we add 
> it in the first place? If we decide it is important, we need to 
> actively make a decision on whether we can ever sidestep it, and if so 
> under what circumstances. (e.g.: "we permit it for tools" - but then 
> the code generation aspect also needs to be covered)
&

Re: [edk2-devel] [PATCH 1/2] Revert "BaseTools/PatchCheck.py: Add LicenseCheck"

2020-07-30 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: Leif Lindholm  
Sent: 2020年7月14日 19:25
To: Gao, Liming 
Cc: devel@edk2.groups.io; ler...@redhat.com; Andrew Fish ; 
Kinney, Michael D ; Zhang, Shenglei 
; Chen, Yuwei 
Subject: Re: [edk2-devel] [PATCH 1/2] Revert "BaseTools/PatchCheck.py: Add 
LicenseCheck"

Hi Liming,

Thanks, this solves my concern.

/
Leif

On Tue, Jul 14, 2020 at 02:28:59 +, Gao, Liming wrote:
> Leif:
>   Shenglei is working on new patch to add license checker as open CI
>   plug-in (BZ 2833). This way allows to add the exception. So, the
>   autogen file can be handled. Based on current statement, only
>   BSD-2-Clause-Patent license will be allowed. Other license can be
>   added as the exception case if necessary. With new license checker
>   in open CI, I agree to revert this checker in
>   BaseTools/PatchCheck.py.
> 
> Thanks
> Liming
> -Original Message-
> From: Leif Lindholm 
> Sent: 2020年7月7日 23:57
> To: devel@edk2.groups.io; ler...@redhat.com
> Cc: Andrew Fish ; Kinney, Michael D 
> ; Zhang, Shenglei 
> ; Chen, Yuwei ; Gao, 
> Liming 
> Subject: Re: [edk2-devel] [PATCH 1/2] Revert "BaseTools/PatchCheck.py: Add 
> LicenseCheck"
> 
> On Fri, Jul 03, 2020 at 18:20:26 +0200, Laszlo Ersek wrote:
> > On 07/02/20 13:24, Leif Lindholm wrote:
> > > This reverts commit a4cfb842fca9693a330cb5435284c1ee8bfbbace.
> > > This commit suggests inclusion of non-edk2+license content without
> > 
> > The expression "non-edk2+license" is a typo.
> > 
> > I think you meant "non-BSD-2-Clause-Patent".
> 
> Err, yes. Sorry.
> 
> > > a contribution agreement is something the community has made a 
> > > decision on, which is incorrect.
> > 
> > I'm OK with commit a4cfb842fca9 being reverted, as this solves the 
> > practical problem of adding generated files.
> > 
> > Acked-by: Laszlo Ersek 
> > 
> > That said, I *still* don't grasp the more general problem you refer to.
> > 
> > Can we express it as follows (using commits 6b621f958123 and 
> > 6f21d772aa6b as reference):
> > 
> > (1) Content under OvmfPkg/Include/IndustryStandard/Xen was 
> > introduced under the MIT license in commit 6b621f958123. That commit was 
> > marked with:
> > 
> > > License: This patch adds many files under the MIT licence.
> > > Contributed-under: TianoCore Contribution Agreement 1.0
> > 
> > and the header files also contained open-coded instances of the MIT 
> > license. (These would later be replaced with SPDX identifiers in 
> > commit
> > 6f21d772aa6b.)
> > 
> > As a result, these files effectively granted use and distribution 
> > rights under the MIT license, *plus* a patent grant (per TCA).
> 
> Correct.
> 
> > (2) If we did the same today (that is, add new MIT-licensed files, 
> > but no "Contributed-under: TCA" line on the commit message), then 
> > that would grant use and distribution rights under the "MIT 
> > license", and
> > *no* patent grant.
> > 
> > Is this the issue you're thinking of?
> 
> Yes.
> 
> > So are we basically looking to replace (for example):
> > 
> >   SPDX-License-Identifier: MIT
> > 
> > with *something* like:
> > 
> >   SPDX-License-Identifier: MIT-Patent
> > 
> > ? (Assuming the latter exists -- which it doesn't, at the moment?)
> 
> It doesn't.
> 
> For BSD3/BSD4, we can do what the BSD distros do and use (for example)
> SPDX-License-Identifier: BSD-3-Clause AND BSD-2-Clause-Patent
> 
> It is not clear to me if (for example) "MIT AND BSD-2-Clause-Patent"
> is a valid expression. But what about "public domain"? Do we figure out a 
> jurisdiction in which public domain content can clearly have arbitrary 
> licenses applied to it and ask someone there to relicense it to something we 
> can accept?
> 
> If we decide the explicit patent grant isn't important, why did we add 
> it in the first place? If we decide it is important, we need to 
> actively make a decision on whether we can ever sidestep it, and if so 
> under what circumstances. (e.g.: "we permit it for tools" - but then 
> the code generation aspect also needs to be covered)
> 
> Regards,
> 
> Leif
> 
> > Thanks
> > Laszlo
> > 
> > > 
> > > Cc: Shenglei Zhang 
> > > Cc: Yuwei Chen 
> > > Cc: Liming Gao 
> > > Signed-off-by: Leif Lindholm 
> > > ---
> > >  BaseTools/Scripts/PatchCheck.py | 50
> > > -
> >

Re: [edk2-devel] [platforms: PATCH 1/1] Marvell/Drivers: MvFvbDxe: Switch to PcdSet64S

2020-07-30 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Marcin Wojtas
Sent: 2020年7月31日 0:06
To: devel@edk2.groups.io
Cc: l...@nuviainc.com; ard.biesheu...@arm.com; m...@semihalf.com; 
j...@semihalf.com; nad...@marvell.com; kos...@marvell.com
Subject: [edk2-devel] [platforms: PATCH 1/1] Marvell/Drivers: MvFvbDxe: Switch 
to PcdSet64S

According to the bug:
https://bugzilla.tianocore.org/show_bug.cgi?id=2777
the deprecated code under DISABLE_NEW_DEPRECATED_INTERFACES will be removed, 
which will result in compilation breakage of the Marvell platforms. Prevent 
that by switching to the different PcdSet API.

Signed-off-by: Marcin Wojtas 
---
 Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c 
b/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c
index fba75b6..e8cad86 100644
--- a/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c
+++ b/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c
@@ -1059,12 +1059,12 @@ MvFvbConfigureFlashInstance (
 return EFI_OUT_OF_RESOURCES;
 }
 
-PcdSet64 (PcdFlashNvStorageVariableBase64,
+PcdSet64S (PcdFlashNvStorageVariableBase64,
   (UINT64) FlashInstance->RegionBaseAddress);
-PcdSet64 (PcdFlashNvStorageFtwWorkingBase64,
+PcdSet64S (PcdFlashNvStorageFtwWorkingBase64,
   (UINT64) FlashInstance->RegionBaseAddress
   + VariableSize);
-PcdSet64 (PcdFlashNvStorageFtwSpareBase64,
+PcdSet64S (PcdFlashNvStorageFtwSpareBase64,
   (UINT64) FlashInstance->RegionBaseAddress
   + VariableSize
   + FtwWorkingSize);
--
2.7.4





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

View/Reply Online (#63532): https://edk2.groups.io/g/devel/message/63532
Mute This Topic: https://groups.io/mt/75889250/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 contain

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<mailto:bret=corthon@groups.io>
Sent: Tuesday, June 23, 2020 4:19 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Yao, Jiewen<mailto:jiewen@intel.com>; Chao 
Zhang<mailto:chao.b.zh...@intel.com>; Jian J 
Wang<mailto:jian.j.w...@intel.com>; Hao A Wu<mailto:hao.a...@intel.com>; 
liming.gao<mailto:liming@intel.com>; Jordan 
Justen<mailto:jordan.l.jus...@intel.com>; Laszlo 
Ersek<mailto:ler...@redhat.com>; Ard Biesheuvel<mailto:ard.biesheu...@arm.com>; 
Andrew Fish<mailto:af...@apple.com>; Ni, Ray<mailto:ray...@intel.com>
Subject: [EXTERNAL] [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%3D2522data=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdf2ee1dbc25a4810f5ce08d817674112%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637285079522114249sdata=1%2F3MkPm5HuXeG%2FEaQgl%2F%2F8Tqu3UvgDs6Ich2ezXgjuY%3Dreserved=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-portingdata=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdf2ee1dbc25a4810f5ce08d817674112%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637285079522114249sdata=b%2FFdg6Sy2pdxbk3C%2FgVzXvoOWOxW6Z60QXRQ%2BVxGfFs%3Dreserved=0

Discussion of the feature can be found in multiple places throughout
the last year on the RFC channel, staging branches, and in devel.

Most recently, this subject was discussed in this thread:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F53712data=02%7C01%7Cbret.barkelew%40microsoft.com%7Cdf2ee1dbc25a4810f5ce08d817674112%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637285079522114249sdata=epDJobMGos0As5T2JSwhs2PTy1IDt52oLqXkxEPJWLg%3Dreserved=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 a

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] [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)
> +  

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

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 pl

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

Re: [edk2-devel] [PATCH] BaseTools/PeCoffLoaderEx: Remove the unused local variable

2020-07-28 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Abner Chang
Sent: 2020年7月25日 10:35
To: devel@edk2.groups.io
Cc: abner.ch...@hpe.com; Feng, Bob C ; Gao, Liming 
; Daniel Schaefer 
Subject: [edk2-devel] [PATCH] BaseTools/PeCoffLoaderEx: Remove the unused local 
variable

BZ:2864 GCC build fails due to variable self assignment.

This local variable is not used at any where, we can just remove it.

Signed-off-by: Abner Chang 

Cc: Bob Feng 
Cc: Liming Gao 
Cc: Daniel Schaefer 
---
 BaseTools/Source/C/Common/PeCoffLoaderEx.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/BaseTools/Source/C/Common/PeCoffLoaderEx.c 
b/BaseTools/Source/C/Common/PeCoffLoaderEx.c
index 588b3a2f84..799f282970 100644
--- a/BaseTools/Source/C/Common/PeCoffLoaderEx.c
+++ b/BaseTools/Source/C/Common/PeCoffLoaderEx.c
@@ -127,10 +127,7 @@ PeCoffLoaderRelocateRiscVImage (
 {   UINT32 Value;   UINT32 Value2;-  UINT32 OrgValue; -  OrgValue = *(UINT32 
*) Fixup;-  OrgValue = OrgValue;   switch ((*Reloc) >> 12) {   case 
EFI_IMAGE_REL_BASED_RISCV_HI20:   RiscVHi20Fixup = (UINT32 *) Fixup;-- 
2.25.0


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

View/Reply Online (#63269): https://edk2.groups.io/g/devel/message/63269
Mute This Topic: https://groups.io/mt/75779823/1759384
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [liming@intel.com] 
-=-=-=-=-=-=


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

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



Re: [edk2-devel] [PATCH v12 07/46] MdePkg/BaseLib: Add support for the VMGEXIT instruction

2020-07-28 Thread Liming Gao
Laszlo:
 Yes. This solution makes sense. 

Thanks
Liming
-Original Message-
From: Laszlo Ersek  
Sent: 2020年7月28日 23:19
To: Tom Lendacky ; Gao, Liming ; 
devel@edk2.groups.io
Cc: Brijesh Singh ; Ard Biesheuvel 
; Dong, Eric ; Justen, Jordan L 
; Kinney, Michael D ; 
Ni, Ray 
Subject: Re: [PATCH v12 07/46] MdePkg/BaseLib: Add support for the VMGEXIT 
instruction

On 07/28/20 16:13, Tom Lendacky wrote:

> IIUC, create a VmgExit.c file in MdePkg/Library/BaseLib/Ia32/ that 
> doesn't actually encode the VMGEXIT instruction, just calls 
> CpuBreakpoint(), e.g.:
>
>   VOID
>   EFIAPI
>   AsmVmgExit (
> VOID
> )
>   {
> CpuBreakpoint();
>   }
>

Yes -- either that, or even just open-code (copy) what we have in

  MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.nasm

now:

global ASM_PFX(AsmVmgExit)
ASM_PFX(AsmVmgExit):
;
; VMGEXIT makes no sense on IA32, and NASM versions before 2.12 cannot ; 
translate the 64-bit "rep vmmcall" instruction into elf32 format. So ; provide 
a stub implementation that is identical to CpuBreakpoint(). In ; practice, 
AsmVmgExit() should never be called on IA32.
;
int  3
ret

Because this assembly-language implementation might be more "true" to the name 
"AsmVmgExit".

Liming, would you be OK with this approach? In other words, the set of files 
changed/introduced in this patch would not change, just the implementation of 
IA32 AsmVmgExit().

> The other alternative is to use a DB-encoded instruction, though I 
> know that isn't the most popular approach.

Right, I've been quite on a quest to eliminate DBs that encode instructions.

> The BITS 64 method to generate the instruction bytes is also used in 
> OvmfPkg/ResetVector/Ia32/PageTables64.asm, but that file is only 
> included when ARCH_X64 is defined, so there shouldn't be an issue 
> there, plus the nasm file format is bin (-f bin).

I confirm that; the following commands all work on RHEL7, with this series 
applied:

$ build -b NOOPT -t GCC48 -m OvmfPkg/ResetVector/ResetVector.inf -a IA32
-p OvmfPkg/OvmfPkgIa32.dsc
$ build -b NOOPT -t GCC48 -m OvmfPkg/ResetVector/ResetVector.inf -a IA32 -a X64 
-p OvmfPkg/OvmfPkgIa32X64.dsc
$ build -b NOOPT -t GCC48 -m OvmfPkg/ResetVector/ResetVector.inf -a X64 
-p OvmfPkg/OvmfPkgX64.dsc

Thanks!
Laszlo


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

View/Reply Online (#63425): https://edk2.groups.io/g/devel/message/63425
Mute This Topic: https://groups.io/mt/75824947/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-28 Thread Liming Gao
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 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   | 118
> ++
>  .../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/S

Re: [edk2-devel] TianoCore Bug Triage - APAC / NAMO - Tue, 07/28/2020 6:30pm-7:30pm #cal-reminder

2020-07-28 Thread Liming Gao

The following Bug will be reviewed this week. Welcome the reporter join the 
meeting to introduce the more background and detail.

Thanks
Liming
ID
Product
Comp
Assignee
Status
Summary
Reporter
Changed▼
2865
EDK2 Tes
UEFI-SCT
edhaya.chand...@arm.com
UNCO
uefi-sct/SctPkg: EFI_SUCCESS not accepted for 
QueryVariableInfo
xypron.g...@gmx.de
Mon 13:57
2233
EDK2 Pla
MinPlatf
rangasai.v.chaga...@intel.com
UNCO
Test Point infrastructure should be broken into more granular categories of 
tests
michael.a.kuba...@intel.com
Sun 10:15
2863
EDK2
Test
unassig...@tianocore.org
UNCO
Make MtrrLib unit test failure easily 
reproducable
ray...@intel.com
Fri 13:13
2853
EDK2
Code
unassig...@tianocore.org
UNCO
UT_LOG_xxx() messages are 
truncated
ray...@intel.com
Fri 02:26
2861
EDK2
Code
unassig...@tianocore.org
UNCO
HiiDatabaseDxe, ConfigRouting.c, GetElementsFromRequest incorrect error 
handling.
ken_tay...@phoenix.com
Thu 07:34
2725
EDK2
Code
ray...@intel.com
UNCO
WinHost.exe exits after launching after SEC 
core.
navdeep_ra...@yahoo.com
Wed 20:27
2504
Tianocor
Code
maciej.rab...@intel.com
UNCO
UEFI HTTPS Boot Support for HTTP Client Authentication (Basic or 
Digest)
zerene.n.san...@intel.com
2020-07-20
2859
EDK2
Code
unassig...@tianocore.org
UNCO
Add BaseTools/Scripts/ to the 

Re: [edk2-devel] [PATCH v12 07/46] MdePkg/BaseLib: Add support for the VMGEXIT instruction

2020-07-28 Thread Liming Gao
I meet with GCC failure on this patch. Can you help check it? If nasm 
> >> doesn't support the vmmcall instruction in 32-bit mode, you
> have to use inline assembly to support it.
> >
> > What version of GCC are you using. I was able to successfully build the
> > Ia32 version with my GCC level. The Ia32 version uses a trick to do switch 
> > to 64-bit just to encode the instruction. Looks like that
> doesn't work with your version of GCC.
> >
> > I can probably switch to defining the instruction as bytes. Let me look 
> > into that and possibly send you a patch to test.
> >
> > Thanks,
> > Tom
> >
> >>
> >> Edk2/Build/IntelFsp2Pkg/DEBUG_GCC5/IA32/MdePkg/Library/BaseLib/BaseLib
> >> /OUTPUT/Ia32/VmgExit.iii:33: error: elf32 output format does not
> >> support 64-bit code
> >> GNUmakefile:741: recipe for target
> >>
> >> Thanks
> >> Liming
> >> -Original Message-
> >> From: Tom Lendacky 
> >> Sent: 2020t727å 23:26
> >> To: devel@edk2.groups.io
> >> Cc: Brijesh Singh ; Ard Biesheuvel
> >> ; Dong, Eric ; Justen,
> >> Jordan L ; Laszlo Ersek
> >> ; Gao, Liming ; Kinney,
> >> Michael D ; Ni, Ray 
> >> Subject: [PATCH v12 07/46] MdePkg/BaseLib: Add support for the VMGEXIT
> >> instruction
> >>
> >> From: Tom Lendacky 
> >>
> >> BZ:
> >> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugz
> >> illa.tianocore.org%2Fshow_bug.cgi%3Fid%3D2198data=02%7C01%7Cthoma
> >> s.lendacky%40amd.com%7C77c8250cd9e14f2929a008d832965726%7C3dd8961fe488
> >> 4e608e11a82d994e183d%7C0%7C0%7C637314968570901400sdata=6zqseI3tVm
> >> aw351w9mfEymMnDcjDzjvcBrhARU6r3Ho%3Dreserved=0
> >>
> >> VMGEXIT is a new instruction used for Hypervisor/Guest communication when 
> >> running as an SEV-ES guest. A VMGEXIT will cause
> an automatic exit (AE) to occur, resulting in a #VMEXIT with an exit code 
> value of 0x403.
> >>
> >> Provide the necessary support to execute the VMGEXIT instruction, which is 
> >> "rep; vmmcall".
> >>
> >> Cc: Michael D Kinney 
> >> Cc: Liming Gao 
> >> Signed-off-by: Tom Lendacky 
> >> ---
> >>   MdePkg/Library/BaseLib/BaseLib.inf   |  2 ++
> >>   MdePkg/Include/Library/BaseLib.h | 14 +
> >>   MdePkg/Library/BaseLib/Ia32/VmgExit.nasm | 37   
> >> MdePkg/Library/BaseLib/X64/VmgExit.nasm  | 32
> 
> >>   4 files changed, 85 insertions(+)
> >>   create mode 100644 MdePkg/Library/BaseLib/Ia32/VmgExit.nasm
> >>   create mode 100644 MdePkg/Library/BaseLib/X64/VmgExit.nasm
> >>
> >> diff --git a/MdePkg/Library/BaseLib/BaseLib.inf
> >> b/MdePkg/Library/BaseLib/BaseLib.inf
> >> index 3b93b5db8d24..3b85c56c3c03 100644
> >> --- a/MdePkg/Library/BaseLib/BaseLib.inf
> >> +++ b/MdePkg/Library/BaseLib/BaseLib.inf
> >> @@ -184,6 +184,7 @@ [Sources.Ia32]
> >> Ia32/DisableCache.nasm| GCC
> >> Ia32/RdRand.nasm
> >> Ia32/XGetBv.nasm
> >> +  Ia32/VmgExit.nasm
> >>
> >> Ia32/DivS64x64Remainder.c
> >> Ia32/InternalSwitchStack.c | MSFT
> >> @@ -317,6 +318,7 @@ [Sources.X64]
> >> X64/DisablePaging64.nasm
> >> X64/RdRand.nasm
> >> X64/XGetBv.nasm
> >> +  X64/VmgExit.nasm
> >> ChkStkGcc.c  | GCC
> >>
> >>   [Sources.EBC]
> >> diff --git a/MdePkg/Include/Library/BaseLib.h
> >> b/MdePkg/Include/Library/BaseLib.h
> >> index 7edf0051a0a0..04fb329eaabb 100644
> >> --- a/MdePkg/Include/Library/BaseLib.h
> >> +++ b/MdePkg/Include/Library/BaseLib.h
> >> @@ -7848,6 +7848,20 @@ AsmXGetBv (
> >> );
> >>
> >>
> >> +/**
> >> +  Executes a VMGEXIT instruction (VMMCALL with a REP prefix)
> >> +
> >> +  Executes a VMGEXIT instruction. This function is only available on
> >> + IA-32 and  x64.
> >> +
> >> +**/
> >> +VOID
> >> +EFIAPI
> >> +AsmVmgExit (
> >> +  VOID
> >> +  );
> >> +
> >> +
> >>   /**
> >> Patch the immediate operand of an IA32 or X64 instruction such that 
> >> the byte,
> >> word, dword or qword operand is encoded at the end of the
> >> instruction's diff --git a/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm
> >> b/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm
> >>

Re: [edk2-devel] [PATCH v12 07/46] MdePkg/BaseLib: Add support for the VMGEXIT instruction

2020-07-28 Thread Liming Gao
This error is reported from nasm compiler. My nasm compiler version is 2.11.08. 
It may be a little old. 2.12 should be fine. 

This change also requires to update edk2\BaseTools\Conf\tools_def.template and 
mention nasm compiler version. 

Thanks
Liming
-Original Message-
From: Tom Lendacky  
Sent: 2020年7月28日 12:08
To: Gao, Liming ; devel@edk2.groups.io
Cc: Brijesh Singh ; Ard Biesheuvel 
; Dong, Eric ; Justen, Jordan L 
; Laszlo Ersek ; Kinney, Michael 
D ; Ni, Ray 
Subject: Re: [PATCH v12 07/46] MdePkg/BaseLib: Add support for the VMGEXIT 
instruction

On 7/27/20 8:34 PM, Gao, Liming wrote:
> Tom:

Hi Liming,

>I meet with GCC failure on this patch. Can you help check it? If nasm 
> doesn't support the vmmcall instruction in 32-bit mode, you have to use 
> inline assembly to support it.

What version of GCC are you using. I was able to successfully build the
Ia32 version with my GCC level. The Ia32 version uses a trick to do switch to 
64-bit just to encode the instruction. Looks like that doesn't work with your 
version of GCC.

I can probably switch to defining the instruction as bytes. Let me look into 
that and possibly send you a patch to test.

Thanks,
Tom

> 
> Edk2/Build/IntelFsp2Pkg/DEBUG_GCC5/IA32/MdePkg/Library/BaseLib/BaseLib
> /OUTPUT/Ia32/VmgExit.iii:33: error: elf32 output format does not 
> support 64-bit code
> GNUmakefile:741: recipe for target
> 
> Thanks
> Liming
> -Original Message-
> From: Tom Lendacky 
> Sent: 2020年7月27日 23:26
> To: devel@edk2.groups.io
> Cc: Brijesh Singh ; Ard Biesheuvel 
> ; Dong, Eric ; Justen, 
> Jordan L ; Laszlo Ersek 
> ; Gao, Liming ; Kinney, 
> Michael D ; Ni, Ray 
> Subject: [PATCH v12 07/46] MdePkg/BaseLib: Add support for the VMGEXIT 
> instruction
> 
> From: Tom Lendacky 
> 
> BZ: 
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugz
> illa.tianocore.org%2Fshow_bug.cgi%3Fid%3D2198data=02%7C01%7Cthoma
> s.lendacky%40amd.com%7C77c8250cd9e14f2929a008d832965726%7C3dd8961fe488
> 4e608e11a82d994e183d%7C0%7C0%7C637314968570901400sdata=6zqseI3tVm
> aw351w9mfEymMnDcjDzjvcBrhARU6r3Ho%3Dreserved=0
> 
> VMGEXIT is a new instruction used for Hypervisor/Guest communication when 
> running as an SEV-ES guest. A VMGEXIT will cause an automatic exit (AE) to 
> occur, resulting in a #VMEXIT with an exit code value of 0x403.
> 
> Provide the necessary support to execute the VMGEXIT instruction, which is 
> "rep; vmmcall".
> 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Signed-off-by: Tom Lendacky 
> ---
>   MdePkg/Library/BaseLib/BaseLib.inf   |  2 ++
>   MdePkg/Include/Library/BaseLib.h | 14 +
>   MdePkg/Library/BaseLib/Ia32/VmgExit.nasm | 37   
> MdePkg/Library/BaseLib/X64/VmgExit.nasm  | 32 
>   4 files changed, 85 insertions(+)
>   create mode 100644 MdePkg/Library/BaseLib/Ia32/VmgExit.nasm
>   create mode 100644 MdePkg/Library/BaseLib/X64/VmgExit.nasm
> 
> diff --git a/MdePkg/Library/BaseLib/BaseLib.inf 
> b/MdePkg/Library/BaseLib/BaseLib.inf
> index 3b93b5db8d24..3b85c56c3c03 100644
> --- a/MdePkg/Library/BaseLib/BaseLib.inf
> +++ b/MdePkg/Library/BaseLib/BaseLib.inf
> @@ -184,6 +184,7 @@ [Sources.Ia32]
> Ia32/DisableCache.nasm| GCC
> Ia32/RdRand.nasm
> Ia32/XGetBv.nasm
> +  Ia32/VmgExit.nasm
>   
> Ia32/DivS64x64Remainder.c
> Ia32/InternalSwitchStack.c | MSFT
> @@ -317,6 +318,7 @@ [Sources.X64]
> X64/DisablePaging64.nasm
> X64/RdRand.nasm
> X64/XGetBv.nasm
> +  X64/VmgExit.nasm
> ChkStkGcc.c  | GCC
>   
>   [Sources.EBC]
> diff --git a/MdePkg/Include/Library/BaseLib.h 
> b/MdePkg/Include/Library/BaseLib.h
> index 7edf0051a0a0..04fb329eaabb 100644
> --- a/MdePkg/Include/Library/BaseLib.h
> +++ b/MdePkg/Include/Library/BaseLib.h
> @@ -7848,6 +7848,20 @@ AsmXGetBv (
> );
>   
>   
> +/**
> +  Executes a VMGEXIT instruction (VMMCALL with a REP prefix)
> +
> +  Executes a VMGEXIT instruction. This function is only available on
> + IA-32 and  x64.
> +
> +**/
> +VOID
> +EFIAPI
> +AsmVmgExit (
> +  VOID
> +  );
> +
> +
>   /**
> Patch the immediate operand of an IA32 or X64 instruction such that the 
> byte,
> word, dword or qword operand is encoded at the end of the 
> instruction's diff --git a/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm 
> b/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm
> new file mode 100644
> index ..a4b37385cc7a
> --- /dev/null
> +++ b/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm
> @@ -0,0 +1,37 @@
> +;
> +--
> +
> +;
> +; Copyright (C

Re: [edk2-devel] [Patch] MdePkg/Library/UnitTestHostBaseLib: Add missing services

2020-07-28 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: Kinney, Michael D  
Sent: 2020年7月24日 9:24
To: devel@edk2.groups.io
Cc: Gao, Liming ; Sean Brogan 
; Bret Barkelew 
Subject: [Patch] MdePkg/Library/UnitTestHostBaseLib: Add missing services

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

Add ReadMmx()/WriteMmx() services
Add MemoryFence() service

Cc: Liming Gao 
Cc: Sean Brogan 
Cc: Bret Barkelew 
Signed-off-by: Michael D Kinney 
---
 .../Library/BaseLib/UnitTestHostBaseLib.inf   | 34 +++
 1 file changed, 34 insertions(+)

diff --git a/MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf 
b/MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf
index 01fda55bec..eae1a7158d 100644
--- a/MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf
+++ b/MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf
@@ -66,6 +66,22 @@ [Sources]
   UnitTestHost.h
 
 [Sources.Ia32]
+  Ia32/WriteMm7.c | MSFT
+  Ia32/WriteMm6.c | MSFT
+  Ia32/WriteMm5.c | MSFT
+  Ia32/WriteMm4.c | MSFT
+  Ia32/WriteMm3.c | MSFT
+  Ia32/WriteMm2.c | MSFT
+  Ia32/WriteMm1.c | MSFT
+  Ia32/WriteMm0.c | MSFT
+  Ia32/ReadMm7.c | MSFT
+  Ia32/ReadMm6.c | MSFT
+  Ia32/ReadMm5.c | MSFT
+  Ia32/ReadMm4.c | MSFT
+  Ia32/ReadMm3.c | MSFT
+  Ia32/ReadMm2.c | MSFT
+  Ia32/ReadMm1.c | MSFT
+  Ia32/ReadMm0.c | MSFT
   Ia32/SwapBytes64.c | MSFT
   Ia32/RRotU64.c | MSFT
   Ia32/RShiftU64.c | MSFT
@@ -104,6 +120,7 @@ [Sources.Ia32]
   Ia32/InternalSwitchStack.nasm | GCC
   Ia32/Non-existing.c
   Unaligned.c
+  X86MemoryFence.c | MSFT
   X86FxSave.c
   X86FxRestore.c
   X86Msr.c
@@ -118,12 +135,29 @@ [Sources.X64]
   X64/CpuBreakpoint.c | MSFT
   X64/CpuPause.nasm| MSFT
   X64/ReadTsc.nasm| MSFT
+  X64/WriteMm7.nasm| MSFT
+  X64/WriteMm6.nasm| MSFT
+  X64/WriteMm5.nasm| MSFT
+  X64/WriteMm4.nasm| MSFT
+  X64/WriteMm3.nasm| MSFT
+  X64/WriteMm2.nasm| MSFT
+  X64/WriteMm1.nasm| MSFT
+  X64/WriteMm0.nasm| MSFT
+  X64/ReadMm7.nasm| MSFT
+  X64/ReadMm6.nasm| MSFT
+  X64/ReadMm5.nasm| MSFT
+  X64/ReadMm4.nasm| MSFT
+  X64/ReadMm3.nasm| MSFT
+  X64/ReadMm2.nasm| MSFT
+  X64/ReadMm1.nasm| MSFT
+  X64/ReadMm0.nasm| MSFT
   X64/FxRestore.nasm| MSFT
   X64/FxSave.nasm| MSFT
   X64/ReadEflags.nasm| MSFT
   X64/Non-existing.c
   Math64.c
   Unaligned.c
+  X86MemoryFence.c | MSFT
   X86FxSave.c
   X86FxRestore.c
   X86Msr.c
-- 
2.21.0.windows.1


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

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



Re: [edk2-devel] [PATCH V4 1/2] MdePkg/Include/IndustryStandard: CXL 1.1 Registers

2020-07-27 Thread Liming Gao
Leif:

-Original Message-
From: Leif Lindholm  
Sent: 2020年7月28日 0:14
To: Gao, Liming 
Cc: devel@edk2.groups.io; Javeed, Ashraf ; Kinney, 
Michael D 
Subject: Re: [edk2-devel] [PATCH V4 1/2] MdePkg/Include/IndustryStandard: CXL 
1.1 Registers

On Mon, Jul 27, 2020 at 14:55:03 +, Gao, Liming wrote:
> > > diff --git a/MdePkg/Include/IndustryStandard/Cxl11.h 
> > > b/MdePkg/Include/IndustryStandard/Cxl11.h
> > > new file mode 100644
> > > index 00..933c1ab817
> > > --- /dev/null
> > > +++ b/MdePkg/Include/IndustryStandard/Cxl11.h
> > > @@ -0,0 +1,569 @@
> > > +/** @file
> > > +  CXL 1.1 Register definitions
> > > +
> > > +  This file contains the register definitions based on the 
> > > + Compute Express Link
> > > +  (CXL) Specification Revision 1.1.
> > > +
> > > +Copyright (c) 2020, Intel Corporation. All rights reserved.
> > > +SPDX-License-Identifier: BSD-2-Clause-Patent
> > > +
> > > +**/
> > > +
> > > +#ifndef _CXL11_H_
> > > +#define _CXL11_H_
> > 
> > We should not be adding macros with a leading _ - these are intended 
> > for toolchain use.
> 
> This style is align to other header file. This is the file header 
> macro to make sure the header file be included more than once.

Yes. The other headers should also be changed, but in the meantime it would be 
good to stop adding more incorrect ones.
https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification/5_source_files/53_include_files#5-3-5-all-include-file-contents-must-be-protected-by-a-include-guard

[Liming] Thank for your point. I miss this one, too. Now, most cases don't 
follow this rule. So, there is no good example for the reference. 
I agree the rule to apply the strict check for new adding file. I will check 
whether ECC has this check point. 

> > > +
> > > +//
> > > +// CXL Flex Bus Device default device and function number // 
> > > +Compute Express Link Specification Revision: 1.1 - Chapter 7.1.1 
> > > +//
> > > +#define CXL_DEV_DEV 0
> > > +#define CXL_DEV_FUNC0
> > > +
> > > +//
> > > +// Ensure proper structure formats // #pragma pack(1)
> > 
> > And this pragma has no function whatsoever with regards to any of 
> > the register definition structs below. It would be much better if 
> > the structs requiring packing (_DEVICE, _PORT, ...) were grouped 
> > together and only those were given this treatment.
> > 
> > #pragma pack(1) is *not* a safe default.
> > 
> 
> I know pack(1) is for the compact structure layout. 

Yes. And it should be used when structs need to be compacted.
All of the bitfield structs are single-variable structs, so the packing has no 
effect on them, other than setting the struct alignment requirements to 1 byte, 
which will not be correct (or efficient) on all architectures.

[Liming] Yes. There is no effect for bitfield structure. This header file still 
includes some structure, such as CXL_1_1_DVSEC_FLEX_BUS_DEVICE. They may have 
the compact alignment requirement. 
@Javeed, Ashraf, can you conform it?

> > Now, one final comment - and this is more of a project feature
> > suggestion:
> > Industry standard headers is something fairly special, even in 
> > comparison with the rest of MdePkg. *I* would certainly like to 
> > ensure I don't miss changes or additions to them.
> > Could we set up a dedicated group of reviewers for this folder only?
> > This need not affect the actual maintainership of MdePkg, just 
> > ensure more eyeballs (or screen readers, braille terminals, ...) hit 
> > updates here?
> > 
> > i.e. something like the below to Maintainers.txt:
> > 
> > F: MdePkg/Include/IndustryStandard/
> > R: Leif ...
> > R: ...
> > R: ...
> > 
> 
> This is a good suggestion. IndustryStandard needs more feedback. 
> Can you send the patch to update Maintainers.txt?

Sure, I can do that. Any thoughts on others to add than me?

[Liming] Thanks. Laszlo or Sean may be added if they are also interested in 
IndustryStandard header file. 

Thanks
Liming
/
Leif

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

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



Re: [edk2-devel] [PATCH] Maintainers.txt: Add 'Yuwei Chen' for Tools review

2020-07-27 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: Chen, Christine  
Sent: 2020年7月24日 16:55
To: devel@edk2.groups.io
Cc: Gao, Liming ; Feng, Bob C 
Subject: [PATCH] Maintainers.txt: Add 'Yuwei Chen' for Tools review

Add 'Yuwei Chen' as a reviewer for
Edk2-platforms\Platform\Intel\Tools and
Edk2-platforms\Silicon\Intel\Tools.

Cc: Liming Gao 
Cc: Bob Feng 
Signed-off-by: Yuwei Chen 
---
 Maintainers.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Maintainers.txt b/Maintainers.txt index 9fc41187b7..01fbea5034 
100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -192,6 +192,7 @@ Platform/Intel/Tools
 F: Platform/Intel/Tools/ M: Bob Feng  M: Liming Gao 
+R: Yuwei Chen   
Silicon/Intel/IntelSiliconPkg F: Silicon/Intel/IntelSiliconPkg/@@ -230,6 +231,7 
@@ Silicon/Intel/Tools
 F: Silicon/Intel/Tools/ M: Bob Feng  M: Liming Gao 
+R: Yuwei Chen   Marvell platforms 
and silicon F: Platform/Marvell/--
2.27.0.windows.1


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

View/Reply Online (#63376): https://edk2.groups.io/g/devel/message/63376
Mute This Topic: https://groups.io/mt/75762929/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 'Yuwei Chen' for BaseTools review

2020-07-27 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: Chen, Christine  
Sent: 2020年7月24日 16:39
To: devel@edk2.groups.io
Cc: Gao, Liming ; Feng, Bob C 
Subject: [PATCH 1/1] Maintainers.txt: Add 'Yuwei Chen' for BaseTools review

Add 'Yuwei Chen' as a reviewer for Edk2\BaseTools.

Cc: Liming Gao 
Cc: Bob Feng 
Signed-off-by: Yuwei Chen 
---
 Maintainers.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Maintainers.txt b/Maintainers.txt index 599f94d57a3d..da09b0be1b96 
100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -157,6 +157,7 @@ F: BaseTools/
 W: https://github.com/tianocore/tianocore.github.io/wiki/BaseTools
 M: Bob Feng 
 M: Liming Gao 
+R: Yuwei Chen 
 
 CryptoPkg
 F: CryptoPkg/
--
2.27.0.windows.1


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

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



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

2020-07-27 Thread Liming Gao
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 
; Kinney, Michael D 
; 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); } +/**+  Gets the 
size of PCI Express.++  This internal functions retrieves PCI Express Base Size 
via a PCD entry+  PcdPciExpressBaseSize.++  @return The base size of PCI 
Express.++**/+STATIC+UINTN+PcdPciExpressBaseSize (+  VOID+  )+{+  return 
(UINTN) PcdGet64 (PcdPciExpressBaseSize);+}+ /**   Reads an 8-bit PCI 
configuration register. @@ -91,7 +110,8 @@ GetPciExpressBaseAddress (
   @param  Address The address that encodes the PCI Bus, De

Re: [edk2-devel] [PATCH v12 07/46] MdePkg/BaseLib: Add support for the VMGEXIT instruction

2020-07-27 Thread Liming Gao
Tom:
  I meet with GCC failure on this patch. Can you help check it? If nasm doesn't 
support the vmmcall instruction in 32-bit mode, you have to use inline assembly 
to support it. 

Edk2/Build/IntelFsp2Pkg/DEBUG_GCC5/IA32/MdePkg/Library/BaseLib/BaseLib/OUTPUT/Ia32/VmgExit.iii:33:
 error: elf32 output format does not support 64-bit code
GNUmakefile:741: recipe for target

Thanks
Liming
-Original Message-
From: Tom Lendacky  
Sent: 2020年7月27日 23:26
To: devel@edk2.groups.io
Cc: Brijesh Singh ; Ard Biesheuvel 
; Dong, Eric ; Justen, Jordan L 
; Laszlo Ersek ; Gao, Liming 
; Kinney, Michael D ; Ni, Ray 

Subject: [PATCH v12 07/46] MdePkg/BaseLib: Add support for the VMGEXIT 
instruction

From: Tom Lendacky 

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198

VMGEXIT is a new instruction used for Hypervisor/Guest communication when 
running as an SEV-ES guest. A VMGEXIT will cause an automatic exit (AE) to 
occur, resulting in a #VMEXIT with an exit code value of 0x403.

Provide the necessary support to execute the VMGEXIT instruction, which is 
"rep; vmmcall".

Cc: Michael D Kinney 
Cc: Liming Gao 
Signed-off-by: Tom Lendacky 
---
 MdePkg/Library/BaseLib/BaseLib.inf   |  2 ++
 MdePkg/Include/Library/BaseLib.h | 14 +
 MdePkg/Library/BaseLib/Ia32/VmgExit.nasm | 37   
MdePkg/Library/BaseLib/X64/VmgExit.nasm  | 32 
 4 files changed, 85 insertions(+)
 create mode 100644 MdePkg/Library/BaseLib/Ia32/VmgExit.nasm
 create mode 100644 MdePkg/Library/BaseLib/X64/VmgExit.nasm

diff --git a/MdePkg/Library/BaseLib/BaseLib.inf 
b/MdePkg/Library/BaseLib/BaseLib.inf
index 3b93b5db8d24..3b85c56c3c03 100644
--- a/MdePkg/Library/BaseLib/BaseLib.inf
+++ b/MdePkg/Library/BaseLib/BaseLib.inf
@@ -184,6 +184,7 @@ [Sources.Ia32]
   Ia32/DisableCache.nasm| GCC
   Ia32/RdRand.nasm
   Ia32/XGetBv.nasm
+  Ia32/VmgExit.nasm
 
   Ia32/DivS64x64Remainder.c
   Ia32/InternalSwitchStack.c | MSFT
@@ -317,6 +318,7 @@ [Sources.X64]
   X64/DisablePaging64.nasm
   X64/RdRand.nasm
   X64/XGetBv.nasm
+  X64/VmgExit.nasm
   ChkStkGcc.c  | GCC
 
 [Sources.EBC]
diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h
index 7edf0051a0a0..04fb329eaabb 100644
--- a/MdePkg/Include/Library/BaseLib.h
+++ b/MdePkg/Include/Library/BaseLib.h
@@ -7848,6 +7848,20 @@ AsmXGetBv (
   );
 
 
+/**
+  Executes a VMGEXIT instruction (VMMCALL with a REP prefix)
+
+  Executes a VMGEXIT instruction. This function is only available on 
+ IA-32 and  x64.
+
+**/
+VOID
+EFIAPI
+AsmVmgExit (
+  VOID
+  );
+
+
 /**
   Patch the immediate operand of an IA32 or X64 instruction such that the byte,
   word, dword or qword operand is encoded at the end of the instruction's diff 
--git a/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm 
b/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm
new file mode 100644
index ..a4b37385cc7a
--- /dev/null
+++ b/MdePkg/Library/BaseLib/Ia32/VmgExit.nasm
@@ -0,0 +1,37 @@
+;--
+
+;
+; Copyright (C) 2020, Advanced Micro Devices, Inc. All rights 
+reserved. ; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module 
+Name:
+;
+;   VmgExit.Asm
+;
+; Abstract:
+;
+;   AsmVmgExit function
+;
+; Notes:
+;
+;--
+
+
+SECTION .text
+
+;--
+
+; VOID
+; EFIAPI
+; AsmVmgExit (
+;   VOID
+;   );
+;--
+
+global ASM_PFX(AsmVmgExit)
+ASM_PFX(AsmVmgExit):
+;
+; NASM doesn't support the vmmcall instruction in 32-bit mode, so work 
+around ; this by temporarily switching to 64-bit mode.
+;
+BITS64
+rep vmmcall
+BITS32
+ret
+
diff --git a/MdePkg/Library/BaseLib/X64/VmgExit.nasm 
b/MdePkg/Library/BaseLib/X64/VmgExit.nasm
new file mode 100644
index ..26f034593c67
--- /dev/null
+++ b/MdePkg/Library/BaseLib/X64/VmgExit.nasm
@@ -0,0 +1,32 @@
+;--
+
+;
+; Copyright (C) 2020, Advanced Micro Devices, Inc. All rights 
+reserved. ; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module 
+Name:
+;
+;   VmgExit.Asm
+;
+; Abstract:
+;
+;   AsmVmgExit function
+;
+; Notes:
+;
+;--
+
+
+DEFAULT REL
+SECTION .text
+
+;--
+
+; VOID
+; EFIAPI
+; AsmVmgExit (
+;   VOID
+;   );
+;--
+
+global ASM_PFX(AsmVmgExit)
+ASM_PFX(AsmVmgExit):
+rep vmmcall
+ret
+
--
2.27.0


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

View/Reply Online (#63369): https://edk2.groups.io/g/devel/message/63369
Mute This To

Re: [edk2-devel] [PATCH v8 0/9] Add new feature that evacuate temporary to permanent memory (CVE-2019-11098)

2020-07-27 Thread Liming Gao
PR https://github.com/tianocore/edk2/pull/830 is created for this patch set. 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Liming Gao
Sent: 2020年7月27日 11:55
To: devel@edk2.groups.io; Jiang, Guomin 
Subject: Re: [edk2-devel] [PATCH v8 0/9] Add new feature that evacuate 
temporary to permanent memory (CVE-2019-11098)

Reviewed-by: Liming Gao  for this patch set. 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Guomin Jiang
Sent: 2020年7月24日 17:55
To: devel@edk2.groups.io
Subject: [edk2-devel] [PATCH v8 0/9] Add new feature that evacuate temporary to 
permanent memory (CVE-2019-11098)

The TOCTOU vulnerability allow that the physical present person to replace the 
code with the normal BootGuard check and PCR0 value.
The issue occur when BootGuard measure IBB and access flash code after NEM 
disable.
The reason why we access the flash code is that we have some pointer to flash.
To avoid this vulnerability, we need to convert those pointers, the patch 
series do this work and make sure that no code will access flash address.

v2:
Create gEdkiiMigratedFvInfoGuid HOB and add 
PcdMigrateTemporaryRamFirmwareVolumes to control whole feature.

v3:
Remove changes which is not related with the feature and disable the feature in 
virtual platform.

v4:
Disable the feature as default, Copy the Tcg2Pei behavior to TcgPei

v5:
Initialize local variable Shadow and return EFI_ABORTED when RepublishSecPpi 
not installed.

v6:
Avoid redundant shadow PEIM when enable Migrated PCD.

v7:
Change patch 10/10 to enhance the logic.

v8:
Drop the patch#10 added in v6 and v7, the optimization will be considered 
future.

Guomin Jiang (6):
  MdeModulePkg: Add new PCD to control the evacuate temporary memory
feature (CVE-2019-11098)
  MdeModulePkg/Core: Create Migrated FV Info Hob for calculating hash
(CVE-2019-11098)
  SecurityPkg/Tcg2Pei: Use Migrated FV Info Hob for calculating hash
(CVE-2019-11098)
  UefiCpuPkg/CpuMpPei: Enable paging and set NP flag to avoid TOCTOU
(CVE-2019-11098)
  UefiCpuPkg: Correct some typos.
  SecurityPkg/TcgPei: Use Migrated FV Info Hob for calculating hash
(CVE-2019-11098)

Michael Kubacki (3):
  MdeModulePkg/PeiCore: Enable T-RAM evacuation in PeiCore
(CVE-2019-11098)
  UefiCpuPkg/CpuMpPei: Add GDT migration support (CVE-2019-11098)
  UefiCpuPkg/SecMigrationPei: Add initial PEIM (CVE-2019-11098)

 MdeModulePkg/MdeModulePkg.dec |  12 +
 UefiCpuPkg/UefiCpuPkg.dec |   3 +
 UefiCpuPkg/UefiCpuPkg.dsc |   1 +
 MdeModulePkg/Core/Pei/PeiMain.inf |   3 +
 SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf   |   1 +
 SecurityPkg/Tcg/TcgPei/TcgPei.inf |   1 +
 UefiCpuPkg/CpuMpPei/CpuMpPei.inf  |   4 +
 UefiCpuPkg/SecCore/SecCore.inf|   2 +
 .../SecMigrationPei/SecMigrationPei.inf   |  68 +++
 MdeModulePkg/Core/Pei/PeiMain.h   | 170 +++
 MdeModulePkg/Include/Guid/MigratedFvInfo.h|  22 +
 UefiCpuPkg/CpuMpPei/CpuMpPei.h|  14 +-
 UefiCpuPkg/Include/Ppi/RepublishSecPpi.h  |  54 +++
 .../CpuExceptionCommon.h  |   4 +-
 UefiCpuPkg/SecCore/SecMain.h  |   1 +
 UefiCpuPkg/SecMigrationPei/SecMigrationPei.h  | 158 +++  
MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 445 +-
 MdeModulePkg/Core/Pei/Image/Image.c   | 130 -
 MdeModulePkg/Core/Pei/Memory/MemoryServices.c |  82 
 MdeModulePkg/Core/Pei/PeiMain/PeiMain.c   |  22 +-
 MdeModulePkg/Core/Pei/Ppi/Ppi.c   | 286 +++
 SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c |  31 +-
 SecurityPkg/Tcg/TcgPei/TcgPei.c   |  29 +-
 UefiCpuPkg/CpuMpPei/CpuMpPei.c|  37 ++
 UefiCpuPkg/CpuMpPei/CpuPaging.c   |  42 +-
 .../Ia32/ArchExceptionHandler.c   |   4 +-
 .../SecPeiCpuException.c  |   2 +-
 .../X64/ArchExceptionHandler.c|   4 +-
 UefiCpuPkg/SecCore/SecMain.c  |  26 +-
 UefiCpuPkg/SecMigrationPei/SecMigrationPei.c  | 385 +++
 MdeModulePkg/MdeModulePkg.uni |   6 +
 .../SecMigrationPei/SecMigrationPei.uni   |  13 +
 32 files changed, 2032 insertions(+), 30 deletions(-)  create mode 100644 
UefiCpuPkg/SecMigrationPei/SecMigrationPei.inf
 create mode 100644 MdeModulePkg/Include/Guid/MigratedFvInfo.h
 create mode 100644 UefiCpuPkg/Include/Ppi/RepublishSecPpi.h
 create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.h
 create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.c
 create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.uni

--
2.25.1.windows.1








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

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

Re: [edk2-devel] [PATCH v5 4/5] BaseTools: Compile AML bytecode arrays into .obj file

2020-07-27 Thread Liming Gao
Pierre:
  Thanks for your investigation. For now, the module will rename source file to 
avoid the file conflict. Can you submit one BZ for BaseTools to enhance the 
logic for the autogen source file? This needs more discussion. 

  Yes. I agree to place the generated source file into $(DEBUG_DIR). You can 
make another patch for this change. 

Thanks
Liming
-Original Message-
From: devel@edk2.groups.io  On Behalf Of PierreGondois
Sent: 2020年7月28日 1:10
To: devel@edk2.groups.io; Gao, Liming ; Leif Lindholm 
; Masahisa Kojima 
Cc: Sami Mujawar ; Tomas Pilar ; 
Feng, Bob C ; Ard Biesheuvel 
Subject: Re: [edk2-devel] [PATCH v5 4/5] BaseTools: Compile AML bytecode arrays 
into .obj file

Hello,

Liming:
I didn't find anything preventing from having a .vfr and .c file with the same 
name in the same scope.

Everybody:
The .c files generated (from either .vfr or .asl) are generated in the 
Build//OUTPUT/ directory, with their original subdirectory stripped. In the 
example below, the .c, .vfr and .asl files have been placed in subdirectories 
in edk2/edk2-platforms. The recipes that have been generated are:
$(OUTPUT_DIR)/Emmc.obj : $(OUTPUT_DIR)/AslDir/Emmc.c (from Emmc.asl) 
$(OUTPUT_DIR)/Ip4Config2.obj : $(DEBUG_DIR)/VfrDir/Ip4Config2.c (from 
Ip4Config2.vfr) $(OUTPUT_DIR)/CDir/Emmc.obj : 
$(WORKSPACE)/edk2-platforms/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/CDir/Emmc.c
 (from Emmc.c)

The only subdirectory that remains is the one from the .c files. Indeed, the 
build system might detects subdirectories from the .inf file location. As the 
.c file is generated in the OUTPUT directory where there is no .inf file, it 
gets stripped.
This means that if a subdirectory is created, it is for the .c file, but I 
don't think we should modify this.

Adding a pre/postfix to the generated .c filename seems a better approach to 
me. It would require modifying build_rule.template, and choose which 
pre/postfix to add.

Another point is that the .c file generated from the .c file is placed in the 
$(DEBUG_DIR), when the one coming from the .asl file is placed in 
$(OUTPUT_DIR). Maybe it should be modified to $(DEBUG_DIR) aswell.

Regards,
Pierre

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Liming Gao via 
groups.io
Sent: Monday, July 27, 2020 3:21 PM
To: Leif Lindholm ; devel@edk2.groups.io; Pierre Gondois 
; Masahisa Kojima 
Cc: Sami Mujawar ; Tomas Pilar ; 
Feng, Bob C ; Ard Biesheuvel 
Subject: Re: [edk2-devel] [PATCH v5 4/5] BaseTools: Compile AML bytecode arrays 
into .obj file

Leif:
  VFR file has the similar case. VFR is converted to xxx.c, then compile it to 
obj file.

Bob:
  Has BaseTools such detection if VFR and C source file have the same file name?

Thanks
Liming
> -Original Message-
> From: Leif Lindholm 
> Sent: Monday, July 27, 2020 9:58 PM
> To: devel@edk2.groups.io; pierre.gond...@arm.com; Masahisa Kojima 
> 
> Cc: sami.muja...@arm.com; tomas.pi...@arm.com; Feng, Bob C 
> ; Gao, Liming ; Ard 
> Biesheuvel 
> Subject: Re: [edk2-devel] [PATCH v5 4/5] BaseTools: Compile AML 
> bytecode arrays into .obj file
>
> Hi Pierre, (+Masahisa)
>
> This commit (0a4aa20e8d44) made for an exciting start to my week.
>
> Socionext's Developerbox failed to build for me, with the spectacular 
> error message:
>
> /usr/lib/gcc-cross/aarch64-linux-gnu/8/../../../../aarch64-linux-gnu/bin/ld:
> DWARF error: could not find abbrev number 5912
> /tmp/ccKt4gaM.ltrans0.ltrans.o: in function `RegisterDevices':
> :(.text.RegisterDevices+0xb0): undefined reference to 
> `RegisterEmmc'
>
> GCC49 (without lto) and CLANG38 profiles give much the same result, 
> with slightly less esoteric messages.
>
> The reason for this turned out to be that edk2-platforms 
> Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/ has both an Emmc.asl 
> and an Emmc.c file, which after this patch both generate an Emmc.obj 
> in the same output directory.
>
> I think the correct course of action is to fix this in the SynQuacer 
> driver, but I am reporting it here so we get it logged in the list 
> archives.
>
> It would of course be good if the build system could detect and warn 
> over cases like this, rather than silently overwriting existing object 
> files.
>
> Masahisa - since Ard is still on holiday, could you create a patch and 
> send out for me to review? Either one of the files needs to be 
> renamed, or we need to move the .asl files (Emmc.asl and Optee.asl) 
> into a subdirectory.
>
> Best Regards,
>
> Leif
>
> On Wed, Jul 01, 2020 at 15:06:03 +0100, PierreGondois wrote:
> > From: Pierre Gondois 
> >
> > The AmlToHex script and Posix/WindowsLike wrappers convert an AML 
> > file to a .hex file, containing a C array storing AML bytecode. This 
> > ".hex" file can then be included in a C file, allowing to

Re: [edk2-devel] [PATCH v2] MdePkg Base.h: Delete prototype for __builtin_return_address

2020-07-27 Thread Liming Gao
PR https://github.com/tianocore/edk2/pull/829 has been created. 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Liming Gao
Sent: 2020年7月27日 10:18
To: Jessica Clarke ; devel@edk2.groups.io
Cc: l...@nuviainc.com; Kinney, Michael D 
Subject: Re: [edk2-devel] [PATCH v2] MdePkg Base.h: Delete prototype for 
__builtin_return_address

Reviewed-by: Liming Gao 

-Original Message-
From: Jessica Clarke  
Sent: 2020年7月27日 9:59
To: devel@edk2.groups.io
Cc: Jessica Clarke ; Gao, Liming ; 
l...@nuviainc.com; Kinney, Michael D 
Subject: [PATCH v2] MdePkg Base.h: Delete prototype for __builtin_return_address

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

Being a compiler builtin, the type of __builtin_return_address is already known 
to the compiler so no prototype is needed. Clang also errors out when 
redeclaring certain builtins like this[1], though currently only for ones with 
custom type checking. At the moment, __builtin_return_address does not use 
custom type checking and so does not trigger this error, however, the CHERI 
fork of LLVM, which will form the basis of the toolchain for Arm's experimental 
Morello platform, does use custom type checking for it, and so gives an error. 
Thus, simply delete the unnecessary line.

[1] llvm/llvm-project@41af97137572ad6d4dafc872e7ecf6bbb08d4984

Cc: Leif Lindholm 
Signed-off-by: Jessica Clarke 
---
Changes in v2:
 * Shortened [1] reference to fit column limit. The bug report has the
   full URL already, and this will still link correctly on GitHub.

 MdePkg/Include/Base.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 
85a091b9d5..8e4271f6ea 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -1273,7 +1273,6 @@ typedef UINTN RETURN_STATUS;
   **/
   #define RETURN_ADDRESS(L) ((L == 0) ? _ReturnAddress() : (VOID *) 0)
 #elif defined (__GNUC__) || defined (__clang__)
-  void * __builtin_return_address (unsigned int level);
   /**
 Get the return address of the calling function.
 
--
2.20.1





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

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



Re: [edk2-devel] [PATCH V4 1/2] MdePkg/Include/IndustryStandard: CXL 1.1 Registers

2020-07-27 Thread Liming Gao
Lefi:
  Thanks for your comments.

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Leif Lindholm
> Sent: Monday, July 27, 2020 10:25 PM
> To: devel@edk2.groups.io; Javeed, Ashraf 
> Cc: Kinney, Michael D ; Gao, Liming 
> 
> Subject: Re: [edk2-devel] [PATCH V4 1/2] MdePkg/Include/IndustryStandard: CXL 
> 1.1 Registers
> 
> Hi Ashraf, but also Mike, Liming.
> 
> I just saw this patch go in and have some comments.
> 
> On Fri, Jul 24, 2020 at 23:56:12 +0530, Javeed, Ashraf wrote:
> > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2611
> >
> > Register definitions from chapter 7 of Compute Express Link
> > Specification Revision 1.1 are ported into the new Cxl11.h.
> > The CXL Flex Bus registers are based on the PCIe Extended Capability
> > DVSEC structure header, led to the inclusion of upgraded Pci.h.
> >
> > Signed-off-by: Ashraf Javeed 
> > Cc: Michael D Kinney 
> > Cc: Liming Gao 
> > --
> >
> > V4: fix code style
> >
> > V3: Copyright date fix
> >
> > V2: Indentation and double declaration fix, copyright date update
> > ---
> >  MdePkg/Include/IndustryStandard/Cxl11.h | 569
> 
> 
> 
> 
> 
> +
> >  MdePkg/Include/IndustryStandard/Pci.h   |   6 ++
> >  2 files changed, 571 insertions(+), 4 deletions(-)
> >
> > diff --git a/MdePkg/Include/IndustryStandard/Cxl11.h 
> > b/MdePkg/Include/IndustryStandard/Cxl11.h
> > new file mode 100644
> > index 00..933c1ab817
> > --- /dev/null
> > +++ b/MdePkg/Include/IndustryStandard/Cxl11.h
> > @@ -0,0 +1,569 @@
> > +/** @file
> > +  CXL 1.1 Register definitions
> > +
> > +  This file contains the register definitions based on the Compute Express 
> > Link
> > +  (CXL) Specification Revision 1.1.
> > +
> > +Copyright (c) 2020, Intel Corporation. All rights reserved.
> > +SPDX-License-Identifier: BSD-2-Clause-Patent
> > +
> > +**/
> > +
> > +#ifndef _CXL11_H_
> > +#define _CXL11_H_
> 
> We should not be adding macros with a leading _ - these are intended
> for toolchain use.

This style is align to other header file. This is the file header macro to make 
sure the header file be included more than once. 

> 
> > +
> > +#include 
> > +//
> > +// DVSEC Vendor ID
> > +// Compute Express Link Specification Revision: 1.1 - Chapter 7.1.1 - 
> > Table 58
> > +// (subject to change as per CXL assigned Vendor ID)
> > +//
> > +#define INTEL_CXL_DVSEC_VENDOR_ID   
> > 0x8086
> 
> This is Cxl11.h - surely this should be CXL_DVSEC_VENDOR_ID_INTEL?

Ashraf: is it defined in spec?

> 
> > +
> > +//
> > +// CXL Flex Bus Device default device and function number
> > +// Compute Express Link Specification Revision: 1.1 - Chapter 7.1.1
> > +//
> > +#define CXL_DEV_DEV 0
> > +#define CXL_DEV_FUNC0
> > +
> > +//
> > +// Ensure proper structure formats
> > +//
> > +#pragma pack(1)
> 
> And this pragma has no function whatsoever with regards to any of the
> register definition structs below. It would be much better if the
> structs requiring packing (_DEVICE, _PORT, ...) were grouped together
> and only those were given this treatment.
> 
> #pragma pack(1) is *not* a safe default.
> 

I know pack(1) is for the compact structure layout. 

> > +
> > +///
> > +/// The PCIe DVSEC for Flex Bus Device
> > +///@{
> > +typedef union {
> > +  struct {
> > +UINT16 CacheCapable : 1; // 
> > bit 0
> > +UINT16 IoCapable: 1; // 
> > bit 1
> > +UINT16 MemCapable   : 1; // 
> > bit 2
> > +UINT16 MemHwInitMode: 1; // 
> > bit 3
> > +UINT16 HdmCount

Re: [edk2-devel] [PATCH v5 4/5] BaseTools: Compile AML bytecode arrays into .obj file

2020-07-27 Thread Liming Gao
Leif:
  VFR file has the similar case. VFR is converted to xxx.c, then compile it to 
obj file. 

Bob:
  Has BaseTools such detection if VFR and C source file have the same file name?

Thanks
Liming
> -Original Message-
> From: Leif Lindholm 
> Sent: Monday, July 27, 2020 9:58 PM
> To: devel@edk2.groups.io; pierre.gond...@arm.com; Masahisa Kojima 
> 
> Cc: sami.muja...@arm.com; tomas.pi...@arm.com; Feng, Bob C 
> ; Gao, Liming ; Ard
> Biesheuvel 
> Subject: Re: [edk2-devel] [PATCH v5 4/5] BaseTools: Compile AML bytecode 
> arrays into .obj file
> 
> Hi Pierre, (+Masahisa)
> 
> This commit (0a4aa20e8d44) made for an exciting start to my week.
> 
> Socionext's Developerbox failed to build for me, with the spectacular
> error message:
> 
> /usr/lib/gcc-cross/aarch64-linux-gnu/8/../../../../aarch64-linux-gnu/bin/ld:
> DWARF error: could not find abbrev number 5912
> /tmp/ccKt4gaM.ltrans0.ltrans.o: in function `RegisterDevices':
> :(.text.RegisterDevices+0xb0): undefined reference to
> `RegisterEmmc'
> 
> GCC49 (without lto) and CLANG38 profiles give much the same result,
> with slightly less esoteric messages.
> 
> The reason for this turned out to be that edk2-platforms
> Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/ has both an Emmc.asl
> and an Emmc.c file, which after this patch both generate an Emmc.obj
> in the same output directory.
> 
> I think the correct course of action is to fix this in the SynQuacer
> driver, but I am reporting it here so we get it logged in the list
> archives.
> 
> It would of course be good if the build system could detect and warn
> over cases like this, rather than silently overwriting existing object
> files.
> 
> Masahisa - since Ard is still on holiday, could you create a patch and
> send out for me to review? Either one of the files needs to be
> renamed, or we need to move the .asl files (Emmc.asl and Optee.asl)
> into a subdirectory.
> 
> Best Regards,
> 
> Leif
> 
> On Wed, Jul 01, 2020 at 15:06:03 +0100, PierreGondois wrote:
> > From: Pierre Gondois 
> >
> > The AmlToHex script and Posix/WindowsLike wrappers convert
> > an AML file to a .hex file, containing a C array storing
> > AML bytecode. This ".hex" file can then be included in a
> > C file, allowing to access the AML bytecode from this C
> > file.
> >
> > The EDK2 build system doesn't allow to a depict dependency
> > orders between files of different languages. For instance,
> > in a module containing a ".c" file and a ".asl", the ".c"
> > file may or may not be built prior to the ".asl" file.
> > This prevents any inclusion of a generated ".hex" in a
> > ".c" file since this later ".hex" file may or may not
> > have been created yet.
> >
> > This patch modifies the AmlToC script to generate a C file
> > instead of a ".hex" file.
> > It also adds the generation of an intermediate ".amli" file
> > when compiling an ASL file, and adds a rule to convert this
> > ".amli" to a C file.
> >
> > This allows to generate a C file containing the AML bytecode
> > from an ASL file. This C file will then be handled by the EDK2
> > build system to generate an object file.
> > Thus, no file inclusion will be required anymore. The C file
> > requiring the AML bytecode as a C array, and the ASL file,
> > will be compiled independently. The C array must be defined
> > as an external symbol. The linker is resolving the
> > reference to the C array symbol.
> >
> > To summarize, the flow goes as:
> >  -1. ASL file is compiled to AML;
> >  -2. AML file is copied to a ".amli" intermediate file;
> >  -3. EDK2 build system applies the rule relevant to ".amli"
> >  files. This is, calling the "AmlToC" script, generating
> >  a C file from the ".amli" file;
> >  -4. EDK2 build system applies the rule relevant to C files.
> >  This is creating an object file.
> >  -5. EDK2 build system links the object file containing the
> >  AML bytecode with the object file requiring it.
> >
> > Signed-off-by: Pierre Gondois 
> > Suggested-by: Tomas Pilar 
> > ---
> >
> > The changes can be seen at: 
> > https://github.com/PierreARM/edk2/commits/803_Compile_AML_bytecode_array_into_OBJ_file_v5
> >
> > Notes:
> > v1:
> >  - Add a new rule to the build_rule.template file to
> >generate ".obj" files from .asl files, and modify
> >the AmlToC script accordingly. [Pierre]
> > v2:
> >  - Restrict the rule to DXE_DRIVER. This allows to build
> >the OvmfPkg, which was not the case in v1. [Pierre]
> > v3:
> >  - Changed "Signed-off-by" to "Suggested-by". [Bob]
> > v4:
> > - No modification. Re-sending the patch with base64
> >   encoding to conserve the right line endings. [Bob]
> > v5:
> >  - No modification. [Pierre]
> >
> >  BaseTools/Conf/build_rule.template   | 15 +++-
> >  BaseTools/Source/Python/AmlToC/AmlToC.py | 82 
> >  2 files changed, 47 insertions(+), 50 deletions(-)
> >
> > diff --git a/BaseTools/Conf/build_rule.template 
> > 

Re: [edk2-devel] [PATCH v8 0/9] Add new feature that evacuate temporary to permanent memory (CVE-2019-11098)

2020-07-26 Thread Liming Gao
Reviewed-by: Liming Gao  for this patch set. 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Guomin Jiang
Sent: 2020年7月24日 17:55
To: devel@edk2.groups.io
Subject: [edk2-devel] [PATCH v8 0/9] Add new feature that evacuate temporary to 
permanent memory (CVE-2019-11098)

The TOCTOU vulnerability allow that the physical present person to replace the 
code with the normal BootGuard check and PCR0 value.
The issue occur when BootGuard measure IBB and access flash code after NEM 
disable.
The reason why we access the flash code is that we have some pointer to flash.
To avoid this vulnerability, we need to convert those pointers, the patch 
series do this work and make sure that no code will access flash address.

v2:
Create gEdkiiMigratedFvInfoGuid HOB and add 
PcdMigrateTemporaryRamFirmwareVolumes to control whole feature.

v3:
Remove changes which is not related with the feature and disable the feature in 
virtual platform.

v4:
Disable the feature as default, Copy the Tcg2Pei behavior to TcgPei

v5:
Initialize local variable Shadow and return EFI_ABORTED when RepublishSecPpi 
not installed.

v6:
Avoid redundant shadow PEIM when enable Migrated PCD.

v7:
Change patch 10/10 to enhance the logic.

v8:
Drop the patch#10 added in v6 and v7, the optimization will be considered 
future.

Guomin Jiang (6):
  MdeModulePkg: Add new PCD to control the evacuate temporary memory
feature (CVE-2019-11098)
  MdeModulePkg/Core: Create Migrated FV Info Hob for calculating hash
(CVE-2019-11098)
  SecurityPkg/Tcg2Pei: Use Migrated FV Info Hob for calculating hash
(CVE-2019-11098)
  UefiCpuPkg/CpuMpPei: Enable paging and set NP flag to avoid TOCTOU
(CVE-2019-11098)
  UefiCpuPkg: Correct some typos.
  SecurityPkg/TcgPei: Use Migrated FV Info Hob for calculating hash
(CVE-2019-11098)

Michael Kubacki (3):
  MdeModulePkg/PeiCore: Enable T-RAM evacuation in PeiCore
(CVE-2019-11098)
  UefiCpuPkg/CpuMpPei: Add GDT migration support (CVE-2019-11098)
  UefiCpuPkg/SecMigrationPei: Add initial PEIM (CVE-2019-11098)

 MdeModulePkg/MdeModulePkg.dec |  12 +
 UefiCpuPkg/UefiCpuPkg.dec |   3 +
 UefiCpuPkg/UefiCpuPkg.dsc |   1 +
 MdeModulePkg/Core/Pei/PeiMain.inf |   3 +
 SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf   |   1 +
 SecurityPkg/Tcg/TcgPei/TcgPei.inf |   1 +
 UefiCpuPkg/CpuMpPei/CpuMpPei.inf  |   4 +
 UefiCpuPkg/SecCore/SecCore.inf|   2 +
 .../SecMigrationPei/SecMigrationPei.inf   |  68 +++
 MdeModulePkg/Core/Pei/PeiMain.h   | 170 +++
 MdeModulePkg/Include/Guid/MigratedFvInfo.h|  22 +
 UefiCpuPkg/CpuMpPei/CpuMpPei.h|  14 +-
 UefiCpuPkg/Include/Ppi/RepublishSecPpi.h  |  54 +++
 .../CpuExceptionCommon.h  |   4 +-
 UefiCpuPkg/SecCore/SecMain.h  |   1 +
 UefiCpuPkg/SecMigrationPei/SecMigrationPei.h  | 158 +++  
MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 445 +-
 MdeModulePkg/Core/Pei/Image/Image.c   | 130 -
 MdeModulePkg/Core/Pei/Memory/MemoryServices.c |  82 
 MdeModulePkg/Core/Pei/PeiMain/PeiMain.c   |  22 +-
 MdeModulePkg/Core/Pei/Ppi/Ppi.c   | 286 +++
 SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c |  31 +-
 SecurityPkg/Tcg/TcgPei/TcgPei.c   |  29 +-
 UefiCpuPkg/CpuMpPei/CpuMpPei.c|  37 ++
 UefiCpuPkg/CpuMpPei/CpuPaging.c   |  42 +-
 .../Ia32/ArchExceptionHandler.c   |   4 +-
 .../SecPeiCpuException.c  |   2 +-
 .../X64/ArchExceptionHandler.c|   4 +-
 UefiCpuPkg/SecCore/SecMain.c  |  26 +-
 UefiCpuPkg/SecMigrationPei/SecMigrationPei.c  | 385 +++
 MdeModulePkg/MdeModulePkg.uni |   6 +
 .../SecMigrationPei/SecMigrationPei.uni   |  13 +
 32 files changed, 2032 insertions(+), 30 deletions(-)  create mode 100644 
UefiCpuPkg/SecMigrationPei/SecMigrationPei.inf
 create mode 100644 MdeModulePkg/Include/Guid/MigratedFvInfo.h
 create mode 100644 UefiCpuPkg/Include/Ppi/RepublishSecPpi.h
 create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.h
 create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.c
 create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.uni

--
2.25.1.windows.1





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

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



Re: [edk2-devel] [PATCH V4 0/2] CXL Specification Registers

2020-07-26 Thread Liming Gao
https://github.com/tianocore/edk2/pull/828 for this change, be merged. 

-Original Message-
From: Gao, Liming 
Sent: 2020年7月27日 10:36
To: Javeed, Ashraf ; devel@edk2.groups.io
Cc: Kinney, Michael D 
Subject: RE: [PATCH V4 0/2] CXL Specification Registers

This version is good to me. Reviewed-by: Liming Gao 

-Original Message-
From: Javeed, Ashraf  
Sent: 2020年7月25日 2:26
To: devel@edk2.groups.io
Cc: Kinney, Michael D ; Gao, Liming 

Subject: [PATCH V4 0/2] CXL Specification Registers

These 2 patches introduces the Compute Express Link (CXL) Specificition defined 
registers.
The Cxl11.h has the actual register definitions of the CXL Specification 
Revision 1.1; and the Cxl.h is the main header file to include all versions of 
the CXL register definitions.

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

Signed-off-by: Ashraf Javeed 
Cc: Michael D Kinney 
Cc: Liming Gao 
--

Ashraf Javeed (2):
  MdePkg/Include/IndustryStandard: CXL 1.1 Registers
  MdePkg/Include/IndustryStandard: Main CXL header

 MdePkg/Include/IndustryStandard/Cxl.h   |  22 ++
 MdePkg/Include/IndustryStandard/Cxl11.h | 569 
+
 MdePkg/Include/IndustryStandard/Pci.h   |   6 ++
 3 files changed, 593 insertions(+), 4 deletions(-)  create mode 100644 
MdePkg/Include/IndustryStandard/Cxl.h
 create mode 100644 MdePkg/Include/IndustryStandard/Cxl11.h

--
2.21.0.windows.1


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

View/Reply Online (#63282): https://edk2.groups.io/g/devel/message/63282
Mute This Topic: https://groups.io/mt/75771995/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-26 Thread Liming Gao
Shenglei:
  I have one comment. Seemly, LicenseCheck_plug_in.yaml copyright may be Intel 
one. 

  Reviewed-by: Liming Gao  for this patch set. 

Thanks
Liming
-Original Message-
From: Zhang, Shenglei  
Sent: 2020年7月20日 16:37
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 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   | 118 ++
 .../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, 194 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 (#63281): https://edk2.groups.io/g/devel/message/63281
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 V4 0/2] CXL Specification Registers

2020-07-26 Thread Liming Gao
This version is good to me. Reviewed-by: Liming Gao 

-Original Message-
From: Javeed, Ashraf  
Sent: 2020年7月25日 2:26
To: devel@edk2.groups.io
Cc: Kinney, Michael D ; Gao, Liming 

Subject: [PATCH V4 0/2] CXL Specification Registers

These 2 patches introduces the Compute Express Link (CXL) Specificition defined 
registers.
The Cxl11.h has the actual register definitions of the CXL Specification 
Revision 1.1; and the Cxl.h is the main header file to include all versions of 
the CXL register definitions.

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

Signed-off-by: Ashraf Javeed 
Cc: Michael D Kinney 
Cc: Liming Gao 
--

Ashraf Javeed (2):
  MdePkg/Include/IndustryStandard: CXL 1.1 Registers
  MdePkg/Include/IndustryStandard: Main CXL header

 MdePkg/Include/IndustryStandard/Cxl.h   |  22 ++
 MdePkg/Include/IndustryStandard/Cxl11.h | 569 
+
 MdePkg/Include/IndustryStandard/Pci.h   |   6 ++
 3 files changed, 593 insertions(+), 4 deletions(-)  create mode 100644 
MdePkg/Include/IndustryStandard/Cxl.h
 create mode 100644 MdePkg/Include/IndustryStandard/Cxl11.h

--
2.21.0.windows.1


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

View/Reply Online (#63279): https://edk2.groups.io/g/devel/message/63279
Mute This Topic: https://groups.io/mt/75771995/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-26 Thread Liming Gao
Rebecca:
  I see Shenglei patch. I plan to finish review early of this week, then merge 
this patch set, and revert the original change in PatchCheck.py. 

Thanks
Liming
-Original Message-
From: Rebecca Cran  
Sent: 2020年7月25日 9:38
To: devel@edk2.groups.io; Zhang, Shenglei 
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: Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci

On 7/20/20 2:36 AM, Zhang, Shenglei wrote:
> 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.

Has there been any progress on this? I'm waiting for it because it's required 
for my bhyve changes.


-- 

Rebecca Cran



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

View/Reply Online (#63278): https://edk2.groups.io/g/devel/message/63278
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] MdePkg Base.h: Delete prototype for __builtin_return_address

2020-07-26 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: Jessica Clarke  
Sent: 2020年7月27日 9:59
To: devel@edk2.groups.io
Cc: Jessica Clarke ; Gao, Liming ; 
l...@nuviainc.com; Kinney, Michael D 
Subject: [PATCH v2] MdePkg Base.h: Delete prototype for __builtin_return_address

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

Being a compiler builtin, the type of __builtin_return_address is already known 
to the compiler so no prototype is needed. Clang also errors out when 
redeclaring certain builtins like this[1], though currently only for ones with 
custom type checking. At the moment, __builtin_return_address does not use 
custom type checking and so does not trigger this error, however, the CHERI 
fork of LLVM, which will form the basis of the toolchain for Arm's experimental 
Morello platform, does use custom type checking for it, and so gives an error. 
Thus, simply delete the unnecessary line.

[1] llvm/llvm-project@41af97137572ad6d4dafc872e7ecf6bbb08d4984

Cc: Leif Lindholm 
Signed-off-by: Jessica Clarke 
---
Changes in v2:
 * Shortened [1] reference to fit column limit. The bug report has the
   full URL already, and this will still link correctly on GitHub.

 MdePkg/Include/Base.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 
85a091b9d5..8e4271f6ea 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -1273,7 +1273,6 @@ typedef UINTN RETURN_STATUS;
   **/
   #define RETURN_ADDRESS(L) ((L == 0) ? _ReturnAddress() : (VOID *) 0)
 #elif defined (__GNUC__) || defined (__clang__)
-  void * __builtin_return_address (unsigned int level);
   /**
 Get the return address of the calling function.
 
--
2.20.1


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

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



Re: [edk2-devel] [PATCH v11 06/46] MdePkg/BaseLib: Add support for the XGETBV instruction

2020-07-23 Thread Liming Gao
Tom:

> -Original Message-
> From: Tom Lendacky 
> Sent: Thursday, July 23, 2020 10:19 PM
> To: Gao, Liming ; Laszlo Ersek ; 
> Liu, Zhiguang ;
> devel@edk2.groups.io
> Cc: Brijesh Singh ; Ard Biesheuvel 
> ; Dong, Eric ; Justen,
> Jordan L ; Kinney, Michael D 
> ; Ni, Ray 
> Subject: Re: [edk2-devel] [PATCH v11 06/46] MdePkg/BaseLib: Add support for 
> the XGETBV instruction
> 
> On 7/22/20 8:16 PM, Gao, Liming wrote:
> > Laszlo:
> >
> > -Original Message-
> > From: Laszlo Ersek 
> > Sent: 2020年7月23日 4:28
> > To: Liu, Zhiguang ; devel@edk2.groups.io; 
> > thomas.lenda...@amd.com
> > Cc: Brijesh Singh ; Ard Biesheuvel 
> > ; Dong, Eric ; Justen,
> Jordan L ; Gao, Liming ; 
> Kinney, Michael D ; Ni, Ray
> 
> > Subject: Re: [edk2-devel] [PATCH v11 06/46] MdePkg/BaseLib: Add support for 
> > the XGETBV instruction
> >
> > On 07/22/20 02:55, Liu, Zhiguang wrote:
> >> Hi Tom,
> >> Nasm is a cross-OS assembly code and can be used in Linux.
> >> So I think we don't need implement the same function in GccInline.c, we 
> >> can just use the nasm file in Linux.
> >
> > I could agree, but this would create an inconsistency with the existent 
> > functions (where both gcc inline assembly and NASM exists).
> > [Liming] Yes. This is clean up task to make the existing ones be 
> > consistent. The new one X86 assembly function (IA32 and X64)
> should follow nasm style.
> 
> I was following what I thought was convention. If you'd like, I can remove
> the "| MSFT" from the .nasm entries in the .inf file and delete (not add)
> the functions in the GccInline.c file.
> 
> Let me know what you would like done.

Yes. This is my suggestion. Only add nasm style, don't touch GccInline.c file. 

Thanks
Liming
> 
> Thanks,
> Tom
> 
> >
> > For example, consider AsmReadEflags():
> > - inline assembly for MSFT IA32 ("Ia32/ReadEflags.c")
> > - NASM for MSFT X64 ("X64/ReadEflags.nasm")
> > - inline assembly for GCC IA32 ("Ia32/GccInline.c")
> > - inline assembly for GCC X64 ("X64/GccInline.c")
> >
> > The source file "X64/ReadEflags.nasm" could be used with GCC X64 too, not 
> > just with MSFT X64.
> >
> > So why do we have the gcc inline implementation for AsmReadEflags() in 
> > "X64/GccInline.c", in the first place?
> > [Liming] This is the history. Nasm migration replaces .S and .asm. But, the 
> > remaining one in C source is not replaced.
> >
> > Thanks
> > Liming
> > The pattern that a contributor is supposed to follow is not clear to me.
> >
> > Thanks,
> > Laszlo
> >
> >>> -Original Message-
> >>> From: devel@edk2.groups.io  On Behalf Of
> >>> Lendacky, Thomas
> >>> Sent: Wednesday, July 22, 2020 5:19 AM
> >>> To: devel@edk2.groups.io
> >>> Cc: Brijesh Singh ; Ard Biesheuvel
> >>> ; Dong, Eric ; Justen,
> >>> Jordan L ; Laszlo Ersek
> >>> ; Gao, Liming ; Kinney,
> >>> Michael D ; Ni, Ray 
> >>> Subject: [edk2-devel] [PATCH v11 06/46] MdePkg/BaseLib: Add support
> >>> for the XGETBV instruction
> >>>
> >>> From: Tom Lendacky 
> >>>
> >>> BZ:
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2198d
> ata=02%7C01%7Cthomas.lendacky%40amd.com%7C7cbbd5ae7ded4963ad1e08d82ea5ff27%7C3dd8961fe4884e608e11a82d994e183d%
> 7C0%7C0%7C637310637778599307sdata=GPutAlSGucRGFnjU4rxWXfeiy4fJhZHHZe5YJ8hhPSQ%3Dreserved=0
> >>>
> >>> Under SEV-ES, a CPUID instruction requires the current value of the
> >>> XCR0 register. In order to retrieve that value, the XGETBV
> >>> instruction needs to be executed.
> >>>
> >>> Provide the necessary support to execute the XGETBV instruction.
> >>>
> >>> Cc: Michael D Kinney 
> >>> Cc: Liming Gao 
> >>> Signed-off-by: Tom Lendacky 
> >>> ---
> >>>   MdePkg/Library/BaseLib/BaseLib.inf  |  2 ++
> >>>   MdePkg/Include/Library/BaseLib.h| 17 +
> >>>   MdePkg/Library/BaseLib/Ia32/GccInline.c | 28 
> >>> MdePkg/Library/BaseLib/X64/GccInline.c  | 30 ++
> >>> MdePkg/Library/BaseLib/Ia32/XGetBv.nasm | 31
> >>> ++
> >>>   MdePkg/Library/BaseLib/X64/XGetBv.nasm  | 34
> >>> +
> >>> 

Re: [edk2-devel] [PATCH V3 1/2] MdePkg/Include/IndustryStandard: CXL 1.1 Registers

2020-07-23 Thread Liming Gao
Ashraf:

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Javeed, Ashraf
Sent: 2020年7月22日 23:22
To: devel@edk2.groups.io
Cc: Kinney, Michael D ; Gao, Liming 

Subject: [edk2-devel] [PATCH V3 1/2] MdePkg/Include/IndustryStandard: CXL 1.1 
Registers

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2611

Register definitions from chapter 7 of Compute Express Link Specification 
Revision 1.1 are ported into the new Cxl11.h.
The CXL Flex Bus registers are based on the PCIe Extended Capability DVSEC 
structure header, led to the inclusion of upgraded Pci.h.

Signed-off-by: Ashraf Javeed 
Cc: Michael D Kinney 
Cc: Liming Gao 
--

V2: Indentation and double declaration fix, copyright date update

V3: Copyright date fix
---
 MdePkg/Include/IndustryStandard/Cxl11.h | 569 
+
 MdePkg/Include/IndustryStandard/Pci.h   |   6 ++
 2 files changed, 571 insertions(+), 4 deletions(-)

diff --git a/MdePkg/Include/IndustryStandard/Cxl11.h 
b/MdePkg/Include/IndustryStandard/Cxl11.h
new file mode 100644
index 00..a261bb3fae
--- /dev/null
+++ b/MdePkg/Include/IndustryStandard/Cxl11.h
@@ -0,0 +1,569 @@
+/** @file
+  CXL 1.1 Register definitions
+
+  This file contains the register definitions based on the Compute 
+ Express Link
+  (CXL) Specification Revision 1.1.
+
+Copyright (c) 2020, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _CXL11_H_
+#define _CXL11_H_
+
+#include 
+//
+// DVSEC Vendor ID
+// Compute Express Link Specification Revision: 1.1 - Chapter 7.1.1 - 
+Table 58 // (subject to change as per CXL assigned Vendor ID) //
+#define INTEL_CXL_DVSEC_VENDOR_ID   0x8086
+
+//
+// CXL Flex Bus Device default device and function number // Compute 
+Express Link Specification Revision: 1.1 - Chapter 7.1.1 //
+#define CXL_DEV_DEV 0
+#define CXL_DEV_FUNC0
+
+//
+// Ensure proper structure formats
+//
+#pragma pack(1)
+
+///
+/// The PCIe DVSEC for Flex Bus Device
+///@{
+typedef union {
+  struct {
+UINT16 CacheCapable : 1; // bit 0
+UINT16 IoCapable: 1; // bit 1
+UINT16 MemCapable   : 1; // bit 2
+UINT16 MemHwInitMode: 1; // bit 3
+UINT16 HdmCount : 2; // bit 
4..5
+UINT16 Reserved1: 8; // bit 
6..13
+UINT16 ViralCapable : 1; // bit 14
+UINT16 Reserved2: 1; // bit 15
+  }Bits;

This line should have one space between } and Bits. Otherwise, ECC will report 
the issue. 
Please fix it in this header file. 

}Bits ==> } Bits

Thanks
Liming
+  UINT16Uint16;
+} CXL_DVSEC_FLEX_BUS_DEVICE_CAPABILITY;
+
+typedef union {
+  struct {
+UINT16 CacheEnable  : 1; // bit 0
+UINT16 IoEnable : 1; // bit 1
+UINT16 MemEnable: 1; // bit 2
+UINT16 CacheSfCoverage  : 5; // bit 
3..7
+UINT16 CacheSfGranularity   : 3; // bit 
8..10
+UINT16 CacheCleanEviction   : 1; // bit 11
+UINT16 Reserved1: 2; // bit 
12..13
+UINT16 ViralEnable  : 1; // bit 14
+UINT16 Reserved2: 1; // bit 15
+  }Bits;
+  UINT16Uint16;
+} CXL_DVSEC_FLEX_BUS_DEVICE_CONTROL;
+
+typedef union {
+  struct {
+UINT16 Reserved1: 14; // bit 
0..13
+UINT16 ViralStatus  : 1;  // bit 14
+UINT16 Reserved2: 1;  // bit 15
+  }Bits;
+  UINT16Uint16;
+} CXL_DVSEC_FLEX_BUS_DEVICE_STATUS;
+
+typedef union {
+  struct {
+UINT16 Reserv

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

2020-07-23 Thread Liming Gao



-Original Message-
From: devel@edk2.groups.io  On Behalf Of Marcello 
Sylvester Bauer
Sent: 2020年7月22日 21:16
To: devel@edk2.groups.io
Cc: Patrick Rudolph ; Christian Walter 
; Kinney, Michael D 
; Gao, Liming 
Subject: [edk2-devel] [PATCH v3 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..02e736a01126 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|0x0FFF|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

[Liming] 256M is 0x1000. PCD value is 0x0FFF. Does it mean that the 
default value is 256M - 1?

Thanks
Liming

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); } +/**+  Gets the 
size of PCI Express.++  This internal functions retrieves PCI Express Base Size 
via a PCD entry+  PcdPciExpressBaseSize.++  @return The base size of PCI 
Express.++**/+STATIC+UINTN+PcdPciExpressBaseSize (+  VOID+  )+{+  return 
(UINTN) PcdGet64 (PcdPciExpressBaseSize);+}+ /**   Reads an 8-bit PCI 
configuration register. @@ -91,7 +110,8 @@ GetPciExpressBaseAddress (
   @param  Address The address that encodes the PCI Bus, Device, Function and   
Register. -  @return The read value from the PCI configuration 
register.+  @retval 0xFF  Invalid PCI address.+  @retval other The read value 
from the PCI configuration register.  **/ UINT8@@ -101,6 +121,9 @@ 
PciExpressRead8 (
   ) {   ASSERT_INVALID_PCI_AD

Re: [edk2-devel] [PATCH V3 2/2] MdePkg/Include/IndustryStandard: Main CXL header

2020-07-23 Thread Liming Gao
Asharf:


-Original Message-
From: Javeed, Ashraf  
Sent: 2020年7月22日 23:22
To: devel@edk2.groups.io
Cc: Kinney, Michael D ; Gao, Liming 

Subject: [PATCH V3 2/2] MdePkg/Include/IndustryStandard: Main CXL header

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2611

Introducing the Cxl.h as the main header file to support all versions of 
Compute Express Link Specification register definitions.

Signed-off-by: Ashraf Javeed 
Cc: Michael D Kinney 
Cc: Liming Gao 
--

V2: Indentation and double declaration fix, copyright date update

V3: Copyright date fix
---
 MdePkg/Include/IndustryStandard/Cxl.h | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/MdePkg/Include/IndustryStandard/Cxl.h 
b/MdePkg/Include/IndustryStandard/Cxl.h
new file mode 100644
index 00..632aa146d0
--- /dev/null
+++ b/MdePkg/Include/IndustryStandard/Cxl.h
@@ -0,0 +1,22 @@
+/** @file
+  Support for the latest CXL standard
+
+  The main header to reference all versions of CXL Base specification 
+ registers  from the MDE

Does MDE means MdePkg? I think "from the MDE" can be removed. 
With this change, Reviewed-by: Liming Gao 

Thanks
Liming
+
+Copyright (c) 2020, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _CXL_MAIN_H_
+#define _CXL_MAIN_H_
+
+#include 
+//
+// CXL assigned new Vendor ID
+//
+#define CXL_DVSEC_VENDOR_ID 0x1E98
+
+#endif
+
--
2.21.0.windows.1


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

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



Re: [edk2-devel] [PATCH v11 03/46] MdePkg: Add the MSR definition for the GHCB register

2020-07-23 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Lendacky, Thomas
Sent: 2020年7月22日 5:19
To: devel@edk2.groups.io
Cc: Brijesh Singh ; Ard Biesheuvel 
; Dong, Eric ; Justen, Jordan L 
; Laszlo Ersek ; Gao, Liming 
; Kinney, Michael D ; Ni, Ray 

Subject: [edk2-devel] [PATCH v11 03/46] MdePkg: Add the MSR definition for the 
GHCB register

From: Tom Lendacky 

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198

For SEV-ES, the GHCB page address is stored in the GHCB MSR register 
(0xc0010130). Define the register and the format used for register during GHCB 
protocol negotiation.

Cc: Michael D Kinney 
Cc: Liming Gao 
Signed-off-by: Tom Lendacky 
---
 MdePkg/Include/Register/Amd/Fam17Msr.h | 46 ++
 1 file changed, 46 insertions(+)

diff --git a/MdePkg/Include/Register/Amd/Fam17Msr.h 
b/MdePkg/Include/Register/Amd/Fam17Msr.h
index 6ef45a9b21d3..e4db09c5184c 100644
--- a/MdePkg/Include/Register/Amd/Fam17Msr.h
+++ b/MdePkg/Include/Register/Amd/Fam17Msr.h
@@ -17,6 +17,52 @@
 #ifndef __FAM17_MSR_H__
 #define __FAM17_MSR_H__
 
+/**
+  Secure Encrypted Virtualization - Encrypted State (SEV-ES) GHCB 
+register
+
+**/
+#define MSR_SEV_ES_GHCB0xc0010130
+
+/**
+  MSR information returned for #MSR_SEV_ES_GHCB **/ typedef union {
+  struct {
+UINT32  Function:12;
+UINT32  Reserved1:20;
+UINT32  Reserved2:32;
+  } GhcbInfo;
+
+  struct {
+UINT8   Reserved[3];
+UINT8   SevEncryptionBitPos;
+UINT16  SevEsProtocolMin;
+UINT16  SevEsProtocolMax;
+  } GhcbProtocol;
+
+  struct {
+UINT32  Function:12;
+UINT32  ReasonCodeSet:4;
+UINT32  ReasonCode:8;
+UINT32  Reserved1:8;
+UINT32  Reserved2:32;
+  } GhcbTerminate;
+
+  VOID*Ghcb;
+
+  UINT64  GhcbPhysicalAddress;
+} MSR_SEV_ES_GHCB_REGISTER;
+
+#define GHCB_INFO_SEV_INFO 1
+#define GHCB_INFO_SEV_INFO_GET 2
+#define GHCB_INFO_CPUID_REQUEST4
+#define GHCB_INFO_CPUID_RESPONSE   5
+#define GHCB_INFO_TERMINATE_REQUEST256
+
+#define GHCB_TERMINATE_GHCB0
+#define GHCB_TERMINATE_GHCB_GENERAL0
+#define GHCB_TERMINATE_GHCB_PROTOCOL   1
+
 /**
   Secure Encrypted Virtualization (SEV) status register
 
--
2.27.0





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

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



Re: [edk2-devel] [PATCH v11 04/46] MdePkg: Add a structure definition for the GHCB

2020-07-23 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: Tom Lendacky  
Sent: 2020年7月22日 5:19
To: devel@edk2.groups.io
Cc: Brijesh Singh ; Ard Biesheuvel 
; Dong, Eric ; Justen, Jordan L 
; Laszlo Ersek ; Gao, Liming 
; Kinney, Michael D ; Ni, Ray 

Subject: [PATCH v11 04/46] MdePkg: Add a structure definition for the GHCB

From: Tom Lendacky 

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198

The GHCB is used by an SEV-ES guest for communicating between the guest and the 
hypervisor. Create the GHCB definition as defined by the GHCB protocol 
definition.

Cc: Michael D Kinney 
Cc: Liming Gao 
Signed-off-by: Tom Lendacky 
---
 MdePkg/Include/Register/Amd/Ghcb.h | 166 +
 1 file changed, 166 insertions(+)
 create mode 100644 MdePkg/Include/Register/Amd/Ghcb.h

diff --git a/MdePkg/Include/Register/Amd/Ghcb.h 
b/MdePkg/Include/Register/Amd/Ghcb.h
new file mode 100644
index ..54a80da0f6d7
--- /dev/null
+++ b/MdePkg/Include/Register/Amd/Ghcb.h
@@ -0,0 +1,166 @@
+/** @file
+  Guest-Hypervisor Communication Block (GHCB) Definition.
+
+  Provides data types allowing an SEV-ES guest to interact with the 
+ hypervisor  using the GHCB protocol.
+
+  Copyright (C) 2020, Advanced Micro Devices, Inc. All rights 
+ reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+  @par Specification Reference:
+  SEV-ES Guest-Hypervisor Communication Block Standardization
+
+**/
+
+#ifndef __GHCB_H__
+#define __GHCB_H__
+
+#include 
+#include 
+#include 
+
+#define UD_EXCEPTION  6
+#define GP_EXCEPTION 13
+#define VC_EXCEPTION 29
+
+#define GHCB_VERSION_MIN 1
+#define GHCB_VERSION_MAX 1
+
+#define GHCB_STANDARD_USAGE  0
+
+//
+// SVM Exit Codes
+//
+#define SVM_EXIT_DR7_READ   0x27ULL
+#define SVM_EXIT_DR7_WRITE  0x37ULL
+#define SVM_EXIT_RDTSC  0x6EULL
+#define SVM_EXIT_RDPMC  0x6FULL
+#define SVM_EXIT_CPUID  0x72ULL
+#define SVM_EXIT_INVD   0x76ULL
+#define SVM_EXIT_IOIO_PROT  0x7BULL
+#define SVM_EXIT_MSR0x7CULL
+#define SVM_EXIT_VMMCALL0x81ULL
+#define SVM_EXIT_RDTSCP 0x87ULL
+#define SVM_EXIT_WBINVD 0x89ULL
+#define SVM_EXIT_MONITOR0x8AULL
+#define SVM_EXIT_MWAIT  0x8BULL
+#define SVM_EXIT_NPF0x400ULL
+
+//
+// VMG Special Exit Codes
+//
+#define SVM_EXIT_MMIO_READ  0x8001ULL
+#define SVM_EXIT_MMIO_WRITE 0x8002ULL
+#define SVM_EXIT_NMI_COMPLETE   0x8003ULL
+#define SVM_EXIT_AP_RESET_HOLD  0x8004ULL #define 
+SVM_EXIT_AP_JUMP_TABLE  0x8005ULL
+#define SVM_EXIT_UNSUPPORTED0x8000ULL
+
+//
+// IOIO Exit Information
+//
+#define IOIO_TYPE_STR   BIT2
+#define IOIO_TYPE_IN1
+#define IOIO_TYPE_INS   (IOIO_TYPE_IN | IOIO_TYPE_STR)
+#define IOIO_TYPE_OUT   0
+#define IOIO_TYPE_OUTS  (IOIO_TYPE_OUT | IOIO_TYPE_STR)
+
+#define IOIO_REPBIT3
+
+#define IOIO_ADDR_64BIT9
+#define IOIO_ADDR_32BIT8
+#define IOIO_ADDR_16BIT7
+
+#define IOIO_DATA_32BIT6
+#define IOIO_DATA_16BIT5
+#define IOIO_DATA_8 BIT4
+#define IOIO_DATA_MASK  (BIT6 | BIT5 | BIT4)
+#define IOIO_DATA_OFFSET4
+#define IOIO_DATA_BYTES(x)  (((x) & IOIO_DATA_MASK) >> 
+IOIO_DATA_OFFSET)
+
+#define IOIO_SEG_ES 0
+#define IOIO_SEG_DS (BIT11 | BIT10)
+
+
+typedef enum {
+  GhcbCpl  = 25,
+  GhcbRflags   = 46,
+  GhcbRip,
+  GhcbRsp  = 59,
+  GhcbRax  = 63,
+  GhcbRcx  = 97,
+  GhcbRdx,
+  GhcbRbx,
+  GhcbRbp  = 101,
+  GhcbRsi,
+  GhcbRdi,
+  GhcbR8,
+  GhcbR9,
+  GhcbR10,
+  GhcbR11,
+  GhcbR12,
+  GhcbR13,
+  GhcbR14,
+  GhcbR15,
+  GhcbXCr0 = 125,
+} GHCB_REGISTER;
+
+typedef PACKED struct {
+  UINT8  Reserved1[203];
+  UINT8  Cpl;
+  UINT8  Reserved2[148];
+  UINT64 Dr7;
+  UINT8  Reserved3[144];
+  UINT64 Rax;
+  UINT8  Reserved4[264];
+  UINT64 Rcx;
+  UINT64 Rdx;
+  UINT64 Rbx;
+  UINT8  Reserved5[112];
+  UINT64 SwExitCode;
+  UINT64 SwExitInfo1;
+  UINT64 SwExitInfo2;
+  UINT64 SwScratch;
+  UINT8  Reserved6[56];
+  UINT64 XCr0;
+  UINT8  ValidBitmap[16];
+  UINT64 X87StateGpa;
+  UINT8  Reserved7[1016];
+} GHCB_SAVE_AREA;
+
+typedef PACKED struct {
+  GHCB_SAVE_AREA SaveArea;
+  UINT8  SharedBuffer[2032];
+  UINT8  Reserved1[10];
+  UINT16 ProtocolVersion;
+  UINT32 GhcbUsage;
+} GHCB;
+
+typedef union {
+  struct {
+UINT32  Lower32Bits;
+UINT32  Upper32Bits;
+  } Elements;
+
+  UINT64Uint64;
+} GHCB_EXIT_INFO;
+
+typedef union {
+  struct {
+UINT32  Vector:8;
+UINT

Re: [edk2-devel] [PATCH v11 06/46] MdePkg/BaseLib: Add support for the XGETBV instruction

2020-07-22 Thread Liming Gao
Laszlo:

-Original Message-
From: Laszlo Ersek  
Sent: 2020年7月23日 4:28
To: Liu, Zhiguang ; devel@edk2.groups.io; 
thomas.lenda...@amd.com
Cc: Brijesh Singh ; Ard Biesheuvel 
; Dong, Eric ; Justen, Jordan L 
; Gao, Liming ; Kinney, 
Michael D ; Ni, Ray 
Subject: Re: [edk2-devel] [PATCH v11 06/46] MdePkg/BaseLib: Add support for the 
XGETBV instruction

On 07/22/20 02:55, Liu, Zhiguang wrote:
> Hi Tom,
> Nasm is a cross-OS assembly code and can be used in Linux.
> So I think we don't need implement the same function in GccInline.c, we can 
> just use the nasm file in Linux.

I could agree, but this would create an inconsistency with the existent 
functions (where both gcc inline assembly and NASM exists).
[Liming] Yes. This is clean up task to make the existing ones be consistent. 
The new one X86 assembly function (IA32 and X64) should follow nasm style.

For example, consider AsmReadEflags():
- inline assembly for MSFT IA32 ("Ia32/ReadEflags.c")
- NASM for MSFT X64 ("X64/ReadEflags.nasm")
- inline assembly for GCC IA32 ("Ia32/GccInline.c")
- inline assembly for GCC X64 ("X64/GccInline.c")

The source file "X64/ReadEflags.nasm" could be used with GCC X64 too, not just 
with MSFT X64.

So why do we have the gcc inline implementation for AsmReadEflags() in 
"X64/GccInline.c", in the first place?
[Liming] This is the history. Nasm migration replaces .S and .asm. But, the 
remaining one in C source is not replaced. 

Thanks
Liming
The pattern that a contributor is supposed to follow is not clear to me.

Thanks,
Laszlo

>> -Original Message-
>> From: devel@edk2.groups.io  On Behalf Of 
>> Lendacky, Thomas
>> Sent: Wednesday, July 22, 2020 5:19 AM
>> To: devel@edk2.groups.io
>> Cc: Brijesh Singh ; Ard Biesheuvel 
>> ; Dong, Eric ; Justen, 
>> Jordan L ; Laszlo Ersek 
>> ; Gao, Liming ; Kinney, 
>> Michael D ; Ni, Ray 
>> Subject: [edk2-devel] [PATCH v11 06/46] MdePkg/BaseLib: Add support 
>> for the XGETBV instruction
>>
>> From: Tom Lendacky 
>>
>> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198
>>
>> Under SEV-ES, a CPUID instruction requires the current value of the 
>> XCR0 register. In order to retrieve that value, the XGETBV 
>> instruction needs to be executed.
>>
>> Provide the necessary support to execute the XGETBV instruction.
>>
>> Cc: Michael D Kinney 
>> Cc: Liming Gao 
>> Signed-off-by: Tom Lendacky 
>> ---
>>  MdePkg/Library/BaseLib/BaseLib.inf  |  2 ++
>>  MdePkg/Include/Library/BaseLib.h| 17 +
>>  MdePkg/Library/BaseLib/Ia32/GccInline.c | 28   
>> MdePkg/Library/BaseLib/X64/GccInline.c  | 30 ++  
>> MdePkg/Library/BaseLib/Ia32/XGetBv.nasm | 31
>> ++
>>  MdePkg/Library/BaseLib/X64/XGetBv.nasm  | 34
>> +
>>  6 files changed, 142 insertions(+)
>>  create mode 100644 MdePkg/Library/BaseLib/Ia32/XGetBv.nasm
>>  create mode 100644 MdePkg/Library/BaseLib/X64/XGetBv.nasm
>>
>> diff --git a/MdePkg/Library/BaseLib/BaseLib.inf
>> b/MdePkg/Library/BaseLib/BaseLib.inf
>> index c740a819cacf..e26c0d8cb0ac 100644
>> --- a/MdePkg/Library/BaseLib/BaseLib.inf
>> +++ b/MdePkg/Library/BaseLib/BaseLib.inf
>> @@ -153,6 +153,7 @@ [Sources.Ia32]
>>Ia32/ARShiftU64.c | MSFT
>>Ia32/EnableCache.c | MSFT
>>Ia32/DisableCache.c | MSFT
>> +  Ia32/XGetBv.nasm | MSFT
>>
>>
>>Ia32/GccInline.c | GCC
>> @@ -288,6 +289,7 @@ [Sources.X64]
>>X64/ReadCr2.nasm| MSFT
>>X64/ReadCr0.nasm| MSFT
>>X64/ReadEflags.nasm| MSFT
>> +  X64/XGetBv.nasm | MSFT
>>
>>
>>X64/Non-existing.c
>> diff --git a/MdePkg/Include/Library/BaseLib.h
>> b/MdePkg/Include/Library/BaseLib.h
>> index 8e7b87cbda4e..7edf0051a0a0 100644
>> --- a/MdePkg/Include/Library/BaseLib.h
>> +++ b/MdePkg/Include/Library/BaseLib.h
>> @@ -7831,6 +7831,23 @@ AsmLfence (
>>VOID
>>);
>>
>> +/**
>> +  Executes a XGETBV instruction
>> +
>> +  Executes a XGETBV instruction. This function is only available on 
>> + IA-32 and  x64.
>> +
>> +  @param[in] IndexExtended control register index
>> +
>> +  @return The current value of the extended control register
>> +**/
>> +UINT64
>> +EFIAPI
>> +AsmXGetBv (
>> +  IN UINT32  Index
>> +  );
>> +
>> +
>>  /**
>>Patch the immediate operand of an IA32 or X64 instruction such 
>> that the byte,
>>word, dword or qword operand is encoded at the end of th

Re: [edk2-devel] [PATCH] MdePkg Base.h: Delete prototype for __builtin_return_address

2020-07-22 Thread Liming Gao
Jess:
  In the commit message, below line is too long that can't pass patch check. 
Can you move this line from the commit message to BZ?

[1] 
https://github.com/llvm/llvm-project/commit/41af97137572ad6d4dafc872e7ecf6bbb08d4984

Thanks
Liming
-Original Message-
From: devel@edk2.groups.io  On Behalf Of Liming Gao
Sent: 2020年7月21日 10:30
To: Jessica Clarke 
Cc: devel@edk2.groups.io; l...@nuviainc.com; Kinney, Michael D 

Subject: Re: [edk2-devel] [PATCH] MdePkg Base.h: Delete prototype for 
__builtin_return_address

Jess:
  OK. Seemly, there is no impact with this change. Reviewed-by: Liming Gao 


Thanks
Liming
-Original Message-
From: Jessica Clarke 
Sent: 2020年7月20日 23:06
To: Gao, Liming 
Cc: devel@edk2.groups.io; l...@nuviainc.com; Kinney, Michael D 

Subject: Re: [edk2-devel] [PATCH] MdePkg Base.h: Delete prototype for 
__builtin_return_address

It will always look like void *__builtin_return_address(unsigned) and work like 
that, just that under the hood it's being implemented slightly differently, 
which has the unfortunate side-effect of triggering this bug. We've been 
compiling the embedded EDK2 in our CheriBSD with that line deleted for years 
now with no issue.

Jess

> On 20 Jul 2020, at 15:58, Gao, Liming  wrote:
> 
> Clarke:
>  Do you mean CLANG compiler may have the different prototype for 
> __builtin_return_address()? If so, dose __builtin_return_address (L) always 
> work? 
> 
> Thanks
> Liming
>> -Original Message-
>> From: devel@edk2.groups.io  On Behalf Of Leif 
>> Lindholm
>> Sent: Monday, July 20, 2020 10:05 PM
>> To: Jessica Clarke 
>> Cc: devel@edk2.groups.io; Kinney, Michael D 
>> ; Gao, Liming 
>> Subject: Re: [edk2-devel] [PATCH] MdePkg Base.h: Delete prototype for 
>> __builtin_return_address
>> 
>> +Mike, Liming
>> 
>> On Mon, Jul 20, 2020 at 14:49:46 +0100, Jessica Clarke wrote:
>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1004
>>> 
>>> Being a compiler builtin, the type of __builtin_return_address is 
>>> already known to the compiler so no prototype is needed. Clang also 
>>> errors out when redeclaring certain builtins like this[1], though 
>>> currently only for ones with custom type checking. At the moment, 
>>> __builtin_return_address does not use custom type checking and so 
>>> does not trigger this error, however, the CHERI fork of LLVM, which 
>>> will form the basis of the toolchain for Arm's experimental Morello 
>>> platform, does use custom type checking for it, and so gives an 
>>> error. Thus, simply delete the unnecessary line.
>>> 
>>> [1]
>>> https://github.com/llvm/llvm-project/commit/41af97137572ad6d4dafc872
>>> e7ecf6bbb08d4984
>>> 
>>> Cc: Leif Lindholm 
>>> Signed-off-by: Jessica Clarke 
>>> ---
>>> MdePkg/Include/Base.h | 1 -
>>> 1 file changed, 1 deletion(-)
>>> 
>>> diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 
>>> 85a091b9d5..8e4271f6ea 100644
>>> --- a/MdePkg/Include/Base.h
>>> +++ b/MdePkg/Include/Base.h
>>> @@ -1273,7 +1273,6 @@ typedef UINTN RETURN_STATUS;
>>>   **/
>>>   #define RETURN_ADDRESS(L) ((L == 0) ? _ReturnAddress() : (VOID *) 0)
>>> #elif defined (__GNUC__) || defined (__clang__)
>>> -  void * __builtin_return_address (unsigned int level);
>> 
>> Agreed this looks somewhat bonkers.
>> And I can't see any ill effects from dropping it, so:
>> Reviewed-by: Leif Lindholm 
>> 
>>>   /**
>>> Get the return address of the calling function.
>>> 
>>> --
>>> 2.20.1
>>> 
>> 
>> 
> 





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

View/Reply Online (#63168): https://edk2.groups.io/g/devel/message/63168
Mute This Topic: https://groups.io/mt/75682100/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 1/1] BaseLib:Fix RISC-V Supervisor mode (S-Mode) trap handler reentry issue.

2020-07-22 Thread Liming Gao
Acked-by: Liming Gao 

-Original Message-
From: Abner Chang  
Sent: 2020年7月22日 16:54
To: devel@edk2.groups.io
Cc: abner.ch...@hpe.com; Daniel Schaefer ; Kinney, 
Michael D ; Gao, Liming ; 
Leif Lindholm 
Subject: [PATCH v2 1/1] BaseLib:Fix RISC-V Supervisor mode (S-Mode) trap 
handler reentry issue.

While RISC-V hart is trapped into S-Mode, the S-Mode interrupt CSR (SIE) is 
disabled by RISC-V hart. However the (SIE) is enabled again by RestoreTPL, this 
causes the second S-Mode trap is triggered by the machine mode (M-Mode)timer 
interrupt redirection. The SRET instruction clear Supervisor Previous Privilege 
(SPP) to zero (User mode) in the second S-Mode interrupt according to the 
RISC-V spec. Above brings hart to the user mode (U-Mode) when execute SRET in 
the nested S-Mode interrupt handler because SPP is set to User Mode in the 
second interrupt. Afterward, system runs in U-Mode and any accesses to S-Mode 
CSR causes the invalid instruction exception.

Signed-off-by: Abner Chang 
Reviewed-by: Daniel Schaefer 

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Daniel Schaefer 
Cc: Leif Lindholm 
---
 .../Library/BaseLib/RiscV64/RiscVInterrupt.S  | 45 ---
 1 file changed, 38 insertions(+), 7 deletions(-)

diff --git a/MdePkg/Library/BaseLib/RiscV64/RiscVInterrupt.S 
b/MdePkg/Library/BaseLib/RiscV64/RiscVInterrupt.S
index 766fcfb9cb..e821124781 100644
--- a/MdePkg/Library/BaseLib/RiscV64/RiscVInterrupt.S
+++ b/MdePkg/Library/BaseLib/RiscV64/RiscVInterrupt.S
@@ -12,21 +12,52 @@ ASM_GLOBAL ASM_PFX(RiscVDisableSupervisorModeInterrupts)
 ASM_GLOBAL ASM_PFX(RiscVEnableSupervisorModeInterrupt) ASM_GLOBAL 
ASM_PFX(RiscVGetSupervisorModeInterrupts) -# define  MSTATUS_SIE
0x0002-# define  CSR_SSTATUS0x100+#define  SSTATUS_SIE 
0x0002+#define  CSR_SSTATUS 0x100+#define  
SSTATUS_SPP_BIT_POSITION8 +//+// This routine disables supervisor mode 
interrupt+// ASM_PFX(RiscVDisableSupervisorModeInterrupts):-  li   a1, 
MSTATUS_SIE-  csrc CSR_SSTATUS, a1+  add   sp, sp, -(__SIZEOF_POINTER__)+  sd   
 a1, (sp)+  lia1, SSTATUS_SIE+  csrc  CSR_SSTATUS, a1+  lda1, (sp)+  
add   sp, sp, (__SIZEOF_POINTER__)   ret +//+// This routine enables supervisor 
mode interrupt+// ASM_PFX(RiscVEnableSupervisorModeInterrupt):-  li   a1, 
MSTATUS_SIE-  csrs CSR_SSTATUS, a1+  add   sp, sp, -2*(__SIZEOF_POINTER__)+  sd 
   a0, (0*__SIZEOF_POINTER__)(sp)+  sda1, (1*__SIZEOF_POINTER__)(sp)++  
csrr  a0, CSR_SSTATUS+  and   a0, a0, (1 << SSTATUS_SPP_BIT_POSITION)+  bnez  
a0, InTrap  // We are in supervisor mode (SMode)+// 
trap handler.+// Skip enabling SIE becasue SIE+ 
   // is set to disabled by RISC-V hart+// 
when the trap takes hart to SMode.++  lia1, SSTATUS_SIE+  csrs  
CSR_SSTATUS, a1+InTrap:+  lda0, (0*__SIZEOF_POINTER__)(sp)+  lda1, 
(1*__SIZEOF_POINTER__)(sp)+  add   sp, sp, 2*(__SIZEOF_POINTER__)   ret +//+// 
This routine returns supervisor mode interrupt+// status.+// 
ASM_PFX(RiscVGetSupervisorModeInterrupts):   csrr a0, CSR_SSTATUS-  andi a0, 
a0, MSTATUS_SIE+  andi a0, a0, SSTATUS_SIE   ret -- 
2.25.0


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

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



Re: [edk2-devel] [PATCH] Maintainers.txt: Add 'Zhiguang Liu' for MdePkg review

2020-07-22 Thread Liming Gao
Sure. https://github.com/tianocore/edk2/pull/818 has been created. 

-Original Message-
From: Laszlo Ersek  
Sent: 2020年7月23日 3:59
To: devel@edk2.groups.io; Gao, Liming ; Liu, Zhiguang 

Cc: Kinney, Michael D 
Subject: Re: [edk2-devel] [PATCH] Maintainers.txt: Add 'Zhiguang Liu' for 
MdePkg review

Hi Liming,

On 07/20/20 16:30, Liming Gao wrote:
> Reviewed-by: Liming Gao 

can you merge the patch, please?

Thanks!
Laszlo

>> -Original Message-
>> From: devel@edk2.groups.io  On Behalf Of 
>> Zhiguang Liu
>> Sent: Monday, July 20, 2020 4:53 PM
>> To: devel@edk2.groups.io
>> Cc: Kinney, Michael D ; Gao, Liming 
>> 
>> Subject: [edk2-devel] [PATCH] Maintainers.txt: Add 'Zhiguang Liu' for 
>> MdePkg review
>>
>> Add 'Zhiguang Liu' as a reviewer for MdePkg.
>>
>> Cc: Michael D Kinney 
>> Cc: Liming Gao 
>> Signed-off-by: Zhiguang Liu 
>> ---
>>  Maintainers.txt | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/Maintainers.txt b/Maintainers.txt index 
>> 599f94d57a..5504bb3d17 100644
>> --- a/Maintainers.txt
>> +++ b/Maintainers.txt
>> @@ -381,6 +381,7 @@ F: MdePkg/
>>  W: https://github.com/tianocore/tianocore.github.io/wiki/MdePkg
>>
>>  M: Michael D Kinney 
>>
>>  M: Liming Gao 
>>
>> +R: Zhiguang Liu 
>>
>>
>>
>>  NetworkPkg
>>
>>  F: NetworkPkg/
>>
>> --
>> 2.25.1.windows.1
>>
>>
>> -=-=-=-=-=-=
>> Groups.io Links: You receive all messages sent to this group.
>>
>> View/Reply Online (#62823): 
>> https://edk2.groups.io/g/devel/message/62823
>> Mute This Topic: https://groups.io/mt/75678333/1759384
>> Group Owner: devel+ow...@edk2.groups.io
>> Unsubscribe: https://edk2.groups.io/g/devel/unsub  
>> [liming@intel.com] -=-=-=-=-=-=
> 
> 
> 
> 


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

View/Reply Online (#63166): https://edk2.groups.io/g/devel/message/63166
Mute This Topic: https://groups.io/mt/75678333/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] BaseTools/Scripts: Ignore the CRLF check when upgrade submodule.

2020-07-22 Thread Liming Gao
For submodule, I see the diff content. So, can we use "Subproject commit" as 
key to ignore it?

-Subproject commit c3656cc594daac8167721dde7220f0e59ae146fc
+Subproject commit e2e09d9fba1187f8d6aafaa34d4172f56f1ffb72

Thanks
Liming
-Original Message-
From: Feng, Bob C  
Sent: 2020年7月22日 10:28
To: Jiang, Guomin ; Gao, Liming ; 
devel@edk2.groups.io
Subject: RE: [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check when upgrade 
submodule.

Here is a case.

diff --git a/BaseTools/BinWrappers/PosixLike/AmlToHex 
b/BaseTools/BinWrappers/PosixLike/AmlToC
similarity index 97%
rename from BaseTools/BinWrappers/PosixLike/AmlToHex
rename to BaseTools/BinWrappers/PosixLike/AmlToC
index 
9fb68299e4c67d1f332cd883fd348a896f1bdc50..1dd28e966288f6ea4fc52d42e2dc7b1f74226c23
 100755

self.line_num+1 looks a hard code based on an assumption. 

Thanks,
Bob

-Original Message-
From: Jiang, Guomin 
Sent: Wednesday, July 22, 2020 10:21 AM
To: Feng, Bob C ; Gao, Liming ; 
devel@edk2.groups.io
Subject: RE: [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check when upgrade 
submodule.

Hi Bob,

Can you provide a sample that the file attribute is not the next line.

Even if the case you mentioned is present, I seem that have not affect on the 
current behavior, isn't it?

Thanks.
Guomin
> -Original Message-
> From: Feng, Bob C 
> Sent: Wednesday, July 22, 2020 10:08 AM
> To: Jiang, Guomin ; Gao, Liming 
> ; devel@edk2.groups.io
> Subject: RE: [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check when 
> upgrade submodule.
> 
> Guomin,
> 
> I have two comments.
> 1. Please only descript the patch's function in the commit message.
> 2. The file attribute is not always the next line of the line starts 
> with "diff -- git"
> 
> Thanks,
> Bob
> 
> -Original Message-
> From: Jiang, Guomin 
> Sent: Tuesday, July 21, 2020 6:38 PM
> To: Gao, Liming ; devel@edk2.groups.io
> Cc: Feng, Bob C 
> Subject: RE: [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check when 
> upgrade submodule.
> 
> It is used to judge if the current change is for submodule.
> 
> The attribute of submodule is 16, just like the file attribute of 
> file is 10644.
> 
> Normally, the changed file will begin with 'diff --git' and the next line 
> like '
> index 954f66c056e..04300e71f38 100644' which end with the attribute, 
> and changed submodule is similar.
> 
> > -Original Message-
> > From: Gao, Liming 
> > Sent: Tuesday, July 21, 2020 1:57 PM
> > To: Jiang, Guomin ; devel@edk2.groups.io
> > Cc: Feng, Bob C 
> > Subject: RE: [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check 
> > when upgrade submodule.
> >
> > Guomin:
> >   +   self.lines[self.line_num+1].endswith('16\n') or
> >
> >   What means for this line?
> >
> >
> > Thanks
> > Liming
> > -Original Message-
> > From: Jiang, Guomin 
> > Sent: 2020年7月21日 10:59
> > To: devel@edk2.groups.io
> > Cc: Feng, Bob C ; Gao, Liming 
> > 
> > Subject: [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check when 
> > upgrade submodule.
> >
> > When i upgrade openssl to 1.1.1g, error occurred when run PatchCheck.py.
> > The reason is that the submodule will end with LF, but it will check 
> > based on file rule, it make no sense and need ignore the check.
> >
> > Signed-off-by: Guomin Jiang 
> > Cc: Bob Feng 
> > Cc: Liming Gao 
> > ---
> >  BaseTools/Scripts/PatchCheck.py | 4 
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/BaseTools/Scripts/PatchCheck.py 
> > b/BaseTools/Scripts/PatchCheck.py index 7db0775d14d1..46b9936c6576
> > 100755
> > --- a/BaseTools/Scripts/PatchCheck.py
> > +++ b/BaseTools/Scripts/PatchCheck.py
> > @@ -405,12 +405,16 @@ class GitDiffCheck:
> >  #
> >  self.force_crlf = False
> >  if self.filename == '.gitmodules' or \
> > +   self.lines[self.line_num+1].endswith('16\n')
> > + or \
> > self.filename == 'BaseTools/Conf/diff.order':
> >  #
> >  # .gitmodules and diff orderfiles are used internally 
> > by git
> >  # use tabs and LF line endings.  Do not enforce no 
> > tabs and
> >  # do not enforce CR/LF line endings.
> >  #
> > +# When update submodule, it will encode with LF line 
> > and do
> > +# not enforce CR/LF line endings.
> > +#
> >  self.force_crlf = False
> >  self.force_notabs = False
> >  elif len(line.rstrip()) != 0:
> > --
> > 2.25.1.windows.1


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

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



Re: [edk2-devel] [PATCH v6 10/10] MdeModulePkg/Core: Avoid redundant shadow when enable the Migrated PCD (CVE-2019-11098)

2020-07-22 Thread Liming Gao
Guomin:
  I add my comments. 

-Original Message-
From: Wang, Jian J  
Sent: 2020年7月22日 14:59
To: devel@edk2.groups.io; Jiang, Guomin 
Cc: Wu, Hao A ; Bi, Dandan ; Gao, 
Liming ; De, Debkumar ; Han, Harry 
; West, Catharine 
Subject: RE: [edk2-devel] [PATCH v6 10/10] MdeModulePkg/Core: Avoid redundant 
shadow when enable the Migrated PCD (CVE-2019-11098)

Guomin,

See my inline comments below.

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Guomin 
> Jiang
> Sent: Monday, July 20, 2020 7:30 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J ; Wu, Hao A 
> ; Bi, Dandan ; Gao, Liming 
> ; De, Debkumar ; Han, 
> Harry ; West, Catharine 
> 
> Subject: [edk2-devel] [PATCH v6 10/10] MdeModulePkg/Core: Avoid 
> redundant shadow when enable the Migrated PCD (CVE-2019-11098)
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1614
> 
> When PcdMigrateTemporaryRamFirmwareVolumes is TRUE, it will shadow the 
> PEIMs, when it is disabled, PEIMs marked REGISTER_FOR_SHADOW will be 
> shadowed as well and it is controled by PcdShadowPeimOnBoot and 
> PcdShadowPeimOnS3Boot.
> 
> To cover the shadow behavior, the change will always shadow PEIMs when 
> enable PcdMigrateTemporaryRamFirmwareVolumes.
> 
> When PcdMigrateTemporaryRamFirmwareVolumes is true, if enable 
> PcdShadowPeiOnBoot, it will shadow some PEIMs twice and occupy more 
> memory and waste more boot time. it is unnecessary, so the only valid 
> choice is to enable PcdMigrateTemporaryRamFirmwareVolumes and disable 
> PcdShadowPeimOnBoot.

You could add similar clarification in dec where the new PCD is defined.

> 
> Signed-off-by: Guomin Jiang 
> Cc: Jian J Wang 
> Cc: Hao A Wu 
> Cc: Dandan Bi 
> Cc: Liming Gao 
> Cc: Debkumar De 
> Cc: Harry Han 
> Cc: Catharine West 
> ---
>  MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 11 +--
>  MdeModulePkg/Core/Pei/Image/Image.c   | 14 ++
>  MdeModulePkg/Core/Pei/PeiMain/PeiMain.c   | 18 +-
>  3 files changed, 32 insertions(+), 11 deletions(-)
> 
> diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
> b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
> index 210b5b22f727..74cd5387c158 100644
> --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
> +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
> @@ -1408,7 +1408,11 @@ PeiDispatcher (
>PeimFileHandle = NULL;
>EntryPoint = 0;
> 
> -  if ((Private->PeiMemoryInstalled) && (Private-
> >HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME ||
> PcdGetBool (PcdShadowPeimOnS3Boot))) {
> +  if ((Private->PeiMemoryInstalled) &&
> +  (PcdGetBool (PcdMigrateTemporaryRamFirmwareVolumes)
> +   || (Private->HobList.HandoffInformationTable->BootMode !=
> BOOT_ON_S3_RESUME)
> +   || PcdGetBool (PcdShadowPeimOnS3Boot))
> +) {
>  //
>  // Once real memory is available, shadow the RegisterForShadow modules.
> And meanwhile
>  // update the modules' status from PEIM_STATE_REGISTER_FOR_SHADOW 
> to PEIM_STATE_DONE.
> @@ -1607,7 +1611,10 @@ PeiDispatcher (
>  PeiCheckAndSwitchStack (SecCoreData, Private);
> 
>  if ((Private->PeiMemoryInstalled) && (Private-
> >Fv[FvCount].PeimState[PeimCount] == PEIM_STATE_REGISTER_FOR_SHADOW)
> &&   \
> -(Private->HobList.HandoffInformationTable->BootMode !=
> BOOT_ON_S3_RESUME || PcdGetBool (PcdShadowPeimOnS3Boot))) {
> +(PcdGetBool (PcdMigrateTemporaryRamFirmwareVolumes)
> + || 
> + (Private->HobList.HandoffInformationTable->BootMode !=
> BOOT_ON_S3_RESUME)
> + || PcdGetBool (PcdShadowPeimOnS3Boot))
> +  ) {
>//
>// If memory is available we shadow images by default 
> for performance reasons.
>// We call the entry point a 2nd time so the module knows it's 
> shadowed.


Below condition also needs to consider new PCD 
PcdMigrateTemporaryRamFirmwareVolumes. 

> diff --git a/MdeModulePkg/Core/Pei/Image/Image.c
> b/MdeModulePkg/Core/Pei/Image/Image.c
> index 0caeb63e26b4..85d1a84e4b67 100644
> --- a/MdeModulePkg/Core/Pei/Image/Image.c
> +++ b/MdeModulePkg/Core/Pei/Image/Image.c
> @@ -328,8 +328,11 @@ LoadAndRelocatePeCoffImage (
>//
>// When Image has no reloc section, it can't be relocated into memory.
>//
> -  if (ImageContext.RelocationsStripped && 
> (Private->PeiMemoryInstalled) &&
> ((!IsPeiModule) ||
> -  (!IsS3Boot && (PcdGetBool (PcdShadowPeimOnBoot) ||
> IsRegisterForShadow)) || (IsS3Boot && PcdGetBool
> (PcdShadowPeimOnS3Boot {
> +  if (Im

Re: [edk2-devel] [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check when upgrade submodule.

2020-07-21 Thread Liming Gao
Guomin:
  OK. Please add this information in the patch for better reading. With this 
change, Reviewed-by: Liming Gao 

Thanks
Liming
-Original Message-
From: Jiang, Guomin  
Sent: 2020年7月21日 18:38
To: Gao, Liming ; devel@edk2.groups.io
Cc: Feng, Bob C 
Subject: RE: [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check when upgrade 
submodule.

It is used to judge if the current change is for submodule.

The attribute of submodule is 16, just like the file attribute of file is 
10644.

Normally, the changed file will begin with 'diff --git' and the next line like 
' index 954f66c056e..04300e71f38 100644' which end with the attribute, and 
changed submodule is similar.

> -Original Message-
> From: Gao, Liming 
> Sent: Tuesday, July 21, 2020 1:57 PM
> To: Jiang, Guomin ; devel@edk2.groups.io
> Cc: Feng, Bob C 
> Subject: RE: [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check when 
> upgrade submodule.
> 
> Guomin:
>   +   self.lines[self.line_num+1].endswith('16\n') or
> 
>   What means for this line?
> 
> 
> Thanks
> Liming
> -Original Message-
> From: Jiang, Guomin 
> Sent: 2020年7月21日 10:59
> To: devel@edk2.groups.io
> Cc: Feng, Bob C ; Gao, Liming 
> 
> Subject: [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check when 
> upgrade submodule.
> 
> When i upgrade openssl to 1.1.1g, error occurred when run PatchCheck.py.
> The reason is that the submodule will end with LF, but it will check 
> based on file rule, it make no sense and need ignore the check.
> 
> Signed-off-by: Guomin Jiang 
> Cc: Bob Feng 
> Cc: Liming Gao 
> ---
>  BaseTools/Scripts/PatchCheck.py | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/BaseTools/Scripts/PatchCheck.py 
> b/BaseTools/Scripts/PatchCheck.py index 7db0775d14d1..46b9936c6576
> 100755
> --- a/BaseTools/Scripts/PatchCheck.py
> +++ b/BaseTools/Scripts/PatchCheck.py
> @@ -405,12 +405,16 @@ class GitDiffCheck:
>  #
>  self.force_crlf = False
>  if self.filename == '.gitmodules' or \
> +   self.lines[self.line_num+1].endswith('16\n') 
> + or \
> self.filename == 'BaseTools/Conf/diff.order':
>  #
>  # .gitmodules and diff orderfiles are used internally by 
> git
>  # use tabs and LF line endings.  Do not enforce no tabs 
> and
>  # do not enforce CR/LF line endings.
>  #
> +# When update submodule, it will encode with LF line and 
> do
> +# not enforce CR/LF line endings.
> +#
>  self.force_crlf = False
>  self.force_notabs = False
>  elif len(line.rstrip()) != 0:
> --
> 2.25.1.windows.1


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

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



  1   2   3   4   5   6   7   8   9   10   >