Re: [edk2-devel] [PATCH v2] UefiCpuPkg/MpInitLib: avoid printing debug messages in AP

2021-03-16 Thread Dong, Eric
Reviewed-by: Eric Dong 

-Original Message-
From: Ni, Ray  
Sent: Tuesday, March 16, 2021 9:52 AM
To: devel@edk2.groups.io
Cc: Dong, Eric ; Laszlo Ersek ; Kumar, 
Rahul1 
Subject: [PATCH v2] UefiCpuPkg/MpInitLib: avoid printing debug messages in AP

MpInitLib contains a function MicrocodeDetect() which is called by
all threads as an AP procedure.
Today this function contains below code:

if (CurrentRevision != LatestRevision) {
  AcquireSpinLock(>MpLock);
  DEBUG ((
EFI_D_ERROR,
"Updated microcode signature [0x%08x] does not match \
loaded microcode signature [0x%08x]\n",
CurrentRevision, LatestRevision
));
  ReleaseSpinLock(>MpLock);
}

When the if-check is passed, the code may call into PEI services:
1. AcquireSpinLock
   When the PcdSpinTimeout is not 0, TimerLib
   GetPerformanceCounterProperties() is called. And some of the
   TimerLib implementations would get the information cached in
   HOB. But AP procedure cannot call PEI services to retrieve the
   HOB list.

2. DEBUG
   Certain DebugLib relies on ReportStatusCode services and the
   ReportStatusCode PPI is retrieved through the PEI services.
   DebugLibSerialPort should be used.
   But when SerialPortLib is implemented to depend on PEI services,
   even using DebugLibSerialPort can still cause AP calls PEI
   services resulting hang.

It causes a lot of debugging effort on the platform side.

There are 2 options to fix the problem:
1. make sure platform DSC chooses the proper DebugLib and set the
   PcdSpinTimeout to 0. So that AcquireSpinLock and DEBUG don't call
   PEI services.
2. remove the AcquireSpinLock and DEBUG call from the procedure.

Option #2 is preferred because it's not practical to ask every
platform DSC to be written properly.

Following option #2, there are two sub-options:
2.A. Just remove the if-check.
2.B. Capture the CurrentRevision and ExpectedRevision in the memory
 for each AP and print them together from BSP.

The patch follows option 2.B.

Signed-off-by: Ray Ni 
Cc: Eric Dong 
Cc: Laszlo Ersek 
Cc: Rahul Kumar 
---
 UefiCpuPkg/Library/MpInitLib/Microcode.c | 11 +--
 UefiCpuPkg/Library/MpInitLib/MpLib.c | 25 
 UefiCpuPkg/Library/MpInitLib/MpLib.h |  1 +
 3 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/UefiCpuPkg/Library/MpInitLib/Microcode.c 
b/UefiCpuPkg/Library/MpInitLib/Microcode.c
index 15629591e2..297c2abcd1 100644
--- a/UefiCpuPkg/Library/MpInitLib/Microcode.c
+++ b/UefiCpuPkg/Library/MpInitLib/Microcode.c
@@ -315,17 +315,8 @@ Done:
 MSR_IA32_BIOS_UPDT_TRIG,

 (UINT64) (UINTN) MicrocodeData

 );

-//

-// Get and check new microcode signature

-//

-CurrentRevision = GetCurrentMicrocodeSignature ();

-if (CurrentRevision != LatestRevision) {

-  AcquireSpinLock(>MpLock);

-  DEBUG ((EFI_D_ERROR, "Updated microcode signature [0x%08x] does not 
match \

-loaded microcode signature [0x%08x]\n", CurrentRevision, 
LatestRevision));

-  ReleaseSpinLock(>MpLock);

-}

   }

+  CpuMpData->CpuData[ProcessorNumber].MicrocodeRevision = 
GetCurrentMicrocodeSignature ();

 }

 

 /**

diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c 
b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index 5040053dad..3d945972a0 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
@@ -2135,6 +2135,31 @@ MpInitLibInitialize (
 }

   }

 

+  //

+  // Dump the microcode revision for each core.

+  //

+  DEBUG_CODE (

+UINT32 ThreadId;

+UINT32 ExpectedMicrocodeRevision;

+CpuInfoInHob = (CPU_INFO_IN_HOB *) (UINTN) CpuMpData->CpuInfoInHob;

+for (Index = 0; Index < CpuMpData->CpuCount; Index++) {

+  GetProcessorLocationByApicId (CpuInfoInHob[Index].InitialApicId, NULL, 
NULL, );

+  if (ThreadId == 0) {

+//

+// MicrocodeDetect() loads microcode in first thread of each core, so,

+// CpuMpData->CpuData[Index].MicrocodeEntryAddr is initialized only 
for first thread of each core.

+//

+ExpectedMicrocodeRevision = 0;

+if (CpuMpData->CpuData[Index].MicrocodeEntryAddr != 0) {

+  ExpectedMicrocodeRevision = ((CPU_MICROCODE_HEADER 
*)(UINTN)CpuMpData->CpuData[Index].MicrocodeEntryAddr)->UpdateRevision;

+}

+DEBUG ((

+  DEBUG_INFO, "CPU[%04d]: Microcode revision = %08x, expected = 
%08x\n",

+  Index, CpuMpData->CpuData[Index].MicrocodeRevision, 
ExpectedMicrocodeRevision

+  ));

+  }

+}

+  );

   //

   // Initialize global data for MP support

   //

diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h 
b/UefiCpuPkg/Library/MpInitLib/MpLib.h
index 0bd60388b1..66f9eb2304 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.h
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.h
@@ -144,6 +144,7 @@ typedef struct {
   UINT32 ProcessorSignature;

   UINT8   

Re: [edk2-devel] [PATCH] SecurityPkg/Tcg2Config: hide PCR Bank SHA1 checkbox

2021-03-16 Thread Yao, Jiewen
Thank you Qi. 

i recommend we file a bugzilla on the scope of the problem

After the scope is agreed, then you can send the patch. 

For example, I can ask why not remove the sha1supported field at all?

I hope the community can reach consensus on the problem statement at first. 


thank you!
Yao, Jiewen


> 在 2021年3月17日,上午10:56,Zhang, Qi1  写道:
> 
> wrap SHA1 related by DISABLE_SHA1_DEPRECATED_INTERFACES.
> 
> Cc: Jiewen Yao 
> Cc: Jian J Wang 
> Cc: Qi Zhang 
> Cc: Rahul Kumar 
> Signed-off-by: Qi Zhang 
> ---
> SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c 
> b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
> index 2946f95db0..81a4d3fa6a 100644
> --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
> +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
> @@ -710,9 +710,11 @@ SetConfigInfo (
>   )
> {
>   switch (TpmAlgHash) {
> +#ifndef DISABLE_SHA1_DEPRECATED_INTERFACES
>   case TPM_ALG_SHA1:
> Tcg2ConfigInfo->Sha1Supported = TRUE;
> break;
> +#endif
>   case TPM_ALG_SHA256:
> Tcg2ConfigInfo->Sha256Supported = TRUE;
> break;
> -- 
> 2.26.2.windows.1
> 


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




Re: [edk2-devel] 回复: [Patch edk2-platforms V2] Intel/BoardModulePkg: sort load option in the first boot

2021-03-16 Thread Ni, Ray
Liming,
Using HII PCDs introduces too many software layers that may cause potential 
bugs if any layer is not proper implemented (Imaging a case when a platform 
forgets to include the mdeModule.dsc.inc).

Variable used here is very straightforward.

That was also the reason when I redesigned the BDS 10 years ago, I chose not to 
include the PcdBootState into the MdeModulePkg but left that in platform.

I agree with you that consistency is better. And I suggest we submit a Bugzilla 
to change all open platforms to use variable directly for first boot detection.

Thanks,
Ray

> -Original Message-
> From: gaoliming 
> Sent: Wednesday, March 17, 2021 11:01 AM
> To: devel@edk2.groups.io; Liu, Zhiguang ; Ni, Ray 
> 
> Cc: Dong, Eric ; Desimone, Nathaniel L 
> ; Agyeman, Prince
> ; Gao, Zhichao 
> Subject: 回复: [edk2-devel] 回复: [Patch edk2-platforms V2] Intel/BoardModulePkg: 
> sort load option in the first boot
> 
> Zhiguang:
>   This is the common platform usage. I suggest to apply the same solution. My 
> solution is to define this PCD PcdBootState in
> MdeModulePkg.dec, and add MdeModule.dsc.inc file that defines this PCD as 
> DynamicHii PCD, platform DSC includes
> MdeModule.dsc.inc file, platform modules consume this PCD (set/get).
> 
> Thanks
> Liming
> > -邮件原件-
> > 发件人: devel@edk2.groups.io  代表 Zhiguang Liu
> > 发送时间: 2021年3月16日 9:57
> > 收件人: devel@edk2.groups.io; gaolim...@byosoft.com.cn; Ni, Ray
> > 
> > 抄送: Dong, Eric ; Desimone, Nathaniel L
> > ; Agyeman, Prince
> > ; Gao, Zhichao 
> > 主题: Re: [edk2-devel] 回复: [Patch edk2-platforms V2]
> > Intel/BoardModulePkg: sort load option in the first boot
> >
> > Hi Liming,
> >
> > Thanks for the comments. This patch is merged before this comment, but I can
> > still send another patch to modify if needed.
> >
> > However, I think the implement in this patch is more simple.
> > The implement in QuarkPlatformPkg need changes in inf, dec and dsc files,
> > and is not as intuitive as just getting and setting a variable.
> > It may be simpler if the implements can reuse a same DynamicHiiPcd, do you
> > think it is possible?
> > If I misunderstand anything, please correct me.
> >
> > Thanks
> > Zhiguang
> >
> > > -Original Message-
> > > From: devel@edk2.groups.io  On Behalf Of
> > > gaoliming
> > > Sent: Monday, March 15, 2021 9:36 AM
> > > To: Ni, Ray ; Liu, Zhiguang ;
> > > devel@edk2.groups.io
> > > Cc: Dong, Eric ; Desimone, Nathaniel L
> > > ; Agyeman, Prince
> > > ; Gao, Zhichao 
> > > Subject: [edk2-devel] 回复: [Patch edk2-platforms V2]
> > > Intel/BoardModulePkg: sort load option in the first boot
> > >
> > > Zhiguang:
> > >   I see QuarkPlatformPkg uses PCD
> > > gQuarkPlatformTokenSpaceGuid.PcdBootState
> > > to decide whether current boot is the first boot or not.
> > >   This PCD is configured as DynamicHiiPcd, and be set in
> > > Platform\Intel\QuarkPlatformPkg\Library\PlatformBootManagerLib\Platfor
> > > mBootM
> > > anager.c
> > >
> > >   Can you use the same solution in Intel BoardModulePkg?
> > >
> > > Thanks
> > > Liming
> > > > -邮件原件-
> > > > 发件人: Ni, Ray 
> > > > 发送时间: 2021年3月10日 17:56
> > > > 收件人: Liu, Zhiguang ; devel@edk2.groups.io
> > > > 抄送: Dong, Eric ; Liming Gao
> > > > ; Desimone, Nathaniel L
> > > > ; Agyeman, Prince
> > > > ; Gao, Zhichao 
> > > > 主题: RE: [Patch edk2-platforms V2] Intel/BoardModulePkg: sort load
> > > > option in the first boot
> > > >
> > > > 1. DataSIze should be set to sizeof (BOOLEAN) before calling
> > > > GetVariable()
> > > >
> > > > > +  Status = gRT->GetVariable (
> > > > > +  L"IsFirstBoot",
> > > >
> > > > 2. Can you please define a macro in this C file for IsFirstBoot string?
> > > > e.g.: #define IS_FIRST_BOOT_VAR_NAME L"IsFirstBoot"
> > > >
> > > > > +  if (IsFirstBoot == TRUE) {
> > > >
> > > > 3. Please remove "== TRUE". Just use "If (IsFirstBoot)".
> > > >
> > > > > +L"IsFirstBoot",
> > > > 4. Please use the macro defined as above.
> > > >
> > > > >
> > > > > +,
> > > > >
> > > > > +EFI_VARIABLE_NON_VOLATILE |
> > > > > EFI_VARIABLE_RUNTIME_ACCESS |
> > > EFI_VARIABLE_BOOTSERVICE_ACCESS,
> > > >
> > > > 5. Please remove "EFI_VARIABLE_RUNTIME_ACCESS".
> > > >
> > > > > +1,
> > > > 6. Please use sizeof (BOOLEAN) instead of "1".
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> > 
> >
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72950): https://edk2.groups.io/g/devel/message/72950
Mute This Topic: https://groups.io/mt/81395975/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: use CpuPause() in CpuDeadLoop()

2021-03-16 Thread Ankur Arora

On 2021-03-16 6:08 p.m., gaoliming wrote:

Ankur:
   Can you give the detail usage for the lower power state when enter into
CpuDeadLoop()?


I'm not really familiar with ARM and RiscV, both of which also have 
implementations
for CpuPause(), for the details for X86 variants are below.

From Intel's instruction-set reference:
"An additional function of the PAUSE instruction is to reduce the power consumed
by a processor while executing a spin loop. A processor can execute a spin-wait
loop extremely quickly, causing the processor to consume a lot of power while it
waits for the resource it is spinning on to become available. Inserting a pause
instruction in a spin-wait loop greatly reduces the processor’s power
consumption."

And, from AMD's instruction-set reference:
"Improves the performance of spin loops, by providing a hint to the processor
that the current code is in a spin loop. The processor may use this to optimize
power consumption while in the spin loop. Architecturally, this instruction
behaves like a NOP instruction."

Happy to add this to the commit message if you think it'll be useful.

Thanks
Ankur



Thanks
Liming

-邮件原件-
发件人: Ankur Arora 
发送时间: 2021年3月17日 6:59
收件人: devel@edk2.groups.io
抄送: Ankur Arora ; Liming Gao
; Michael D Kinney

主题: [PATCH] MdePkg: use CpuPause() in CpuDeadLoop()

Use CpuPause() to allow the CPU to go into a lower power state
state while we spin wait.

Cc: Liming Gao 
Signed-off-by: Ankur Arora 
Reviewed-by: Michael D Kinney 
---
  MdePkg/Library/BaseLib/CpuDeadLoop.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Library/BaseLib/CpuDeadLoop.c
b/MdePkg/Library/BaseLib/CpuDeadLoop.c
index 9e110cacbc96..3cd304351a65 100644
--- a/MdePkg/Library/BaseLib/CpuDeadLoop.c
+++ b/MdePkg/Library/BaseLib/CpuDeadLoop.c
@@ -28,5 +28,7 @@ CpuDeadLoop (
  {
volatile UINTN  Index;

-  for (Index = 0; Index == 0;);
+  for (Index = 0; Index == 0;) {
+CpuPause();
+  }
  }
--
2.9.3







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




回复: [edk2-devel] [PATCH 1/1] MdeModulePkg/VariableRuntimeDxe: avoid double VA conversion of FVB protocol

2021-03-16 Thread gaoliming
Ard:

> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Laszlo Ersek
> 发送时间: 2021年3月16日 23:58
> 收件人: Ard Biesheuvel ; devel@edk2.groups.io
> 抄送: liming@intel.com; j...@solid-run.com; l...@nuviainc.com
> 主题: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/VariableRuntimeDxe:
> avoid double VA conversion of FVB protocol
> 
> On 03/13/21 00:05, Ard Biesheuvel wrote:
> > For historical reasons, the VariableRuntimeDxe performs virtual address
> > conversion on the FVB protocol member pointers of the protocol instance
> > that backs the EFI variable store. However, the driver that produces the
> > actual instance should be doing this, as it is the owner, and provides
> > the actual implementation of those methods.
> >
> > Unfortunately, we cannot simply change this: existing drivers may rely
> > on this behavior, and so the variable driver should take care to only
> > convert the pointers when necessary, but leave them alone when the owner
> > is taking care of this.

To answer Laszlo question, I want to know the impact for the simple fix. 

> >
> > The virtual address switch event can be delivered in arbitrary order, and
> > so we should take care of this in a way that does not rely on whether this
> > driver converts its pointers either before or after the owner of the FVB
> > protocol receives the event.
> >
> > So let's not convert the pointers at all when the event is delivered, but
> > record the converted addresses in a shadow FVB protocol. This way, we can
> > check when the variable driver is invoked at runtime whether the switch
> > has occurred or not, and perform the switch if it hasn't.
> >
> > Signed-off-by: Ard Biesheuvel 
> > ---
> > Build tested only.
> >
> >  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c | 50
> +---
> >  1 file changed, 43 insertions(+), 7 deletions(-)
> >
> > diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
> b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
> > index 0fca0bb2a9b5..3d83ac4452ee 100644
> > --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
> > +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
> > @@ -37,6 +37,8 @@ EDKII_VAR_CHECK_PROTOCOL
> mVarCheck  = { VarCheckRegis
> >
> VarCheckVariablePropertySet,
> >
> VarCheckVariablePropertyGet };
> >
> > +STATIC EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
> mFvbProtocolShadow;
> > +
> >  /**
> >Some Secure Boot Policy Variable may update following other variable
> changes(SecureBoot follows PK change, etc).
> >Record their initial State when variable write service is ready.
> > @@ -105,8 +107,26 @@ AcquireLockOnlyAtBootTime (
> >IN EFI_LOCK *Lock
> >)
> >  {
> 
> (1) Why is AcquireLockOnlyAtBootTime() the best place to add this?
> 
> (Considering especially the leading comment, "This is a temperary
> function that will be removed when EfiAcquireLock() in UefiLib can
> handle the call in UEFI Runtimer driver in RT phase".)
> 
> Obviously, I don't want to create more work for you! I just feel that,
> if this is not the best place, we shouldn't overload this function with
> a new responsibility.
> 
> > +  EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL  *FvbInstance;
> > +
> >if (!AtRuntime ()) {
> >  EfiAcquireLock (Lock);
> > +  } else {
> > +//
> > +// Check whether we need to swap in the converted pointer values
> for the
> > +// FVB protocol methods
> > +//
> > +FvbInstance = mVariableModuleGlobal->FvbInstance;
> > +if (FvbInstance != NULL &&
> > +FvbInstance->GetBlockSize !=
> mFvbProtocolShadow.GetBlockSize) {
> 
> (2) It occurs to me that the following pattern (in a single-threaded
> environment):
> 
> if (a != b) {
>   a = b;
> }
> 
> is just:
> 
>   a = b;
> 
> (the small CPU cost notwithstanding).
> 
> And that puts this patch in a bit different light: it's not that we may
> or may not convert. Instead, we *always* convert, the question is *when*
> we apply the result of the conversion.
> 
> Functionally, there is no difference, but to me mentally, there'd be a
> difference, if we said "delay applying the runtime conversion until
> first call".
> 
> Anyway... just wanted to highlight this: we could drop the GetBlockSize
> funcptr comparison. But, we don't have to.
> 
> Given the reviews from Liming and Hao -- and thank you in the first
> place for writing the patch! --, I won't really ask for a v2. I'd just
> somehow prefer the compat logic to be elsewhere, rather than in
> AcquireLockOnlyAtBootTime(). In the first place, I'm not clear what we
> currently use AcquireLockOnlyAtBootTime() for.
> 
> Up to the maintainers to decide whether this justifies v2. If not:
> 
> Acked-by: Laszlo Ersek 
> 
> Thanks
> Laszlo
> 
> > +  FvbInstance->GetBlockSize   =
> mFvbProtocolShadow.GetBlockSize;
> > +  FvbInstance->GetPhysicalAddress =
> mFvbProtocolShadow.GetPhysicalAddress;
> > +  FvbInstance->GetAttributes  =
> 

回复: [edk2-devel] [edk2-platforms] [patch 00/35] Consume RegisterFilterLibNull instance

2021-03-16 Thread gaoliming
Ard and Dandan:

> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Ard
> Biesheuvel
> 发送时间: 2021年3月16日 23:01
> 收件人: devel@edk2.groups.io; dandan...@intel.com; Laszlo Ersek
> ; Andrew Fish 
> 抄送: Leif Lindholm ; Michael D Kinney
> ; Liming Gao 
> 主题: Re: [edk2-devel] [edk2-platforms] [patch 00/35] Consume
> RegisterFilterLibNull instance
> 
> On Tue, 16 Mar 2021 at 15:56, Dandan Bi  wrote:
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> > RFC: https://edk2.groups.io/g/devel/message/72530
> >
> >
> > Add RegisterFilterLibNull in dsc files in edk2-platforms repo,
> > which will be consumed by IoLib and BaseLib.
> >
> > This is the following update in edk2-platforms repo for the change in edk2,
> > which will add RegisterFilterLib dependency for IoLib and BaseLib to
> filter/trace
> > port IO/MMIO/MSR access.
> > https://edk2.groups.io/g/devel/message/72754
> >
> > Cc: Leif Lindholm 
> > Cc: Michael D Kinney 
> > Cc: Liming Gao 
> >
> 
> It is a bit disappointing that we have to update every platform in
> existence again to apply a change to a core module.
> 

I suggest to add MdePkg.dsc.inc file to include the default library instance, 
and update all Platform DSC to include it. Then, for the future change, no 
change is required for platform DSC. 

Because this patch set updates every platform DSC, I suggest to introduce 
MdePkg.dsc.inc file in this patch set. 

Thanks
Liming
> Is there really not a better way to provide a 'default' resolution for
> a library class? Maybe a change to the .DEC format, so that the file
> which defines the library class can provide a resolution that is used
> if none is provided by the .DSC file?
> 
> 
> 
> > Dandan Bi (35):
> >   Drivers/ASIX: Consume RegisterFilterLibNull instance
> >   Drivers/DisplayLink: Consume RegisterFilterLibNull instance
> >   Drivers/OptionRomPkg: Consume RegisterFilterLibNull instance
> >   Features/Debugging: Consume RegisterFilterLibNull instance
> >   Features/Network: Consume RegisterFilterLibNull instance
> >   Features/OutOfBandManagement: Consume RegisterFilterLibNull
> instance
> >   Features/PowerManagement: Consume RegisterFilterLibNull instance
> >   Features/SystemInformation: Consume RegisterFilterLibNull instance
> >   Features/UserInterface: Consume RegisterFilterLibNull instance
> >   Platform/AMD: Consume RegisterFilterLibNull instance
> >   Platform/ARM: Consume RegisterFilterLibNull instance
> >   Platform/BeagleBoard: Consume RegisterFilterLibNull instance
> >   Platform/BoardModulePkg: Consume RegisterFilterLibNull instance
> >   Platform/MinPlatformPkg: Consume RegisterFilterLibNull instance
> >   Platform/QuarkPlatformPkg: Consume RegisterFilterLibNull instance
> >   Platform/Vlv2TbltDevicePkg: Consume RegisterFilterLibNull instance
> >   Platform/LeMaker: Consume RegisterFilterLibNull instance
> >   Platform/Qemu: Consume RegisterFilterLibNull instance
> >   Platform/RaspberryPi: Consume RegisterFilterLibNull instance
> >   Platform/RISC-V: Consume RegisterFilterLibNull instance
> >   Platform/SiFive: Consume RegisterFilterLibNull instance
> >   Platform/Socionext: Consume RegisterFilterLibNull instance
> >   Platform/SoftIron: Consume RegisterFilterLibNull instance
> >   Silicon/Hisilicon: Consume RegisterFilterLibNull instance
> >   Silicon/CoffeelakeSiliconPkg: Consume RegisterFilterLibNull instance
> >   Silicon/IntelSiliconPkg: Consume RegisterFilterLibNull instance
> >   Silicon/KabylakeSiliconPkg: Consume RegisterFilterLibNull instance
> >   Silicon/QuarkSocPkg: Consume RegisterFilterLibNull instance
> >   Silicon/TigerlakeSiliconPkg: Consume RegisterFilterLibNull instance
> >   Silicon/Marvell: Consume RegisterFilterLibNull instance
> >   Silicon/NXP: Consume RegisterFilterLibNull instance
> >   Silicon/Openmoko: Consume RegisterFilterLibNull instance
> >   Silicon/RISC_V: Consume RegisterFilterLibNull instance
> >   Silicon/Synopsys/DesignWare: Consume RegisterFilterLibNull instance
> >   Silicon/TexasInstruments: Consume RegisterFilterLibNull instance
> >
> >  Drivers/ASIX/Asix.dsc
> | 1 +
> >  Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkPkg.dsc  | 1 +
> >  Drivers/OptionRomPkg/OptionRomPkg.dsc
> | 3 ++-
> >  .../Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc | 3
> ++-
> >  .../Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc | 3
> ++-
> >  .../PostCodeDebugFeaturePkg/Include/PostCodeDebugFeature.dsc   | 3
> ++-
> >  .../Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc | 3
> ++-
> >  .../Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc | 3
> ++-
> >  .../OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc | 3
> ++-
> >  .../OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc | 3
> ++-
> >  .../Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc   | 3
> ++-
> >  .../SmbiosFeaturePkg/Include/SmbiosFeature.dsc | 3
> ++-
> >  .../Intel/UserInterface/LogoFeaturePkg/Include/LogoFeature.dsc | 3 ++-
> >  

回复: [edk2-devel] 回复: [Patch edk2-platforms V2] Intel/BoardModulePkg: sort load option in the first boot

2021-03-16 Thread gaoliming
Zhiguang:
  This is the common platform usage. I suggest to apply the same solution. My 
solution is to define this PCD PcdBootState in MdeModulePkg.dec, and add 
MdeModule.dsc.inc file that defines this PCD as DynamicHii PCD, platform DSC 
includes MdeModule.dsc.inc file, platform modules consume this PCD (set/get). 

Thanks
Liming
> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Zhiguang Liu
> 发送时间: 2021年3月16日 9:57
> 收件人: devel@edk2.groups.io; gaolim...@byosoft.com.cn; Ni, Ray
> 
> 抄送: Dong, Eric ; Desimone, Nathaniel L
> ; Agyeman, Prince
> ; Gao, Zhichao 
> 主题: Re: [edk2-devel] 回复: [Patch edk2-platforms V2]
> Intel/BoardModulePkg: sort load option in the first boot
> 
> Hi Liming,
> 
> Thanks for the comments. This patch is merged before this comment, but I can
> still send another patch to modify if needed.
> 
> However, I think the implement in this patch is more simple.
> The implement in QuarkPlatformPkg need changes in inf, dec and dsc files,
> and is not as intuitive as just getting and setting a variable.
> It may be simpler if the implements can reuse a same DynamicHiiPcd, do you
> think it is possible?
> If I misunderstand anything, please correct me.
> 
> Thanks
> Zhiguang
> 
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of
> > gaoliming
> > Sent: Monday, March 15, 2021 9:36 AM
> > To: Ni, Ray ; Liu, Zhiguang ;
> > devel@edk2.groups.io
> > Cc: Dong, Eric ; Desimone, Nathaniel L
> > ; Agyeman, Prince
> > ; Gao, Zhichao 
> > Subject: [edk2-devel] 回复: [Patch edk2-platforms V2]
> > Intel/BoardModulePkg: sort load option in the first boot
> >
> > Zhiguang:
> >   I see QuarkPlatformPkg uses PCD
> > gQuarkPlatformTokenSpaceGuid.PcdBootState
> > to decide whether current boot is the first boot or not.
> >   This PCD is configured as DynamicHiiPcd, and be set in
> > Platform\Intel\QuarkPlatformPkg\Library\PlatformBootManagerLib\Platfor
> > mBootM
> > anager.c
> >
> >   Can you use the same solution in Intel BoardModulePkg?
> >
> > Thanks
> > Liming
> > > -邮件原件-
> > > 发件人: Ni, Ray 
> > > 发送时间: 2021年3月10日 17:56
> > > 收件人: Liu, Zhiguang ; devel@edk2.groups.io
> > > 抄送: Dong, Eric ; Liming Gao
> > > ; Desimone, Nathaniel L
> > > ; Agyeman, Prince
> > > ; Gao, Zhichao 
> > > 主题: RE: [Patch edk2-platforms V2] Intel/BoardModulePkg: sort load
> > > option in the first boot
> > >
> > > 1. DataSIze should be set to sizeof (BOOLEAN) before calling
> > > GetVariable()
> > >
> > > > +  Status = gRT->GetVariable (
> > > > +  L"IsFirstBoot",
> > >
> > > 2. Can you please define a macro in this C file for IsFirstBoot string?
> > > e.g.: #define IS_FIRST_BOOT_VAR_NAME L"IsFirstBoot"
> > >
> > > > +  if (IsFirstBoot == TRUE) {
> > >
> > > 3. Please remove "== TRUE". Just use "If (IsFirstBoot)".
> > >
> > > > +L"IsFirstBoot",
> > > 4. Please use the macro defined as above.
> > >
> > > >
> > > > +,
> > > >
> > > > +EFI_VARIABLE_NON_VOLATILE |
> > > > EFI_VARIABLE_RUNTIME_ACCESS |
> > EFI_VARIABLE_BOOTSERVICE_ACCESS,
> > >
> > > 5. Please remove "EFI_VARIABLE_RUNTIME_ACCESS".
> > >
> > > > +1,
> > > 6. Please use sizeof (BOOLEAN) instead of "1".
> >
> >
> >
> >
> >
> >
> >
> 
> 
> 
> 
> 





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




[edk2-devel] [PATCH] SecurityPkg/Tcg2Config: hide PCR Bank SHA1 checkbox

2021-03-16 Thread Qi Zhang
wrap SHA1 related by DISABLE_SHA1_DEPRECATED_INTERFACES.

Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Qi Zhang 
Cc: Rahul Kumar 
Signed-off-by: Qi Zhang 
---
 SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c 
b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
index 2946f95db0..81a4d3fa6a 100644
--- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
+++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
@@ -710,9 +710,11 @@ SetConfigInfo (
   )
 {
   switch (TpmAlgHash) {
+#ifndef DISABLE_SHA1_DEPRECATED_INTERFACES
   case TPM_ALG_SHA1:
 Tcg2ConfigInfo->Sha1Supported = TRUE;
 break;
+#endif
   case TPM_ALG_SHA256:
 Tcg2ConfigInfo->Sha256Supported = TRUE;
 break;
-- 
2.26.2.windows.1



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




Re: [edk2-devel] [PATCH] ShellPkg/Library: Fix bug in Pci.c

2021-03-16 Thread Gao, Zhichao
Hi Ian/Vincent,

Sorry, I just notice the NextCapabilityOffset starts from base address of the 
PCI config space. So the comment I give in previous patch is incorrect.
And refer the PCIe spec, its valid value should be 0x100 to (0x1000 - sizeof 
(PCI_EXP_EXT_HDR)) or 0x0 (to terminate the list of capabilities).

The title of the patch is too common. The title should give a tiny description 
of the change.
Here is an example:
ShellPkg/Pci: Add valid check for PCI extended config space parser

If you have a better title, just update your own style.

Thanks,
Zhichao

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of IanX
> Kuo
> Sent: Saturday, April 10, 2021 1:35 AM
> To: devel@edk2.groups.io
> Cc: Ke, VincentX 
> Subject: [edk2-devel] [PATCH] ShellPkg/Library: Fix bug in Pci.c
> 
> From: VincentX Ke 
> 
> Bugzilla: 3262 (https://bugzilla.tianocore.org/show_bug.cgi?id=3262)
> 
> No need to print PCIe details while CapabilityId is 0x.
> Limit the NextCapabilityOffset value to AllocatePool() memory.
> 
> Signed-off-by: VincentX Ke 
> ---
>  ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c | 9 +++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
> index a2f04d8db5..9ebf1c26ef 100644
> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
> +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
> @@ -2038,12 +2038,14 @@ LocatePciCapability (
> @param[in] PciExpressCap   PCI Express capability buffer.   @param[in]
> ExtendedConfigSpace PCI Express extended configuration space.+
> @param[in] ExtendedConfigSize  PCI Express extended configuration size.
> @param[in] ExtendedCapability  PCI Express extended capability ID to
> explain. **/ VOID PciExplainPciExpress (   IN  PCI_CAPABILITY_PCIEXP
> *PciExpressCap,   IN  UINT8  
> *ExtendedConfigSpace,+  IN
> UINTN  ExtendedConfigSize,   IN CONST UINT16
> ExtendedCapability   ); @@ -2921,6 +2923,7 @@ ShellCommandRunPci (
>  PciExplainPciExpress (   (PCI_CAPABILITY_PCIEXP *) ((UINT8 *)
>  + PcieCapabilityPtr),   ExtendedConfigSpace,+
> ExtendedConfigSize,   ExtendedCapability   );   }@@ 
> -5698,12
> +5701,14 @@ PrintPciExtendedCapabilityDetails(
> @param[in] PciExpressCap   PCI Express capability buffer.   @param[in]
> ExtendedConfigSpace PCI Express extended configuration space.+
> @param[in] ExtendedConfigSize  PCI Express extended configuration size.
> @param[in] ExtendedCapability  PCI Express extended capability ID to
> explain. **/ VOID PciExplainPciExpress (   IN  PCI_CAPABILITY_PCIEXP
> *PciExpressCap,   IN  UINT8  
> *ExtendedConfigSpace,+  IN
> UINTN  ExtendedConfigSize,   IN CONST UINT16
> ExtendedCapability   ) {@@ -5786,7 +5791,7 @@ PciExplainPciExpress (
>}ExtHdr = (PCI_EXP_EXT_HDR*)ExtendedConfigSpace;-  while (ExtHdr-
> >CapabilityId != 0 && ExtHdr->CapabilityVersion != 0) {+  while (ExtHdr-
> >CapabilityId != 0 && ExtHdr->CapabilityVersion != 0 && ExtHdr-
> >CapabilityId != 0x) { // // Process this item //@@ -5800,7 
> >+5805,7
> @@ PciExplainPciExpress (
>  // // Advance to the next item if it exists //-if (ExtHdr-
> >NextCapabilityOffset != 0) {+if (ExtHdr->NextCapabilityOffset != 0 &&
> (ExtHdr->NextCapabilityOffset <= (UINT32)(ExtendedConfigSize - sizeof
> (PCI_EXP_EXT_HDR {   ExtHdr =
> (PCI_EXP_EXT_HDR*)(ExtendedConfigSpace + ExtHdr->NextCapabilityOffset
> - EFI_PCIE_CAPABILITY_BASE_OFFSET); } else {   break;--
> 2.18.0.windows.1
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#72862): https://edk2.groups.io/g/devel/message/72862
> Mute This Topic: https://groups.io/mt/81372175/1768756
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [zhichao@intel.com]
> -=-=-=-=-=-=
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72944): https://edk2.groups.io/g/devel/message/72944
Mute This Topic: https://groups.io/mt/81372175/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/2] UefiCpuPkg/CpuDxe: Rename variables to follow EDKII coding standard

2021-03-16 Thread Ni, Ray
> (1) I think "mGdtTemplate" would be a better name than "gGdtTemplate". I
> think the "g" prefix is used when an object is identical for all
> firmware modules (such as named GUIDs, for example).
Agree! I will change in v2.


> 
> (2) I think the last hunk does not belong in this patch -- more
> precisely, I *disagree* with the last hunk. Inserting a space in the
> middle of a typecast, after the parenthesized typename, is a bad
> practice in edk2; it is error prone and suggests that typecasts have low
> binding power (when in reality they have almost the strongest binding).

I double checked the edk2 coding standard and did find a rule for this.
That might be just my personal preference. Since I need your Ack or Rb, I will 
remove
this change in v2.



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




回复: [edk2-devel] 回复: [PATCH 1/1] MdePkg/UefiLib: Correct the arguments passed to IsLanguageSupported()

2021-03-16 Thread gaoliming
Create PR https://github.com/tianocore/edk2/pull/1495

Thanks
Liming
> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 gaoliming
> 发送时间: 2021年3月9日 9:31
> 收件人: 'Chandramohan Akula' ;
> devel@edk2.groups.io
> 抄送: 'Michael D Kinney' ; 'Zhiguang Liu'
> 
> 主题: [edk2-devel] 回复: [PATCH 1/1] MdePkg/UefiLib: Correct the
> arguments passed to IsLanguageSupported()
> 
> Reviewed-by: Liming Gao 
> 
> > -邮件原件-
> > 发件人: Chandramohan Akula 
> > 发送时间: 2021年3月8日 11:03
> > 收件人: devel@edk2.groups.io
> > 抄送: Chandramohan Akula ;
> > Michael D Kinney ; Liming Gao
> > ; Zhiguang Liu 
> > 主题: [PATCH 1/1] MdePkg/UefiLib: Correct the arguments passed to
> > IsLanguageSupported()
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3211
> >
> > Correct the arguments passed to the IsLanguageSupported() function in
> > AddUnicodeString2() and LookupUnicodeString2() as expected by the
> function
> >
> > Cc: Michael D Kinney 
> > Cc: Liming Gao 
> > Cc: Zhiguang Liu 
> > Signed-off-by: Chandramohan Akula
> 
> > ---
> >  MdePkg/Library/UefiLib/UefiLib.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/MdePkg/Library/UefiLib/UefiLib.c
> > b/MdePkg/Library/UefiLib/UefiLib.c
> > index 835218f9824f..b6a33a0a488e 100644
> > --- a/MdePkg/Library/UefiLib/UefiLib.c
> > +++ b/MdePkg/Library/UefiLib/UefiLib.c
> > @@ -839,7 +839,7 @@ LookupUnicodeString2 (
> >SupportedLanguages += 3;
> >
> >  }
> >
> >} else {
> >
> > -Found = !IsLanguageSupported(Language, SupportedLanguages);
> >
> > +Found = !IsLanguageSupported(SupportedLanguages, Language);
> >
> >}
> >
> >
> >
> >
> >
> > @@ -1133,7 +1133,7 @@ AddUnicodeString2 (
> >SupportedLanguages += 3;
> >
> >  }
> >
> >} else {
> >
> > -Found = !IsLanguageSupported(Language, SupportedLanguages);
> >
> > +Found = !IsLanguageSupported(SupportedLanguages, Language);
> >
> >}
> >
> >//
> >
> >// If Language is not a member of SupportedLanguages, then return
> > EFI_UNSUPPORTED
> >
> > --
> > 2.27.0
> 
> 
> 
> 
> 
> 
> 





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




[edk2-devel] TianoCore Bug Triage - APAC / NAMO - Tue, 03/16/2021 6:30pm-7:30pm #cal-reminder

2021-03-16 Thread devel@edk2.groups.io Calendar
*Reminder:* TianoCore Bug Triage - APAC / NAMO

*When:* Tuesday, 16 March 2021, 6:30pm to 7:30pm, (GMT-07:00) America/Los 
Angeles

*Where:* 
https://meetingsamer34.webex.com/meetingsamer34/j.php?MTID=mb96c5bd411bd010e1e6d43a6f6c65f45

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=1057055 )

*Organizer:* Liming Gao gaolim...@byosoft.com.cn ( 
gaolim...@byosoft.com.cn?subject=Re:%20Event:%20TianoCore%20Bug%20Triage%20-%20APAC%20%2F%20NAMO
 )

*Description:*

TianoCore Bug Triage - APAC / NAMO

Hosted by Liming Gao

https://meetingsamer34.webex.com/meetingsamer34/j.php?MTID=mb96c5bd411bd010e1e6d43a6f6c65f45

Wednesday, Jan 20, 2021 10:30 am | 50 minutes | (UTC+08:00) Beijing, Chongqing, 
Hong Kong, Urumqi

Occurs every Wednesday effective 1/20/2021 from 10:30 AM to 11:20 AM, 
(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi

Meeting number: 126 867 1239

Password: ZhqYQunw246 (94797869 from video systems)

d8edc6c9604344b08f727b4bf054eaac_20210120T023000Z

Join by video system

Dial 1268671...@meetingsamer34.webex.com

You can also dial 173.243.2.68 and enter your meeting number.

Join by phone

Use VoIP only


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




[edk2-devel] 回复: [PATCH] MdePkg: use CpuPause() in CpuDeadLoop()

2021-03-16 Thread gaoliming
Ankur:
  Can you give the detail usage for the lower power state when enter into
CpuDeadLoop()?

Thanks
Liming
> -邮件原件-
> 发件人: Ankur Arora 
> 发送时间: 2021年3月17日 6:59
> 收件人: devel@edk2.groups.io
> 抄送: Ankur Arora ; Liming Gao
> ; Michael D Kinney
> 
> 主题: [PATCH] MdePkg: use CpuPause() in CpuDeadLoop()
> 
> Use CpuPause() to allow the CPU to go into a lower power state
> state while we spin wait.
> 
> Cc: Liming Gao 
> Signed-off-by: Ankur Arora 
> Reviewed-by: Michael D Kinney 
> ---
>  MdePkg/Library/BaseLib/CpuDeadLoop.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Library/BaseLib/CpuDeadLoop.c
> b/MdePkg/Library/BaseLib/CpuDeadLoop.c
> index 9e110cacbc96..3cd304351a65 100644
> --- a/MdePkg/Library/BaseLib/CpuDeadLoop.c
> +++ b/MdePkg/Library/BaseLib/CpuDeadLoop.c
> @@ -28,5 +28,7 @@ CpuDeadLoop (
>  {
>volatile UINTN  Index;
> 
> -  for (Index = 0; Index == 0;);
> +  for (Index = 0; Index == 0;) {
> +CpuPause();
> +  }
>  }
> --
> 2.9.3





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




Re: [edk2-devel] [edk2-discuss] Google Summer of Code Interested Student

2021-03-16 Thread Nate DeSimone
Hi Laszlo,

> -Original Message-
> From: disc...@edk2.groups.io  On Behalf Of
> Laszlo Ersek
> Sent: Tuesday, March 16, 2021 8:24 AM
> To: Desimone, Nathaniel L 
> Cc: disc...@edk2.groups.io; cadenkli...@gmail.com; edk2-devel-groups-io
> ; Ard Biesheuvel (TianoCore)
> ; Leif Lindholm (Nuvia address)
> 
> Subject: Re: [edk2-discuss] Google Summer of Code Interested Student
> 
> Hi Nate,
> 
> (adding Leif and Ard)
> 
> On 03/13/21 03:52, Desimone, Nathaniel L wrote:
> > I've created a new wiki page for this task with all the information I
> > have gathered thus far. I've done some more experimentation and found
> > that there are several newer terminal emulators that don't support DEC
> > Special Graphics so I've reduced the number of modes where DEC Special
> > Graphics should be preferred. Laszlo, if you could take a look at the
> > terminal type matrix I created that would be very helpful.
> >
> > https://github.com/tianocore/tianocore.github.io/wiki/Tasks-Terminal-d
> > river-improvements
> 
> (
> 
> My background:
> 
> I settled on plain (non-UTF-8) xterm around 1998, and have been using it
> ever since. Whenever something was off, I always tried to hammer the
> application into conformance with my particular xterm setup, rather than the
> other way around. I also have some quirky terminal settings -- for me,
> "backspace" generates ^H / keycode 22 (stty sets erase to ^H), "delete"
> generates keycode 119, and there's no "rubout". I still don't use UTF-8 (I use
> latin2).
> 
> )
> 
> * Regarding ArmVirtPkg, I stick with the default TTY_TERMINAL=FALSE
>   setting (which means VT-100). Using that setting, I see the following
>   kind of "ASCII approximation" for box drawing:
> 
>   
> /--\
>   |Boot Manager   
>|
>   
> \--/
> 
>   I'm really happy with this, as I don't care much for nice-looking
>   boxes; instead I prefer portability.
> 
>   (NB: this seems to disagree with your "Current Behavior (Which is
>   wrong)" line for VT100, as it suggests CP437. That's not what I'm
>   seeing with VT100.)

I went back and looked at this is more detail, and I missed the following 
critical detail:

if (TerminalDevice->TerminalType != TerminalTypePcAnsi) {
  GraphicChar = AsciiChar;
}

Yes you are totally right! I've adjusted the table to reflect this behavior.

> 
>   TTY_TERMINAL=TRUE would mainly affect backspace / delete I think -- as
>   far as I recall, that's why I asked Roy not to make TTY_TERMINAL=TRUE
>   the default, in 2015:
> 
>   http://mid.mail-archive.com/555458DB.3090602@redhat.com
>   http://mid.mail-
> archive.com/CAFECyb_E+bGZt5xv7QhRqyD0jX=AzoEMw7VW_tjZr+E=sQf8w
> w...@mail.gmail.com
> 
>   (I'd like to CC Roy, but I can't tell if he's now working for Linaro,
>   Cavium, HPE, Marvell, or another company.)
> 
> * Regarding OvmfPkg, currently PC_ANSI is hard-coded, and for me it
>   looks like this:
> 
> 
> ÚÄÄÄ
> ÄÄÄż
>   łBoot Manager   
>ł
> 
> ŔÄÄÄ
> ÄÄÄŮ
> 
>   Obviously I'd much prefer if I got the simple ASCII approximation here
>   as well.
> 
> * Whether VT100 and/or PC_ANSI and/or TTY_TERM are *officially*
> supposed
>   to use DEC Special Graphics, I can't tell.

The UEFI spec doesn't read on this at all, even though it describes VT100 and 
VT100+ as separate modes... it doesn't say how they differ. I agree with you 
that it seems reasonable for VT100 to keep character output to strict ASCII 
only... that way the "+" in VT100+ actually means something. I've updated the 
wiki accordingly.

I'd advocate for the default to be switched to VT_UTF8. I really don't think 
you will run into many terminal emulators that don't implement UTF-8 anymore, 
XTerm included. Those who want pure ASCII output can switch to VT100.

> 
>   I know what my preferences are:
> 
>   - the current BackSpace and Delete mappings (which work fine for me
> with both VT100 and PC_ANSI, but *not* with TTY_TERM),
> 
>   - and the most primitive ASCII mapping (no special graphics, no UTF-8
> sequences, etc). I really like a super dumb terminal, where taking
> simple "ASCII screenshots" (and pasting them into plaintext emails!)
> is *trivial*.
> 
>   ... Looking at your "Expected Behavior" table, there is only one line
>   left with "poor man's ASCII" -- namely, TTY_TERM. Unfortunately,
>   TTY_TERM breaks my BackSpace / Delete settings :(
> 
> * In summary, I'd prefer if (a) VT100 stayed as-is (using "poor man's
>   ASCII", as seen in ArmVirtPkg), and (b) if OVMF used *that* VT100,
>   rather than PC_ANSI, by default.
> 
> Thanks!
> Laszlo
> 
> 
> 
> 
> 




[edk2-devel] [PATCH] MdePkg: use CpuPause() in CpuDeadLoop()

2021-03-16 Thread Ankur Arora
Use CpuPause() to allow the CPU to go into a lower power state
state while we spin wait.

Cc: Liming Gao 
Signed-off-by: Ankur Arora 
Reviewed-by: Michael D Kinney 
---
 MdePkg/Library/BaseLib/CpuDeadLoop.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Library/BaseLib/CpuDeadLoop.c 
b/MdePkg/Library/BaseLib/CpuDeadLoop.c
index 9e110cacbc96..3cd304351a65 100644
--- a/MdePkg/Library/BaseLib/CpuDeadLoop.c
+++ b/MdePkg/Library/BaseLib/CpuDeadLoop.c
@@ -28,5 +28,7 @@ CpuDeadLoop (
 {
   volatile UINTN  Index;
 
-  for (Index = 0; Index == 0;);
+  for (Index = 0; Index == 0;) {
+CpuPause();
+  }
 }
-- 
2.9.3



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72938): https://edk2.groups.io/g/devel/message/72938
Mute This Topic: https://groups.io/mt/81390478/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] EmbeddedPkg: fix guid for PrePiHobLib

2021-03-16 Thread Ard Biesheuvel
On Tue, 16 Mar 2021 at 20:53, Matthew Carlson  wrote:
>
> Currently there is a duplicate GUID shared by two INFs.
> This rolls the INF for the PrePiHobLib.
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2381
>
> Cc: Leif Lindholm 
> Cc: Ard Biesheuvel 
> Cc: devel@edk2.groups.io
>
> Signed-off-by: Matthew Carlson 

Reviewed-by: Ard Biesheuvel 

Thanks for the patch

PR submitted, this should appear on master shortly.


> ---
>  EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf 
> b/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
> index b2c4c04bfd76..55de4511fc98 100644
> --- a/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
> +++ b/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
> @@ -12,7 +12,7 @@
>  [Defines]
>INF_VERSION= 0x00010005
>BASE_NAME  = PrePiHobLib
> -  FILE_GUID  = 1F3A3278-82EB-4C0D-86F1-5BCDA5846CB2
> +  FILE_GUID  = AEF7D85A-6A91-4ACD-9A28-193DEFB325FB
>MODULE_TYPE= BASE
>VERSION_STRING = 1.0
>LIBRARY_CLASS  = HobLib
> --
> 2.30.1.windows.1
>


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




[edk2-devel] [PATCH v2 1/1] EmbeddedPkg: fix guid for PrePiHobLib

2021-03-16 Thread Matthew Carlson
Currently there is a duplicate GUID shared by two INFs.
This rolls the INF for the PrePiHobLib.
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2381

Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
Cc: devel@edk2.groups.io

Signed-off-by: Matthew Carlson 
---
 EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf 
b/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
index b2c4c04bfd76..55de4511fc98 100644
--- a/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
+++ b/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
@@ -12,7 +12,7 @@
 [Defines]
   INF_VERSION= 0x00010005
   BASE_NAME  = PrePiHobLib
-  FILE_GUID  = 1F3A3278-82EB-4C0D-86F1-5BCDA5846CB2
+  FILE_GUID  = AEF7D85A-6A91-4ACD-9A28-193DEFB325FB
   MODULE_TYPE= BASE
   VERSION_STRING = 1.0
   LIBRARY_CLASS  = HobLib
-- 
2.30.1.windows.1



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




[edk2-devel] [PATCH v2 0/1] Fix GUID in PrePiHobLib

2021-03-16 Thread Matthew Carlson
Currently there is a duplicate GUID shared by two INFs.
This rolls the INF for the PrePiHobLib.
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2381

Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
Cc: devel@edk2.groups.io

Matthew Carlson (1):
  EmbeddedPkg: fix guid for PrePiHobLib

 EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.30.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72935): https://edk2.groups.io/g/devel/message/72935
Mute This Topic: https://groups.io/mt/81385985/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] MdeModulePkg/VariableRuntimeDxe: avoid double VA conversion of FVB protocol

2021-03-16 Thread Samer El-Haj-Mahmoud
Late to the party, but I confirm that this fixes the SetVariable() runtime 
calls on Solid Run Honeycomb LX2 (confirmed from multiple distros)

Tested-by: Samer El-Haj-Mahmoud 



> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Laszlo
> Ersek via groups.io
> Sent: Tuesday, March 16, 2021 11:58 AM
> To: Ard Biesheuvel ; devel@edk2.groups.io
> Cc: liming@intel.com; Jon (j...@solid-run.com) ;
> l...@nuviainc.com
> Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/VariableRuntimeDxe:
> avoid double VA conversion of FVB protocol
>
> On 03/13/21 00:05, Ard Biesheuvel wrote:
> > For historical reasons, the VariableRuntimeDxe performs virtual
> > address conversion on the FVB protocol member pointers of the protocol
> > instance that backs the EFI variable store. However, the driver that
> > produces the actual instance should be doing this, as it is the owner,
> > and provides the actual implementation of those methods.
> >
> > Unfortunately, we cannot simply change this: existing drivers may rely
> > on this behavior, and so the variable driver should take care to only
> > convert the pointers when necessary, but leave them alone when the
> > owner is taking care of this.
> >
> > The virtual address switch event can be delivered in arbitrary order,
> > and so we should take care of this in a way that does not rely on
> > whether this driver converts its pointers either before or after the
> > owner of the FVB protocol receives the event.
> >
> > So let's not convert the pointers at all when the event is delivered,
> > but record the converted addresses in a shadow FVB protocol. This way,
> > we can check when the variable driver is invoked at runtime whether
> > the switch has occurred or not, and perform the switch if it hasn't.
> >
> > Signed-off-by: Ard Biesheuvel 
> > ---
> > Build tested only.
> >
> >  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c | 50
> > +---
> >  1 file changed, 43 insertions(+), 7 deletions(-)
> >
> > diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
> > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
> > index 0fca0bb2a9b5..3d83ac4452ee 100644
> > --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
> > +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
> > @@ -37,6 +37,8 @@ EDKII_VAR_CHECK_PROTOCOLmVarCheck
> = { VarCheckRegis
> >  
> > VarCheckVariablePropertySet,
> >
> > VarCheckVariablePropertyGet };
> >
> > +STATIC EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
> mFvbProtocolShadow;
> > +
> >  /**
> >Some Secure Boot Policy Variable may update following other variable
> changes(SecureBoot follows PK change, etc).
> >Record their initial State when variable write service is ready.
> > @@ -105,8 +107,26 @@ AcquireLockOnlyAtBootTime (
> >IN EFI_LOCK *Lock
> >)
> >  {
>
> (1) Why is AcquireLockOnlyAtBootTime() the best place to add this?
>
> (Considering especially the leading comment, "This is a temperary function
> that will be removed when EfiAcquireLock() in UefiLib can handle the call in
> UEFI Runtimer driver in RT phase".)
>
> Obviously, I don't want to create more work for you! I just feel that, if 
> this is
> not the best place, we shouldn't overload this function with a new
> responsibility.
>
> > +  EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL  *FvbInstance;
> > +
> >if (!AtRuntime ()) {
> >  EfiAcquireLock (Lock);
> > +  } else {
> > +//
> > +// Check whether we need to swap in the converted pointer values for
> the
> > +// FVB protocol methods
> > +//
> > +FvbInstance = mVariableModuleGlobal->FvbInstance;
> > +if (FvbInstance != NULL &&
> > +FvbInstance->GetBlockSize != mFvbProtocolShadow.GetBlockSize)
> > + {
>
> (2) It occurs to me that the following pattern (in a single-threaded
> environment):
>
> if (a != b) {
>   a = b;
> }
>
> is just:
>
>   a = b;
>
> (the small CPU cost notwithstanding).
>
> And that puts this patch in a bit different light: it's not that we may or may
> not convert. Instead, we *always* convert, the question is *when* we apply
> the result of the conversion.
>
> Functionally, there is no difference, but to me mentally, there'd be a
> difference, if we said "delay applying the runtime conversion until first 
> call".
>
> Anyway... just wanted to highlight this: we could drop the GetBlockSize
> funcptr comparison. But, we don't have to.
>
> Given the reviews from Liming and Hao -- and thank you in the first place for
> writing the patch! --, I won't really ask for a v2. I'd just somehow prefer 
> the
> compat logic to be elsewhere, rather than in AcquireLockOnlyAtBootTime().
> In the first place, I'm not clear what we currently use
> AcquireLockOnlyAtBootTime() for.
>
> Up to the maintainers to decide whether this justifies v2. If not:
>
> Acked-by: Laszlo Ersek 
>
> Thanks
> Laszlo
>
> 

Re: [edk2-devel] [RFC PATCH 00/14] Firmware Support for Fast Live Migration for AMD SEV

2021-03-16 Thread Singh, Brijesh
[AMD Official Use Only - Internal Distribution Only]

Hi Yao,

In the current proposal the accelerated migration does not involve the PSP. I 
will let Tobin and Dov comment on how things works in current prototype.

If PSP was involved in the migration, then flow would be like this:

- During the guest creation time two things will happen (both source and 
destination VMs go through this step)
  a) create a random VM encryption key (VEK) -- the key is used for encrypting 
the guest pages.
  b) guest owner supplies a session blob to the PSP. The session blob contains 
transport encryption key (TEK).  The TEK is used to encrypt all the 
confidential information exchanged between the PSP and the external entities 
such as a guest owner or another PSP.

During the migration
i) source VMM asks PSP to get a page that can be migrated.
ii) source PSP  encrypt the guest pages using the TEK
iii) source VMM write the encrypted pages on the wire
iv) destination VMM  will call PSP to put the received encrypted page in the 
guest memory.
v) destination PSP will decrypt the received pages using TEK, then encrypt it 
using the VEK before copying it to the guest memory.

As you see in the flow, the PSP's never share the keys. The TEK is wrapped in 
the session blob provided to the PSP on launch.

You are correct that the SEV/SEV-ES does not support querying the attestation 
report after the guest boot. All the attestation need to be done during the 
guest creation time.

With SEV-SNP, a guest OS/BIOS can call PSP to get the attestation report. The 
SEV-SNP, provides a method in which the guest owner can provide an IMI (Initial 
migration agent) through the launch process. The IMI will be measured 
separately and stored in IMD (Initial Migration Digest). When source VMM is 
ready to migrate it will use a PSP command (VM_EXPORT) to export the data from 
source to destination. The export will contains information about IMD etc. The 
destination VMM will use the PSP command (ABSORB) to import the incoming data. 
During the absorb process the destination PSP will check the IMD to ensure that 
same IMI is used at the source end. I have cut short few details in the email; 
See the SEV-SNP spec (section migration 4.11) for more.

Thanks
Brijesh

-Original Message-
From: Yao, Jiewen 
Sent: Friday, March 12, 2021 8:32 PM
To: devel@edk2.groups.io; Yao, Jiewen ; 
to...@linux.ibm.com
Cc: Dov Murik ; Tobin Feldman-Fitzthum 
; James Bottomley ; Hubertus Franke 
; Singh, Brijesh ; Kalra, Ashish 
; Grimm, Jon ; Lendacky, Thomas 

Subject: RE: [edk2-devel] [RFC PATCH 00/14] Firmware Support for Fast Live 
Migration for AMD SEV

Hi
We discuss the patch internally. We do see PROs and CONs with this approach.
The advantage is that it is very simple. In-VM migration can save lots of 
effort on security context restore.
On the other hand, we feel not so comfortable to reserve a dedicate CPU to 
achieve that. Similar to the feedback in the community.

Using Hot-Plug is not a solution for Intel TDX as well. It is unsupported now.

I like the idea to diverge the migration boot mode v.s. normal boot mode in SEC 
phase.
We must be very carefully handle this migration boot mode, to avoid any 
touching on system memory.
Intel TDX Virtual Firmware skips the PEI phase directly. If we choose this 
approach, SEC-based migration is our preference.

Besides this patch, we would like to understand a full picture.
1) How the key is passed from source VM to destination?
I saw you mentions: "Key sharing is out of scope for this part of the RFC."
"This will probably be implemented via inject-launch-secret in the future"

Does that mean two PSP will sync with each other and negotiate the key, after 
the Migration Agent (MA) checks the policy?

2) How the attestation is supported?
I read the whitepaper 
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.amd.com%2Fsystem%2Ffiles%2FTechDocs%2FSEV-SNP-strengthening-vm-isolation-with-integrity-protection-and-more.pdfdata=04%7C01%7Cbrijesh.singh%40amd.com%7Cb19ccecd6ca946abd0eb08d8e5c84177%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637511995981376795%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=h67VntbdjigZFvhRfP6%2FGYTE9eqrFDqJRojWqG0C25c%3Dreserved=0.
It seems SEV and SEV-ES only support attestation during launch, I don't believe 
this migration feature will impact the attestation report. Am I right?
SEV-SNP supports more flexible attestation, does it include any information 
about the new migrated content?


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Yao,
> Jiewen
> Sent: Thursday, March 4, 2021 9:49 AM
> To: devel@edk2.groups.io; to...@linux.ibm.com
> Cc: Dov Murik ; Tobin Feldman-Fitzthum
> ; James Bottomley ; Hubertus Franke
> ; Brijesh Singh ; Ashish
> Kalra ; Jon Grimm ; Tom
> Lendacky ; Yao, Jiewen 
> Subject: Re: [edk2-devel] [RFC PATCH 00/14] Firmware Support for Fast
> Live Migration for AMD 

[edk2-devel] [edk2-platforms][PATCH v2 5/5] Socionext: DeveloperBox DSC File: Added library for VariableSmmRuntimeDxe

2021-03-16 Thread Kun Qin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3250

This change added NULL MmUnblockMemoryLib instance in DeveloperBox.dsc to
resolve new dependency by VariableSmmRuntimeDxe. The library interface
is consumed by variable module to better support variable runtime cache
feature.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 

Signed-off-by: Kun Qin 
---

Notes:
v2:
- No review, no change.

 Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc 
b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
index 0a11b796cca5..acaa4cd90fc5 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
@@ -49,6 +49,8 @@ [LibraryClasses]
   
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
 !endif
 
+  
MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf
+
 [LibraryClasses.common.SEC]
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
   BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
-- 
2.30.0.windows.1



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




[edk2-devel] [edk2-platforms][PATCH v2 4/5] Vlv2TbltDevicePkg: PlatformPkg DSC: Added library for VariableSmmRuntimeDxe

2021-03-16 Thread Kun Qin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3250

This change added NULL MmUnblockMemoryLib instance in PlatformPkg dsc
file to resolve new dependency by VariableSmmRuntimeDxe. The library
interface is consumed by variable module to better support variable
runtime cache feature.

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Michael D Kinney 

Signed-off-by: Kun Qin 
---

Notes:
v2:
- Added Michael K. to cc list [Zailiang]

 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 1 +
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index 409f31c982d7..33e93b74800c 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -311,6 +311,7 @@ [LibraryClasses.IA32]
   LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
   EfiRegTableLib|Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.inf
   
HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf
+  
MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf
 
 [LibraryClasses.IA32.DXE_DRIVER]
   DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index 38bd825c8bdc..f7a876353649 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -313,6 +313,7 @@ [LibraryClasses.X64]
   LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
   EfiRegTableLib|Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.inf
   
HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf
+  
MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf
 
 [LibraryClasses.X64.DXE_DRIVER]
   DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-- 
2.30.0.windows.1



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




[edk2-devel] [edk2-platforms][PATCH v2 0/5] Resolve dependency from MmUnblockMemoryLib

2021-03-16 Thread Kun Qin
This patch series is a follow up of previous submission:
https://edk2.groups.io/g/devel/message/72645

v2 patches mainly focus on feedback for reviewed commits in v1 patches,
including:
a. Adding "Reviewed-by" tags for applicable patch;
b. Updating cc list include critical reviewers;

Patch v2 branch: 
https://github.com/kuqin12/edk2-platforms/tree/unblock_dependency_v2

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Liming Gao 
Cc: Eric Dong 
Cc: Michael D Kinney 
Cc: Kelly Steele 
Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Ard Biesheuvel 
Cc: Leif Lindholm 

Kun Qin (5):
  MinPlatformPkg: CoreCommonLib: Added new library for
VariableSmmRuntimeDxe
  MinPlatformPkg: Core Include Files: Added Tcg2Acpi driver after
separation
  QuarkPlatformPkg: Quark DSC File: Added new library for
VariableSmmRuntimeDxe
  Vlv2TbltDevicePkg: PlatformPkg DSC: Added library for
VariableSmmRuntimeDxe
  Socionext: DeveloperBox DSC File: Added library for
VariableSmmRuntimeDxe

 Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc   | 1 +
 Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc  | 1 +
 Platform/Intel/MinPlatformPkg/Include/Fdf/CoreSecurityLateInclude.fdf | 3 ++-
 Platform/Intel/QuarkPlatformPkg/Quark.dsc | 1 +
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc  | 1 +
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc   | 1 +
 Platform/Socionext/DeveloperBox/DeveloperBox.dsc  | 2 ++
 7 files changed, 9 insertions(+), 1 deletion(-)

-- 
2.30.0.windows.1



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




[edk2-devel] [edk2-platforms][PATCH v2 3/5] QuarkPlatformPkg: Quark DSC File: Added new library for VariableSmmRuntimeDxe

2021-03-16 Thread Kun Qin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3250

This change added NULL MmUnblockMemoryLib instance in Quark.dsc to
resolve new dependency by VariableSmmRuntimeDxe. The library interface
is consumed by variable module to better support variable runtime cache
feature.

Cc: Michael D Kinney 
Cc: Kelly Steele 

Signed-off-by: Kun Qin 
Reviewed-by: Kelly Steele 
---

Notes:
v2:
- Added reviewed-by tag [Kelly]

 Platform/Intel/QuarkPlatformPkg/Quark.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/Intel/QuarkPlatformPkg/Quark.dsc 
b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
index e29c7465b1e4..c58da58348e3 100644
--- a/Platform/Intel/QuarkPlatformPkg/Quark.dsc
+++ b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
@@ -146,6 +146,7 @@ [LibraryClasses]
   
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
   LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
+  
MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf
   VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
   
VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
   
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
-- 
2.30.0.windows.1



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




[edk2-devel] [edk2-platforms][PATCH v2 2/5] MinPlatformPkg: Core Include Files: Added Tcg2Acpi driver after separation

2021-03-16 Thread Kun Qin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3251

This change follows the commit that separates the original Tcg2Smm driver
into Tcg2Acpi and Tcg2 MM based on functionality in DXE and MM. The new
Tcg2Acpi driver now will be responsible for patching and publishing ACPI
table from DXE, and Tcg2 MM driver will be handling runtime MMI requests
from ACPI calls.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Liming Gao 
Cc: Eric Dong 

Signed-off-by: Kun Qin 
Reviewed-by: Liming Gao 
---

Notes:
v2:
- Added reviewed-by tag [Liming]

 Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc  | 1 +
 Platform/Intel/MinPlatformPkg/Include/Fdf/CoreSecurityLateInclude.fdf | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc 
b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
index a76a9bf5fdf9..c2ade240f314 100644
--- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
@@ -155,6 +155,7 @@
   NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf
   }
   SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
+  SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.inf
   SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf
 !endif
 
diff --git 
a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreSecurityLateInclude.fdf 
b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreSecurityLateInclude.fdf
index 45dda7ea0a91..3edc878e173b 100644
--- a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreSecurityLateInclude.fdf
+++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreSecurityLateInclude.fdf
@@ -14,6 +14,7 @@
 !if gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable == TRUE
 INF  SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf
 INF  SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
-INF  RuleOverride = DRIVER_ACPITABLE SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
+INF  SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
+INF  RuleOverride = DRIVER_ACPITABLE SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.inf
 INF  SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf
 !endif
-- 
2.30.0.windows.1



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




[edk2-devel] [edk2-platforms][PATCH v2 1/5] MinPlatformPkg: CoreCommonLib: Added new library for VariableSmmRuntimeDxe

2021-03-16 Thread Kun Qin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3250

This change added NULL MmUnblockMemoryLib instance in dsc files of
CoreCommonLib to resolve newly introduced dependency. The library
interface is consumed by VariableSmmRuntimeDxe to better support variable
runtime cache feature.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Liming Gao 
Cc: Eric Dong 

Signed-off-by: Kun Qin 
Reviewed-by: Liming Gao 
---

Notes:
v2:
- Added reviewed-by tag [Liming]

 Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc 
b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
index cb40e111b5dd..bcabb797e91a 100644
--- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
@@ -159,6 +159,7 @@ [LibraryClasses.common]
   LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf
 
   SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf
+  
MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf
 
   SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
   
VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
-- 
2.30.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72928): https://edk2.groups.io/g/devel/message/72928
Mute This Topic: https://groups.io/mt/81383278/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/10] support CPU hot-unplug

2021-03-16 Thread Ankur Arora

On 2021-03-16 7:07 a.m., Laszlo Ersek wrote:

On 03/12/21 07:26, Ankur Arora wrote:

Hi,

This series adds OVMF support for CPU hot-unplug.

QEMU secureboot hot-unplug logic corresponding to this is in upstream.
Also posted here:
   
https://lore.kernel.org/qemu-devel/20201207140739.3829993-1-imamm...@redhat.com/

Testing (with QEMU 5.2.50):
  - Stable with randomized CPU plug/unplug (guest maxcpus=33,128)
  - Synthetic tests with simultaneous multi CPU hot-unplug

Also at:
   github.com/terminus/edk2/ hot-unplug-v9

Changelog:

v9:
   - Rebased on top of edd46cd407ea
   - Clarify comments around memory-barriers in patches 7, 8, 9
   - Address other review comments from v8


Merged as commit range 4751a48aeb2a..f3bdfc41866e, via
, with the following R-b's
/ comments / light tweaks added:


Awesome! Thanks Laszlo.

And, thanks especially for the thorough reviews.

Ankur




  1:  4b4466ed7c44 =  1:  0cb242e33693 OvmfPkg/CpuHotplugSmm: refactor hotplug 
logic
  2:  719828efdebe !  2:  a752dd07466c OvmfPkg/CpuHotplugSmm: collect 
hot-unplug events
 @@ -20,6 +20,7 @@
  Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
  Signed-off-by: Ankur Arora 
  Message-Id: <20210312062656.2477515-3-ankur.a.ar...@oracle.com>
 +Reviewed-by: Laszlo Ersek 

  diff --git a/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h 
b/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
  --- a/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
  3:  7d732efcb7af =  3:  2d92e052c3af OvmfPkg/CpuHotplugSmm: add Qemu Cpu 
Status helper
  4:  64649e42 =  4:  15e6ae8ea400 OvmfPkg/CpuHotplugSmm: introduce 
UnplugCpus()
  5:  7190a5d134a7 !  5:  8ade9d425a6e OvmfPkg: define CPU_HOT_EJECT_DATA
 @@ -15,6 +15,7 @@
  Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
  Signed-off-by: Ankur Arora 
  Message-Id: <20210312062656.2477515-6-ankur.a.ar...@oracle.com>
 +Reviewed-by: Laszlo Ersek 

  diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec
  --- a/OvmfPkg/OvmfPkg.dec
  6:  1fd019dac476 !  6:  b6d5996706dd OvmfPkg/SmmCpuFeaturesLib: init CPU 
ejection state
 @@ -22,6 +22,7 @@
  Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
  Signed-off-by: Ankur Arora 
  Message-Id: <20210312062656.2477515-7-ankur.a.ar...@oracle.com>
 +Reviewed-by: Laszlo Ersek 

  diff --git a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf 
b/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
  --- a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
  7:  c8758d9b9764 !  7:  af9c77e151fa OvmfPkg/SmmCpuFeaturesLib: call CPU 
hot-eject handler
 @@ -19,6 +19,7 @@
  Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
  Signed-off-by: Ankur Arora 
  Message-Id: <20210312062656.2477515-8-ankur.a.ar...@oracle.com>
 +Reviewed-by: Laszlo Ersek 

  diff --git a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c 
b/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c
  --- a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c
  8:  5ff8e8700678 !  8:  30c69d2cfa63 OvmfPkg/CpuHotplugSmm: add EjectCpu()
 @@ -19,6 +19,7 @@
  Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
  Signed-off-by: Ankur Arora 
  Message-Id: <20210312062656.2477515-9-ankur.a.ar...@oracle.com>
 +Reviewed-by: Laszlo Ersek 

  diff --git a/OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf 
b/OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf
  --- a/OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf
  9:  d6660f8f2f14 !  9:  f05328886302 OvmfPkg/CpuHotplugSmm: do actual CPU 
hot-eject
 @@ -27,6 +27,9 @@
  Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
  Signed-off-by: Ankur Arora 
  Message-Id: <20210312062656.2477515-10-ankur.a.ar...@oracle.com>
 +Reviewed-by: Laszlo Ersek 
 +[ler...@redhat.com: unneeded inner QemuSelector declaration in 
EjectCpu()
 + triggers VS warning #4456 (local variable shadowed); remove it]

  diff --git a/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h 
b/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
  --- a/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
 @@ -102,8 +105,6 @@
  +UINT32 Idx;
  +
  +for (Idx = 0; Idx < mCpuHotEjectData->ArrayLength; Idx++) {
 -+  UINT64 QemuSelector;
 -+
  +  QemuSelector = mCpuHotEjectData->QemuSelectorMap[Idx];
  +
  +  if (QemuSelector != CPU_EJECT_QEMU_SELECTOR_INVALID) {
10:  0a9a1cd40b98 ! 10:  f3bdfc41866e OvmfPkg/SmmControl2Dxe: negotiate CPU 
hot-unplug
 @@ -14,6 +14,9 @@
  Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
  Signed-off-by: Ankur Arora 
  Message-Id: <20210312062656.2477515-11-ankur.a.ar...@oracle.com>
 +[ler...@redhat.com: preserve the empty line between the 

Re: [edk2-devel] [RFC PATCH 00/14] Firmware Support for Fast Live Migration for AMD SEV

2021-03-16 Thread Tobin Feldman-Fitzthum

On 3/12/21 9:32 PM, Yao, Jiewen wrote:


Hi
We discuss the patch internally. We do see PROs and CONs with this approach.
The advantage is that it is very simple. In-VM migration can save lots of 
effort on security context restore.
On the other hand, we feel not so comfortable to reserve a dedicate CPU to 
achieve that. Similar to the feedback in the community.

Using Hot-Plug is not a solution for Intel TDX as well. It is unsupported now.

I like the idea to diverge the migration boot mode v.s. normal boot mode in SEC 
phase.
We must be very carefully handle this migration boot mode, to avoid any 
touching on system memory.
Intel TDX Virtual Firmware skips the PEI phase directly. If we choose this 
approach, SEC-based migration is our preference.

Besides this patch, we would like to understand a full picture.
1) How the key is passed from source VM to destination?
I saw you mentions: "Key sharing is out of scope for this part of the RFC."
"This will probably be implemented via inject-launch-secret in the future"

Does that mean two PSP will sync with each other and negotiate the key, after 
the Migration Agent (MA) checks the policy?


The source and destination migration handlers will need to share a key. 
If we only relied on the PSP for migration, we could use the existing 
secure channel between the PSP and the guest owner to transfer the 
pages. Unfortunately the throughput of this approach is far too low. 
Thus, we have some migration handler running on a guest vCPU with a 
transport key shared between the source and the target.


The main mechanism for getting a key to the migration handler is 
inject-launch-secret. Here the guest owner can provide a secret to the 
PSP via a secure channel and the PSP will inject it at some guest 
physical address. You use inject-launch-secret after the launch 
measurement of the guest has been generated to inject the secret 
conditionally. One approach would be to inject the transport key 
directly in the source and the target. This is pretty simple, but might 
have a few drawbacks. The injection has to happen at boot, meaning that 
the source machine would have to be provisioned with a transport key 
before a migration happens and that all migrations from that machine 
would have to use the same transport key. One way around this would be 
to inject asymmetric keys and use them to derive the transport key.


Another approach entirely is to use the PSP to migrate just a few pages, 
which might include a secret set by the source MH that the target MH 
could use to decrypt incoming pages. Using the PSP to migrate pages 
requires some extra kernel support.


For the RFC, we just assume that there is some shared key. We have 
talked some about the various options internally.



2) How the attestation is supported?
I read the whitepaper 
https://www.amd.com/system/files/TechDocs/SEV-SNP-strengthening-vm-isolation-with-integrity-protection-and-more.pdf.
It seems SEV and SEV-ES only support attestation during launch, I don't believe 
this migration feature will impact the attestation report. Am I right?
SEV-SNP supports more flexible attestation, does it include any information 
about the new migrated content?


Brijesh already addressed most of this. In our approach the MH is baked 
into the firmware, which can be attested prior to injecting the key. In 
other words there aren't any additional steps to attest the MH and it 
does not change the functionality of any existing attestation mechanisms.


-Tobin




-Original Message-
From: devel@edk2.groups.io  On Behalf Of Yao, Jiewen
Sent: Thursday, March 4, 2021 9:49 AM
To: devel@edk2.groups.io; to...@linux.ibm.com
Cc: Dov Murik ; Tobin Feldman-Fitzthum
; James Bottomley ; Hubertus Franke
; Brijesh Singh ; Ashish Kalra
; Jon Grimm ; Tom Lendacky
; Yao, Jiewen 
Subject: Re: [edk2-devel] [RFC PATCH 00/14] Firmware Support for Fast Live
Migration for AMD SEV

Hi Tobin
Thanks for your patch.
You may that Intel is working on TDX for the same live migration feature.

Please give me some time (about 1 work week) to digest and evaluate the patch
and impact.
Then I will provide feedback.

Thank you
Yao Jiewen


-Original Message-
From: devel@edk2.groups.io  On Behalf Of Tobin
Feldman-Fitzthum
Sent: Wednesday, March 3, 2021 4:48 AM
To: devel@edk2.groups.io
Cc: Dov Murik ; Tobin Feldman-Fitzthum
; Tobin Feldman-Fitzthum ; James
Bottomley ; Hubertus Franke ;
Brijesh Singh ; Ashish Kalra

;

Jon Grimm ; Tom Lendacky

Subject: [edk2-devel] [RFC PATCH 00/14] Firmware Support for Fast Live
Migration for AMD SEV

This is a demonstration of fast migration for encrypted virtual machines
using a Migration Handler that lives in OVMF. This demo uses AMD SEV,
but the ideas may generalize to other confidential computing platforms.
With AMD SEV, guest memory is encrypted and the hypervisor cannot access
or move it. This makes migration tricky. In this demo, we show how the
HV can ask a Migration Handler (MH) in the firmware for 

Re: [edk2-devel] [PATCH v2] UefiCpuPkg/MpInitLib: avoid printing debug messages in AP

2021-03-16 Thread Laszlo Ersek
On 03/16/21 02:52, Ray Ni wrote:
> MpInitLib contains a function MicrocodeDetect() which is called by
> all threads as an AP procedure.
> Today this function contains below code:
> 
> if (CurrentRevision != LatestRevision) {
>   AcquireSpinLock(>MpLock);
>   DEBUG ((
> EFI_D_ERROR,
> "Updated microcode signature [0x%08x] does not match \
> loaded microcode signature [0x%08x]\n",
> CurrentRevision, LatestRevision
> ));
>   ReleaseSpinLock(>MpLock);
> }
> 
> When the if-check is passed, the code may call into PEI services:
> 1. AcquireSpinLock
>When the PcdSpinTimeout is not 0, TimerLib
>GetPerformanceCounterProperties() is called. And some of the
>TimerLib implementations would get the information cached in
>HOB. But AP procedure cannot call PEI services to retrieve the
>HOB list.
> 
> 2. DEBUG
>Certain DebugLib relies on ReportStatusCode services and the
>ReportStatusCode PPI is retrieved through the PEI services.
>DebugLibSerialPort should be used.
>But when SerialPortLib is implemented to depend on PEI services,
>even using DebugLibSerialPort can still cause AP calls PEI
>services resulting hang.
> 
> It causes a lot of debugging effort on the platform side.
> 
> There are 2 options to fix the problem:
> 1. make sure platform DSC chooses the proper DebugLib and set the
>PcdSpinTimeout to 0. So that AcquireSpinLock and DEBUG don't call
>PEI services.
> 2. remove the AcquireSpinLock and DEBUG call from the procedure.
> 
> Option #2 is preferred because it's not practical to ask every
> platform DSC to be written properly.
> 
> Following option #2, there are two sub-options:
> 2.A. Just remove the if-check.
> 2.B. Capture the CurrentRevision and ExpectedRevision in the memory
>  for each AP and print them together from BSP.
> 
> The patch follows option 2.B.
> 
> Signed-off-by: Ray Ni 
> Cc: Eric Dong 
> Cc: Laszlo Ersek 
> Cc: Rahul Kumar 
> ---
>  UefiCpuPkg/Library/MpInitLib/Microcode.c | 11 +--
>  UefiCpuPkg/Library/MpInitLib/MpLib.c | 25 
>  UefiCpuPkg/Library/MpInitLib/MpLib.h |  1 +
>  3 files changed, 27 insertions(+), 10 deletions(-)
> 
> diff --git a/UefiCpuPkg/Library/MpInitLib/Microcode.c 
> b/UefiCpuPkg/Library/MpInitLib/Microcode.c
> index 15629591e2..297c2abcd1 100644
> --- a/UefiCpuPkg/Library/MpInitLib/Microcode.c
> +++ b/UefiCpuPkg/Library/MpInitLib/Microcode.c
> @@ -315,17 +315,8 @@ Done:
>  MSR_IA32_BIOS_UPDT_TRIG,
>  (UINT64) (UINTN) MicrocodeData
>  );
> -//
> -// Get and check new microcode signature
> -//
> -CurrentRevision = GetCurrentMicrocodeSignature ();
> -if (CurrentRevision != LatestRevision) {
> -  AcquireSpinLock(>MpLock);
> -  DEBUG ((EFI_D_ERROR, "Updated microcode signature [0x%08x] does not 
> match \
> -loaded microcode signature [0x%08x]\n", CurrentRevision, 
> LatestRevision));
> -  ReleaseSpinLock(>MpLock);
> -}
>}
> +  CpuMpData->CpuData[ProcessorNumber].MicrocodeRevision = 
> GetCurrentMicrocodeSignature ();
>  }
>  
>  /**
> diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c 
> b/UefiCpuPkg/Library/MpInitLib/MpLib.c
> index 5040053dad..3d945972a0 100644
> --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
> +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
> @@ -2135,6 +2135,31 @@ MpInitLibInitialize (
>  }
>}
>  
> +  //
> +  // Dump the microcode revision for each core.
> +  //
> +  DEBUG_CODE (
> +UINT32 ThreadId;
> +UINT32 ExpectedMicrocodeRevision;
> +CpuInfoInHob = (CPU_INFO_IN_HOB *) (UINTN) CpuMpData->CpuInfoInHob;
> +for (Index = 0; Index < CpuMpData->CpuCount; Index++) {
> +  GetProcessorLocationByApicId (CpuInfoInHob[Index].InitialApicId, NULL, 
> NULL, );
> +  if (ThreadId == 0) {
> +//
> +// MicrocodeDetect() loads microcode in first thread of each core, 
> so,
> +// CpuMpData->CpuData[Index].MicrocodeEntryAddr is initialized only 
> for first thread of each core.
> +//
> +ExpectedMicrocodeRevision = 0;
> +if (CpuMpData->CpuData[Index].MicrocodeEntryAddr != 0) {
> +  ExpectedMicrocodeRevision = ((CPU_MICROCODE_HEADER 
> *)(UINTN)CpuMpData->CpuData[Index].MicrocodeEntryAddr)->UpdateRevision;
> +}
> +DEBUG ((
> +  DEBUG_INFO, "CPU[%04d]: Microcode revision = %08x, expected = 
> %08x\n",
> +  Index, CpuMpData->CpuData[Index].MicrocodeRevision, 
> ExpectedMicrocodeRevision
> +  ));
> +  }
> +}
> +  );
>//
>// Initialize global data for MP support
>//
> diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h 
> b/UefiCpuPkg/Library/MpInitLib/MpLib.h
> index 0bd60388b1..66f9eb2304 100644
> --- a/UefiCpuPkg/Library/MpInitLib/MpLib.h
> +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.h
> @@ -144,6 +144,7 @@ typedef struct {
>UINT32 ProcessorSignature;
>UINT8   

Re: [edk2-devel] [patch 24/28] UefiCpuPkg: Consume RegisterFilterLibNull instance

2021-03-16 Thread Laszlo Ersek
On 03/15/21 04:58, Dandan Bi wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> Add RegisterFilterLibNull in dsc which will be consumed
> by IoLib and BaseLib.
> 
> Cc: Eric Dong 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 
> Cc: Rahul Kumar 
> Signed-off-by: Dandan Bi 
> ---
>  UefiCpuPkg/UefiCpuPkg.dsc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/UefiCpuPkg/UefiCpuPkg.dsc b/UefiCpuPkg/UefiCpuPkg.dsc
> index 7db419471d..9e5dbb271f 100644
> --- a/UefiCpuPkg/UefiCpuPkg.dsc
> +++ b/UefiCpuPkg/UefiCpuPkg.dsc
> @@ -56,10 +56,11 @@
>
> SmmCpuFeaturesLib|UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
>
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
>
> PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
>
> TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
>VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
> +  
> RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
>  
>  [LibraryClasses.common.SEC]
>PlatformSecLib|UefiCpuPkg/Library/PlatformSecLibNull/PlatformSecLibNull.inf
>  !if $(TOOL_CHAIN_TAG) == "XCODE5"
>
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf
> 

Reviewed-by: Laszlo Ersek 



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




Re: [edk2-devel] [patch 16/28] OvmfPkg: Consume RegisterFilterLibNull instance

2021-03-16 Thread Laszlo Ersek
On 03/15/21 04:58, Dandan Bi wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> Add RegisterFilterLibNull in dsc which will be consumed
> by IoLib and BaseLib.
> 
> Cc: Laszlo Ersek 
> Cc: Ard Biesheuvel 
> Cc: Jordan Justen 
> Signed-off-by: Dandan Bi 
> ---
>  OvmfPkg/OvmfPkgIa32.dsc| 1 +
>  OvmfPkg/OvmfPkgIa32X64.dsc | 1 +
>  OvmfPkg/OvmfPkgX64.dsc | 1 +
>  OvmfPkg/OvmfXen.dsc| 1 +
>  4 files changed, 4 insertions(+)
> 
> diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> index 1eaf3e99c6..46a2bc02a9 100644
> --- a/OvmfPkg/OvmfPkgIa32.dsc
> +++ b/OvmfPkg/OvmfPkgIa32.dsc
> @@ -169,10 +169,11 @@
>QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf
>
> QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParserLib.inf
>VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
>LoadLinuxLib|OvmfPkg/Library/LoadLinuxLib/LoadLinuxLib.inf
>
> MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf
> +  
> RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
>  !if $(SMM_REQUIRE) == FALSE
>LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf
>  !endif
>
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
>
> FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
> diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
> index 4a5a430147..812c2af48b 100644
> --- a/OvmfPkg/OvmfPkgIa32X64.dsc
> +++ b/OvmfPkg/OvmfPkgIa32X64.dsc
> @@ -173,10 +173,11 @@
>QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf
>
> QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParserLib.inf
>VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
>LoadLinuxLib|OvmfPkg/Library/LoadLinuxLib/LoadLinuxLib.inf
>
> MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf
> +  
> RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
>  !if $(SMM_REQUIRE) == FALSE
>LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf
>  !endif
>
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
>
> FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index d4d601b444..76a41aa351 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -173,10 +173,11 @@
>QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf
>
> QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParserLib.inf
>VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
>LoadLinuxLib|OvmfPkg/Library/LoadLinuxLib/LoadLinuxLib.inf
>
> MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf
> +  
> RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
>  !if $(SMM_REQUIRE) == FALSE
>LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf
>  !endif
>
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
>
> FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
> diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
> index 507029404f..f057c9d7c1 100644
> --- a/OvmfPkg/OvmfXen.dsc
> +++ b/OvmfPkg/OvmfXen.dsc
> @@ -163,10 +163,11 @@
>
> QemuLoadImageLib|OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.inf
>
> MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf
>LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf
>
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
>
> FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
> +  
> RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
>  
>  !if $(SOURCE_DEBUG_ENABLE) == TRUE
>
> PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
>
> DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
>  !else
> 

(1) There are more DSC files under OvmfPkg -- the total set is:

OvmfPkg/AmdSev/AmdSevX64.dsc
OvmfPkg/Bhyve/BhyveX64.dsc
OvmfPkg/OvmfPkgIa32.dsc
OvmfPkg/OvmfPkgIa32X64.dsc
OvmfPkg/OvmfPkgX64.dsc
OvmfPkg/OvmfXen.dsc

(2) Can we please pick a spot that looks similar in all of those DSC
files? If this new class is going to be a dependency of BaseLib, can we
add it near the BaseLib resolution, in each DSC? (E.g., between BaseLib
and SafeIntLib.)

Thanks
Laszlo



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

Re: [edk2-devel] [patch 04/28] ArmVirtPkg: Consume RegisterFilterLibNull instance

2021-03-16 Thread Laszlo Ersek
Hi Dandan,

On 03/15/21 04:58, Dandan Bi wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> Add RegisterFilterLibNull in dsc which will be consumed
> by IoLib and BaseLib.
> 
> Cc: Laszlo Ersek 
> Cc: Ard Biesheuvel 
> Cc: Leif Lindholm 
> Signed-off-by: Dandan Bi 
> ---
>  ArmVirtPkg/ArmVirt.dsc.inc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
> index d9abadbe70..4d4ebc5f0c 100644
> --- a/ArmVirtPkg/ArmVirt.dsc.inc
> +++ b/ArmVirtPkg/ArmVirt.dsc.inc
> @@ -51,10 +51,11 @@
>
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
>PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
>IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicArmVirt.inf
>
> UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
>CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
> +  
> RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
>  
>UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
>HobLib|ArmVirtPkg/Library/ArmVirtDxeHobLib/ArmVirtDxeHobLib.inf
>
> UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
>
> DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
> 

your git setup does not include the setting for formatting the @@ hunk
headers into the patches. This makes it more difficult for me to
determine which [LibraryClasses] section is being modified. If you run
SetupGit.py, that should take care of the setting. Please fix this.

Anyway, it appears that [LibraryClasses.common] is the section being
modified, so that should be OK.

Reviewed-by: Laszlo Ersek 

Thanks
Laszlo



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




Re: [edk2-devel] [PATCH 2/2] UefiCpuPkg/CpuDxe: Guarantee GDT is below 4GB

2021-03-16 Thread Laszlo Ersek
On 03/16/21 04:33, Ray Ni wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3233
> 
> GDT needs to be allocated below 4GB in 64bit environment
> because AP needs it for entering to protected mode.
> CPU running in big real mode cannot access above 4GB GDT.
> 
> But CpuDxe driver contains below code:
>   gdt = AllocateRuntimePool (sizeof (GdtTemplate) + 8);
>   .
>   gdtPtr.Base = (UINT32)(UINTN)(VOID*) gdt;
> 
> The AllocateRuntimePool() may allocate memory above 4GB.
> Thus, we cannot use AllocateRuntimePool (), instead,
> we should use AllocatePages() to make sure GDT is below 4GB space.
> 
> Signed-off-by: Ray Ni 
> Cc: Eric Dong 
> Cc: Laszlo Ersek 
> Cc: Rahul Kumar 
> ---
>  UefiCpuPkg/CpuDxe/CpuGdt.c | 21 -
>  1 file changed, 16 insertions(+), 5 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuDxe/CpuGdt.c b/UefiCpuPkg/CpuDxe/CpuGdt.c
> index 322ce87142..98d5551702 100644
> --- a/UefiCpuPkg/CpuDxe/CpuGdt.c
> +++ b/UefiCpuPkg/CpuDxe/CpuGdt.c
> @@ -124,15 +124,26 @@ InitGlobalDescriptorTable (
>VOID
>)
>  {
> +  EFI_STATUSStatus;
>GDT_ENTRIES   *Gdt;
>IA32_DESCRIPTOR   Gdtr;
> +  EFI_PHYSICAL_ADDRESS  Memory;
>  
>//
> -  // Allocate Runtime Data for the GDT
> -  //
> -  Gdt = AllocateRuntimePool (sizeof (gGdtTemplate) + 8);
> -  ASSERT (Gdt != NULL);
> -  Gdt = ALIGN_POINTER (Gdt, 8);
> +  // Allocate Runtime Data below 4GB for the GDT
> +  // AP uses the same GDT when it's waken up from real mode so

(1) s/waken/woken/

> +  // the GDT needs to be below 4GB.
> +  //
> +  Memory = SIZE_4GB - 1;
> +  Status = gBS->AllocatePages (
> +  AllocateMaxAddress,
> +  EfiRuntimeServicesData,
> +  EFI_SIZE_TO_PAGES (sizeof (gGdtTemplate)),
> +  
> +  );
> +  ASSERT_EFI_ERROR (Status);
> +  ASSERT ((Memory != 0) && (Memory < SIZE_4GB));

(2) Can we drop the (Memory < SIZE_4GB) sub-condition? That should be
guaranteed by the UEFI spec.

> +  Gdt = (GDT_ENTRIES *) (UINTN) Memory;
>  
>//
>// Initialize all GDT entries
> 

Anyway...

Reviewed-by: Laszlo Ersek 

Thanks
Laszlo



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72920): https://edk2.groups.io/g/devel/message/72920
Mute This Topic: https://groups.io/mt/81368665/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/2] UefiCpuPkg/CpuDxe: Rename variables to follow EDKII coding standard

2021-03-16 Thread Laszlo Ersek
On 03/16/21 04:33, Ray Ni wrote:
> The change doesn't impact any functionality.
> 
> Signed-off-by: Ray Ni 
> Cc: Eric Dong 
> Cc: Laszlo Ersek 
> Cc: Rahul Kumar 
> ---
>  UefiCpuPkg/CpuDxe/CpuGdt.c | 27 +--
>  1 file changed, 13 insertions(+), 14 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuDxe/CpuGdt.c b/UefiCpuPkg/CpuDxe/CpuGdt.c
> index a1ab543f2d..322ce87142 100644
> --- a/UefiCpuPkg/CpuDxe/CpuGdt.c
> +++ b/UefiCpuPkg/CpuDxe/CpuGdt.c
> @@ -2,7 +2,7 @@
>C based implementation of IA32 interrupt handling only
>requiring a minimal assembly interrupt entry point.
>  
> -  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
> +  Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
>SPDX-License-Identifier: BSD-2-Clause-Patent
>  
>  **/
> @@ -13,7 +13,7 @@
>  //
>  // Global descriptor table (GDT) Template
>  //
> -STATIC GDT_ENTRIES GdtTemplate = {
> +STATIC GDT_ENTRIES gGdtTemplate = {
>//
>// NULL_SEL
>//
> @@ -124,32 +124,31 @@ InitGlobalDescriptorTable (
>VOID
>)
>  {
> -  GDT_ENTRIES *gdt;
> -  IA32_DESCRIPTOR gdtPtr;
> +  GDT_ENTRIES   *Gdt;
> +  IA32_DESCRIPTOR   Gdtr;
>  
>//
>// Allocate Runtime Data for the GDT
>//
> -  gdt = AllocateRuntimePool (sizeof (GdtTemplate) + 8);
> -  ASSERT (gdt != NULL);
> -  gdt = ALIGN_POINTER (gdt, 8);
> +  Gdt = AllocateRuntimePool (sizeof (gGdtTemplate) + 8);
> +  ASSERT (Gdt != NULL);
> +  Gdt = ALIGN_POINTER (Gdt, 8);
>  
>//
>// Initialize all GDT entries
>//
> -  CopyMem (gdt, , sizeof (GdtTemplate));
> +  CopyMem (Gdt, , sizeof (gGdtTemplate));
>  
>//
>// Write GDT register
>//
> -  gdtPtr.Base = (UINT32)(UINTN)(VOID*) gdt;
> -  gdtPtr.Limit = (UINT16) (sizeof (GdtTemplate) - 1);
> -  AsmWriteGdtr ();
> +  Gdtr.Base  = (UINT32) (UINTN) Gdt;
> +  Gdtr.Limit = (UINT16) (sizeof (gGdtTemplate) - 1);
> +  AsmWriteGdtr ();
>  
>//
>// Update selector (segment) registers base on new GDT
>//
> -  SetCodeSelector ((UINT16)CPU_CODE_SEL);
> -  SetDataSelectors ((UINT16)CPU_DATA_SEL);
> +  SetCodeSelector  ((UINT16) CPU_CODE_SEL);
> +  SetDataSelectors ((UINT16) CPU_DATA_SEL);
>  }
> -
> 

(1) I think "mGdtTemplate" would be a better name than "gGdtTemplate". I
think the "g" prefix is used when an object is identical for all
firmware modules (such as named GUIDs, for example).

(2) I think the last hunk does not belong in this patch -- more
precisely, I *disagree* with the last hunk. Inserting a space in the
middle of a typecast, after the parenthesized typename, is a bad
practice in edk2; it is error prone and suggests that typecasts have low
binding power (when in reality they have almost the strongest binding).

Thanks
Laszlo



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72919): https://edk2.groups.io/g/devel/message/72919
Mute This Topic: https://groups.io/mt/81368664/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 00/35] Consume RegisterFilterLibNull instance

2021-03-16 Thread Laszlo Ersek
On 03/16/21 16:00, Ard Biesheuvel wrote:
> On Tue, 16 Mar 2021 at 15:56, Dandan Bi  wrote:
>>
>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
>> RFC: https://edk2.groups.io/g/devel/message/72530
>>
>>
>> Add RegisterFilterLibNull in dsc files in edk2-platforms repo,
>> which will be consumed by IoLib and BaseLib.
>>
>> This is the following update in edk2-platforms repo for the change in edk2,
>> which will add RegisterFilterLib dependency for IoLib and BaseLib to 
>> filter/trace
>> port IO/MMIO/MSR access.
>> https://edk2.groups.io/g/devel/message/72754
>>
>> Cc: Leif Lindholm 
>> Cc: Michael D Kinney 
>> Cc: Liming Gao 
>>
> 
> It is a bit disappointing that we have to update every platform in
> existence again to apply a change to a core module.
> 
> Is there really not a better way to provide a 'default' resolution for
> a library class? Maybe a change to the .DEC format, so that the file
> which defines the library class can provide a resolution that is used
> if none is provided by the .DSC file?

I vaguely remember this feature was raised earlier (maybe implemented
via cross-Pkg DSC !include files). I believe some patches were posted
even. I think I asked for a libclass-by-libclass conversion for existent
platform DSCs (so I could verify that the new DSC include file would
give OVMF and ArmVirt the same resolutions as before). I don't recall
updates afterwards.

Thanks
Laszlo

> 
> 
> 
>> Dandan Bi (35):
>>   Drivers/ASIX: Consume RegisterFilterLibNull instance
>>   Drivers/DisplayLink: Consume RegisterFilterLibNull instance
>>   Drivers/OptionRomPkg: Consume RegisterFilterLibNull instance
>>   Features/Debugging: Consume RegisterFilterLibNull instance
>>   Features/Network: Consume RegisterFilterLibNull instance
>>   Features/OutOfBandManagement: Consume RegisterFilterLibNull instance
>>   Features/PowerManagement: Consume RegisterFilterLibNull instance
>>   Features/SystemInformation: Consume RegisterFilterLibNull instance
>>   Features/UserInterface: Consume RegisterFilterLibNull instance
>>   Platform/AMD: Consume RegisterFilterLibNull instance
>>   Platform/ARM: Consume RegisterFilterLibNull instance
>>   Platform/BeagleBoard: Consume RegisterFilterLibNull instance
>>   Platform/BoardModulePkg: Consume RegisterFilterLibNull instance
>>   Platform/MinPlatformPkg: Consume RegisterFilterLibNull instance
>>   Platform/QuarkPlatformPkg: Consume RegisterFilterLibNull instance
>>   Platform/Vlv2TbltDevicePkg: Consume RegisterFilterLibNull instance
>>   Platform/LeMaker: Consume RegisterFilterLibNull instance
>>   Platform/Qemu: Consume RegisterFilterLibNull instance
>>   Platform/RaspberryPi: Consume RegisterFilterLibNull instance
>>   Platform/RISC-V: Consume RegisterFilterLibNull instance
>>   Platform/SiFive: Consume RegisterFilterLibNull instance
>>   Platform/Socionext: Consume RegisterFilterLibNull instance
>>   Platform/SoftIron: Consume RegisterFilterLibNull instance
>>   Silicon/Hisilicon: Consume RegisterFilterLibNull instance
>>   Silicon/CoffeelakeSiliconPkg: Consume RegisterFilterLibNull instance
>>   Silicon/IntelSiliconPkg: Consume RegisterFilterLibNull instance
>>   Silicon/KabylakeSiliconPkg: Consume RegisterFilterLibNull instance
>>   Silicon/QuarkSocPkg: Consume RegisterFilterLibNull instance
>>   Silicon/TigerlakeSiliconPkg: Consume RegisterFilterLibNull instance
>>   Silicon/Marvell: Consume RegisterFilterLibNull instance
>>   Silicon/NXP: Consume RegisterFilterLibNull instance
>>   Silicon/Openmoko: Consume RegisterFilterLibNull instance
>>   Silicon/RISC_V: Consume RegisterFilterLibNull instance
>>   Silicon/Synopsys/DesignWare: Consume RegisterFilterLibNull instance
>>   Silicon/TexasInstruments: Consume RegisterFilterLibNull instance
>>
>>  Drivers/ASIX/Asix.dsc  | 1 +
>>  Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkPkg.dsc  | 1 +
>>  Drivers/OptionRomPkg/OptionRomPkg.dsc  | 3 ++-
>>  .../Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc | 3 ++-
>>  .../Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc | 3 ++-
>>  .../PostCodeDebugFeaturePkg/Include/PostCodeDebugFeature.dsc   | 3 ++-
>>  .../Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc | 3 ++-
>>  .../Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc | 3 ++-
>>  .../OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc | 3 ++-
>>  .../OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc | 3 ++-
>>  .../Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc   | 3 ++-
>>  .../SmbiosFeaturePkg/Include/SmbiosFeature.dsc | 3 ++-
>>  .../Intel/UserInterface/LogoFeaturePkg/Include/LogoFeature.dsc | 3 ++-
>>  .../UserAuthFeaturePkg/Include/UserAuthFeature.dsc | 3 ++-
>>  .../Include/VirtualKeyboardFeature.dsc | 3 ++-
>>  Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 1 +
>>  Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc 

Re: [edk2-devel] [PATCH v1 1/1] UefiCpuPkg/CpuCacheInfoLib: Collect cache associative type

2021-03-16 Thread Laszlo Ersek
On 03/15/21 09:04, Jason wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3265
> 
> Support collecting cache associative type in CpuCacheInfoLib.
> This prevents the user from using additional code to obtain the
> same information.
> 
> Signed-off-by: Jason Lou 
> Cc: Ray Ni 
> Cc: Eric Dong 
> Cc: Laszlo Ersek 
> Cc: Rahul Kumar 
> ---
>  UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c | 47 
> +++-
>  UefiCpuPkg/Include/Library/CpuCacheInfoLib.h | 13 +-
>  UefiCpuPkg/Library/CpuCacheInfoLib/InternalCpuCacheInfoLib.h | 13 +-
>  3 files changed, 50 insertions(+), 23 deletions(-)

OVMF doesn't use this library, so I'd like to skip this review.

Thanks
Laszlo

> 
> diff --git a/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c 
> b/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c
> index d46fb0425851..48ef5dae8ee0 100644
> --- a/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c
> +++ b/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c
> @@ -23,18 +23,18 @@ CpuCacheInfoPrintCpuCacheInfoTable (
>  {
>UINTN Index;
>  
> -  DEBUG ((DEBUG_INFO, 
> "+---+---+\n"));
> -  DEBUG ((DEBUG_INFO, "| Index | Packge  CoreType  CacheLevel  CacheType  
> CacheWays  CacheSizeinKB  CacheCount |\n"));
> -  DEBUG ((DEBUG_INFO, 
> "+---+---+\n"));
> +  DEBUG ((DEBUG_INFO, 
> "+---+--+\n"));
> +  DEBUG ((DEBUG_INFO, "| Index | Packge  CoreType  CacheLevel  CacheType  
> CacheWays (FA|DM) CacheSizeinKB  CacheCount |\n"));
> +  DEBUG ((DEBUG_INFO, 
> "+---+--+\n"));
>  
>for (Index = 0; Index < CpuCacheInfoCount; Index++) {
> -DEBUG ((DEBUG_INFO, "| %4x  | %4x   %2x%2x  %2x  
>  %4x  %8x %4x |\n", Index,
> -CpuCacheInfo[Index].Package, CpuCacheInfo[Index].CoreType, 
> CpuCacheInfo[Index].CacheLevel,
> -CpuCacheInfo[Index].CacheType, CpuCacheInfo[Index].CacheWays, 
> CpuCacheInfo[Index].CacheSizeinKB,
> -CpuCacheInfo[Index].CacheCount));
> +DEBUG ((DEBUG_INFO, "| %4x  | %4x   %2x%2x  %2x  
>  %4x ( %x| %x) %8x %4x |\n",
> +Index, CpuCacheInfo[Index].Package, CpuCacheInfo[Index].CoreType, 
> CpuCacheInfo[Index].CacheLevel,
> +CpuCacheInfo[Index].CacheType, CpuCacheInfo[Index].CacheWays, 
> CpuCacheInfo[Index].FullyAssociativeCache,
> +CpuCacheInfo[Index].DirectMappedCache, 
> CpuCacheInfo[Index].CacheSizeinKB, CpuCacheInfo[Index].CacheCount));
>}
>  
> -  DEBUG ((DEBUG_INFO, 
> "+---+---+\n"));
> +  DEBUG ((DEBUG_INFO, 
> "+---+--+\n"));
>  }
>  
>  /**
> @@ -160,6 +160,7 @@ CpuCacheInfoCollectCoreAndCacheData (
>CPUID_CACHE_PARAMS_EAXCacheParamEax;
>CPUID_CACHE_PARAMS_EBXCacheParamEbx;
>UINT32CacheParamEcx;
> +  CPUID_CACHE_PARAMS_EDXCacheParamEdx;
>CPUID_NATIVE_MODEL_ID_AND_CORE_TYPE_EAX   NativeModelIdAndCoreTypeEax;
>COLLECT_CPUID_CACHE_DATA_CONTEXT  *Context;
>CPUID_CACHE_DATA  *CacheData;
> @@ -185,17 +186,19 @@ CpuCacheInfoCollectCoreAndCacheData (
>CacheParamLeafIndex = 0;
>  
>while (CacheParamLeafIndex < MAX_NUM_OF_CACHE_PARAMS_LEAF) {
> -AsmCpuidEx (CPUID_CACHE_PARAMS, CacheParamLeafIndex, 
> , , , NULL);
> +AsmCpuidEx (CPUID_CACHE_PARAMS, CacheParamLeafIndex, 
> , , , 
> );
>  
>  if (CacheParamEax.Bits.CacheType == 0) {
>break;
>  }
>  
> -CacheData[CacheParamLeafIndex].CacheLevel = 
> (UINT8)CacheParamEax.Bits.CacheLevel;
> -CacheData[CacheParamLeafIndex].CacheType  = 
> (UINT8)CacheParamEax.Bits.CacheType;
> -CacheData[CacheParamLeafIndex].CacheWays  = 
> (UINT16)CacheParamEbx.Bits.Ways;
> -CacheData[CacheParamLeafIndex].CacheShareBits = 
> (UINT16)CacheParamEax.Bits.MaximumAddressableIdsForLogicalProcessors;
> -CacheData[CacheParamLeafIndex].CacheSizeinKB  = (CacheParamEbx.Bits.Ways 
> + 1) *
> +CacheData[CacheParamLeafIndex].CacheLevel= 
> (UINT8)CacheParamEax.Bits.CacheLevel;
> +CacheData[CacheParamLeafIndex].CacheType = 
> (UINT8)CacheParamEax.Bits.CacheType;
> +CacheData[CacheParamLeafIndex].CacheWays = 
> (UINT16)CacheParamEbx.Bits.Ways;
> +CacheData[CacheParamLeafIndex].FullyAssociativeCache = 
> (UINT8)CacheParamEax.Bits.FullyAssociativeCache;
> +CacheData[CacheParamLeafIndex].DirectMappedCache = 
> (UINT8)CacheParamEdx.Bits.ComplexCacheIndexing;
> +

Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/VariableRuntimeDxe: avoid double VA conversion of FVB protocol

2021-03-16 Thread Laszlo Ersek
On 03/13/21 00:05, Ard Biesheuvel wrote:
> For historical reasons, the VariableRuntimeDxe performs virtual address
> conversion on the FVB protocol member pointers of the protocol instance
> that backs the EFI variable store. However, the driver that produces the
> actual instance should be doing this, as it is the owner, and provides
> the actual implementation of those methods.
> 
> Unfortunately, we cannot simply change this: existing drivers may rely
> on this behavior, and so the variable driver should take care to only
> convert the pointers when necessary, but leave them alone when the owner
> is taking care of this.
> 
> The virtual address switch event can be delivered in arbitrary order, and
> so we should take care of this in a way that does not rely on whether this
> driver converts its pointers either before or after the owner of the FVB
> protocol receives the event.
> 
> So let's not convert the pointers at all when the event is delivered, but
> record the converted addresses in a shadow FVB protocol. This way, we can
> check when the variable driver is invoked at runtime whether the switch
> has occurred or not, and perform the switch if it hasn't.
> 
> Signed-off-by: Ard Biesheuvel 
> ---
> Build tested only.
> 
>  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c | 50 
> +---
>  1 file changed, 43 insertions(+), 7 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c 
> b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
> index 0fca0bb2a9b5..3d83ac4452ee 100644
> --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
> +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
> @@ -37,6 +37,8 @@ EDKII_VAR_CHECK_PROTOCOLmVarCheck   
>= { VarCheckRegis
>  
> VarCheckVariablePropertySet,
>  
> VarCheckVariablePropertyGet };
>  
> +STATIC EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL mFvbProtocolShadow;
> +
>  /**
>Some Secure Boot Policy Variable may update following other variable 
> changes(SecureBoot follows PK change, etc).
>Record their initial State when variable write service is ready.
> @@ -105,8 +107,26 @@ AcquireLockOnlyAtBootTime (
>IN EFI_LOCK *Lock
>)
>  {

(1) Why is AcquireLockOnlyAtBootTime() the best place to add this?

(Considering especially the leading comment, "This is a temperary
function that will be removed when EfiAcquireLock() in UefiLib can
handle the call in UEFI Runtimer driver in RT phase".)

Obviously, I don't want to create more work for you! I just feel that,
if this is not the best place, we shouldn't overload this function with
a new responsibility.

> +  EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL  *FvbInstance;
> +
>if (!AtRuntime ()) {
>  EfiAcquireLock (Lock);
> +  } else {
> +//
> +// Check whether we need to swap in the converted pointer values for the
> +// FVB protocol methods
> +//
> +FvbInstance = mVariableModuleGlobal->FvbInstance;
> +if (FvbInstance != NULL &&
> +FvbInstance->GetBlockSize != mFvbProtocolShadow.GetBlockSize) {

(2) It occurs to me that the following pattern (in a single-threaded
environment):

if (a != b) {
  a = b;
}

is just:

  a = b;

(the small CPU cost notwithstanding).

And that puts this patch in a bit different light: it's not that we may
or may not convert. Instead, we *always* convert, the question is *when*
we apply the result of the conversion.

Functionally, there is no difference, but to me mentally, there'd be a
difference, if we said "delay applying the runtime conversion until
first call".

Anyway... just wanted to highlight this: we could drop the GetBlockSize
funcptr comparison. But, we don't have to.

Given the reviews from Liming and Hao -- and thank you in the first
place for writing the patch! --, I won't really ask for a v2. I'd just
somehow prefer the compat logic to be elsewhere, rather than in
AcquireLockOnlyAtBootTime(). In the first place, I'm not clear what we
currently use AcquireLockOnlyAtBootTime() for.

Up to the maintainers to decide whether this justifies v2. If not:

Acked-by: Laszlo Ersek 

Thanks
Laszlo

> +  FvbInstance->GetBlockSize   = mFvbProtocolShadow.GetBlockSize;
> +  FvbInstance->GetPhysicalAddress = 
> mFvbProtocolShadow.GetPhysicalAddress;
> +  FvbInstance->GetAttributes  = mFvbProtocolShadow.GetAttributes;
> +  FvbInstance->SetAttributes  = mFvbProtocolShadow.SetAttributes;
> +  FvbInstance->Read   = mFvbProtocolShadow.Read;
> +  FvbInstance->Write  = mFvbProtocolShadow.Write;
> +  FvbInstance->EraseBlocks= mFvbProtocolShadow.EraseBlocks;
> +}
>}
>  }
>  
> @@ -247,13 +267,22 @@ VariableClassAddressChangeEvent (
>UINTN  Index;
>  
>if (mVariableModuleGlobal->FvbInstance 

Re: [edk2-devel] [edk2-discuss] Google Summer of Code Interested Student

2021-03-16 Thread Laszlo Ersek
Hi Nate,

(adding Leif and Ard)

On 03/13/21 03:52, Desimone, Nathaniel L wrote:
> I've created a new wiki page for this task with all the information I
> have gathered thus far. I've done some more experimentation and found
> that there are several newer terminal emulators that don't support
> DEC Special Graphics so I've reduced the number of modes where DEC
> Special Graphics should be preferred. Laszlo, if you could take a
> look at the terminal type matrix I created that would be very
> helpful.
>
> https://github.com/tianocore/tianocore.github.io/wiki/Tasks-Terminal-driver-improvements

(

My background:

I settled on plain (non-UTF-8) xterm around 1998, and have been using it
ever since. Whenever something was off, I always tried to hammer the
application into conformance with my particular xterm setup, rather than
the other way around. I also have some quirky terminal settings -- for
me, "backspace" generates ^H / keycode 22 (stty sets erase to ^H),
"delete" generates keycode 119, and there's no "rubout". I still don't
use UTF-8 (I use latin2).

)

* Regarding ArmVirtPkg, I stick with the default TTY_TERMINAL=FALSE
  setting (which means VT-100). Using that setting, I see the following
  kind of "ASCII approximation" for box drawing:

  
/--\
  |Boot Manager 
 |
  
\--/

  I'm really happy with this, as I don't care much for nice-looking
  boxes; instead I prefer portability.

  (NB: this seems to disagree with your "Current Behavior (Which is
  wrong)" line for VT100, as it suggests CP437. That's not what I'm
  seeing with VT100.)

  TTY_TERMINAL=TRUE would mainly affect backspace / delete I think -- as
  far as I recall, that's why I asked Roy not to make TTY_TERMINAL=TRUE
  the default, in 2015:

  http://mid.mail-archive.com/555458DB.3090602@redhat.com
  
http://mid.mail-archive.com/CAFECyb_E+bGZt5xv7QhRqyD0jX=AzoEMw7VW_tjZr+E=sqf...@mail.gmail.com

  (I'd like to CC Roy, but I can't tell if he's now working for Linaro,
  Cavium, HPE, Marvell, or another company.)

* Regarding OvmfPkg, currently PC_ANSI is hard-coded, and for me it
  looks like this:

  
ÚÄÄż
  łBoot Manager 
 ł
  
ŔÄÄŮ

  Obviously I'd much prefer if I got the simple ASCII approximation here
  as well.

* Whether VT100 and/or PC_ANSI and/or TTY_TERM are *officially* supposed
  to use DEC Special Graphics, I can't tell.

  I know what my preferences are:

  - the current BackSpace and Delete mappings (which work fine for me
with both VT100 and PC_ANSI, but *not* with TTY_TERM),

  - and the most primitive ASCII mapping (no special graphics, no UTF-8
sequences, etc). I really like a super dumb terminal, where taking
simple "ASCII screenshots" (and pasting them into plaintext emails!)
is *trivial*.

  ... Looking at your "Expected Behavior" table, there is only one line
  left with "poor man's ASCII" -- namely, TTY_TERM. Unfortunately,
  TTY_TERM breaks my BackSpace / Delete settings :(

* In summary, I'd prefer if (a) VT100 stayed as-is (using "poor man's
  ASCII", as seen in ArmVirtPkg), and (b) if OVMF used *that* VT100,
  rather than PC_ANSI, by default.

Thanks!
Laszlo



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72915): https://edk2.groups.io/g/devel/message/72915
Mute This Topic: https://groups.io/mt/81273234/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 28/35] Silicon/QuarkSocPkg: Consume RegisterFilterLibNull instance

2021-03-16 Thread Steele, Kelly


Reviewed-by: Kelly Steele 

> -Original Message-
> From: Bi, Dandan 
> Sent: Tuesday, March 16, 2021 7:54 AM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D ; Steele, Kelly
> 
> Subject: [edk2-platforms] [patch 28/35] Silicon/QuarkSocPkg: Consume
> RegisterFilterLibNull instance
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.
> 
> Cc: Michael D Kinney 
> Cc: Kelly Steele 
> Signed-off-by: Dandan Bi 
> ---
>  Silicon/Intel/QuarkSocPkg/QuarkSocPkg.dsc | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Silicon/Intel/QuarkSocPkg/QuarkSocPkg.dsc
> b/Silicon/Intel/QuarkSocPkg/QuarkSocPkg.dsc
> index e743a5e272..5b9679f32f 100644
> --- a/Silicon/Intel/QuarkSocPkg/QuarkSocPkg.dsc
> +++ b/Silicon/Intel/QuarkSocPkg/QuarkSocPkg.dsc
> @@ -2,11 +2,11 @@
>  # INTEL Quark SoC Module Package Reference Implementations
>  #
>  # This DSC file is used for Package Level build.
>  #
>  # This Module provides FRAMEWORK reference implementation for INTEL
> Quark SoC.
> -#   Copyright (c) 2013-2016 Intel Corporation.
> +#   Copyright (c) 2013-2021 Intel Corporation.
>  #
>  #   SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
>  ##
> 
> @@ -62,10 +62,11 @@ [LibraryClasses]
>  !if $(CFG_SOURCE_DEBUG) == 1
> 
> PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibD
> ebug/PeCoffExtraActionLibDebug.inf
>  !else
> 
> PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BaseP
> eCoffExtraActionLibNull.inf
>  !endif
> +
> RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.i
> nf
>#
># UEFI & PI
>#
> 
> UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo
> otServicesTableLib.inf
> 
> UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib
> /UefiRuntimeServicesTableLib.inf
> --
> 2.18.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72914): https://edk2.groups.io/g/devel/message/72914
Mute This Topic: https://groups.io/mt/81378032/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 15/35] Platform/QuarkPlatformPkg: Consume RegisterFilterLibNull instance

2021-03-16 Thread Steele, Kelly


Reviewed-by: Kelly Steele 

> -Original Message-
> From: Bi, Dandan 
> Sent: Tuesday, March 16, 2021 7:54 AM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D ; Steele, Kelly
> 
> Subject: [edk2-platforms] [patch 15/35] Platform/QuarkPlatformPkg:
> Consume RegisterFilterLibNull instance
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.
> 
> Cc: Michael D Kinney 
> Cc: Kelly Steele 
> Signed-off-by: Dandan Bi 
> ---
>  Platform/Intel/QuarkPlatformPkg/Quark.dsc| 1 +
>  Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/Platform/Intel/QuarkPlatformPkg/Quark.dsc
> b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
> index e29c7465b1..632f8a44f1 100644
> --- a/Platform/Intel/QuarkPlatformPkg/Quark.dsc
> +++ b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
> @@ -101,10 +101,11 @@ [LibraryClasses]
> 
> PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BaseP
> eCoffExtraActionLibNull.inf
>  !endif
> 
> DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLi
> bNull.inf
> 
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/Base
> PeCoffGetEntryPointLib.inf
>VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
> +
> RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.i
> nf
> 
>#
># UEFI & PI
>#
> 
> UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo
> otServicesTableLib.inf
> diff --git a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
> b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
> index 6fdfba9a58..83909c6357 100644
> --- a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
> +++ b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
> @@ -89,10 +89,11 @@ [LibraryClasses]
> 
> PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BaseP
> eCoffExtraActionLibNull.inf
>  !endif
> 
> DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLi
> bNull.inf
> 
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/Base
> PeCoffGetEntryPointLib.inf
>VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
> +
> RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.i
> nf
> 
>#
># UEFI & PI
>#
> 
> UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo
> otServicesTableLib.inf
> --
> 2.18.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72913): https://edk2.groups.io/g/devel/message/72913
Mute This Topic: https://groups.io/mt/81378016/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 00/35] Consume RegisterFilterLibNull instance

2021-03-16 Thread Ard Biesheuvel
On Tue, 16 Mar 2021 at 15:56, Dandan Bi  wrote:
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> RFC: https://edk2.groups.io/g/devel/message/72530
>
>
> Add RegisterFilterLibNull in dsc files in edk2-platforms repo,
> which will be consumed by IoLib and BaseLib.
>
> This is the following update in edk2-platforms repo for the change in edk2,
> which will add RegisterFilterLib dependency for IoLib and BaseLib to 
> filter/trace
> port IO/MMIO/MSR access.
> https://edk2.groups.io/g/devel/message/72754
>
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
>

It is a bit disappointing that we have to update every platform in
existence again to apply a change to a core module.

Is there really not a better way to provide a 'default' resolution for
a library class? Maybe a change to the .DEC format, so that the file
which defines the library class can provide a resolution that is used
if none is provided by the .DSC file?



> Dandan Bi (35):
>   Drivers/ASIX: Consume RegisterFilterLibNull instance
>   Drivers/DisplayLink: Consume RegisterFilterLibNull instance
>   Drivers/OptionRomPkg: Consume RegisterFilterLibNull instance
>   Features/Debugging: Consume RegisterFilterLibNull instance
>   Features/Network: Consume RegisterFilterLibNull instance
>   Features/OutOfBandManagement: Consume RegisterFilterLibNull instance
>   Features/PowerManagement: Consume RegisterFilterLibNull instance
>   Features/SystemInformation: Consume RegisterFilterLibNull instance
>   Features/UserInterface: Consume RegisterFilterLibNull instance
>   Platform/AMD: Consume RegisterFilterLibNull instance
>   Platform/ARM: Consume RegisterFilterLibNull instance
>   Platform/BeagleBoard: Consume RegisterFilterLibNull instance
>   Platform/BoardModulePkg: Consume RegisterFilterLibNull instance
>   Platform/MinPlatformPkg: Consume RegisterFilterLibNull instance
>   Platform/QuarkPlatformPkg: Consume RegisterFilterLibNull instance
>   Platform/Vlv2TbltDevicePkg: Consume RegisterFilterLibNull instance
>   Platform/LeMaker: Consume RegisterFilterLibNull instance
>   Platform/Qemu: Consume RegisterFilterLibNull instance
>   Platform/RaspberryPi: Consume RegisterFilterLibNull instance
>   Platform/RISC-V: Consume RegisterFilterLibNull instance
>   Platform/SiFive: Consume RegisterFilterLibNull instance
>   Platform/Socionext: Consume RegisterFilterLibNull instance
>   Platform/SoftIron: Consume RegisterFilterLibNull instance
>   Silicon/Hisilicon: Consume RegisterFilterLibNull instance
>   Silicon/CoffeelakeSiliconPkg: Consume RegisterFilterLibNull instance
>   Silicon/IntelSiliconPkg: Consume RegisterFilterLibNull instance
>   Silicon/KabylakeSiliconPkg: Consume RegisterFilterLibNull instance
>   Silicon/QuarkSocPkg: Consume RegisterFilterLibNull instance
>   Silicon/TigerlakeSiliconPkg: Consume RegisterFilterLibNull instance
>   Silicon/Marvell: Consume RegisterFilterLibNull instance
>   Silicon/NXP: Consume RegisterFilterLibNull instance
>   Silicon/Openmoko: Consume RegisterFilterLibNull instance
>   Silicon/RISC_V: Consume RegisterFilterLibNull instance
>   Silicon/Synopsys/DesignWare: Consume RegisterFilterLibNull instance
>   Silicon/TexasInstruments: Consume RegisterFilterLibNull instance
>
>  Drivers/ASIX/Asix.dsc  | 1 +
>  Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkPkg.dsc  | 1 +
>  Drivers/OptionRomPkg/OptionRomPkg.dsc  | 3 ++-
>  .../Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc | 3 ++-
>  .../Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc | 3 ++-
>  .../PostCodeDebugFeaturePkg/Include/PostCodeDebugFeature.dsc   | 3 ++-
>  .../Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc | 3 ++-
>  .../Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc | 3 ++-
>  .../OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc | 3 ++-
>  .../OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc | 3 ++-
>  .../Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc   | 3 ++-
>  .../SmbiosFeaturePkg/Include/SmbiosFeature.dsc | 3 ++-
>  .../Intel/UserInterface/LogoFeaturePkg/Include/LogoFeature.dsc | 3 ++-
>  .../UserAuthFeaturePkg/Include/UserAuthFeature.dsc | 3 ++-
>  .../Include/VirtualKeyboardFeature.dsc | 3 ++-
>  Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 1 +
>  Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc   | 1 +
>  Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc   | 1 +
>  Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc | 3 ++-
>  Platform/Intel/BoardModulePkg/BoardModulePkg.dsc   | 3 ++-
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc| 3 ++-
>  Platform/Intel/QuarkPlatformPkg/Quark.dsc  | 1 +
>  Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc   | 1 +
>  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 3 

[edk2-devel] [edk2-platforms] [patch 30/35] Silicon/Marvell: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Marcin Wojtas 
Cc: Leif Lindholm 
Signed-off-by: Dandan Bi 
---
 Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc 
b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
index 4cdafe8b1f..ccb45a2adb 100644
--- a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
+++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
@@ -50,10 +50,11 @@ [LibraryClasses.common]
   CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
   PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
   PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
   
PciHostBridgeLib|Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLib.inf
   
PciSegmentLib|Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciSegmentLib/PciSegmentLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 # Basic UEFI services libraries
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 34/35] Silicon/Synopsys/DesignWare: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Signed-off-by: Dandan Bi 
---
 Silicon/Synopsys/DesignWare/DesignWare.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Silicon/Synopsys/DesignWare/DesignWare.dsc 
b/Silicon/Synopsys/DesignWare/DesignWare.dsc
index 098bba3f7d..2be1d81986 100755
--- a/Silicon/Synopsys/DesignWare/DesignWare.dsc
+++ b/Silicon/Synopsys/DesignWare/DesignWare.dsc
@@ -35,9 +35,10 @@ [LibraryClasses]
   TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [Components]
   Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/DwEmacSnpDxe.inf
   Silicon/Synopsys/DesignWare/Drivers/DwEmmcDxe/DwEmmcDxe.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 32/35] Silicon/Openmoko: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Signed-off-by: Dandan Bi 
---
 Silicon/Openmoko/Openmoko.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Silicon/Openmoko/Openmoko.dsc b/Silicon/Openmoko/Openmoko.dsc
index 572be3d730..fbe46e7ff3 100644
--- a/Silicon/Openmoko/Openmoko.dsc
+++ b/Silicon/Openmoko/Openmoko.dsc
@@ -26,10 +26,11 @@ [LibraryClasses]
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.ARM]
   NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
 
 [Components]
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 35/35] Silicon/TexasInstruments: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Signed-off-by: Dandan Bi 
---
 Silicon/TexasInstruments/Omap35xxPkg/Omap35xxPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Silicon/TexasInstruments/Omap35xxPkg/Omap35xxPkg.dsc 
b/Silicon/TexasInstruments/Omap35xxPkg/Omap35xxPkg.dsc
index 18ebc4aedf..895b79dacb 100644
--- a/Silicon/TexasInstruments/Omap35xxPkg/Omap35xxPkg.dsc
+++ b/Silicon/TexasInstruments/Omap35xxPkg/Omap35xxPkg.dsc
@@ -29,10 +29,11 @@ [LibraryClasses.common]
   ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
 
   BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
   BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
 
   
CacheMaintenanceLib|ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMaintenanceLib.inf
   
DefaultExceptioHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 33/35] Silicon/RISC_V: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Abner Chang 
Cc: Daniel Schaefer 
Cc: Gilbert Chen 
Signed-off-by: Dandan Bi 
---
 Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dsc 
b/Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dsc
index 5f88f5e89f..da4083c81e 100644
--- a/Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dsc
+++ b/Silicon/RISC-V/ProcessorPkg/RiscVProcessorPkg.dsc
@@ -62,10 +62,11 @@ [LibraryClasses.common]
   
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
   
RiscVPlatformTimerLib|Silicon/RISC-V/ProcessorPkg/Library/RiscVPlatformTimerLibNull/RiscVPlatformTimerLib.inf
   
PeiServicesTablePointerLib|Silicon/RISC-V/ProcessorPkg/Library/PeiServicesTablePointerLibOpenSbi/PeiServicesTablePointerLibOpenSbi.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.common.PEI_CORE]
   
PeiServicesTablePointerLib|Silicon/RISC-V/ProcessorPkg/Library/PeiServicesTablePointerLibOpenSbi/PeiServicesTablePointerLibOpenSbi.inf
 
 [LibraryClasses.common.PEIM]
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 29/35] Silicon/TigerlakeSiliconPkg: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Sai Chaganty 
Cc: Nate DeSimone 
Cc: Heng Luo 
Signed-off-by: Dandan Bi 
---
 Silicon/Intel/TigerlakeSiliconPkg/TigerlakeSiliconPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Silicon/Intel/TigerlakeSiliconPkg/TigerlakeSiliconPkg.dsc 
b/Silicon/Intel/TigerlakeSiliconPkg/TigerlakeSiliconPkg.dsc
index 73a2594887..b787b00048 100644
--- a/Silicon/Intel/TigerlakeSiliconPkg/TigerlakeSiliconPkg.dsc
+++ b/Silicon/Intel/TigerlakeSiliconPkg/TigerlakeSiliconPkg.dsc
@@ -117,10 +117,11 @@ [LibraryClasses.common]
   
CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
   PostCodeLib|MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   #
   # UEFI & PI
   #
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 28/35] Silicon/QuarkSocPkg: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Michael D Kinney 
Cc: Kelly Steele 
Signed-off-by: Dandan Bi 
---
 Silicon/Intel/QuarkSocPkg/QuarkSocPkg.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Silicon/Intel/QuarkSocPkg/QuarkSocPkg.dsc 
b/Silicon/Intel/QuarkSocPkg/QuarkSocPkg.dsc
index e743a5e272..5b9679f32f 100644
--- a/Silicon/Intel/QuarkSocPkg/QuarkSocPkg.dsc
+++ b/Silicon/Intel/QuarkSocPkg/QuarkSocPkg.dsc
@@ -2,11 +2,11 @@
 # INTEL Quark SoC Module Package Reference Implementations
 #
 # This DSC file is used for Package Level build.
 #
 # This Module provides FRAMEWORK reference implementation for INTEL Quark SoC.
-#   Copyright (c) 2013-2016 Intel Corporation.
+#   Copyright (c) 2013-2021 Intel Corporation.
 #
 #   SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -62,10 +62,11 @@ [LibraryClasses]
 !if $(CFG_SOURCE_DEBUG) == 1
   
PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
 !else
   
PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
 !endif
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
   #
   # UEFI & PI
   #
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 31/35] Silicon/NXP: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Leif Lindholm 
Cc: Meenakshi Aggarwal 
Signed-off-by: Dandan Bi 
---
 Silicon/NXP/NxpQoriqLs.dsc.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Silicon/NXP/NxpQoriqLs.dsc.inc b/Silicon/NXP/NxpQoriqLs.dsc.inc
index 99a317aba7..7c66a88bc6 100644
--- a/Silicon/NXP/NxpQoriqLs.dsc.inc
+++ b/Silicon/NXP/NxpQoriqLs.dsc.inc
@@ -95,10 +95,11 @@ [LibraryClasses.common]
   NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
   
NonDiscoverableDeviceRegistrationLib|MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.inf
   
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   I2cLib|Silicon/NXP/Library/I2cLib/I2cLib.inf
   
ResetSystemLib|ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.inf
   IoAccessLib|Silicon/NXP/Library/IoAccessLib/IoAccessLib.inf
 
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 24/35] Silicon/Hisilicon: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
Cc: Wenyi Xie 
Signed-off-by: Dandan Bi 
---
 Silicon/Hisilicon/Hisilicon.dsc.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Silicon/Hisilicon/Hisilicon.dsc.inc 
b/Silicon/Hisilicon/Hisilicon.dsc.inc
index 6bacd9cafd..51591b15d9 100644
--- a/Silicon/Hisilicon/Hisilicon.dsc.inc
+++ b/Silicon/Hisilicon/Hisilicon.dsc.inc
@@ -24,10 +24,11 @@ [LibraryClasses.common]
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 27/35] Silicon/KabylakeSiliconPkg: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Chasel Chiu 
Cc: Sai Chaganty 
Signed-off-by: Dandan Bi 
---
 Silicon/Intel/KabylakeSiliconPkg/KabylakeSiliconPkg.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Silicon/Intel/KabylakeSiliconPkg/KabylakeSiliconPkg.dsc 
b/Silicon/Intel/KabylakeSiliconPkg/KabylakeSiliconPkg.dsc
index aa481d0307..972a882613 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/KabylakeSiliconPkg.dsc
+++ b/Silicon/Intel/KabylakeSiliconPkg/KabylakeSiliconPkg.dsc
@@ -1,9 +1,9 @@
 ## @file
 #  Component description file for the SkyLake SiPkg DSC file.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -94,10 +94,11 @@ [LibraryClasses.common]
   PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
   PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
   
CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
   #
   # UEFI & PI
   #
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 23/35] Platform/SoftIron: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Signed-off-by: Dandan Bi 
---
 Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc 
b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
index dd45b4142c..7750e65eb6 100644
--- a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
+++ b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
@@ -54,10 +54,11 @@ [LibraryClasses.common]
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 26/35] Silicon/IntelSiliconPkg: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Ray Ni 
Cc: Rangasai V Chaganty 
Signed-off-by: Dandan Bi 
---
 Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc 
b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc
index 6dff68f681..ea6477ec53 100644
--- a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc
+++ b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc
@@ -1,9 +1,9 @@
 ## @file
 # This package provides common open source Intel silicon modules.
 #
-# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.
 # Copyright (c) Microsoft Corporation.
 #
 #SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -35,10 +35,11 @@ [LibraryClasses]
   SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
   
CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
   
MicrocodeFlashAccessLib|IntelSiliconPkg/Feature/Capsule/Library/MicrocodeFlashAccessLibNull/MicrocodeFlashAccessLibNull.inf
   
PeiGetVtdPmrAlignmentLib|IntelSiliconPkg/Library/PeiGetVtdPmrAlignmentLib/PeiGetVtdPmrAlignmentLib.inf
   
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.common.PEIM]
   PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
   
PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
   PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 22/35] Platform/Socionext: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Signed-off-by: Dandan Bi 
---
 Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc | 1 +
 Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc 
b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc
index 0a364bc457..fa54b571f8 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc
@@ -63,10 +63,11 @@ [LibraryClasses]
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
diff --git a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc 
b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
index 18accbfd5d..b8674c84c1 100644
--- a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
+++ b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
@@ -82,10 +82,11 @@ [LibraryClasses.common]
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
   RngLib|MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 25/35] Silicon/CoffeelakeSiliconPkg: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Chasel Chiu 
Cc: Sai Chaganty 
Signed-off-by: Dandan Bi 
---
 Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc 
b/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc
index 2f25bdb35e..18369afce1 100644
--- a/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc
+++ b/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc
@@ -103,10 +103,11 @@ [LibraryClasses.common]
   PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
   PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
   
CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
   #
   # UEFI & PI
   #
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 20/35] Platform/RISC-V: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Abner Chang 
Cc: Daniel Schaefer 
Cc: Gilbert Chen 
Signed-off-by: Dandan Bi 
---
 Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dsc 
b/Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dsc
index 092717d2ef..961e1234e9 100644
--- a/Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dsc
+++ b/Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dsc
@@ -53,10 +53,11 @@ [LibraryClasses.common]
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
   SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
   TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.common.PEIM]
   
FirmwareContextProcessorSpecificLib|Platform/RISC-V/PlatformPkg/Library/FirmwareContextProcessorSpecificLib/FirmwareContextProcessorSpecificLib.inf
   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
   
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 21/35] Platform/SiFive: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Abner Chang 
Cc: Daniel Schaefer 
Cc: Gilbert Chen 
Signed-off-by: Dandan Bi 
---
 Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc   | 1 +
 .../SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc 
b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc
index 2d652d215f..9610f0613a 100644
--- a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc
+++ b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc
@@ -94,10 +94,11 @@ [LibraryClasses]
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
   SortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
   
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
   FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 # RISC-V Platform Library
   TimeBaseLib|EmbeddedPkg//Library/TimeBaseLib/TimeBaseLib.inf
   
RealTimeClockLib|EmbeddedPkg//Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.inf
 
diff --git 
a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc 
b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
index 9f60475189..b3d4427a8a 100644
--- a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
+++ b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
@@ -94,10 +94,11 @@ [LibraryClasses]
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
   SortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
   
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
   FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 # RISC-V Platform Library
   TimeBaseLib|EmbeddedPkg//Library/TimeBaseLib/TimeBaseLib.inf
   
RealTimeClockLib|EmbeddedPkg//Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.inf
 
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 16/35] Platform/Vlv2TbltDevicePkg: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Michael D Kinney 
Cc: Zailiang Sun 
Cc: Yi Qian 
Signed-off-by: Dandan Bi 
---
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 3 ++-
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index 409f31c982..ac83f72e88 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -1,9 +1,9 @@
 #/** @file
 # Platform description.
 #
-# Copyright (c) 2012  - 2020, Intel Corporation. All rights reserved.
+# Copyright (c) 2012  - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 #
 #**/
@@ -93,10 +93,11 @@ [LibraryClasses.common]
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
 !if $(RC_BINARY_RELEASE) == TRUE
   PchPlatformLib|Vlv2TbltDevicePkg/Library/PchPlatformLib/PchPlatformLib.inf
 !endif
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
   #
   # UEFI & PI
   #
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index 38bd825c8b..6bbb38cec5 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -1,9 +1,9 @@
 #/** @file
 # Platform description.
 #
-# Copyright (c) 2012  - 2020, Intel Corporation. All rights reserved.
+# Copyright (c) 2012  - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 #
 #**/
@@ -95,10 +95,11 @@ [LibraryClasses.common]
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
 !if $(RC_BINARY_RELEASE) == TRUE
   PchPlatformLib|Vlv2TbltDevicePkg/Library/PchPlatformLib/PchPlatformLib.inf
 !endif
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
   #
   # UEFI & PI
   #
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 04/35] Features/Debugging: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Eric Dong 
Cc: Liming Gao 
Signed-off-by: Dandan Bi 
---
 .../Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc | 3 ++-
 .../Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc | 3 ++-
 .../PostCodeDebugFeaturePkg/Include/PostCodeDebugFeature.dsc   | 3 ++-
 .../Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git 
a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc 
b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc
index 3e6b1f69c2..ab269dd8df 100644
--- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc
+++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc
@@ -4,11 +4,11 @@
 #
 # The DEC files are used by the utilities that parse DSC and
 # INF files to generate AutoGen.c and AutoGen.h files
 # for the build infrastructure.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -43,10 +43,11 @@ [LibraryClasses]
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER]
   ###
   # Edk2 Packages
   ###
diff --git 
a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc 
b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc
index 65e00b5979..e6e480b734 100644
--- a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc
+++ b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc
@@ -4,11 +4,11 @@
 #
 # The DEC files are used by the utilities that parse DSC and
 # INF files to generate AutoGen.c and AutoGen.h files
 # for the build infrastructure.
 #
-# Copyright (c) 2020, Intel Corporation. All rights reserved.
+# Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -57,10 +57,11 @@ [LibraryClasses]
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.common.PEIM]
   ###
   # Edk2 Packages
   ###
diff --git 
a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCodeDebugFeature.dsc
 
b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCodeDebugFeature.dsc
index 2852b9cf7c..539c74c84d 100644
--- 
a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCodeDebugFeature.dsc
+++ 
b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCodeDebugFeature.dsc
@@ -4,11 +4,11 @@
 #
 # The DEC files are used by the utilities that parse DSC and
 # INF files to generate AutoGen.c and AutoGen.h files
 # for the build infrastructure.
 #
-# Copyright (c) 2020, Intel Corporation. All rights reserved.
+# Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -56,10 +56,11 @@ [LibraryClasses]
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.common.PEIM]
   ###
   # Edk2 Packages
   ###
diff --git 
a/Features/Intel/Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc 
b/Features/Intel/Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc
index 95adb01a74..7b1e41d999 100644
--- 

[edk2-devel] [edk2-platforms] [patch 19/35] Platform/RaspberryPi: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Pete Batard 
Signed-off-by: Dandan Bi 
---
 Platform/RaspberryPi/RPi3/RPi3.dsc | 3 ++-
 Platform/RaspberryPi/RPi4/RPi4.dsc | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc 
b/Platform/RaspberryPi/RPi3/RPi3.dsc
index 107cbda297..84c4648a42 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.dsc
+++ b/Platform/RaspberryPi/RPi3/RPi3.dsc
@@ -1,10 +1,10 @@
 # @file
 #
 #  Copyright (c) 2011 - 2020, ARM Limited. All rights reserved.
 #  Copyright (c) 2014, Linaro Limited. All rights reserved.
-#  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
+#  Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.
 #  Copyright (c) 2017 - 2018, Andrei Warkentin 
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -72,10 +72,11 @@ [LibraryClasses.common]
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc 
b/Platform/RaspberryPi/RPi4/RPi4.dsc
index e0fad6f744..23ec283d01 100644
--- a/Platform/RaspberryPi/RPi4/RPi4.dsc
+++ b/Platform/RaspberryPi/RPi4/RPi4.dsc
@@ -1,10 +1,10 @@
 # @file
 #
 #  Copyright (c) 2011 - 2020, ARM Limited. All rights reserved.
 #  Copyright (c) 2017 - 2018, Andrei Warkentin 
-#  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
+#  Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.
 #  Copyright (c) 2014, Linaro Limited. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -70,10 +70,11 @@ [LibraryClasses.common]
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 18/35] Platform/Qemu: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Graeme Gregory 
Cc: Radoslaw Biernacki 
Signed-off-by: Dandan Bi 
---
 Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc 
b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
index c1f8a46965..34e89b9ad6 100644
--- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
+++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
@@ -58,10 +58,11 @@ [LibraryClasses.common]
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicArmVirt.inf
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   HobLib|ArmVirtPkg/Library/ArmVirtDxeHobLib/ArmVirtDxeHobLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 17/35] Platform/LeMaker: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Signed-off-by: Dandan Bi 
---
 Platform/LeMaker/CelloBoard/CelloBoard.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/LeMaker/CelloBoard/CelloBoard.dsc 
b/Platform/LeMaker/CelloBoard/CelloBoard.dsc
index 262497..9d802e83b3 100644
--- a/Platform/LeMaker/CelloBoard/CelloBoard.dsc
+++ b/Platform/LeMaker/CelloBoard/CelloBoard.dsc
@@ -53,10 +53,11 @@ [LibraryClasses.common]
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 15/35] Platform/QuarkPlatformPkg: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Michael D Kinney 
Cc: Kelly Steele 
Signed-off-by: Dandan Bi 
---
 Platform/Intel/QuarkPlatformPkg/Quark.dsc| 1 +
 Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Platform/Intel/QuarkPlatformPkg/Quark.dsc 
b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
index e29c7465b1..632f8a44f1 100644
--- a/Platform/Intel/QuarkPlatformPkg/Quark.dsc
+++ b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
@@ -101,10 +101,11 @@ [LibraryClasses]
   
PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
 !endif
   DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   #
   # UEFI & PI
   #
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
diff --git a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc 
b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
index 6fdfba9a58..83909c6357 100644
--- a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
+++ b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
@@ -89,10 +89,11 @@ [LibraryClasses]
   
PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
 !endif
   DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   #
   # UEFI & PI
   #
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 14/35] Platform/MinPlatformPkg: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Liming Gao 
Cc: Eric Dong 
Signed-off-by: Dandan Bi 
---
 Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc 
b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
index cb40e111b5..bafd814009 100644
--- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
@@ -1,9 +1,9 @@
 ## @file
 #  Platform description.
 #
-# Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -40,10 +40,11 @@ [LibraryClasses.common]
   PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
   
CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   SortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
   #
   # UEFI & PI
   #
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 13/35] Platform/BoardModulePkg: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Eric Dong 
Cc: Liming Gao 
Signed-off-by: Dandan Bi 
---
 Platform/Intel/BoardModulePkg/BoardModulePkg.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc 
b/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc
index bcc2dfbfeb..b7c3d153cf 100644
--- a/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc
+++ b/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc
@@ -4,11 +4,11 @@
 #
 # The DEC files are used by the utilities that parse DSC and
 # INF files to generate AutoGen.c and AutoGen.h files
 # for the build infrastructure.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -34,10 +34,11 @@ [LibraryClasses]
   PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
   
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.common.PEIM]
   
FirmwareBootMediaLib|IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/PeiFirmwareBootMediaLib.inf
   
FirmwareBootMediaInfoLib|BoardModulePkg/Library/PeiFirmwareBootMediaInfoLib/PeiFirmwareBootMediaInfoLib.inf
   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 12/35] Platform/BeagleBoard: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Signed-off-by: Dandan Bi 
---
 Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc 
b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
index c5fc978c5f..98b47948f2 100644
--- a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
+++ b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
@@ -1,10 +1,10 @@
 #/** @file
 # Beagle board package.
 #
 # Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.
-# Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.
 # Copyright (c) 2016, Linaro Ltd. All rights reserved.
 #
 #SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 #**/
@@ -46,10 +46,11 @@ [LibraryClasses.common]
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
 
   BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
   BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
   SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   
ResetSystemLib|Platform/BeagleBoard/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.inf
 
   PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
   
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 11/35] Platform/ARM: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Ard Biesheuvel 
Cc: Thomas Abraham 
Cc: Sami Mujawar 
Signed-off-by: Dandan Bi 
---
 Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc | 1 +
 Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc 
b/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc
index 38bf6020ba..01539e8916 100644
--- a/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc
+++ b/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc
@@ -45,10 +45,11 @@ [LibraryClasses]
   
MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.inf
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
   
ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   #
   # Entry point
   #
   
StandaloneMmDriverEntryPoint|MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf
diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc 
b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
index fee7cfcc2d..3f0556e2b8 100644
--- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
+++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
@@ -43,10 +43,11 @@ [LibraryClasses.common]
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 10/35] Platform/AMD: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Signed-off-by: Dandan Bi 
---
 Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc 
b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
index 05d1b69c83..8dd1378b86 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
@@ -47,10 +47,11 @@ [LibraryClasses.common]
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 09/35] Features/UserInterface: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Liming Gao 
Signed-off-by: Dandan Bi 
---
 .../Intel/UserInterface/LogoFeaturePkg/Include/LogoFeature.dsc | 3 ++-
 .../UserAuthFeaturePkg/Include/UserAuthFeature.dsc | 3 ++-
 .../Include/VirtualKeyboardFeature.dsc | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/Features/Intel/UserInterface/LogoFeaturePkg/Include/LogoFeature.dsc 
b/Features/Intel/UserInterface/LogoFeaturePkg/Include/LogoFeature.dsc
index d2dcdeb36a..c3f359137e 100644
--- a/Features/Intel/UserInterface/LogoFeaturePkg/Include/LogoFeature.dsc
+++ b/Features/Intel/UserInterface/LogoFeaturePkg/Include/LogoFeature.dsc
@@ -4,11 +4,11 @@
 #
 # The DEC files are used by the utilities that parse DSC and
 # INF files to generate AutoGen.c and AutoGen.h files
 # for the build infrastructure.
 #
-# Copyright (c) 2020, Intel Corporation. All rights reserved.
+# Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -37,10 +37,11 @@ [LibraryClasses]
   BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
   BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
   DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.common.DXE_DRIVER]
   ###
   # Edk2 Packages
   ###
diff --git 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc 
b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc
index 7d784f4dff..3b84798bc1 100644
--- 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc
+++ 
b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc
@@ -4,11 +4,11 @@
 #
 # The DEC files are used by the utilities that parse DSC and
 # INF files to generate AutoGen.c and AutoGen.h files
 # for the build infrastructure.
 #
-# Copyright (c) 2020, Intel Corporation. All rights reserved.
+# Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -49,10 +49,11 @@ [LibraryClasses]
   
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
   
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   #
   # User Authentication Feature Package
   #
   
PlatformPasswordLib|UserInterface/UserAuthFeaturePkg/Library/PlatformPasswordLibNull/PlatformPasswordLibNull.inf
diff --git 
a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/VirtualKeyboardFeature.dsc
 
b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/VirtualKeyboardFeature.dsc
index c10fb2d567..d6d492556d 100644
--- 
a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/VirtualKeyboardFeature.dsc
+++ 
b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/VirtualKeyboardFeature.dsc
@@ -4,11 +4,11 @@
 #
 # The DEC files are used by the utilities that parse DSC and
 # INF files to generate AutoGen.c and AutoGen.h files
 # for the build infrastructure.
 #
-# Copyright (c) 2020, Intel Corporation. All rights reserved.
+# Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -44,10 +44,11 @@ [LibraryClasses]
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
   
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.common.UEFI_DRIVER]
   ###
   # Edk2 Packages
   ###
-- 
2.18.0.windows.1



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

[edk2-devel] [edk2-platforms] [patch 08/35] Features/SystemInformation: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Liming Gao 
Signed-off-by: Dandan Bi 
---
 .../SmbiosFeaturePkg/Include/SmbiosFeature.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc 
b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc
index a59fdf3702..d037b4c078 100644
--- 
a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc
+++ 
b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc
@@ -4,11 +4,11 @@
 #
 # The DEC files are used by the utilities that parse DSC and
 # INF files to generate AutoGen.c and AutoGen.h files
 # for the build infrastructure.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -41,10 +41,11 @@ [LibraryClasses]
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.common.DXE_DRIVER]
   ###
   # Edk2 Packages
   ###
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 07/35] Features/PowerManagement: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Liming Gao 
Signed-off-by: Dandan Bi 
---
 .../Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc 
b/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
index 647dc3f93a..5140eb522a 100644
--- a/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
+++ b/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
@@ -4,11 +4,11 @@
 #
 # The DEC files are used by the utilities that parse DSC and
 # INF files to generate AutoGen.c and AutoGen.h files
 # for the build infrastructure.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -39,10 +39,11 @@ [LibraryClasses]
   DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
   PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
   PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM]
   ###
   # Edk2 Packages
   ###
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 05/35] Features/Network: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Liming Gao 
Signed-off-by: Dandan Bi 
---
 .../Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc 
b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
index c59c21ee6c..36cf817d91 100644
--- a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
+++ b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
@@ -4,11 +4,11 @@
 #
 # The DEC files are used by the utilities that parse DSC and
 # INF files to generate AutoGen.c and AutoGen.h files
 # for the build infrastructure.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -68,10 +68,11 @@ [LibraryClasses]
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
   
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 
[LibraryClasses.common.SEC,LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM]
   ###
   # Edk2 Packages
   ###
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 02/35] Drivers/DisplayLink: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
Cc: Andy Hayes 
Signed-off-by: Dandan Bi 
---
 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkPkg.dsc 
b/Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkPkg.dsc
index 955331ba60..23a9feb175 100644
--- a/Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkPkg.dsc
+++ b/Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkPkg.dsc
@@ -28,10 +28,11 @@ [LibraryClasses]
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.common.UEFI_DRIVER]
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
 
 [LibraryClasses.AARCH64]
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 06/35] Features/OutOfBandManagement: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Liming Gao 
Signed-off-by: Dandan Bi 
---
 .../OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc | 3 ++-
 .../OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc 
b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc
index a82f18a68c..f27dfbfd3c 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc
@@ -4,11 +4,11 @@
 #
 # The DEC files are used by the utilities that parse DSC and
 # INF files to generate AutoGen.c and AutoGen.h files
 # for the build infrastructure.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -38,10 +38,11 @@ [LibraryClasses]
   BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
   DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
   IpmiLib|MdeModulePkg/Library/BaseIpmiLibNull/BaseIpmiLibNull.inf
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
   TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   #
   # IPMI Feature Package
   #
   
IpmiCommandLib|OutOfBandManagement/IpmiFeaturePkg/Library/IpmiCommandLib/IpmiCommandLib.inf
diff --git 
a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc 
b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc
index 89ef648f31..14d840143e 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc
@@ -4,11 +4,11 @@
 #
 # The DEC files are used by the utilities that parse DSC and
 # INF files to generate AutoGen.c and AutoGen.h files
 # for the build infrastructure.
 #
-# Copyright (c) 2020, Intel Corporation. All rights reserved.
+# Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -42,10 +42,11 @@ [LibraryClasses]
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   ###
   # SpcrFeaturePkg Packages
   ###
   SpcrDeviceLib|SpcrFeaturePkg/Library/SpcrDeviceLibNull/SpcrDeviceLibNull.inf
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 03/35] Drivers/OptionRomPkg: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Ray Ni 
Signed-off-by: Dandan Bi 
---
 Drivers/OptionRomPkg/OptionRomPkg.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Drivers/OptionRomPkg/OptionRomPkg.dsc 
b/Drivers/OptionRomPkg/OptionRomPkg.dsc
index 8a13cc54e6..5c3aed6408 100644
--- a/Drivers/OptionRomPkg/OptionRomPkg.dsc
+++ b/Drivers/OptionRomPkg/OptionRomPkg.dsc
@@ -4,11 +4,11 @@
 # This package is designed to interoperate with the EDK II open source project
 # at http://www.tianocore.org, and this package is required to build PCI 
compliant
 # Option ROM image for all CPU architectures, including EBC target.
 # A single driver can support mixes of EFI 1.1, UEFI 2.0 and UEFI 2.1.
 #
-# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.
 # Copyright (c) 2016, Linaro Ltd. All rights reserved.
 # Copyright (c) 2020, ARM Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -53,10 +53,11 @@ [LibraryClasses]
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
   
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.AARCH64, LibraryClasses.ARM]
   NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
 
 [LibraryClasses.ARM]
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 01/35] Drivers/ASIX: Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.

Cc: Samer El-Haj-Mahmoud 
Cc: Ray Ni 
Signed-off-by: Dandan Bi 
---
 Drivers/ASIX/Asix.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Drivers/ASIX/Asix.dsc b/Drivers/ASIX/Asix.dsc
index 5e02e11760..4a9f8897b0 100644
--- a/Drivers/ASIX/Asix.dsc
+++ b/Drivers/ASIX/Asix.dsc
@@ -40,10 +40,11 @@ [LibraryClasses]
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
   
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
+  
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.AARCH64, LibraryClasses.ARM]
   NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
 
 [LibraryClasses.ARM]
-- 
2.18.0.windows.1



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




[edk2-devel] [edk2-platforms] [patch 00/35] Consume RegisterFilterLibNull instance

2021-03-16 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
RFC: https://edk2.groups.io/g/devel/message/72530


Add RegisterFilterLibNull in dsc files in edk2-platforms repo,
which will be consumed by IoLib and BaseLib.

This is the following update in edk2-platforms repo for the change in edk2,
which will add RegisterFilterLib dependency for IoLib and BaseLib to 
filter/trace
port IO/MMIO/MSR access.
https://edk2.groups.io/g/devel/message/72754

Cc: Leif Lindholm 
Cc: Michael D Kinney 
Cc: Liming Gao 

Dandan Bi (35):
  Drivers/ASIX: Consume RegisterFilterLibNull instance
  Drivers/DisplayLink: Consume RegisterFilterLibNull instance
  Drivers/OptionRomPkg: Consume RegisterFilterLibNull instance
  Features/Debugging: Consume RegisterFilterLibNull instance
  Features/Network: Consume RegisterFilterLibNull instance
  Features/OutOfBandManagement: Consume RegisterFilterLibNull instance
  Features/PowerManagement: Consume RegisterFilterLibNull instance
  Features/SystemInformation: Consume RegisterFilterLibNull instance
  Features/UserInterface: Consume RegisterFilterLibNull instance
  Platform/AMD: Consume RegisterFilterLibNull instance
  Platform/ARM: Consume RegisterFilterLibNull instance
  Platform/BeagleBoard: Consume RegisterFilterLibNull instance
  Platform/BoardModulePkg: Consume RegisterFilterLibNull instance
  Platform/MinPlatformPkg: Consume RegisterFilterLibNull instance
  Platform/QuarkPlatformPkg: Consume RegisterFilterLibNull instance
  Platform/Vlv2TbltDevicePkg: Consume RegisterFilterLibNull instance
  Platform/LeMaker: Consume RegisterFilterLibNull instance
  Platform/Qemu: Consume RegisterFilterLibNull instance
  Platform/RaspberryPi: Consume RegisterFilterLibNull instance
  Platform/RISC-V: Consume RegisterFilterLibNull instance
  Platform/SiFive: Consume RegisterFilterLibNull instance
  Platform/Socionext: Consume RegisterFilterLibNull instance
  Platform/SoftIron: Consume RegisterFilterLibNull instance
  Silicon/Hisilicon: Consume RegisterFilterLibNull instance
  Silicon/CoffeelakeSiliconPkg: Consume RegisterFilterLibNull instance
  Silicon/IntelSiliconPkg: Consume RegisterFilterLibNull instance
  Silicon/KabylakeSiliconPkg: Consume RegisterFilterLibNull instance
  Silicon/QuarkSocPkg: Consume RegisterFilterLibNull instance
  Silicon/TigerlakeSiliconPkg: Consume RegisterFilterLibNull instance
  Silicon/Marvell: Consume RegisterFilterLibNull instance
  Silicon/NXP: Consume RegisterFilterLibNull instance
  Silicon/Openmoko: Consume RegisterFilterLibNull instance
  Silicon/RISC_V: Consume RegisterFilterLibNull instance
  Silicon/Synopsys/DesignWare: Consume RegisterFilterLibNull instance
  Silicon/TexasInstruments: Consume RegisterFilterLibNull instance

 Drivers/ASIX/Asix.dsc  | 1 +
 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkPkg.dsc  | 1 +
 Drivers/OptionRomPkg/OptionRomPkg.dsc  | 3 ++-
 .../Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc | 3 ++-
 .../Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc | 3 ++-
 .../PostCodeDebugFeaturePkg/Include/PostCodeDebugFeature.dsc   | 3 ++-
 .../Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc | 3 ++-
 .../Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc | 3 ++-
 .../OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc | 3 ++-
 .../OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc | 3 ++-
 .../Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc   | 3 ++-
 .../SmbiosFeaturePkg/Include/SmbiosFeature.dsc | 3 ++-
 .../Intel/UserInterface/LogoFeaturePkg/Include/LogoFeature.dsc | 3 ++-
 .../UserAuthFeaturePkg/Include/UserAuthFeature.dsc | 3 ++-
 .../Include/VirtualKeyboardFeature.dsc | 3 ++-
 Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 1 +
 Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc   | 1 +
 Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc   | 1 +
 Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc | 3 ++-
 Platform/Intel/BoardModulePkg/BoardModulePkg.dsc   | 3 ++-
 Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc| 3 ++-
 Platform/Intel/QuarkPlatformPkg/Quark.dsc  | 1 +
 Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc   | 1 +
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 3 ++-
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc| 3 ++-
 Platform/LeMaker/CelloBoard/CelloBoard.dsc | 1 +
 Platform/Qemu/SbsaQemu/SbsaQemu.dsc| 1 +
 Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dsc   | 1 +
 Platform/RaspberryPi/RPi3/RPi3.dsc | 3 ++-
 Platform/RaspberryPi/RPi4/RPi4.dsc | 3 ++-
 Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc | 1 +
 .../U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc   | 1 +
 

Re: [edk2-devel] [PATCH v9 00/10] support CPU hot-unplug

2021-03-16 Thread Laszlo Ersek
On 03/12/21 07:26, Ankur Arora wrote:
> Hi,
>
> This series adds OVMF support for CPU hot-unplug.
>
> QEMU secureboot hot-unplug logic corresponding to this is in upstream.
> Also posted here:
>   
> https://lore.kernel.org/qemu-devel/20201207140739.3829993-1-imamm...@redhat.com/
>
> Testing (with QEMU 5.2.50):
>  - Stable with randomized CPU plug/unplug (guest maxcpus=33,128)
>  - Synthetic tests with simultaneous multi CPU hot-unplug
>
> Also at:
>   github.com/terminus/edk2/ hot-unplug-v9
>
> Changelog:
>
> v9:
>   - Rebased on top of edd46cd407ea
>   - Clarify comments around memory-barriers in patches 7, 8, 9
>   - Address other review comments from v8

Merged as commit range 4751a48aeb2a..f3bdfc41866e, via
, with the following R-b's
/ comments / light tweaks added:

>  1:  4b4466ed7c44 =  1:  0cb242e33693 OvmfPkg/CpuHotplugSmm: refactor hotplug 
> logic
>  2:  719828efdebe !  2:  a752dd07466c OvmfPkg/CpuHotplugSmm: collect 
> hot-unplug events
> @@ -20,6 +20,7 @@
>  Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
>  Signed-off-by: Ankur Arora 
>  Message-Id: <20210312062656.2477515-3-ankur.a.ar...@oracle.com>
> +Reviewed-by: Laszlo Ersek 
>
>  diff --git a/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h 
> b/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
>  --- a/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
>  3:  7d732efcb7af =  3:  2d92e052c3af OvmfPkg/CpuHotplugSmm: add Qemu Cpu 
> Status helper
>  4:  64649e42 =  4:  15e6ae8ea400 OvmfPkg/CpuHotplugSmm: introduce 
> UnplugCpus()
>  5:  7190a5d134a7 !  5:  8ade9d425a6e OvmfPkg: define CPU_HOT_EJECT_DATA
> @@ -15,6 +15,7 @@
>  Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
>  Signed-off-by: Ankur Arora 
>  Message-Id: <20210312062656.2477515-6-ankur.a.ar...@oracle.com>
> +Reviewed-by: Laszlo Ersek 
>
>  diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec
>  --- a/OvmfPkg/OvmfPkg.dec
>  6:  1fd019dac476 !  6:  b6d5996706dd OvmfPkg/SmmCpuFeaturesLib: init CPU 
> ejection state
> @@ -22,6 +22,7 @@
>  Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
>  Signed-off-by: Ankur Arora 
>  Message-Id: <20210312062656.2477515-7-ankur.a.ar...@oracle.com>
> +Reviewed-by: Laszlo Ersek 
>
>  diff --git a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf 
> b/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
>  --- a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
>  7:  c8758d9b9764 !  7:  af9c77e151fa OvmfPkg/SmmCpuFeaturesLib: call CPU 
> hot-eject handler
> @@ -19,6 +19,7 @@
>  Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
>  Signed-off-by: Ankur Arora 
>  Message-Id: <20210312062656.2477515-8-ankur.a.ar...@oracle.com>
> +Reviewed-by: Laszlo Ersek 
>
>  diff --git a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c 
> b/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c
>  --- a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c
>  8:  5ff8e8700678 !  8:  30c69d2cfa63 OvmfPkg/CpuHotplugSmm: add EjectCpu()
> @@ -19,6 +19,7 @@
>  Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
>  Signed-off-by: Ankur Arora 
>  Message-Id: <20210312062656.2477515-9-ankur.a.ar...@oracle.com>
> +Reviewed-by: Laszlo Ersek 
>
>  diff --git a/OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf 
> b/OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf
>  --- a/OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf
>  9:  d6660f8f2f14 !  9:  f05328886302 OvmfPkg/CpuHotplugSmm: do actual CPU 
> hot-eject
> @@ -27,6 +27,9 @@
>  Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
>  Signed-off-by: Ankur Arora 
>  Message-Id: <20210312062656.2477515-10-ankur.a.ar...@oracle.com>
> +Reviewed-by: Laszlo Ersek 
> +[ler...@redhat.com: unneeded inner QemuSelector declaration in 
> EjectCpu()
> + triggers VS warning #4456 (local variable shadowed); remove it]
>
>  diff --git a/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h 
> b/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
>  --- a/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
> @@ -102,8 +105,6 @@
>  +UINT32 Idx;
>  +
>  +for (Idx = 0; Idx < mCpuHotEjectData->ArrayLength; Idx++) {
> -+  UINT64 QemuSelector;
> -+
>  +  QemuSelector = mCpuHotEjectData->QemuSelectorMap[Idx];
>  +
>  +  if (QemuSelector != CPU_EJECT_QEMU_SELECTOR_INVALID) {
> 10:  0a9a1cd40b98 ! 10:  f3bdfc41866e OvmfPkg/SmmControl2Dxe: negotiate CPU 
> hot-unplug
> @@ -14,6 +14,9 @@
>  Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
>  Signed-off-by: Ankur Arora 
>  Message-Id: <20210312062656.2477515-11-ankur.a.ar...@oracle.com>
> +[ler...@redhat.com: preserve the empty line between the 
> 

Re: [edk2-devel] [PATCH v2 1/1] UefiCpuPkg/CpuCacheInfoLib: Collect cache associative type

2021-03-16 Thread Dong, Eric
Reviewed-by: Eric Dong 

-Original Message-
From: Lou, Yun  
Sent: Monday, March 15, 2021 9:49 PM
To: devel@edk2.groups.io
Cc: Lou, Yun ; Ni, Ray ; Dong, Eric 
; Laszlo Ersek ; Kumar, Rahul1 

Subject: [PATCH v2 1/1] UefiCpuPkg/CpuCacheInfoLib: Collect cache associative 
type

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

Support collecting cache associative type in CpuCacheInfoLib.
This prevents the user from using additional code to obtain the
same information.

Signed-off-by: Jason Lou 
Cc: Ray Ni 
Cc: Eric Dong 
Cc: Laszlo Ersek 
Cc: Rahul Kumar 
---
 UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c | 49 
+++-
 UefiCpuPkg/Include/Library/CpuCacheInfoLib.h | 15 +-
 UefiCpuPkg/Library/CpuCacheInfoLib/InternalCpuCacheInfoLib.h | 15 +-
 3 files changed, 53 insertions(+), 26 deletions(-)

diff --git a/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c 
b/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c
index d46fb0425851..126ee0da86fc 100644
--- a/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c
+++ b/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c
@@ -1,7 +1,7 @@
 /** @file

   Provides cache info for each package, core type, cache level and cache type.

 

-  Copyright (c) 2020 Intel Corporation. All rights reserved.

+  Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.

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

 

 **/

@@ -23,18 +23,18 @@ CpuCacheInfoPrintCpuCacheInfoTable (
 {

   UINTN Index;

 

-  DEBUG ((DEBUG_INFO, 
"+---+---+\n"));

-  DEBUG ((DEBUG_INFO, "| Index | Packge  CoreType  CacheLevel  CacheType  
CacheWays  CacheSizeinKB  CacheCount |\n"));

-  DEBUG ((DEBUG_INFO, 
"+---+---+\n"));

+  DEBUG ((DEBUG_INFO, 
"+---+--+\n"));

+  DEBUG ((DEBUG_INFO, "| Index | Packge  CoreType  CacheLevel  CacheType  
CacheWays (FA|DM) CacheSizeinKB  CacheCount |\n"));

+  DEBUG ((DEBUG_INFO, 
"+---+--+\n"));

 

   for (Index = 0; Index < CpuCacheInfoCount; Index++) {

-DEBUG ((DEBUG_INFO, "| %4x  | %4x   %2x%2x  %2x   
%4x  %8x %4x |\n", Index,

-CpuCacheInfo[Index].Package, CpuCacheInfo[Index].CoreType, 
CpuCacheInfo[Index].CacheLevel,

-CpuCacheInfo[Index].CacheType, CpuCacheInfo[Index].CacheWays, 
CpuCacheInfo[Index].CacheSizeinKB,

-CpuCacheInfo[Index].CacheCount));

+DEBUG ((DEBUG_INFO, "| %4x  | %4x   %2x%2x  %2x   
%4x ( %x| %x) %8x %4x |\n",

+Index, CpuCacheInfo[Index].Package, CpuCacheInfo[Index].CoreType, 
CpuCacheInfo[Index].CacheLevel,

+CpuCacheInfo[Index].CacheType, CpuCacheInfo[Index].CacheWays, 
CpuCacheInfo[Index].FullyAssociativeCache,

+CpuCacheInfo[Index].DirectMappedCache, 
CpuCacheInfo[Index].CacheSizeinKB, CpuCacheInfo[Index].CacheCount));

   }

 

-  DEBUG ((DEBUG_INFO, 
"+---+---+\n"));

+  DEBUG ((DEBUG_INFO, 
"+---+--+\n"));

 }

 

 /**

@@ -160,6 +160,7 @@ CpuCacheInfoCollectCoreAndCacheData (
   CPUID_CACHE_PARAMS_EAXCacheParamEax;

   CPUID_CACHE_PARAMS_EBXCacheParamEbx;

   UINT32CacheParamEcx;

+  CPUID_CACHE_PARAMS_EDXCacheParamEdx;

   CPUID_NATIVE_MODEL_ID_AND_CORE_TYPE_EAX   NativeModelIdAndCoreTypeEax;

   COLLECT_CPUID_CACHE_DATA_CONTEXT  *Context;

   CPUID_CACHE_DATA  *CacheData;

@@ -185,17 +186,19 @@ CpuCacheInfoCollectCoreAndCacheData (
   CacheParamLeafIndex = 0;

 

   while (CacheParamLeafIndex < MAX_NUM_OF_CACHE_PARAMS_LEAF) {

-AsmCpuidEx (CPUID_CACHE_PARAMS, CacheParamLeafIndex, 
, , , NULL);

+AsmCpuidEx (CPUID_CACHE_PARAMS, CacheParamLeafIndex, 
, , , 
);

 

 if (CacheParamEax.Bits.CacheType == 0) {

   break;

 }

 

-CacheData[CacheParamLeafIndex].CacheLevel = 
(UINT8)CacheParamEax.Bits.CacheLevel;

-CacheData[CacheParamLeafIndex].CacheType  = 
(UINT8)CacheParamEax.Bits.CacheType;

-CacheData[CacheParamLeafIndex].CacheWays  = 
(UINT16)CacheParamEbx.Bits.Ways;

-CacheData[CacheParamLeafIndex].CacheShareBits = 
(UINT16)CacheParamEax.Bits.MaximumAddressableIdsForLogicalProcessors;

-CacheData[CacheParamLeafIndex].CacheSizeinKB  = (CacheParamEbx.Bits.Ways + 
1) *

+CacheData[CacheParamLeafIndex].CacheLevel= 
(UINT8)CacheParamEax.Bits.CacheLevel;

+CacheData[CacheParamLeafIndex].CacheType = 
(UINT8)CacheParamEax.Bits.CacheType;

+CacheData[CacheParamLeafIndex].CacheWays  

Re: [edk2-devel] [PATCH 2/2] UefiCpuPkg/CpuDxe: Guarantee GDT is below 4GB

2021-03-16 Thread Dong, Eric
Reviewed-by: Eric Dong 

-Original Message-
From: Ni, Ray  
Sent: Tuesday, March 16, 2021 11:34 AM
To: devel@edk2.groups.io
Cc: Dong, Eric ; Laszlo Ersek ; Kumar, 
Rahul1 
Subject: [PATCH 2/2] UefiCpuPkg/CpuDxe: Guarantee GDT is below 4GB

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

GDT needs to be allocated below 4GB in 64bit environment
because AP needs it for entering to protected mode.
CPU running in big real mode cannot access above 4GB GDT.

But CpuDxe driver contains below code:
  gdt = AllocateRuntimePool (sizeof (GdtTemplate) + 8);
  .
  gdtPtr.Base = (UINT32)(UINTN)(VOID*) gdt;

The AllocateRuntimePool() may allocate memory above 4GB.
Thus, we cannot use AllocateRuntimePool (), instead,
we should use AllocatePages() to make sure GDT is below 4GB space.

Signed-off-by: Ray Ni 
Cc: Eric Dong 
Cc: Laszlo Ersek 
Cc: Rahul Kumar 
---
 UefiCpuPkg/CpuDxe/CpuGdt.c | 21 -
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/UefiCpuPkg/CpuDxe/CpuGdt.c b/UefiCpuPkg/CpuDxe/CpuGdt.c
index 322ce87142..98d5551702 100644
--- a/UefiCpuPkg/CpuDxe/CpuGdt.c
+++ b/UefiCpuPkg/CpuDxe/CpuGdt.c
@@ -124,15 +124,26 @@ InitGlobalDescriptorTable (
   VOID

   )

 {

+  EFI_STATUSStatus;

   GDT_ENTRIES   *Gdt;

   IA32_DESCRIPTOR   Gdtr;

+  EFI_PHYSICAL_ADDRESS  Memory;

 

   //

-  // Allocate Runtime Data for the GDT

-  //

-  Gdt = AllocateRuntimePool (sizeof (gGdtTemplate) + 8);

-  ASSERT (Gdt != NULL);

-  Gdt = ALIGN_POINTER (Gdt, 8);

+  // Allocate Runtime Data below 4GB for the GDT

+  // AP uses the same GDT when it's waken up from real mode so

+  // the GDT needs to be below 4GB.

+  //

+  Memory = SIZE_4GB - 1;

+  Status = gBS->AllocatePages (

+  AllocateMaxAddress,

+  EfiRuntimeServicesData,

+  EFI_SIZE_TO_PAGES (sizeof (gGdtTemplate)),

+  

+  );

+  ASSERT_EFI_ERROR (Status);

+  ASSERT ((Memory != 0) && (Memory < SIZE_4GB));

+  Gdt = (GDT_ENTRIES *) (UINTN) Memory;

 

   //

   // Initialize all GDT entries

-- 
2.27.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72873): https://edk2.groups.io/g/devel/message/72873
Mute This Topic: https://groups.io/mt/81368665/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/2] UefiCpuPkg/CpuDxe: Rename variables to follow EDKII coding standard

2021-03-16 Thread Dong, Eric
Reviewed-by: Eric Dong 

-Original Message-
From: Ni, Ray  
Sent: Tuesday, March 16, 2021 11:34 AM
To: devel@edk2.groups.io
Cc: Dong, Eric ; Laszlo Ersek ; Kumar, 
Rahul1 
Subject: [PATCH 1/2] UefiCpuPkg/CpuDxe: Rename variables to follow EDKII coding 
standard

The change doesn't impact any functionality.

Signed-off-by: Ray Ni 
Cc: Eric Dong 
Cc: Laszlo Ersek 
Cc: Rahul Kumar 
---
 UefiCpuPkg/CpuDxe/CpuGdt.c | 27 +--
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/UefiCpuPkg/CpuDxe/CpuGdt.c b/UefiCpuPkg/CpuDxe/CpuGdt.c
index a1ab543f2d..322ce87142 100644
--- a/UefiCpuPkg/CpuDxe/CpuGdt.c
+++ b/UefiCpuPkg/CpuDxe/CpuGdt.c
@@ -2,7 +2,7 @@
   C based implementation of IA32 interrupt handling only

   requiring a minimal assembly interrupt entry point.

 

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

+  Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.

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

 

 **/

@@ -13,7 +13,7 @@
 //

 // Global descriptor table (GDT) Template

 //

-STATIC GDT_ENTRIES GdtTemplate = {

+STATIC GDT_ENTRIES gGdtTemplate = {

   //

   // NULL_SEL

   //

@@ -124,32 +124,31 @@ InitGlobalDescriptorTable (
   VOID

   )

 {

-  GDT_ENTRIES *gdt;

-  IA32_DESCRIPTOR gdtPtr;

+  GDT_ENTRIES   *Gdt;

+  IA32_DESCRIPTOR   Gdtr;

 

   //

   // Allocate Runtime Data for the GDT

   //

-  gdt = AllocateRuntimePool (sizeof (GdtTemplate) + 8);

-  ASSERT (gdt != NULL);

-  gdt = ALIGN_POINTER (gdt, 8);

+  Gdt = AllocateRuntimePool (sizeof (gGdtTemplate) + 8);

+  ASSERT (Gdt != NULL);

+  Gdt = ALIGN_POINTER (Gdt, 8);

 

   //

   // Initialize all GDT entries

   //

-  CopyMem (gdt, , sizeof (GdtTemplate));

+  CopyMem (Gdt, , sizeof (gGdtTemplate));

 

   //

   // Write GDT register

   //

-  gdtPtr.Base = (UINT32)(UINTN)(VOID*) gdt;

-  gdtPtr.Limit = (UINT16) (sizeof (GdtTemplate) - 1);

-  AsmWriteGdtr ();

+  Gdtr.Base  = (UINT32) (UINTN) Gdt;

+  Gdtr.Limit = (UINT16) (sizeof (gGdtTemplate) - 1);

+  AsmWriteGdtr ();

 

   //

   // Update selector (segment) registers base on new GDT

   //

-  SetCodeSelector ((UINT16)CPU_CODE_SEL);

-  SetDataSelectors ((UINT16)CPU_DATA_SEL);

+  SetCodeSelector  ((UINT16) CPU_CODE_SEL);

+  SetDataSelectors ((UINT16) CPU_DATA_SEL);

 }

-

-- 
2.27.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72872): https://edk2.groups.io/g/devel/message/72872
Mute This Topic: https://groups.io/mt/81368664/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] Intel/MinPlatformPkg: resolve MmUnblockMemoryLib

2021-03-16 Thread Zhiguang Liu
Hi Kun,
Your patch is ok for me. Please keep this change in your patch series.

Hi All, 
Please ignore this patch since the same solution is already included in Kun's 
patch serials.

Thanks
Zhiguang


> -Original Message-
> From: Kun Qin 
> Sent: Tuesday, March 16, 2021 5:18 PM
> To: devel@edk2.groups.io; Liu, Zhiguang 
> Cc: Desimone, Nathaniel L ; Chiu, Chasel
> ; Liming Gao ; Dong,
> Eric 
> Subject: Re: [edk2-devel] [edk2-platforms] Intel/MinPlatformPkg: resolve
> MmUnblockMemoryLib
> 
> Hi Zhiguang,
> 
> I have already sent this patch series to resolve dependencies in edk2-
> platform (although the change is slightly different):
> https://edk2.groups.io/g/devel/message/72645
> 
> Specifically:
> https://edk2.groups.io/g/devel/message/72646
> 
> Could you please let me know if the change above resolves the dependency
> issue for you?
> 
> The patch series have 2 other patches not being reviewed yet. I plan to send
> out another round tomorrow to include reviewed-by tags. But please let me
> know if you prefer your change below to check in first, I will just drop my
> patch #1 when sending v2.
> 
> Thanks,
> Kun
> 
> On 03/16/2021 02:06, Zhiguang Liu wrote:
> > The below Edk2 patch makes VariableSmmRuntimeDxe begin to consume
> MmUnblockMemoryLib.
> > It cause multiple platforms build failure.
> >  f463dbadede138dc96a66dae6f361c54f0b3093c
> >  MdeModulePkg: VariableSmmRuntimeDxe: Added request unblock
> memory
> > interface
> >
> > This change added NULL MmUnblockMemoryLib instance in
> MinPlatformPkg
> > dsc include files
> >
> > Cc: Nate DeSimone 
> > Cc: Chasel Chiu 
> > Cc: Liming Gao 
> > Cc: Eric Dong 
> >
> > Signed-off-by: Zhiguang Liu 
> > ---
> >   Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> > b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> > index fa9098d525..ee91dd8bd6 100644
> > --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> > +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> > @@ -116,6 +116,7 @@
> >   !endif
> >
> > BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
> >
> >
> > VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolic
> > yLibRuntimeDxe.inf
> >
> > +
> > +
> MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblo
> ckMemory
> > + LibNull.inf
> >
> >
> >
> >   [LibraryClasses.common.UEFI_DRIVER]
> >
> >
> >
> Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.
> > inf
> >


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72871): https://edk2.groups.io/g/devel/message/72871
Mute This Topic: https://groups.io/mt/81371819/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 09/10] OvmfPkg/CpuHotplugSmm: do actual CPU hot-eject

2021-03-16 Thread Laszlo Ersek
On 03/12/21 07:26, Ankur Arora wrote:

> @@ -214,6 +243,83 @@ EjectCpu (
>  {
>UINT64 QemuSelector;
>  
> +  if (CheckIfBsp ()) {
> +UINT32 Idx;
> +
> +for (Idx = 0; Idx < mCpuHotEjectData->ArrayLength; Idx++) {
> +  UINT64 QemuSelector;

Visual Studio warns that the inner QemuSelector declaration shadows the
outer one. I'm going to remove the inner declaration, due to:

> +
> +  QemuSelector = mCpuHotEjectData->QemuSelectorMap[Idx];
> +
> +  if (QemuSelector != CPU_EJECT_QEMU_SELECTOR_INVALID) {
> +//
> +// This to-be-ejected-CPU has already received the BSP's SMI exit
> +// signal and will execute SmmCpuFeaturesRendezvousExit()
> +// followed by this callback or is already penned in the
> +// CpuSleep() loop below.
> +//
> +// Tell QEMU to context-switch it out.
> +//
> +QemuCpuhpWriteCpuSelector (mMmCpuIo, (UINT32) QemuSelector);
> +QemuCpuhpWriteCpuStatus (mMmCpuIo, QEMU_CPUHP_STAT_EJECT);
> +
> +//
> +// Now that we've ejected the CPU corresponding to 
> QemuSelectorMap[Idx],
> +// clear its eject status to ensure that an invalid future SMI does
> +// not end up trying a spurious eject or a newly hotplugged CPU does
> +// not get penned in the CpuSleep() loop.
> +//
> +// Note that the QemuCpuhpWriteCpuStatus() command above is a write 
> to
> +// a different address space and uses the EFI_MM_CPU_IO_PROTOCOL.
> +//
> +// This means that we are guaranteed that the following assignment
> +// will not be reordered before the eject. And, so we can safely
> +// do this write here.
> +//
> +mCpuHotEjectData->QemuSelectorMap[Idx] =
> +  CPU_EJECT_QEMU_SELECTOR_INVALID;
> +
> +DEBUG ((DEBUG_INFO, "%a: Unplugged ProcessorNum %u, "
> +  "QemuSelector %Lu\n", __FUNCTION__, Idx, QemuSelector));
> +  }
> +}
> +
> +//
> +// We are done until the next hot-unplug; clear the handler.
> +//
> +// mCpuHotEjectData->Handler is a NOP for any CPU not under ejection.
> +// So, once we are done with all the ejections, we can safely reset it
> +// here since any CPU dereferencing it would only see either the old
> +// or the new value (since it is aligned at a natural boundary.)
> +//
> +mCpuHotEjectData->Handler = NULL;
> +return;
> +  }
> +
> +  //
> +  // Reached only on APs
> +  //
> +
> +  //
> +  // mCpuHotEjectData->QemuSelectorMap[ProcessorNum] is updated
> +  // on the BSP in the ongoing SMI at two places:
> +  //
> +  // - UnplugCpus() where the BSP determines if a CPU is under ejection
> +  //   or not. As a comment in UnplugCpus() at set-up, and in
> +  //   SmmCpuFeaturesRendezvousExit() where it is dereferenced describe,
> +  //   any such updates are guaranteed to be ordered-before the
> +  //   dereference below.
> +  //
> +  // - EjectCpu() on the BSP (above) updates QemuSelectorMap[ProcessorNum]
> +  //   for a CPU once it's ejected.
> +  //
> +  //   The CPU under ejection: might be executing anywhere between the
> +  //   AllCpusInSync loop in SmiRendezvous(), to about to dereference
> +  //   QemuSelectorMap[ProcessorNum].
> +  //   As described in the comment above where we do the reset, this
> +  //   is not a problem since the ejected CPU never sees the after value.
> +  //   CPUs not-under ejection: never see any changes so they are fine.
> +  //
>QemuSelector = mCpuHotEjectData->QemuSelectorMap[ProcessorNum];

this reference being to the outer one.

Thanks
Laszlo

>if (QemuSelector == CPU_EJECT_QEMU_SELECTOR_INVALID) {
>  return;
> @@ -495,11 +601,6 @@ CpuHotplugMmi (
>if (EFI_ERROR (Status)) {
>  goto Fatal;
>}
> -  if (ToUnplugCount > 0) {
> -DEBUG ((DEBUG_ERROR, "%a: hot-unplug is not supported yet\n",
> -  __FUNCTION__));
> -goto Fatal;
> -  }
>  
>if (PluggedCount > 0) {
>  Status = ProcessHotAddedCpus (mPluggedApicIds, PluggedCount);
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72870): https://edk2.groups.io/g/devel/message/72870
Mute This Topic: https://groups.io/mt/81273610/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 10/10] OvmfPkg/SmmControl2Dxe: negotiate CPU hot-unplug

2021-03-16 Thread Laszlo Ersek
On 03/12/21 07:26, Ankur Arora wrote:
> Advertise OVMF support for CPU hot-unplug and negotiate it
> if QEMU requests the feature.
> 
> Cc: Laszlo Ersek 
> Cc: Jordan Justen 
> Cc: Ard Biesheuvel 
> Cc: Igor Mammedov 
> Cc: Boris Ostrovsky 
> Cc: Aaron Young 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
> Signed-off-by: Ankur Arora 
> ---
> 
> Notes:
> Addresses the following comments from v8:
> 
> (1) Remove inconsistent comment style (and stray newline) around the newly
> added ICH9_LPC_SMI_F_CPU_HOT_UNPLUG.
> (2) Remove spurious empty line.
> 
>  OvmfPkg/SmmControl2Dxe/SmiFeatures.c | 18 --
>  1 file changed, 16 insertions(+), 2 deletions(-)
> 
> diff --git a/OvmfPkg/SmmControl2Dxe/SmiFeatures.c 
> b/OvmfPkg/SmmControl2Dxe/SmiFeatures.c
> index c9d875543205..3e2e61e4dbd0 100644
> --- a/OvmfPkg/SmmControl2Dxe/SmiFeatures.c
> +++ b/OvmfPkg/SmmControl2Dxe/SmiFeatures.c
> @@ -28,7 +28,12 @@
>  // "etc/smi/supported-features" and "etc/smi/requested-features" fw_cfg 
> files.
>  //
>  #define ICH9_LPC_SMI_F_CPU_HOTPLUG BIT1
> -
> +//
> +// The following bit value stands for "enable CPU hot-unplug, and inject an 
> SMI
> +// with control value ICH9_APM_CNT_CPU_HOTPLUG upon hot-unplug", in the
> +// "etc/smi/supported-features" and "etc/smi/requested-features" fw_cfg 
> files.
> +//
> +#define ICH9_LPC_SMI_F_CPU_HOT_UNPLUG BIT2

Per my v8 comment, this hunk is not supposed to change the amount of
vertical whitespace, in either direction. v8 added an empty line that
wasn't called for, and this version removes one, which is also unjustified.

But I'll fix that up when I merge this series (= soon).

Reviewed-by: Laszlo Ersek 

Thanks!
Laszlo

>  //
>  // Provides a scratch buffer (allocated in EfiReservedMemoryType type memory)
>  // for the S3 boot script fragment to write to and read from.
> @@ -112,7 +117,8 @@ NegotiateSmiFeatures (
>QemuFwCfgReadBytes (sizeof mSmiFeatures, );
>  
>//
> -  // We want broadcast SMI, SMI on CPU hotplug, and nothing else.
> +  // We want broadcast SMI, SMI on CPU hotplug, SMI on CPU hot-unplug
> +  // and nothing else.
>//
>RequestedFeaturesMask = ICH9_LPC_SMI_F_BROADCAST;
>if (!MemEncryptSevIsEnabled ()) {
> @@ -120,6 +126,7 @@ NegotiateSmiFeatures (
>  // For now, we only support hotplug with SEV disabled.
>  //
>  RequestedFeaturesMask |= ICH9_LPC_SMI_F_CPU_HOTPLUG;
> +RequestedFeaturesMask |= ICH9_LPC_SMI_F_CPU_HOT_UNPLUG;
>}
>mSmiFeatures &= RequestedFeaturesMask;
>QemuFwCfgSelectItem (mRequestedFeaturesItem);
> @@ -166,6 +173,13 @@ NegotiateSmiFeatures (
>__FUNCTION__));
>}
>  
> +  if ((mSmiFeatures & ICH9_LPC_SMI_F_CPU_HOT_UNPLUG) == 0) {
> +DEBUG ((DEBUG_INFO, "%a: CPU hot-unplug not negotiated\n", 
> __FUNCTION__));
> +  } else {
> +DEBUG ((DEBUG_INFO, "%a: CPU hot-unplug with SMI negotiated\n",
> +  __FUNCTION__));
> +  }
> +
>//
>// Negotiation successful (although we may not have gotten the optimal
>// feature set).
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72869): https://edk2.groups.io/g/devel/message/72869
Mute This Topic: https://groups.io/mt/81273612/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 09/10] OvmfPkg/CpuHotplugSmm: do actual CPU hot-eject

2021-03-16 Thread Laszlo Ersek
On 03/12/21 07:26, Ankur Arora wrote:
> Add logic in EjectCpu() to do the actual the CPU ejection.
> 
> On the BSP, ejection happens by first selecting the CPU via
> its QemuSelector and then sending the QEMU "eject" command.
> QEMU in-turn signals the remote VCPU thread which context-switches
> the CPU out of the SMI handler.
> 
> Meanwhile the CPU being ejected, waits around in its holding
> area until it is context-switched out. Note that it is possible
> that a slow CPU gets ejected before it reaches the wait loop.
> However, this would never happen before it has executed the
> "AllCpusInSync" loop in SmiRendezvous().
> It can mean that an ejected CPU does not execute code after
> that point but given that the CPU state will be destroyed by
> QEMU, the missed cleanup is no great loss.
> 
> Cc: Laszlo Ersek 
> Cc: Jordan Justen 
> Cc: Ard Biesheuvel 
> Cc: Igor Mammedov 
> Cc: Boris Ostrovsky 
> Cc: Aaron Young 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
> Signed-off-by: Ankur Arora 
> ---
> 
> Notes:
> Addresses the following comments from v8:
> 
> (1a,1b) CheckIfBsp(): get rid of ProcessorNum, document retval.
> (2) Line up IsBsp and ApicBaseMsr
> (3) s/ongoing SMI iteration/ongoing SMI/
> (4) Get rid of the allusions to alignment in the comment in EjectCpu().
> () Also reduce some of the repetitive detail in this comment.
> (5) EjectCpu(): reorder logic to cleanly separate the AP and the BSP 
> portions.
> (6) Get rid of unnecessary MemoryFence() between QemuCpuhpWrite
> and clearing of the eject status.
> (7) Change type of QemuSelector to %Lu in DEBUG statement
> (8) Get rid of the repetitive comment in SmmCpuFeaturesRendezvousExit().
> The necessary parts of this got moved to patch-7.
> 
>  OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h |   1 +
>  OvmfPkg/CpuHotplugSmm/CpuHotplug.c| 113 
> --
>  2 files changed, 108 insertions(+), 6 deletions(-)

Reviewed-by: Laszlo Ersek 

Thanks
Laszlo

> 
> diff --git a/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h 
> b/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
> index 2ec7a107a64d..d0e83102c13f 100644
> --- a/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
> +++ b/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
> @@ -34,6 +34,7 @@
>  #define QEMU_CPUHP_STAT_ENABLEDBIT0
>  #define QEMU_CPUHP_STAT_INSERT BIT1
>  #define QEMU_CPUHP_STAT_REMOVE BIT2
> +#define QEMU_CPUHP_STAT_EJECT  BIT3
>  #define QEMU_CPUHP_STAT_FW_REMOVE  BIT4
>  
>  #define QEMU_CPUHP_RW_CMD_DATA   0x8
> diff --git a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c 
> b/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
> index 2eeb4567a262..ae3abd525900 100644
> --- a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
> +++ b/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
> @@ -18,6 +18,7 @@
>  #include  // CPU_HOT_EJECT_DATA
>  #include // EFI_MM_CPU_IO_PROTOCOL
>  #include   // EFI_SMM_CPU_SERVICE_PROTOCOL
> +#include  // MSR_IA32_APIC_BASE_REGISTER
>  #include// EFI_STATUS
>  
>  #include "ApicId.h"  // APIC_ID
> @@ -193,12 +194,40 @@ RevokeNewSlot:
>  }
>  
>  /**
> +  EjectCpu needs to know the BSP at SMI exit at a point when
> +  some of the EFI_SMM_CPU_SERVICE_PROTOCOL state has been torn
> +  down.
> +  Reuse the logic from OvmfPkg::PlatformSmmBspElection() to
> +  do that.
> +
> +  @retval TRUE   If the CPU executing this function is the BSP.
> +
> +  @retval FALSE  If the CPU executing this function is an AP.
> +**/
> +STATIC
> +BOOLEAN
> +CheckIfBsp (
> +  VOID
> +  )
> +{
> +  MSR_IA32_APIC_BASE_REGISTER ApicBaseMsr;
> +  BOOLEAN IsBsp;
> +
> +  ApicBaseMsr.Uint64 = AsmReadMsr64 (MSR_IA32_APIC_BASE);
> +  IsBsp = (BOOLEAN)(ApicBaseMsr.Bits.BSP == 1);
> +  return IsBsp;
> +}
> +
> +/**
>CPU Hot-eject handler, called from SmmCpuFeaturesRendezvousExit()
>on each CPU at exit from SMM.
>  
> -  If, the executing CPU is not being ejected, nothing to be done.
> +  If, the executing CPU is neither the BSP, nor being ejected, nothing
> +  to be done.
>If, the executing CPU is being ejected, wait in a halted loop
>until ejected.
> +  If, the executing CPU is the BSP, set QEMU CPU status to eject
> +  for CPUs being ejected.
>  
>@param[in] ProcessorNum  ProcessorNum denotes the CPU exiting SMM,
> and will be used as an index into
> @@ -214,6 +243,83 @@ EjectCpu (
>  {
>UINT64 QemuSelector;
>  
> +  if (CheckIfBsp ()) {
> +UINT32 Idx;
> +
> +for (Idx = 0; Idx < mCpuHotEjectData->ArrayLength; Idx++) {
> +  UINT64 QemuSelector;
> +
> +  QemuSelector = mCpuHotEjectData->QemuSelectorMap[Idx];
> +
> +  if (QemuSelector != CPU_EJECT_QEMU_SELECTOR_INVALID) {
> +//
> +// This to-be-ejected-CPU has already received the BSP's SMI exit
> +// signal 

Re: [edk2-devel] [PATCH v9 08/10] OvmfPkg/CpuHotplugSmm: add EjectCpu()

2021-03-16 Thread Laszlo Ersek
On 03/12/21 07:26, Ankur Arora wrote:
> Add EjectCpu(), which handles the CPU ejection, and provides a holding
> area for said CPUs. It is called via SmmCpuFeaturesRendezvousExit(),
> at the tail end of the SMI handling.
> 
> Also UnplugCpus() now stashes QEMU Selectors of CPUs which need to be
> ejected in CPU_HOT_EJECT_DATA.QemuSelectorMap. This is used by
> EjectCpu() to identify CPUs marked for ejection.
> 
> Cc: Laszlo Ersek 
> Cc: Jordan Justen 
> Cc: Ard Biesheuvel 
> Cc: Igor Mammedov 
> Cc: Boris Ostrovsky 
> Cc: Aaron Young 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
> Signed-off-by: Ankur Arora 
> ---
> 
> Notes:
> Addresses the following comments from v8:
> 
> (1) Fixup the coment about UnplugCpus() to reference stashing QEMU
> Cpu Selectors instead of APIC IDs.
> (2) s/ToUnplugSelector/ToUnplugSelectors/
> (3) Use plural for APIC ID in comment describing retval 
> EFI_ALREADY_STARTED.
> (4) Fixup indentation in check against CPU_EJECT_QEMU_SELECTOR_INVALID.
> (5) Clarify comment:
> -   // never match more than one APIC ID and by transitivity, more than 
> one
> -   // QemuSelector in a single invocation of UnplugCpus().
> +   // never match more than one APIC ID -- nor, by transitivity, 
> designate
> +   // more than one QemuSelector -- in a single invocation of 
> UnplugCpus().
> (6a) Remove unnecessary UINT64 cast for 
> mCpuHotEjectData->QemuSelectorMap[ProcessorNum].
> (6b) Switch from 0x%Lx -> %Lu for QemuSelectorMap[ProcessorNum].
> (6c) Switch from 0x%Lx -> %u for QemuSelector
> (7) Switch to "return EFI_ALREADY_STARTED".
> (8a) Replace "QemuSelector 0x%Lx" with "QemuSelector %u".
> (8b) Replace the mCpuHotEjectData->QemuSelectorMap[ProcessorNum] argument
> with just QemuSelector in DEBUG call.
> (9) Clarify comment and make the language complementary to that in patch-7
> Explicitly mention release memory fence.
> 
>  OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf |   2 +
>  OvmfPkg/CpuHotplugSmm/CpuHotplug.c  | 154 
> ++--
>  2 files changed, 148 insertions(+), 8 deletions(-)

Reviewed-by: Laszlo Ersek 

Thanks
Laszlo

> diff --git a/OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf 
> b/OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf
> index 04322b0d7855..ebcc7e2ac63a 100644
> --- a/OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf
> +++ b/OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf
> @@ -40,6 +40,7 @@ [Packages]
>  [LibraryClasses]
>BaseLib
>BaseMemoryLib
> +  CpuLib
>DebugLib
>LocalApicLib
>MmServicesTableLib
> @@ -54,6 +55,7 @@ [Protocols]
>  
>  [Pcd]
>gUefiCpuPkgTokenSpaceGuid.PcdCpuHotPlugDataAddress## 
> CONSUMES
> +  gUefiOvmfPkgTokenSpaceGuid.PcdCpuHotEjectDataAddress  ## 
> CONSUMES
>gUefiOvmfPkgTokenSpaceGuid.PcdQ35SmramAtDefaultSmbase ## 
> CONSUMES
>  
>  [FeaturePcd]
> diff --git a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c 
> b/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
> index 59f000eb7886..2eeb4567a262 100644
> --- a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
> +++ b/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
> @@ -10,10 +10,12 @@
>  #include  // ICH9_APM_CNT
>  #include  // QEMU_CPUHP_CMD_GET_PENDING
>  #include  // CpuDeadLoop()
> +#include   // CpuSleep()
>  #include // ASSERT()
>  #include   // gMmst
>  #include   // PcdGetBool()
>  #include   // SafeUintnSub()
> +#include  // CPU_HOT_EJECT_DATA
>  #include // EFI_MM_CPU_IO_PROTOCOL
>  #include   // EFI_SMM_CPU_SERVICE_PROTOCOL
>  #include// EFI_STATUS
> @@ -32,11 +34,12 @@ STATIC EFI_MM_CPU_IO_PROTOCOL *mMmCpuIo;
>  //
>  STATIC EFI_SMM_CPU_SERVICE_PROTOCOL *mMmCpuService;
>  //
> -// This structure is a communication side-channel between the
> +// These structures serve as communication side-channels between the
>  // EFI_SMM_CPU_SERVICE_PROTOCOL consumer (i.e., this driver) and provider
>  // (i.e., PiSmmCpuDxeSmm).
>  //
>  STATIC CPU_HOT_PLUG_DATA *mCpuHotPlugData;
> +STATIC CPU_HOT_EJECT_DATA *mCpuHotEjectData;
>  //
>  // SMRAM arrays for fetching the APIC IDs of processors with pending events 
> (of
>  // known event types), for the time of just one MMI.
> @@ -190,18 +193,71 @@ RevokeNewSlot:
>  }
>  
>  /**
> +  CPU Hot-eject handler, called from SmmCpuFeaturesRendezvousExit()
> +  on each CPU at exit from SMM.
> +
> +  If, the executing CPU is not being ejected, nothing to be done.
> +  If, the executing CPU is being ejected, wait in a halted loop
> +  until ejected.
> +
> +  @param[in] ProcessorNum  ProcessorNum denotes the CPU exiting SMM,
> +   and will be used as an index into
> +   CPU_HOT_EJECT_DATA->QemuSelectorMap. It is
> +   identical to the processor handle number in
> +   EFI_SMM_CPU_SERVICE_PROTOCOL.
> +**/
> 

Re: [edk2-devel] [PATCH v9 07/10] OvmfPkg/SmmCpuFeaturesLib: call CPU hot-eject handler

2021-03-16 Thread Laszlo Ersek
On 03/12/21 07:26, Ankur Arora wrote:
> Call the CPU hot-eject handler if one is installed. The condition for
> installation is (PcdCpuMaxLogicalProcessorNumber > 1), and there's
> a hot-unplug request.
> 
> The handler is called from SmmCpuFeaturesRendezvousExit(), which is
> in-turn called at the tail-end of SmiRendezvous() after the BSP has
> signalled an SMI exit via the "AllCpusInSync" loop.
> 
> Cc: Laszlo Ersek 
> Cc: Jordan Justen 
> Cc: Ard Biesheuvel 
> Cc: Igor Mammedov 
> Cc: Boris Ostrovsky 
> Cc: Aaron Young 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
> Signed-off-by: Ankur Arora 
> ---
> 
> Notes:
> Addresses the following comments from v8:
> 
> (1) Add a MemoryFence() before accessing mCpuHotEjctData->Handler
> (and comment to that effect.)
> 
>  .../Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c  | 34 
> ++
>  1 file changed, 34 insertions(+)

Reviewed-by: Laszlo Ersek 

Thanks
Laszlo

> diff --git a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c 
> b/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c
> index 5c025bc717c3..fdf2380974fa 100644
> --- a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c
> +++ b/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c
> @@ -452,6 +452,40 @@ SmmCpuFeaturesRendezvousExit (
>IN UINTN  CpuIndex
>)
>  {
> +  //
> +  // We only call the Handler if CPU hot-eject is enabled
> +  // (PcdCpuMaxLogicalProcessorNumber > 1), and hot-eject is needed
> +  // in this SMI exit (otherwise mCpuHotEjectData->Handler is not armed.)
> +  //
> +
> +  if (mCpuHotEjectData != NULL) {
> +CPU_HOT_EJECT_HANDLER Handler;
> +
> +//
> +// As the comment above mentions, mCpuHotEjectData->Handler might be
> +// written to on the BSP as part of handling of the CPU-ejection.
> +//
> +// We know that any initial assignment to mCpuHotEjectData->Handler
> +// (on the BSP, in the CpuHotplugMmi() context) is ordered-before the
> +// load below, since it is guaranteed to happen before the
> +// control-dependency of the BSP's SMI exit signal -- by way of a store
> +// to AllCpusInSync (on the BSP, in BspHandler()) and the corresponding
> +// AllCpusInSync loop (on the APs, in SmiRendezvous()) which depends on
> +// that store.
> +//
> +// This guarantees that these pieces of code can never execute
> +// simultaneously. In addition, we ensure that the following load is
> +// ordered-after the AllCpusInSync loop by using a MemoryFence() with
> +// acquire semantics.
> +//
> +MemoryFence();
> +
> +Handler = mCpuHotEjectData->Handler;
> +
> +if (Handler != NULL) {
> +  Handler (CpuIndex);
> +}
> +  }
>  }
>  
>  /**
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72866): https://edk2.groups.io/g/devel/message/72866
Mute This Topic: https://groups.io/mt/81273609/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 06/10] OvmfPkg/SmmCpuFeaturesLib: init CPU ejection state

2021-03-16 Thread Laszlo Ersek
On 03/12/21 07:26, Ankur Arora wrote:
> Init CPU_HOT_EJECT_DATA, which will be used to share CPU ejection
> state between SmmCpuFeaturesLib (via PiSmmCpuDxeSmm) and CpuHotPlugSmm.
> 
> The init happens via SmmCpuFeaturesSmmRelocationComplete(), and so it
> will run as part of the PiSmmCpuDxeSmm entry point function,
> PiCpuSmmEntry(). Once inited, CPU_HOT_EJECT_DATA is exposed via
> PcdCpuHotEjectDataAddress.
> 
> The CPU hot-eject handler (CPU_HOT_EJECT_DATA->Handler) is setup when
> there is an ejection request via CpuHotplugSmm.
> 
> Cc: Laszlo Ersek 
> Cc: Jordan Justen 
> Cc: Ard Biesheuvel 
> Cc: Igor Mammedov 
> Cc: Boris Ostrovsky 
> Cc: Aaron Young 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
> Signed-off-by: Ankur Arora 
> ---
> 
> Notes:
> Addresses the following comments from v8:
> 
> (1) Remove line before the "if (MaxNumberofCpus == 1)" check.
> (3) Fixup the space around "||".
> (2,6) Simplify the three SafeInt multiplication into the ones suggested
> by Laszlo.
> (4) Get rid of the mixed sizeof(mCpuHotEjectData->QemuSelectorMap[0]) and
> sizeof(UINT64) in favour of UINT64 everywhere. I was planning to use
> the first, but describing the alignment needed is easier in terms of 
> the
> second.
> Also, as Laszlo's comments on v8-patch-9 mention, we don't really need
> this alignment for correctness reasons. This patch retains it, so we
> don't pay access penalty for unaligned access.
> (5) Change alignment from UINT64 to UINT64-1.
> (7) Use the more idiomatic ALIGN_POINTER instead of ALIGN_VALUE.
> (8) RETURN_ERROR -> ASSERT_RETURN_ERROR.
> 
>  .../SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf|  4 ++
>  .../Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c  | 77 
> ++
>  2 files changed, 81 insertions(+)

Reviewed-by: Laszlo Ersek 

Thanks!
Laszlo

> 
> diff --git a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf 
> b/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
> index 97a10afb6e27..8a426a4c10fb 100644
> --- a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
> +++ b/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
> @@ -30,9 +30,13 @@ [LibraryClasses]
>BaseMemoryLib
>DebugLib
>MemEncryptSevLib
> +  MemoryAllocationLib
>PcdLib
> +  SafeIntLib
>SmmServicesTableLib
>UefiBootServicesTableLib
>  
>  [Pcd]
> +  gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber
> +  gUefiOvmfPkgTokenSpaceGuid.PcdCpuHotEjectDataAddress
>gUefiOvmfPkgTokenSpaceGuid.PcdQ35SmramAtDefaultSmbase
> diff --git a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c 
> b/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c
> index 7ef7ed98342e..5c025bc717c3 100644
> --- a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c
> +++ b/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c
> @@ -11,10 +11,13 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -171,6 +174,77 @@ SmmCpuFeaturesHookReturnFromSmm (
>return OriginalInstructionPointer;
>  }
>  
> +STATIC CPU_HOT_EJECT_DATA *mCpuHotEjectData = NULL;
> +
> +/**
> +  Initialize mCpuHotEjectData if PcdCpuMaxLogicalProcessorNumber > 1.
> +
> +  Also setup the corresponding PcdCpuHotEjectDataAddress.
> +**/
> +STATIC
> +VOID
> +InitCpuHotEjectData (
> +  VOID
> +  )
> +{
> +  UINTN  Size;
> +  UINT32 Idx;
> +  UINT32 MaxNumberOfCpus;
> +  RETURN_STATUS  PcdStatus;
> +
> +  MaxNumberOfCpus = PcdGet32 (PcdCpuMaxLogicalProcessorNumber);
> +  if (MaxNumberOfCpus == 1) {
> +return;
> +  }
> +
> +  //
> +  // We allocate CPU_HOT_EJECT_DATA and CPU_HOT_EJECT_DATA->QemuSelectorMap[]
> +  // in a single allocation, and explicitly align the QemuSelectorMap[] 
> (which
> +  // is a UINT64 array) at its natural boundary.
> +  // Accordingly, allocate:
> +  //   sizeof(*mCpuHotEjectData) + (MaxNumberOfCpus * sizeof(UINT64))
> +  // and, add sizeof(UINT64) - 1 to use as padding if needed.
> +  //
> +
> +  if (RETURN_ERROR (SafeUintnMult (MaxNumberOfCpus, sizeof (UINT64), )) 
> ||
> +  RETURN_ERROR (SafeUintnAdd (Size, sizeof (*mCpuHotEjectData), )) 
> ||
> +  RETURN_ERROR (SafeUintnAdd (Size, sizeof (UINT64) - 1, ))) {
> +DEBUG ((DEBUG_ERROR, "%a: invalid CPU_HOT_EJECT_DATA\n", __FUNCTION__));
> +goto Fatal;
> +  }
> +
> +  mCpuHotEjectData = AllocatePool (Size);
> +  if (mCpuHotEjectData == NULL) {
> +ASSERT (mCpuHotEjectData != NULL);
> +goto Fatal;
> +  }
> +
> +  mCpuHotEjectData->Handler = NULL;
> +  mCpuHotEjectData->ArrayLength = MaxNumberOfCpus;
> +
> +  mCpuHotEjectData->QemuSelectorMap = ALIGN_POINTER (mCpuHotEjectData + 1,
> +sizeof (UINT64));
> +  //
> +  // We use mCpuHotEjectData->QemuSelectorMap to map
> +  // ProcessorNum -> QemuSelector. Initialize to invalid 

Re: [edk2-devel] [PATCH v9 05/10] OvmfPkg: define CPU_HOT_EJECT_DATA

2021-03-16 Thread Laszlo Ersek
On 03/12/21 07:26, Ankur Arora wrote:
> Define CPU_HOT_EJECT_DATA and add PCD PcdCpuHotEjectDataAddress, which
> will be used to share CPU ejection state between OvmfPkg/CpuHotPlugSmm
> and PiSmmCpuDxeSmm.
> 
> Cc: Laszlo Ersek 
> Cc: Jordan Justen 
> Cc: Ard Biesheuvel 
> Cc: Igor Mammedov 
> Cc: Boris Ostrovsky 
> Cc: Aaron Young 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
> Signed-off-by: Ankur Arora 
> ---
> 
> Notes:
> Addresses the following comments from v8:
> 
>  (1) Get rid of the unnecessary commit specifier from the subject.
>  (2) s/MaxNumberOfCpus/PcdCpuMaxLogicalProcessorNumber/
>  (3) Shifted the comments to be above each structure field.
> 
>  OvmfPkg/OvmfPkg.dec   |  4 +++
>  OvmfPkg/Include/Pcd/CpuHotEjectData.h | 60 
> +++
>  2 files changed, 64 insertions(+)
>  create mode 100644 OvmfPkg/Include/Pcd/CpuHotEjectData.h

Reviewed-by: Laszlo Ersek 

Thanks,
Laszlo

> 
> diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec
> index 4348bb45c64a..9629707020ba 100644
> --- a/OvmfPkg/OvmfPkg.dec
> +++ b/OvmfPkg/OvmfPkg.dec
> @@ -352,6 +352,10 @@ [PcdsDynamic, PcdsDynamicEx]
>#  This PCD is only accessed if PcdSmmSmramRequire is TRUE (see below).
>gUefiOvmfPkgTokenSpaceGuid.PcdQ35SmramAtDefaultSmbase|FALSE|BOOLEAN|0x34
>  
> +  ## This PCD adds a communication channel between OVMF's SmmCpuFeaturesLib
> +  #  instance in PiSmmCpuDxeSmm, and CpuHotplugSmm.
> +  gUefiOvmfPkgTokenSpaceGuid.PcdCpuHotEjectDataAddress|0|UINT64|0x46
> +
>  [PcdsFeatureFlag]
>gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE|BOOLEAN|0x1c
>
> gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|FALSE|BOOLEAN|0x1d
> diff --git a/OvmfPkg/Include/Pcd/CpuHotEjectData.h 
> b/OvmfPkg/Include/Pcd/CpuHotEjectData.h
> new file mode 100644
> index ..06714375526c
> --- /dev/null
> +++ b/OvmfPkg/Include/Pcd/CpuHotEjectData.h
> @@ -0,0 +1,60 @@
> +/** @file
> +  Definition for the CPU_HOT_EJECT_DATA structure, which shares
> +  CPU hot-eject state between OVMF's SmmCpuFeaturesLib instance in
> +  PiSmmCpuDxeSmm, and CpuHotplugSmm.
> +
> +  CPU_HOT_EJECT_DATA is allocated in SMRAM, and pointed-to by
> +  PcdCpuHotEjectDataAddress.
> +
> +  PcdCpuHotEjectDataAddress is valid when SMM_REQUIRE is TRUE
> +  and PcdCpuMaxLogicalProcessorNumber > 1.
> +
> +  Copyright (C) 2021, Oracle Corporation.
> +
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +**/
> +
> +#ifndef CPU_HOT_EJECT_DATA_H_
> +#define CPU_HOT_EJECT_DATA_H_
> +
> +/**
> +  CPU Hot-eject handler, called from SmmCpuFeaturesRendezvousExit()
> +  on each CPU at exit from SMM.
> +
> +  @param[in] ProcessorNum  ProcessorNum denotes the CPU exiting SMM,
> +   and will be used as an index into
> +   CPU_HOT_EJECT_DATA->QemuSelectorMap. It is
> +   identical to the processor handle in
> +   EFI_SMM_CPU_SERVICE_PROTOCOL.
> +**/
> +typedef
> +VOID
> +(EFIAPI *CPU_HOT_EJECT_HANDLER) (
> +  IN UINTN  ProcessorNum
> +  );
> +
> +//
> +// CPU_EJECT_QEMU_SELECTOR_INVALID marks CPUs not being ejected in
> +// CPU_HOT_EJECT_DATA->QemuSelectorMap.
> +//
> +// QEMU CPU Selector is UINT32, so we choose an invalid value larger
> +// than that type.
> +//
> +#define CPU_EJECT_QEMU_SELECTOR_INVALID   (MAX_UINT64)
> +
> +typedef struct {
> +  //
> +  // Maps ProcessorNum -> QemuSelector for pending hot-ejects
> +  //
> +  volatile UINT64 *QemuSelectorMap;
> +  //
> +  // Handler to do the CPU ejection
> +  //
> +  volatile CPU_HOT_EJECT_HANDLER Handler;
> +  //
> +  // Entries in the QemuSelectorMap
> +  //
> +  UINT32 ArrayLength;
> +} CPU_HOT_EJECT_DATA;
> +
> +#endif // CPU_HOT_EJECT_DATA_H_
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72864): https://edk2.groups.io/g/devel/message/72864
Mute This Topic: https://groups.io/mt/81273608/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 02/10] OvmfPkg/CpuHotplugSmm: collect hot-unplug events

2021-03-16 Thread Laszlo Ersek
On 03/12/21 07:26, Ankur Arora wrote:
> Process fw_remove events in QemuCpuhpCollectApicIds(), and collect APIC IDs
> and QEMU CPU Selectors for CPUs being hot-unplugged.
> 
> In addition, we now ignore CPUs which only have remove set. These
> CPUs haven't been processed by OSPM yet.
> 
> This is based on the QEMU hot-unplug protocol documented here:
>   
> https://lore.kernel.org/qemu-devel/20201204170939.1815522-3-imamm...@redhat.com/
> 
> Cc: Laszlo Ersek 
> Cc: Jordan Justen 
> Cc: Ard Biesheuvel 
> Cc: Igor Mammedov 
> Cc: Boris Ostrovsky 
> Cc: Aaron Young 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
> Signed-off-by: Ankur Arora 
> ---
> 
> Notes:
> Addresses the following comments from v8:
>   (1) Fix commit message to mention that we collect cpu-selectors as well.
>   (2,3,6) s/UnplugSelector/UnplugSelectors/ in CpuHotplug.c, QemuCpuhp.c
>   (4) Fix comment above the declaration of the now renamed 
> mToUnplugSelector.
>   (5) Fix spacing around "||".
>   (7) Fix QemuCpuCollectApicIds() comments to line up descriptions for
>   ToUnplugSelectors and other params.
>   (8) s/ExtendSel/ExtendSels/.
>   (9) Add the (ExtendSels => ExtendIds) assert.
>   (10) Fix the missing CurrentSelector++ bug.
> 
>  OvmfPkg/CpuHotplugSmm/QemuCpuhp.h |   1 +
>  OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h |   1 +
>  OvmfPkg/CpuHotplugSmm/CpuHotplug.c|  29 +--
>  OvmfPkg/CpuHotplugSmm/QemuCpuhp.c | 101 
> +++---
>  4 files changed, 93 insertions(+), 39 deletions(-)

Reviewed-by: Laszlo Ersek 

Thanks
Laszlo

> 
> diff --git a/OvmfPkg/CpuHotplugSmm/QemuCpuhp.h 
> b/OvmfPkg/CpuHotplugSmm/QemuCpuhp.h
> index 8adaa0ad91f0..3e2c2192e1c0 100644
> --- a/OvmfPkg/CpuHotplugSmm/QemuCpuhp.h
> +++ b/OvmfPkg/CpuHotplugSmm/QemuCpuhp.h
> @@ -55,6 +55,7 @@ QemuCpuhpCollectApicIds (
>OUT APIC_ID  *PluggedApicIds,
>OUT UINT32   *PluggedCount,
>OUT APIC_ID  *ToUnplugApicIds,
> +  OUT UINT32   *ToUnplugSelectors,
>OUT UINT32   *ToUnplugCount
>);
>  
> diff --git a/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h 
> b/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
> index a34a6d3fae61..2ec7a107a64d 100644
> --- a/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
> +++ b/OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
> @@ -34,6 +34,7 @@
>  #define QEMU_CPUHP_STAT_ENABLEDBIT0
>  #define QEMU_CPUHP_STAT_INSERT BIT1
>  #define QEMU_CPUHP_STAT_REMOVE BIT2
> +#define QEMU_CPUHP_STAT_FW_REMOVE  BIT4
>  
>  #define QEMU_CPUHP_RW_CMD_DATA   0x8
>  
> diff --git a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c 
> b/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
> index bf68fcd42914..ee1497b93140 100644
> --- a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
> +++ b/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
> @@ -45,13 +45,16 @@ STATIC CPU_HOT_PLUG_DATA *mCpuHotPlugData;
>  // don't want to allocate SMRAM at OS runtime, and potentially fail (or
>  // fragment the SMRAM map).
>  //
> -// These arrays provide room for ("possible CPU count" minus one) APIC IDs
> -// each, as we don't expect every possible CPU to appear, or disappear, in a
> -// single MMI. The numbers of used (populated) elements in the arrays are
> +// The first array stores APIC IDs for hot-plug events, the second and the
> +// third store APIC IDs and QEMU CPU Selectors (both indexed similarly) for
> +// hot-unplug events. All of these provide room for "possible CPU count" 
> minus
> +// one elements as we don't expect every possible CPU to appear, or 
> disappear,
> +// in a single MMI. The numbers of used (populated) elements in the arrays 
> are
>  // determined on every MMI separately.
>  //
>  STATIC APIC_ID *mPluggedApicIds;
>  STATIC APIC_ID *mToUnplugApicIds;
> +STATIC UINT32  *mToUnplugSelectors;
>  //
>  // Address of the non-SMRAM reserved memory page that contains the Post-SMM 
> Pen
>  // for hot-added CPUs.
> @@ -289,6 +292,7 @@ CpuHotplugMmi (
>   mPluggedApicIds,
>   ,
>   mToUnplugApicIds,
> + mToUnplugSelectors,
>   
>   );
>if (EFI_ERROR (Status)) {
> @@ -333,7 +337,9 @@ CpuHotplugEntry (
>)
>  {
>EFI_STATUS Status;
> +  UINTN  Len;
>UINTN  Size;
> +  UINTN  SizeSel;
>  
>//
>// This module should only be included when SMM support is required.
> @@ -387,8 +393,9 @@ CpuHotplugEntry (
>//
>// Allocate the data structures that depend on the possible CPU count.
>//
> -  if (RETURN_ERROR (SafeUintnSub (mCpuHotPlugData->ArrayLength, 1, )) ||
> -  RETURN_ERROR (SafeUintnMult (sizeof (APIC_ID), Size, ))) {
> +  if (RETURN_ERROR (SafeUintnSub (mCpuHotPlugData->ArrayLength, 1, )) ||
> +  RETURN_ERROR (SafeUintnMult (sizeof (APIC_ID), Len, )) ||
> +  RETURN_ERROR 

[edk2-devel] [PATCH] ShellPkg/Library: Fix bug in Pci.c

2021-03-16 Thread IanX Kuo
From: VincentX Ke 

Bugzilla: 3262 (https://bugzilla.tianocore.org/show_bug.cgi?id=3262)

No need to print PCIe details while CapabilityId is 0x.
Limit the NextCapabilityOffset value to AllocatePool() memory.

Signed-off-by: VincentX Ke 
---
 ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
index a2f04d8db5..9ebf1c26ef 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
@@ -2038,12 +2038,14 @@ LocatePciCapability (
 
   @param[in] PciExpressCap   PCI Express capability buffer.
   @param[in] ExtendedConfigSpace PCI Express extended configuration space.
+  @param[in] ExtendedConfigSize  PCI Express extended configuration size.
   @param[in] ExtendedCapability  PCI Express extended capability ID to explain.
 **/
 VOID
 PciExplainPciExpress (
   IN  PCI_CAPABILITY_PCIEXP  *PciExpressCap,
   IN  UINT8  *ExtendedConfigSpace,
+  IN  UINTN  ExtendedConfigSize,
   IN CONST UINT16ExtendedCapability
   );
 
@@ -2921,6 +2923,7 @@ ShellCommandRunPci (
 PciExplainPciExpress (
   (PCI_CAPABILITY_PCIEXP *) ((UINT8 *)  + 
PcieCapabilityPtr),
   ExtendedConfigSpace,
+  ExtendedConfigSize,
   ExtendedCapability
   );
   }
@@ -5698,12 +5701,14 @@ PrintPciExtendedCapabilityDetails(
 
   @param[in] PciExpressCap   PCI Express capability buffer.
   @param[in] ExtendedConfigSpace PCI Express extended configuration space.
+  @param[in] ExtendedConfigSize  PCI Express extended configuration size.
   @param[in] ExtendedCapability  PCI Express extended capability ID to explain.
 **/
 VOID
 PciExplainPciExpress (
   IN  PCI_CAPABILITY_PCIEXP  *PciExpressCap,
   IN  UINT8  *ExtendedConfigSpace,
+  IN  UINTN  ExtendedConfigSize,
   IN CONST UINT16ExtendedCapability
   )
 {
@@ -5786,7 +5791,7 @@ PciExplainPciExpress (
   }
 
   ExtHdr = (PCI_EXP_EXT_HDR*)ExtendedConfigSpace;
-  while (ExtHdr->CapabilityId != 0 && ExtHdr->CapabilityVersion != 0) {
+  while (ExtHdr->CapabilityId != 0 && ExtHdr->CapabilityVersion != 0 && 
ExtHdr->CapabilityId != 0x) {
 //
 // Process this item
 //
@@ -5800,7 +5805,7 @@ PciExplainPciExpress (
 //
 // Advance to the next item if it exists
 //
-if (ExtHdr->NextCapabilityOffset != 0) {
+if (ExtHdr->NextCapabilityOffset != 0 && (ExtHdr->NextCapabilityOffset <= 
(UINT32)(ExtendedConfigSize - sizeof (PCI_EXP_EXT_HDR {
   ExtHdr = (PCI_EXP_EXT_HDR*)(ExtendedConfigSpace + 
ExtHdr->NextCapabilityOffset - EFI_PCIE_CAPABILITY_BASE_OFFSET);
 } else {
   break;
-- 
2.18.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72862): https://edk2.groups.io/g/devel/message/72862
Mute This Topic: https://groups.io/mt/81372175/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] Intel/MinPlatformPkg: resolve MmUnblockMemoryLib

2021-03-16 Thread Kun Qin

Hi Zhiguang,

I have already sent this patch series to resolve dependencies in 
edk2-platform (although the change is slightly different):

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

Specifically:
https://edk2.groups.io/g/devel/message/72646

Could you please let me know if the change above resolves the dependency 
issue for you?


The patch series have 2 other patches not being reviewed yet. I plan to 
send out another round tomorrow to include reviewed-by tags. But please 
let me know if you prefer your change below to check in first, I will 
just drop my patch #1 when sending v2.


Thanks,
Kun

On 03/16/2021 02:06, Zhiguang Liu wrote:

The below Edk2 patch makes VariableSmmRuntimeDxe begin to consume 
MmUnblockMemoryLib.
It cause multiple platforms build failure.
 f463dbadede138dc96a66dae6f361c54f0b3093c
 MdeModulePkg: VariableSmmRuntimeDxe: Added request unblock memory interface

This change added NULL MmUnblockMemoryLib instance in MinPlatformPkg dsc 
include files

Cc: Nate DeSimone 
Cc: Chasel Chiu 
Cc: Liming Gao 
Cc: Eric Dong 

Signed-off-by: Zhiguang Liu 
---
  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc | 1 +
  1 file changed, 1 insertion(+)

diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc 
b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
index fa9098d525..ee91dd8bd6 100644
--- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
@@ -116,6 +116,7 @@
  !endif

BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf


VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf

+  
MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf

  


  [LibraryClasses.common.UEFI_DRIVER]

Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf




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




[edk2-devel] [edk2-platforms] Intel/MinPlatformPkg: resolve MmUnblockMemoryLib

2021-03-16 Thread Zhiguang Liu
The below Edk2 patch makes VariableSmmRuntimeDxe begin to consume 
MmUnblockMemoryLib.
It cause multiple platforms build failure.
f463dbadede138dc96a66dae6f361c54f0b3093c
MdeModulePkg: VariableSmmRuntimeDxe: Added request unblock memory interface

This change added NULL MmUnblockMemoryLib instance in MinPlatformPkg dsc 
include files

Cc: Nate DeSimone 
Cc: Chasel Chiu 
Cc: Liming Gao 
Cc: Eric Dong 

Signed-off-by: Zhiguang Liu 
---
 Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc 
b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
index fa9098d525..ee91dd8bd6 100644
--- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
@@ -116,6 +116,7 @@
 !endif
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
   
VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf
+  
MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf
 
 [LibraryClasses.common.UEFI_DRIVER]
   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf
-- 
2.30.0.windows.2



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




Re: [edk2-devel] [patch 20/28] ShellPkg: Consume RegisterFilterLibNull instance

2021-03-16 Thread Gao, Zhichao
Reviewed-by: Zhichao Gao 

Thanks,
Zhichao

> -Original Message-
> From: Bi, Dandan 
> Sent: Monday, March 15, 2021 11:59 AM
> To: devel@edk2.groups.io
> Cc: Ni, Ray ; Gao, Zhichao 
> Subject: [patch 20/28] ShellPkg: Consume RegisterFilterLibNull instance
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.
> 
> Cc: Ray Ni 
> Cc: Zhichao Gao 
> Signed-off-by: Dandan Bi 
> ---
>  ShellPkg/ShellPkg.dsc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc index
> a8b6de3342..e6ad8e8960 100644
> --- a/ShellPkg/ShellPkg.dsc
> +++ b/ShellPkg/ShellPkg.dsc
> @@ -51,10 +51,11 @@
> 
> 
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/Base
> PeCoffGetEntryPointLib.inf
> 
> BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfg
> CommandLib.inf
> 
> AcpiViewCommandLib|ShellPkg/Library/UefiShellAcpiViewCommandLib/Uef
> iShellAcpiViewCommandLib.inf
>IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> +
> + RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterL
> + ibNull.inf
> 
> 
> UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBoo
> tManagerLib.inf
>HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> 
> PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanc
> eLibNull.inf
> 
> DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTabl
> eLib.inf
> --
> 2.18.0.windows.1



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




Re: [edk2-devel] [PATCH] ShellPkg/Library: Error handle while CapabilityId is 0xFFFF

2021-03-16 Thread Gao, Zhichao
Hi Ian/Vincent,

It is a bug fix for parsing PCI extended config space. But there is one more 
place can be enhanced.

if (ExtHdr->NextCapabilityOffset != 0) {

You can see the above condition to check next capability info. But it doesn't 
check the length. If the value is 0xfff, it would put the ExtHdr outside the 
extended config space.
Its safe value should be below 0xFFF - EFI_PCIE_CAPABILITY_BASE_OFFSET - sizeof 
(PCI_EXP_EXT_HDR).

Thanks,
Zhichao

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of IanX
> Kuo
> Sent: Thursday, April 8, 2021 5:50 AM
> To: devel@edk2.groups.io
> Cc: Ke, VincentX 
> Subject: [edk2-devel] [PATCH] ShellPkg/Library: Error handle while
> CapabilityId is 0x
> 
> From: VincentX Ke 
> 
> Bugzilla: 3262 (https://bugzilla.tianocore.org/show_bug.cgi?id=3262)
> 
> Adding error handle while CapabilityId is 0x
> 
> Signed-off-by: VincentX Ke 
> ---
>  ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
> index a2f04d8db5..cd295bb79b 100644
> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
> +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
> @@ -5786,7 +5786,7 @@ PciExplainPciExpress (
>}ExtHdr = (PCI_EXP_EXT_HDR*)ExtendedConfigSpace;-  while (ExtHdr-
> >CapabilityId != 0 && ExtHdr->CapabilityVersion != 0) {+  while (ExtHdr-
> >CapabilityId != 0 && ExtHdr->CapabilityVersion != 0 && ExtHdr-
> >CapabilityId != 0x) { // // Process this item //--
> 2.26.2.windows.1
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#72748): https://edk2.groups.io/g/devel/message/72748
> Mute This Topic: https://groups.io/mt/81324192/1768756
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [zhichao@intel.com]
> -=-=-=-=-=-=
> 



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