Re: [edk2-devel] [PATCH] MdeModulePkg/HiiDatabaseDxe: Add Support for authenticated variable

2022-01-12 Thread Dandan Bi
The change is ok to me. Reviewed-by: Dandan Bi 

Hi Liming,

Could you also help review it?


Thanks,
Dandan
> -Original Message-
> From: Huang, Long1 
> Sent: Thursday, January 13, 2022 1:06 AM
> To: devel@edk2.groups.io
> Cc: Huang, Long1 ; Feng, Bob C
> ; Gao, Liming ; Bi,
> Dandan ; Chen, Lin Z ; Li,
> Zhuangzhi 
> Subject: [PATCH] MdeModulePkg/HiiDatabaseDxe: Add Support for
> authenticated variable
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3796
> 
> Database.c:
>   1. Replace PcdGetExPtr with PcdGetExPtr.
>   2. Add FindAuthVariableData function to parse authenticated
> variable type for getting a correct default value in
> PcdNvStoreDefaultValueBuffer.
> 
> Signed-off-by: Huang Long 
> 
> Cc: Bob Feng 
> Cc: Liming Gao 
> Cc: Dandan Bi 
> Cc: Lin Z Chen 
> Cc: Zhuangzhi Li 
> ---
>  .../Universal/HiiDatabaseDxe/Database.c   | 130 ++
>  .../HiiDatabaseDxe/HiiDatabaseDxe.inf |   3 +
>  2 files changed, 105 insertions(+), 28 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
> b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
> index 0b09c24d52..c7a92d6aed 100644
> --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
> +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
> @@ -603,6 +603,45 @@ FindVariableData (
>return NULL;
> 
>  }
> 
> 
> 
> +/**
> 
> +  Find the matched authenticated variable from the input variable storage.
> 
> +
> 
> +  @param[in] VariableStorage Point to the variable storage header.
> 
> +  @param[in] VarGuid A unique identifier for the variable.
> 
> +  @param[in] VarAttributeThe attributes bitmask for the variable.
> 
> +  @param[in] VarName A Null-terminated ascii string that is the name 
> of
> the variable.
> 
> +
> 
> +  @return Pointer to the matched variable header or NULL if not found.
> 
> +**/
> 
> +AUTHENTICATED_VARIABLE_HEADER *
> 
> +FindAuthVariableData (
> 
> +  IN  VARIABLE_STORE_HEADER  *VariableStorage,
> 
> +  IN  EFI_GUID   *VarGuid,
> 
> +  IN  UINT32 VarAttribute,
> 
> +  IN  CHAR16 *VarName
> 
> +  )
> 
> +{
> 
> +  AUTHENTICATED_VARIABLE_HEADER  *AuthVariableHeader;
> 
> +  AUTHENTICATED_VARIABLE_HEADER  *AuthVariableEnd;
> 
> +
> 
> +  AuthVariableEnd= (AUTHENTICATED_VARIABLE_HEADER *)((UINT8
> *)VariableStorage + VariableStorage->Size);
> 
> +  AuthVariableHeader = (AUTHENTICATED_VARIABLE_HEADER
> *)(VariableStorage + 1);
> 
> +  AuthVariableHeader = (AUTHENTICATED_VARIABLE_HEADER
> *)HEADER_ALIGN (AuthVariableHeader);
> 
> +  while (AuthVariableHeader < AuthVariableEnd) {
> 
> +if (CompareGuid (>VendorGuid, VarGuid) &&
> 
> +(AuthVariableHeader->Attributes == VarAttribute) &&
> 
> +(StrCmp (VarName, (CHAR16 *)(AuthVariableHeader + 1)) == 0))
> 
> +{
> 
> +  return AuthVariableHeader;
> 
> +}
> 
> +
> 
> +AuthVariableHeader = (AUTHENTICATED_VARIABLE_HEADER *)((UINT8
> *)AuthVariableHeader + sizeof (AUTHENTICATED_VARIABLE_HEADER) +
> AuthVariableHeader->NameSize + AuthVariableHeader->DataSize);
> 
> +AuthVariableHeader = (AUTHENTICATED_VARIABLE_HEADER
> *)HEADER_ALIGN (AuthVariableHeader);
> 
> +  }
> 
> +
> 
> +  return NULL;
> 
> +}
> 
> +
> 
>  /**
> 
>Find question default value from PcdNvStoreDefaultValueBuffer
> 
> 
> 
> @@ -626,25 +665,29 @@ FindQuestionDefaultSetting (
>IN  BOOLEAN  BitFieldQuestion
> 
>)
> 
>  {
> 
> -  VARIABLE_HEADER  *VariableHeader;
> 
> -  VARIABLE_STORE_HEADER*VariableStorage;
> 
> -  LIST_ENTRY   *Link;
> 
> -  VARSTORAGE_DEFAULT_DATA  *Entry;
> 
> -  VARIABLE_STORE_HEADER*NvStoreBuffer;
> 
> -  UINT8*DataBuffer;
> 
> -  UINT8*BufferEnd;
> 
> -  BOOLEAN  IsFound;
> 
> -  UINTNIndex;
> 
> -  UINT32   BufferValue;
> 
> -  UINT32   BitFieldVal;
> 
> -  UINTNBitOffset;
> 
> -  UINTNByteOffset;
> 
> -  UINTNBitWidth;
> 
> -  UINTNStartBit;
> 
> -  UINTNEndBit;
> 
> -  PCD_DEFAULT_DATA *DataHeader;
> 
> -  PCD_DEFAULT_INFO *DefaultInfo;
> 
> -  PCD_DATA_DELTA   *DeltaData;
> 
> +  VARIABLE_HEADER   *VariableHeader;
> 
> +  AUTHENTICATED_VARIABLE_HEADER *AuthVariableHeader;
> 
> +  VARIABLE_STORE_HEADER *VariableStorage;
> 
> +  LIST_ENTRY*Link;
> 
> +  VARSTORAGE_DEFAULT_DATA   *Entry;
> 
> +  VARIABLE_STORE_HEADER *NvStoreBuffer;
> 
> +  VOID  *ValueSource;
> 
> +  VOID  *BitValueSource;
> 
> +  UINT8 *DataBuffer;
> 
> +  UINT8 *BufferEnd;
> 
> +  BOOLEAN   AuthFormat;
> 
> +  BOOLEAN   IsFound;
> 
> +  UINTN  

Re: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add header files of RISC-V processor package

2022-01-12 Thread Abner Chang
HI Mike,
It is no problem to meet there. However, I am not available to join the design 
meeting in the next two weeks. Before we can get together to discuss the best 
locations, do you have information regarding the rationale of driver/library 
location?

What is the best location for, 
- Processor ARCH dependent modules
- Common modules for all processor ARCHs
- Platform module that is specific to processor ARCH?
- Platform module that is common to processor ARCHs?

Thanks
Abner

> -Original Message-
> From: Kinney, Michael D 
> Sent: Monday, January 10, 2022 11:58 PM
> To: Leif Lindholm ; devel@edk2.groups.io; Chang, Abner
> (HPS SW/FW Technologist) ; Kinney, Michael D
> ; Ni, Ray 
> Cc: Andrew Fish ; Sami Mujawar
> 
> Subject: RE: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add header
> files of RISC-V processor package
> 
> Hi Abner,
> 
> I see comments from Leif as well.
> 
> Do you think a discussion in the design meeting Ray Ni runs would be
> valuable
> to review all the modules/libs/includes and discuss options for the best
> location for them to reside in the edk2 repos?
> 
> Thanks,
> 
> Mike
> 
> > -Original Message-
> > From: Kinney, Michael D 
> > Sent: Monday, January 10, 2022 7:55 AM
> > To: Leif Lindholm ; devel@edk2.groups.io; Chang,
> Abner ; Kinney, Michael D
> > 
> > Cc: Andrew Fish ; Sami Mujawar
> 
> > Subject: RE: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add
> header files of RISC-V processor package
> >
> > Hi Abner,
> >
> > I would also like to see some proposals on adding the RiscV CPU scoped
> content
> > to the existing MdePkg/UefiCpuPkg instead of adding a new top level CPU
> package.
> >
> > There is already some work started to move some of the ARM specific
> content
> > from ARM CPU packages into MdePkg.
> >
> > Thanks,
> >
> > Mike
> >
> > > -Original Message-
> > > From: Leif Lindholm 
> > > Sent: Monday, January 10, 2022 5:11 AM
> > > To: devel@edk2.groups.io; Chang, Abner 
> > > Cc: Andrew Fish ; Kinney, Michael D
> ; Sami Mujawar 
> > > Subject: Re: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add
> header files of RISC-V processor package
> > >
> > > On Sat, Jan 08, 2022 at 12:07:53 +0800, Abner Chang wrote:
> > > > (This is migrated from edk2-platforms:Silicon/RISC-V)
> > > >
> > > > RISC-V processor package library definitions.
> > > >
> > > > IndustryStandard/RiscV.h
> > > > -Add RiscV.h which conform with RISC-V Privilege Spec v1.10.
> > > >
> > > > RiscVImpl.h
> > > > -Definition of EDK2 RISC-V implementation.
> > > >
> > > > Signed-off-by: Abner Chang 
> > > > Co-authored-by: Daniel Schaefer 
> > > > Co-authored-by: Gilbert Chen 
> > > > Reviewed-by: Leif Lindholm 
> > >
> > > Hmm, no.
> > > I gave a reviewed-by for that patch to be merged into edk2-platforms
> > > once upon a time. This is not relevant for migration to edk2.
> > >
> > > My proposal for migrating this code would be as follows:
> > > - Announce a hold on merging new code to RiscV portions of
> > >   edk2-platforms.
> > > - Apply any and all bugfixes and CI/uncrustify fixes in place in
> > >   edk2-platforms.
> > > - Get some level of agreement for what to do instead of
> > >   RiscVPlatformPkg - i.e. slot into MdeModulePkg instead.
> > >   -  If that cannot be reached within a few days, create a new
> > >  top-level directory called "CommonPlatformPkg" or something,
> > >  with you, Daniel(/Gilbert?), Sami, me as maintainers.
> > >  - Move all of the RiscVPlatformPkg code under there instead.
> > >  - I'll follow with ArmPlatformPkg.
> > >  - PC/AT code should move across too over time.
> > > - Move the rest of the code across unmodified as massive single
> > >   patches per package (potentially more patches than that for
> > >   RiscVPlatformPkg).
> > >   - Drop all existing Reviewed-by/Acked-by.
> > >   - After each "move" patch, insert a "fixup" patch to address the
> > > things that need fixing due to path/name changes.
> > >
> > > /
> > > Leif
> > >
> > > > Cc: Leif Lindholm 
> > > > Cc: Gilbert Chen 
> > > > ---
> > > >  .../Include/IndustryStandard/RiscV.h  | 156 ++
> > > >  .../RISC-V/ProcessorPkg/Include/RiscVImpl.h   |  87 ++
> > > >  2 files changed, 243 insertions(+)
> > > >  create mode 100644 Silicon/RISC-
> V/ProcessorPkg/Include/IndustryStandard/RiscV.h
> > > >  create mode 100644 Silicon/RISC-V/ProcessorPkg/Include/RiscVImpl.h
> > > >
> > > > diff --git a/Silicon/RISC-
> V/ProcessorPkg/Include/IndustryStandard/RiscV.h b/Silicon/RISC-
> > > V/ProcessorPkg/Include/IndustryStandard/RiscV.h
> > > > new file mode 100644
> > > > index 00..2a992394ed
> > > > --- /dev/null
> > > > +++ b/Silicon/RISC-V/ProcessorPkg/Include/IndustryStandard/RiscV.h
> > > > @@ -0,0 +1,156 @@
> > > > +/** @file
> > > > +  RISC-V package definitions.
> > > > +
> > > > +  Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All
> rights reserved.
> > > > +
> > > > +  SPDX-License-Identifier: 

Re: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add header files of RISC-V processor package

2022-01-12 Thread Abner Chang
Hi Leif,

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Leif
> Lindholm
> Sent: Monday, January 10, 2022 9:11 PM
> To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
> 
> Cc: Andrew Fish ; Michael D Kinney
> ; Sami Mujawar 
> Subject: Re: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add header
> files of RISC-V processor package
> 
> On Sat, Jan 08, 2022 at 12:07:53 +0800, Abner Chang wrote:
> > (This is migrated from edk2-platforms:Silicon/RISC-V)
> >
> > RISC-V processor package library definitions.
> >
> > IndustryStandard/RiscV.h
> > -Add RiscV.h which conform with RISC-V Privilege Spec v1.10.
> >
> > RiscVImpl.h
> > -Definition of EDK2 RISC-V implementation.
> >
> > Signed-off-by: Abner Chang 
> > Co-authored-by: Daniel Schaefer 
> > Co-authored-by: Gilbert Chen 
> > Reviewed-by: Leif Lindholm 
> 
> Hmm, no.
> I gave a reviewed-by for that patch to be merged into edk2-platforms
> once upon a time. This is not relevant for migration to edk2.
> 
> My proposal for migrating this code would be as follows:
> - Announce a hold on merging new code to RiscV portions of
>   edk2-platforms.
> - Apply any and all bugfixes and CI/uncrustify fixes in place in
>   edk2-platforms.
> - Get some level of agreement for what to do instead of
>   RiscVPlatformPkg - i.e. slot into MdeModulePkg instead.
Is this the idea from edk2 community? To have the platform modules under 
MdeModulePkg?

>   -  If that cannot be reached within a few days, create a new
>  top-level directory called "CommonPlatformPkg" or something,
This seems makes more sense than having platform modules in MdeModulePkg, while 
I don't know the reasons for MdeModulePkg.

>  with you, Daniel(/Gilbert?), Sami, me as maintainers.
Gilbert moved to ARM. 

>  - Move all of the RiscVPlatformPkg code under there instead.
>  - I'll follow with ArmPlatformPkg.
>  - PC/AT code should move across too over time.
I believe you mean to share the same common platform drivers (if this is the 
case) with the separate libraries for different ARCHs under CommonPlatformPkg?
So what do you imagine the locations of drivers those are specifically to ARM, 
RISC-V, or X86 under CommonPlatformPkg? Have the second level folders for 
processor architectures?

Abner

> - Move the rest of the code across unmodified as massive single
>   patches per package (potentially more patches than that for
>   RiscVPlatformPkg).
>   - Drop all existing Reviewed-by/Acked-by.
>   - After each "move" patch, insert a "fixup" patch to address the
> things that need fixing due to path/name changes.
> 
> /
> Leif
> 
> > Cc: Leif Lindholm 
> > Cc: Gilbert Chen 
> > ---
> >  .../Include/IndustryStandard/RiscV.h  | 156 ++
> >  .../RISC-V/ProcessorPkg/Include/RiscVImpl.h   |  87 ++
> >  2 files changed, 243 insertions(+)
> >  create mode 100644 Silicon/RISC-
> V/ProcessorPkg/Include/IndustryStandard/RiscV.h
> >  create mode 100644 Silicon/RISC-V/ProcessorPkg/Include/RiscVImpl.h
> >
> > diff --git a/Silicon/RISC-V/ProcessorPkg/Include/IndustryStandard/RiscV.h
> b/Silicon/RISC-V/ProcessorPkg/Include/IndustryStandard/RiscV.h
> > new file mode 100644
> > index 00..2a992394ed
> > --- /dev/null
> > +++ b/Silicon/RISC-V/ProcessorPkg/Include/IndustryStandard/RiscV.h
> > @@ -0,0 +1,156 @@
> > +/** @file
> > +  RISC-V package definitions.
> > +
> > +  Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All rights
> reserved.
> > +
> > +  SPDX-License-Identifier: BSD-2-Clause-Patent
> > +
> > +**/
> > +
> > +#ifndef RISCV_INDUSTRY_STANDARD_H_
> > +#define RISCV_INDUSTRY_STANDARD_H_
> > +
> > +#if defined (MDE_CPU_RISCV64)
> > +#define RISC_V_XLEN_BITS 64
> > +#else
> > +#endif
> > +
> > +#define RISC_V_ISA_ATOMIC_EXTENSION (0x0001 << 0)
> > +#define RISC_V_ISA_BIT_OPERATION_EXTENSION  (0x0001 << 1)
> > +#define RISC_V_ISA_COMPRESSED_EXTENSION (0x0001 << 2)
> > +#define RISC_V_ISA_DOUBLE_PRECISION_FP_EXTENSION(0x0001
> << 3)
> > +#define RISC_V_ISA_RV32E_ISA(0x0001 << 4)
> > +#define RISC_V_ISA_SINGLE_PRECISION_FP_EXTENSION(0x0001
> << 5)
> > +#define RISC_V_ISA_ADDITIONAL_STANDARD_EXTENSION(0x0001
> << 6)
> > +#define RISC_V_ISA_RESERVED_1   (0x0001 << 7)
> > +#define RISC_V_ISA_INTEGER_ISA_EXTENSION(0x0001 << 8)
> > +#define
> RISC_V_ISA_DYNAMICALLY_TRANSLATED_LANGUAGE_EXTENSION
> (0x0001 << 9)
> > +#define RISC_V_ISA_RESERVED_2   (0x0001 << 10)
> > +#define RISC_V_ISA_DECIMAL_FP_EXTENSION (0x0001 << 11)
> > +#define RISC_V_ISA_INTEGER_MUL_DIV_EXTENSION(0x0001 <<
> 12)
> > +#define RISC_V_ISA_USER_LEVEL_INTERRUPT_SUPPORTED   (0x0001
> << 13)
> > +#define RISC_V_ISA_RESERVED_3   (0x0001 << 14)
> > +#define RISC_V_ISA_PACKED_SIMD_EXTENSION(0x0001 << 15)
> > 

Re: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add header files of RISC-V processor package

2022-01-12 Thread Abner Chang
Hi Mike,

> -Original Message-
> From: Kinney, Michael D 
> Sent: Monday, January 10, 2022 11:55 PM
> To: Leif Lindholm ; devel@edk2.groups.io; Chang, Abner
> (HPS SW/FW Technologist) ; Kinney, Michael D
> 
> Cc: Andrew Fish ; Sami Mujawar
> 
> Subject: RE: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add header
> files of RISC-V processor package
> 
> Hi Abner,
> 
> I would also like to see some proposals on adding the RiscV CPU scoped
> content
> to the existing MdePkg/UefiCpuPkg instead of adding a new top level CPU
> package.
> 
> There is already some work started to move some of the ARM specific
> content
> from ARM CPU packages into MdePkg.
> 
Could you please give me some reference of PRs or patches that move ARM CPU 
package into Mde(Module)Pkg? I would like to see what kind of ARM edk2 
drivers/libraries were moved into those common packages.
Thanks
Abner

> Thanks,
> 
> Mike
> 
> > -Original Message-
> > From: Leif Lindholm 
> > Sent: Monday, January 10, 2022 5:11 AM
> > To: devel@edk2.groups.io; Chang, Abner 
> > Cc: Andrew Fish ; Kinney, Michael D
> ; Sami Mujawar 
> > Subject: Re: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add
> header files of RISC-V processor package
> >
> > On Sat, Jan 08, 2022 at 12:07:53 +0800, Abner Chang wrote:
> > > (This is migrated from edk2-platforms:Silicon/RISC-V)
> > >
> > > RISC-V processor package library definitions.
> > >
> > > IndustryStandard/RiscV.h
> > > -Add RiscV.h which conform with RISC-V Privilege Spec v1.10.
> > >
> > > RiscVImpl.h
> > > -Definition of EDK2 RISC-V implementation.
> > >
> > > Signed-off-by: Abner Chang 
> > > Co-authored-by: Daniel Schaefer 
> > > Co-authored-by: Gilbert Chen 
> > > Reviewed-by: Leif Lindholm 
> >
> > Hmm, no.
> > I gave a reviewed-by for that patch to be merged into edk2-platforms
> > once upon a time. This is not relevant for migration to edk2.
> >
> > My proposal for migrating this code would be as follows:
> > - Announce a hold on merging new code to RiscV portions of
> >   edk2-platforms.
> > - Apply any and all bugfixes and CI/uncrustify fixes in place in
> >   edk2-platforms.
> > - Get some level of agreement for what to do instead of
> >   RiscVPlatformPkg - i.e. slot into MdeModulePkg instead.
> >   -  If that cannot be reached within a few days, create a new
> >  top-level directory called "CommonPlatformPkg" or something,
> >  with you, Daniel(/Gilbert?), Sami, me as maintainers.
> >  - Move all of the RiscVPlatformPkg code under there instead.
> >  - I'll follow with ArmPlatformPkg.
> >  - PC/AT code should move across too over time.
> > - Move the rest of the code across unmodified as massive single
> >   patches per package (potentially more patches than that for
> >   RiscVPlatformPkg).
> >   - Drop all existing Reviewed-by/Acked-by.
> >   - After each "move" patch, insert a "fixup" patch to address the
> > things that need fixing due to path/name changes.
> >
> > /
> > Leif
> >
> > > Cc: Leif Lindholm 
> > > Cc: Gilbert Chen 
> > > ---
> > >  .../Include/IndustryStandard/RiscV.h  | 156 ++
> > >  .../RISC-V/ProcessorPkg/Include/RiscVImpl.h   |  87 ++
> > >  2 files changed, 243 insertions(+)
> > >  create mode 100644 Silicon/RISC-
> V/ProcessorPkg/Include/IndustryStandard/RiscV.h
> > >  create mode 100644 Silicon/RISC-V/ProcessorPkg/Include/RiscVImpl.h
> > >
> > > diff --git a/Silicon/RISC-
> V/ProcessorPkg/Include/IndustryStandard/RiscV.h b/Silicon/RISC-
> > V/ProcessorPkg/Include/IndustryStandard/RiscV.h
> > > new file mode 100644
> > > index 00..2a992394ed
> > > --- /dev/null
> > > +++ b/Silicon/RISC-V/ProcessorPkg/Include/IndustryStandard/RiscV.h
> > > @@ -0,0 +1,156 @@
> > > +/** @file
> > > +  RISC-V package definitions.
> > > +
> > > +  Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All
> rights reserved.
> > > +
> > > +  SPDX-License-Identifier: BSD-2-Clause-Patent
> > > +
> > > +**/
> > > +
> > > +#ifndef RISCV_INDUSTRY_STANDARD_H_
> > > +#define RISCV_INDUSTRY_STANDARD_H_
> > > +
> > > +#if defined (MDE_CPU_RISCV64)
> > > +#define RISC_V_XLEN_BITS 64
> > > +#else
> > > +#endif
> > > +
> > > +#define RISC_V_ISA_ATOMIC_EXTENSION (0x0001 << 0)
> > > +#define RISC_V_ISA_BIT_OPERATION_EXTENSION  (0x0001 <<
> 1)
> > > +#define RISC_V_ISA_COMPRESSED_EXTENSION (0x0001 << 2)
> > > +#define RISC_V_ISA_DOUBLE_PRECISION_FP_EXTENSION
> (0x0001 << 3)
> > > +#define RISC_V_ISA_RV32E_ISA(0x0001 << 4)
> > > +#define RISC_V_ISA_SINGLE_PRECISION_FP_EXTENSION(0x0001
> << 5)
> > > +#define RISC_V_ISA_ADDITIONAL_STANDARD_EXTENSION
> (0x0001 << 6)
> > > +#define RISC_V_ISA_RESERVED_1   (0x0001 << 7)
> > > +#define RISC_V_ISA_INTEGER_ISA_EXTENSION(0x0001 << 8)
> > > +#define
> RISC_V_ISA_DYNAMICALLY_TRANSLATED_LANGUAGE_EXTENSION
> (0x0001 << 9)
> > > +#define 

Re: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build consistency

2022-01-12 Thread Nate DeSimone
Hi Isaac,

Comments inline.

Thanks,
Nate

-Original Message-
From: Oram, Isaac W  
Sent: Wednesday, January 12, 2022 7:15 PM
To: Desimone, Nathaniel L ; devel@edk2.groups.io
Cc: Chaganty, Rangasai V ; Gao, Liming 
; Dong, Eric ; Tan, Ming 
; Chiu, Chasel ; Bi, Dandan 
; Shindo, Miki ; Abbas, Mohamed 
; KARPAGAVINAYAGAM, MANICKAVASAKAM 

Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build 
consistency

Thanks Nate.

Comments in line.

Regards,
Isaac

-Original Message-
From: Desimone, Nathaniel L 
Sent: Wednesday, January 12, 2022 6:47 PM
To: Oram, Isaac W ; devel@edk2.groups.io
Cc: Chaganty, Rangasai V ; Gao, Liming 
; Dong, Eric ; Tan, Ming 
; Chiu, Chasel ; Bi, Dandan 
; Shindo, Miki ; Abbas, Mohamed 
; KARPAGAVINAYAGAM, MANICKAVASAKAM 

Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build 
consistency

Hi Isaac,

Thank you for doing this cleanup work. I have some comments for you. I have 
provided a summary of my feedback below:

PATCH 01/27

* Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc

Line 69: [Components.IA32] should be changed to [Components.$(PEI_ARCH)] Line 
83: [Components.X64] should be changed to [Components.$(DXE_ARCH)]

Note: These comments can also be addressed by restoring the @todo comment 
stating that these changes still need to be done (which you deleted.)

[Isaac] $(DXE_ARCH) and $(PEI_ARCH) are not fully functional.  It appears that 
they are fine in DSC files, even when inside an include.  But they are not fine 
inside an include in an FDF file.  The PreMemory.fdf and PostMemory.fdf do not 
work when I try to introduce this change.  
As these are not required, ToDo are against coding style and are bad for 
comprehensibility, I would prefer to not add such useless comments back in.  
Comments should improve the comprehensibility of code and should not distract 
from understanding the code.

[Nate] The $(PEI_ARCH)/$(DXE_ARCH) additions are not be necessary in the FDF 
files. Adding them to the DSC file should be sufficient. Can you re-test with 
just the DSC file change?

PATCH 18/27

* Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dsc

Line 33: [PcdsFeatureFlag.X64] should be changed to 
[PcdsFeatureFlag.$(DXE_ARCH)]

Note: This comment can also be addressed by adding a @todo comment stating that 
this change still needs to be done.
[Isaac] See prior response.

PATCH 19/27

* Features/Intel/Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc

Line 35: Typo here. Usb3DebugPortParamLibo should be Usb3DebugPortParamLib.
[Isaac] Good catch.  I guess we don't catch that class of error if the library 
class is not used.

* Features/Intel/Debugging/Usb3DebugFeaturePkg/Usb3DebugFeaturePkg.dsc

Line 40: Did you test compilation for the Usb3DebugFeaturePkg? I've generally 
run into issues when a components sections does not specify a machine 
architecture through some sort of means.
[Isaac] There is no code consuming these libraries.  I verified build of 32 and 
64 bit modes as well as part of AdvancedFeaturePkg build and a board package 
build.
I believe that library classes can be specified by module type and the build 
tool builds the right mode for the consuming driver on demand.  Basically, 
there is no value to specifying architecture for a library.
This does not work with components however.  If you leave the architecture 
unspecified, you get an error when including the component in an FDF as the 
build does not know how to resolve.

[Nate] I bring this up because you added a [Components] section and put this 
package's library classes into that [Components] section for the purposes of 
running a build test on those library classes even though they are not consumed 
by anything. That new [Components] section does not specify a machine 
architecture so I'm wondering if the compilation still succeeds.

PATCH 26/27

Since FvAdvanced is post-memory and not covered by the boot guard IBB, I 
suspect we should probably also support optional signing of that FV.
[Isaac] I do not know how to act on that suggestion.  That seems out of scope 
for this change.  I restricted my changes to be functionally compatible as I do 
not have hardware to test these changes other than minimally.

[Nate] Nevermind. I checked all the OpenBoardPkgs we have and none of them have 
FV signing enabled anyway. Ignore this comment.

Thanks,
Nate

-Original Message-
From: Oram, Isaac W 
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W ; Chaganty, Rangasai V 
; Gao, Liming ; Dong, 
Eric ; Tan, Ming ; Desimone, Nathaniel 
L ; Chiu, Chasel ; Bi, 
Dandan ; Shindo, Miki ; Abbas, 
Mohamed ; KARPAGAVINAYAGAM, MANICKAVASAKAM 

Subject: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build 
consistency

This series addresses inconsistencies in feature implementation and use. Some 
inconsistencies are just conventions of the feature 

Re: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build consistency

2022-01-12 Thread Nate DeSimone



-Original Message-
From: Oram, Isaac W  
Sent: Wednesday, January 12, 2022 7:15 PM
To: Desimone, Nathaniel L ; devel@edk2.groups.io
Cc: Chaganty, Rangasai V ; Gao, Liming 
; Dong, Eric ; Tan, Ming 
; Chiu, Chasel ; Bi, Dandan 
; Shindo, Miki ; Abbas, Mohamed 
; KARPAGAVINAYAGAM, MANICKAVASAKAM 

Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build 
consistency

Thanks Nate.

Comments in line.

Regards,
Isaac

-Original Message-
From: Desimone, Nathaniel L 
Sent: Wednesday, January 12, 2022 6:47 PM
To: Oram, Isaac W ; devel@edk2.groups.io
Cc: Chaganty, Rangasai V ; Gao, Liming 
; Dong, Eric ; Tan, Ming 
; Chiu, Chasel ; Bi, Dandan 
; Shindo, Miki ; Abbas, Mohamed 
; KARPAGAVINAYAGAM, MANICKAVASAKAM 

Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build 
consistency

Hi Issac,

Thank you for doing this cleanup work. I have some comments for you. I have 
provided a summary of my feedback below:

PATCH 01/27

* Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc

Line 69: [Components.IA32] should be changed to [Components.$(PEI_ARCH)] Line 
83: [Components.X64] should be changed to [Components.$(DXE_ARCH)]

Note: These comments can also be addressed by restoring the @todo comment 
stating that these changes still need to be done (which you deleted.)

[Isaac] $(DXE_ARCH) and $(PEI_ARCH) are not fully functional.  It appears that 
they are fine in DSC files, even when inside an include.  But they are not fine 
inside an include in an FDF file.  The PreMemory.fdf and PostMemory.fdf do not 
work when I try to introduce this change.  
As these are not required, ToDo are against coding style and are bad for 
comprehensibility, I would prefer to not add such useless comments back in.  
Comments should improve the comprehensibility of code and should not distract 
from understanding the code.

[Nate] The $(PEI_ARCH)/$(DXE_ARCH) additions are not be necessary in the FDF 
files. Adding them to the DSC file should be sufficient. Can you re-test with 
just the DSC file change?

PATCH 18/27

* Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dsc

Line 33: [PcdsFeatureFlag.X64] should be changed to 
[PcdsFeatureFlag.$(DXE_ARCH)]

Note: This comment can also be addressed by adding a @todo comment stating that 
this change still needs to be done.
[Isaac] See prior response.

PATCH 19/27

* Features/Intel/Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc

Line 35: Typo here. Usb3DebugPortParamLibo should be Usb3DebugPortParamLib.
[Isaac] Good catch.  I guess we don't catch that class of error if the library 
class is not used.

* Features/Intel/Debugging/Usb3DebugFeaturePkg/Usb3DebugFeaturePkg.dsc

Line 40: Did you test compilation for the Usb3DebugFeaturePkg? I've generally 
run into issues when a components sections does not specify a machine 
architecture through some sort of means.
[Isaac] There is no code consuming these libraries.  I verified build of 32 and 
64 bit modes as well as part of AdvancedFeaturePkg build and a board package 
build.
I believe that library classes can be specified by module type and the build 
tool builds the right mode for the consuming driver on demand.  Basically, 
there is no value to specifying architecture for a library.
This does not work with components however.  If you leave the architecture 
unspecified, you get an error when including the component in an FDF as the 
build does not know how to resolve.

[Nate] I bring this up because you added a [Components] section and put this 
package's library classes into that [Components] section for the purposes of 
running a build test on those library classes even though they are not consumed 
by anything. That new [Components] section does not specify a machine 
architecture so I'm wondering if the compilation still succeeds.

PATCH 26/27

Since FvAdvanced is post-memory and not covered by the boot guard IBB, I 
suspect we should probably also support optional signing of that FV.
[Isaac] I do not know how to act on that suggestion.  That seems out of scope 
for this change.  I restricted my changes to be functionally compatible as I do 
not have hardware to test these changes other than minimally.

[Nate] Nevermind. I checked all the OpenBoardPkgs we have and none of them have 
FV signing enabled anyway. Ignore this comment.

Thanks,
Nate

-Original Message-
From: Oram, Isaac W 
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W ; Chaganty, Rangasai V 
; Gao, Liming ; Dong, 
Eric ; Tan, Ming ; Desimone, Nathaniel 
L ; Chiu, Chasel ; Bi, 
Dandan ; Shindo, Miki ; Abbas, 
Mohamed ; KARPAGAVINAYAGAM, MANICKAVASAKAM 

Subject: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build 
consistency

This series addresses inconsistencies in feature implementation and use. Some 
inconsistencies are just conventions of the feature design/template/convention. 
 Some are inconsistency 

Re: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build consistency

2022-01-12 Thread Oram, Isaac W
Thanks Nate.

Comments in line.

Regards,
Isaac

-Original Message-
From: Desimone, Nathaniel L  
Sent: Wednesday, January 12, 2022 6:47 PM
To: Oram, Isaac W ; devel@edk2.groups.io
Cc: Chaganty, Rangasai V ; Gao, Liming 
; Dong, Eric ; Tan, Ming 
; Chiu, Chasel ; Bi, Dandan 
; Shindo, Miki ; Abbas, Mohamed 
; KARPAGAVINAYAGAM, MANICKAVASAKAM 

Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build 
consistency

Hi Issac,

Thank you for doing this cleanup work. I have some comments for you. I have 
provided a summary of my feedback below:

PATCH 01/27

* Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc

Line 69: [Components.IA32] should be changed to [Components.$(PEI_ARCH)] Line 
83: [Components.X64] should be changed to [Components.$(DXE_ARCH)]

Note: These comments can also be addressed by restoring the @todo comment 
stating that these changes still need to be done (which you deleted.)
[Isaac] $(DXE_ARCH) and $(PEI_ARCH) are not fully functional.  It appears that 
they are fine in DSC files, even when inside an include.  But they are not fine 
inside an include in an FDF file.  The PreMemory.fdf and PostMemory.fdf do not 
work when I try to introduce this change.  
As these are not required, ToDo are against coding style and are bad for 
comprehensibility, I would prefer to not add such useless comments back in.  
Comments should improve the comprehensibility of code and should not distract 
from understanding the code.

PATCH 18/27

* Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dsc

Line 33: [PcdsFeatureFlag.X64] should be changed to 
[PcdsFeatureFlag.$(DXE_ARCH)]

Note: This comment can also be addressed by adding a @todo comment stating that 
this change still needs to be done.
[Isaac] See prior response.

PATCH 19/27

* Features/Intel/Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc

Line 35: Typo here. Usb3DebugPortParamLibo should be Usb3DebugPortParamLib.
[Isaac] Good catch.  I guess we don't catch that class of error if the library 
class is not used.

* Features/Intel/Debugging/Usb3DebugFeaturePkg/Usb3DebugFeaturePkg.dsc

Line 40: Did you test compilation for the Usb3DebugFeaturePkg? I've generally 
run into issues when a components sections does not specify a machine 
architecture through some sort of means.
[Isaac] There is no code consuming these libraries.  I verified build of 32 and 
64 bit modes as well as part of AdvancedFeaturePkg build and a board package 
build.
I believe that library classes can be specified by module type and the build 
tool builds the right mode for the consuming driver on demand.  Basically, 
there is no value to specifying architecture for a library.
This does not work with components however.  If you leave the architecture 
unspecified, you get an error when including the component in an FDF as the 
build does not know how to resolve.

PATCH 26/27

Since FvAdvanced is post-memory and not covered by the boot guard IBB, I 
suspect we should probably also support optional signing of that FV.
[Isaac] I do not know how to act on that suggestion.  That seems out of scope 
for this change.  I restricted my changes to be functionally compatible as I do 
not have hardware to test these changes other than minimally.

Thanks,
Nate

-Original Message-
From: Oram, Isaac W 
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W ; Chaganty, Rangasai V 
; Gao, Liming ; Dong, 
Eric ; Tan, Ming ; Desimone, Nathaniel 
L ; Chiu, Chasel ; Bi, 
Dandan ; Shindo, Miki ; Abbas, 
Mohamed ; KARPAGAVINAYAGAM, MANICKAVASAKAM 

Subject: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build 
consistency

This series addresses inconsistencies in feature implementation and use. Some 
inconsistencies are just conventions of the feature design/template/convention. 
 Some are inconsistency with feature design intent that negatively affect the 
usability of the features and the amount of work required from board porting 
engineers.

Some features were missing feature enable flags.
Some features had non-functional standalone builds.
Many features were implemented to include common core build content in their 
feature include files.
Updated some of the Readme content.
Added AdvancedFeaturePkg.fdf to build all feature content to support verifying 
no build time issues between features.
Removed duplicate and unused content from build files.
Modified the TemplateFeaturePkg to use the common MinPlatform include content.

Removed all instances where features were relative to Features/Intel and made 
them relative to the package roots.
This does mean PACKAGES_PATH may need to be extended for all the feature 
domains.  Debugging, PowerManagement, etc.
However, it should enable packaging tools to function properly as the relative 
paths violate spec.

Use of the common MinPlatformPkg build includes does increase the build time 
for each individual feature in standalone 

Re: [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/Include: Remove duplicate file

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: Oram, Isaac W 
> Sent: Monday, January 10, 2022 2:41 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Desimone, Nathaniel L
> ; Chiu, Chasel 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 1/1]
> WhitleyOpenBoardPkg/Include: Remove duplicate file
> 
> Switch to using the IntelSiliconPkg version of the file as both were 
> identical.
> 
> Cc: Nate DeSimone 
> Cc: Chasel Chiu 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Platform/Intel/WhitleyOpenBoardPkg/Include/Library/SpiFlashCommonLib.h
> | 98 
> 
> Platform/Intel/WhitleyOpenBoardPkg/Library/SmmSpiFlashCommonLib/Sm
> mSpiFlashCommonLib.inf |  1 +
>  2 files changed, 1 insertion(+), 98 deletions(-)
> 
> diff --git
> a/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/SpiFlashCommonLi
> b.h
> b/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/SpiFlashCommonLi
> b.h
> deleted file mode 100644
> index ef62ba238d..00
> ---
> a/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/SpiFlashCommonLi
> b.h
> +++ /dev/null
> @@ -1,98 +0,0 @@
> -/** @file
> -  The header file includes the common header files, defines
> -  internal structure and functions used by SpiFlashCommonLib.
> -
> -  Copyright (c) 2019 Intel Corporation. All rights reserved. 
> -  SPDX-License-Identifier: BSD-2-Clause-Patent
> -
> -**/
> -
> -#ifndef __SPI_FLASH_COMMON_LIB_H__
> -#define __SPI_FLASH_COMMON_LIB_H__
> -
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include  -#include
>  -#include
> 
> -
> -#define SECTOR_SIZE_4KB   0x1000  // Common 4kBytes sector size
> -/**
> -  Enable block protection on the Serial Flash device.
> -
> -  @retval EFI_SUCCESS   Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashLock (
> -  VOID
> -  );
> -
> -/**
> -  Read NumBytes bytes of data from the address specified by
> -  PAddress into Buffer.
> -
> -  @param[in]  Address   The starting physical address of the read.
> -  @param[in,out]  NumBytes  On input, the number of bytes to read. On
> output, the number
> -of bytes actually read.
> -  @param[out] BufferThe destination data buffer for the read.
> -
> -  @retval EFI_SUCCESS   Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashRead (
> -  IN UINTNAddress,
> -  IN OUT UINT32   *NumBytes,
> - OUT UINT8*Buffer
> -  );
> -
> -/**
> -  Write NumBytes bytes of data from Buffer to the address specified by
> -  PAddresss.
> -
> -  @param[in]  Address The starting physical address of the write.
> -  @param[in,out]  NumBytesOn input, the number of bytes to write. On
> output,
> -  the actual number of bytes written.
> -  @param[in]  Buffer  The source data buffer for the write.
> -
> -  @retval EFI_SUCCESS   Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashWrite (
> -  IN UINTN  Address,
> -  IN OUT UINT32 *NumBytes,
> -  IN UINT8  *Buffer
> -  );
> -
> -/**
> -  Erase the block starting at Address.
> -
> -  @param[in]  Address The starting physical address of the block to 
> be
> erased.
> -  This library assume that caller garantee that 
> the PAddress
> -  is at the starting address of this block.
> -  @param[in]  NumBytesOn input, the number of bytes of the logical
> block to be erased.
> -  On output, the actual number of bytes erased.
> -
> -  @retval EFI_SUCCESS.  Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashBlockErase (
> -  INUINTN Address,
> -  INUINTN *NumBytes
> -  );
> -
> -#endif
> diff --git
> a/Platform/Intel/WhitleyOpenBoardPkg/Library/SmmSpiFlashCommonLib/S
> mmSpiFlashCommonLib.inf
> b/Platform/Intel/WhitleyOpenBoardPkg/Library/SmmSpiFlashCommonLib/S
> mmSpiFlashCommonLib.inf
> index a5bcb5e2f2..b1e0896c7c 100644
> ---
> a/Platform/Intel/WhitleyOpenBoardPkg/Library/SmmSpiFlashCommonLib/S
> mmSpiFlashCommonLib.inf
> +++
> b/Platform/Intel/WhitleyOpenBoardPkg/Library/SmmSpiFlashCommonLib/S
> m
> +++ mSpiFlashCommonLib.inf
> @@ -33,6 +33,7 @@
> 
>  [Packages]
>MdePkg/MdePkg.dec
> +  IntelSiliconPkg/IntelSiliconPkg.dec
>WhitleySiliconPkg/WhitleySiliconPkg.dec
>WhitleySiliconPkg/CpRcPkg.dec
>WhitleyOpenBoardPkg/PlatformPkg.dec
> --
> 2.27.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all 

Re: [edk2-devel][edk2-platforms][PATCH V1 27/27] WhitleyOpenBoardPkg/Build: Enable Features/Intel features

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: Oram, Isaac W 
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Desimone, Nathaniel L
> ; Chiu, Chasel 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 27/27]
> WhitleyOpenBoardPkg/Build: Enable Features/Intel features
> 
> This enables Whitley as a test vehicle for features.
> These are not expected to be fully functional at this time.
> Specifically UserAuthentication causes a boot failure and the others have
> only been verified to be built and dispatched, not ported to the Whitley
> reference platform hardware.
> 
> Cc: Nate DeSimone 
> Cc: Chasel Chiu 
> 
> Signed-off-by: Isaac Oram 
> ---
>  Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc | 44
> 
> Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.fdf |  6 ++-
>  2 files changed, 49 insertions(+), 1 deletion(-)
> 
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc
> b/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc
> index f07b0a8ccf..42680254d1 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc
> @@ -39,6 +39,50 @@
>DEFINE IIO_INSTANCE   = UnknownCpu
>  !endif
> 
> +!include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
> +
> +[PcdsFixedAtBuild]
> +
> gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugPortLibInstance|1
> +
> +[PcdsFeatureFlag]
> +  #
> +  # Debugging features
> +  #
> +  gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable
> |FALSE
> +  gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable
> |FALSE
> +
> gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdPostCodeDebugFeatureEn
> able  |FALSE
> +  gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable
> |FALSE
> +
> +  #
> +  # Network features
> +  #
> +  gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable
> |FALSE
> +
> +  #
> +  # OutOfBandManagement features
> +  #
> +  gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable
> |FALSE
> +  gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable
> |FALSE
> +
> +  #
> +  # PowerManagement features
> +  #
> +  gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable
> |FALSE
> +
> +  #
> +  # SystemInformation features
> +  #
> +  gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable
> |FALSE
> +
> +  #
> +  # UserInterface features
> +  #
> +  gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable
> |FALSE
> +
> gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnabl
> e  |FALSE
> +
> +
> gVirtualKeyboardFeaturePkgTokenSpaceGuid.PcdVirtualKeyboardFeatureEn
> ab
> + le  |FALSE
> +
> +!include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
> +
>#
># Platform On/Off features are defined here
>#
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.fdf
> b/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.fdf
> index 7e2a8b1b9f..45460570d9 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.fdf
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.fdf
> @@ -84,7 +84,7 @@ SET gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize
> = 0x0100
>SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSSize  =
> 0x0004 # Size must match WhitleyFspPkg.fdf content
>SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMSize  =
> 0x00221000 # Size must match WhitleyFspPkg.fdf content
>SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize  =
> 0x6000 # Size must match WhitleyFspPkg.fdf content
> -  SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvBspPreMemorySize  =
> 0x1000
> +  SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvBspPreMemorySize  =
> + 0x0001
>SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPreMemorySize =
> gCpPlatFlashTokenSpaceGuid.PcdFlashFdSecPeiSize -
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvBspSize -
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemorySize -
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSSize -
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMSize -
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize -
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvBspPreMemorySize
> 
>#
> @@ -481,6 +481,8 @@ SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x0100
>!include MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
>FvNameGuid = 09f25d44-b2ef-4225-8b2e-e0e094b51775
> 
> +  !include AdvancedFeaturePkg/Include/PreMemory.fdf
> +
>  [FV.FvBspPreMemory]
>!include MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
>FvNameGuid = e6c65995-8c2d-4119-a52d-7dbf1acb45a1
> @@ -710,6 +712,8 @@ SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x0100
>!include MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
>FvNameGuid = 70aeaf57-4997-49ce-a4f7-122980745670
> 
> +  !include AdvancedFeaturePkg/Include/PostMemory.fdf
> +
>  [FV.FvAdvanced]
>!include MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
>FvNameGuid  

Re: [edk2-devel][edk2-platforms][PATCH V1 23/27] AdvancedFeaturePkg: Add missing features

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Chaganty, Rangasai V
> ; Gao, Liming 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 23/27]
> AdvancedFeaturePkg: Add missing features
> 
> The AdvancedFeaturePkg is supposed to include all features.
> Add Beep Debug feature to include DSC and FDF.
> 
> Order features based on their domains.
> 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> 
> Signed-off-by: Isaac Oram 
> ---
>  Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc  | 66
> 
>  Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc| 36
> ---
>  Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc |
> 64 +++
>  Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf  | 36
> ---
>  Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf   | 36
> ---
>  Features/Intel/Readme.md  | 49 
> ++-
>  6 files changed, 219 insertions(+), 68 deletions(-)
> 
> diff --git a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
> b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
> index 0c7a29cc75..02636da916 100644
> --- a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
> +++ b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
> @@ -36,7 +36,6 @@
> 
>  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
> 
> -
> 
> ##
> ##
>  #
>  # Advanced Feature Enable section - all advanced features are enabling for
> the @@ -44,26 +43,71 @@  #
> ##
> ##
>  [PcdsFeatureFlag]
> -  gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable
> |TRUE
> -  gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable  
> |TRUE
> -  gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable
> |TRUE
> -  gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable  
> |TRUE
> -  gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable
> |TRUE
> -  gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable
> |TRUE
> -
> gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnabl
> e|TRUE
> -  gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable  
> |TRUE
> -  gLogoFeaturePkgTokenSpaceGuid.PcdJpgEnable  
> |FALSE
> +  #
> +  # Debugging features
> +  #
> +  gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable
> |TRUE
> +  gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable
> |TRUE
> +
> gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdPostCodeDebugFeatureEn
> able  |TRUE
> +  gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable
> |TRUE
> +
> +  #
> +  # Network features
> +  #
> +  gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable
> |TRUE
> +
> +  #
> +  # OutOfBandManagement features
> +  #
> +  gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable
> |TRUE
> +  gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable
> |TRUE
> +
> +  #
> +  # PowerManagement features
> +  #
> +  gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable
> |TRUE
> +
> +  #
> +  # SystemInformation features
> +  #
> +  gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable
> |TRUE
> +
> +  #
> +  # UserInterface features
> +  #
> +  gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable
> |TRUE
> +
> gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnabl
> e  |TRUE
> +
> +
> gVirtualKeyboardFeaturePkgTokenSpaceGuid.PcdVirtualKeyboardFeatureEn
> ab
> + le  |TRUE
> +
> +#
> +# PCD that are required to be set by the build target should be
> +configured here for test purposes # These settings are only for the
> purposes of buildings, boards should follow instructions in Readme files.
> +#
> +
> +[PcdsFixedAtBuild]
> +
> gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugPortLibInstance|1
> +
> +[PcdsFeatureFlag]
> +  #
> +  # MinPlatform common include currently required PCD
> +  #
>gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable
> |FALSE
>gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable
> |FALSE
>gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable
> |FALSE
> 
>  #
> -# Include common library
> +# Include common libraries
>  #
>  !include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
>  !include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
>  !include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> 
> +#
> +# Libraries required to be specified by the build target #
> +[LibraryClasses.Common]
> +
> +PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePl
> atfo
> +rmHookLibNull.inf # Required by BeepDebugFeature
> +
>  #
>  # This package builds all advanced features.
>  #
> diff --git
> 

Re: [edk2-devel][edk2-platforms][PATCH V1 25/27] WhitleyOpenBoardPkg/Build: Use common SPI FV Header include

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: Oram, Isaac W 
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Desimone, Nathaniel L
> ; Chiu, Chasel 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 25/27]
> WhitleyOpenBoardPkg/Build: Use common SPI FV Header include
> 
> Use the MinPlatformPkg version of CommonSpiFvHeaderInfo.fdf.
> 
> Cc: Nate DeSimone 
> Cc: Chasel Chiu 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Platform/Intel/WhitleyOpenBoardPkg/Include/Fdf/CommonSpiFvHeaderInf
> o.fdf | 24 --
>  Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf  |
> 48 ++--
>  Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.fdf   | 48
> ++--
>  3 files changed, 48 insertions(+), 72 deletions(-)
> 
> diff --git
> a/Platform/Intel/WhitleyOpenBoardPkg/Include/Fdf/CommonSpiFvHeaderI
> nfo.fdf
> b/Platform/Intel/WhitleyOpenBoardPkg/Include/Fdf/CommonSpiFvHeaderI
> nfo.fdf
> deleted file mode 100644
> index 08f8b95938..00
> ---
> a/Platform/Intel/WhitleyOpenBoardPkg/Include/Fdf/CommonSpiFvHeaderI
> nfo.fdf
> +++ /dev/null
> @@ -1,24 +0,0 @@
> -## @file CommonSpiFvHeaderInfo.fdf
> -#
> -# @copyright
> -# Copyright 2020 - 2021 Intel Corporation.  -# -# SPDX-License-
> Identifier: BSD-2-Clause-Patent -##
> -
> -FvAlignment= 16 #FV alignment and FV attributes setting.
> -ERASE_POLARITY = 1
> -MEMORY_MAPPED  = TRUE
> -STICKY_WRITE   = TRUE
> -LOCK_CAP   = TRUE
> -LOCK_STATUS= TRUE
> -WRITE_DISABLED_CAP = TRUE
> -WRITE_ENABLED_CAP  = TRUE
> -WRITE_STATUS   = TRUE
> -WRITE_LOCK_CAP = TRUE
> -WRITE_LOCK_STATUS  = TRUE
> -READ_DISABLED_CAP  = TRUE
> -READ_ENABLED_CAP   = TRUE
> -READ_STATUS= TRUE
> -READ_LOCK_CAP  = TRUE
> -READ_LOCK_STATUS   = TRUE
> diff --git
> a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
> b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
> index 70ceaa1889..0b919b5ea9 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/PlatformPkg.fdf
> @@ -394,13 +394,13 @@ SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x0100
> 
> ##
> ##
> 
>  [FV.FvSecurityPreMemory]
> -  !include WhitleyOpenBoardPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
> +  !include MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
>FvNameGuid = 40ab290f-8494-41cf-b302-31b178b4ce0b
> 
>!include MinPlatformPkg/Include/Fdf/CoreSecurityPreMemoryInclude.fdf
> 
>  [FV.FvPreMemory]
> -  !include WhitleyOpenBoardPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
> +  !include MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
>FvNameGuid = 6522280D-28F9-4131-ADC4-F40EBFA45864
> 
>INF  UefiCpuPkg/SecCore/SecCore.inf
> @@ -481,13 +481,13 @@ SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x0100
>}
> 
>  [FV.FvAdvancedPreMemory]
> -  !include WhitleyOpenBoardPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
> +  !include MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
>FvNameGuid = 09f25d44-b2ef-4225-8b2e-e0e094b51775
> 
>!include AdvancedFeaturePkg/Include/PreMemory.fdf
> 
>  [FV.FvBspPreMemory]
> -  !include WhitleyOpenBoardPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
> +  !include MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
>FvNameGuid = e6c65995-8c2d-4119-a52d-7dbf1acb45a1
> 
>FILE FV_IMAGE = 09f25d44-b2ef-4225-8b2e-e0e094b51775 {
> @@ -498,11 +498,11 @@ SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x0100
>  # FvPostMemory includes common hardware, common core variable
> services, load and invoke DXE etc  #  [FV.FvPostMemoryUncompressed]
> -  !include WhitleyOpenBoardPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
> +  !include MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
>FvNameGuid = B4705B4B-0BE6-4BDB-A83A-51CAD2345CEA
> 
>  [FV.FvPostMemory]
> -  !include WhitleyOpenBoardPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
> +  !include MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
>FvNameGuid = 3298afc4-c484-47f1-a65a-5917a54b5e8c
> 
>FILE FV_IMAGE = B4705B4B-0BE6-4BDB-A83A-51CAD2345CEA {
> @@ -515,11 +515,11 @@ SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize = 0x0100
>  # FvBsp includes board specific components  #  [FV.FvBspUncompressed]
> -  !include WhitleyOpenBoardPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
> +  !include MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
>FvNameGuid = e4c65347-fd90-4143-8a41-113e1015fe07
> 
>  [FV.FvBsp]
> -  !include WhitleyOpenBoardPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
> +  !include MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
>FvNameGuid = 9e151cf3-ca90-444f-b33b-a9941cbc772f
> 
>FILE FV_IMAGE = 

Re: [edk2-devel][edk2-platforms][PATCH V1 24/27] MinPlatformPkg/Build: Add an include file for the common SPI FV info

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: Oram, Isaac W 
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Chaganty, Rangasai V
> ; Desimone, Nathaniel L
> ; Gao, Liming
> ; Dong, Eric 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 24/27]
> MinPlatformPkg/Build: Add an include file for the common SPI FV info
> 
> This include file allows for elimination of a lot of duplicate code and makes
> FDF files more readable.
> 
> Cc: Sai Chaganty 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Isaac Oram 
> ---
>  Platform/Intel/MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf |
> 24 
>  1 file changed, 24 insertions(+)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
> b/Platform/Intel/MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
> new file mode 100644
> index 00..fdda085a41
> --- /dev/null
> +++
> b/Platform/Intel/MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fd
> +++ f
> @@ -0,0 +1,24 @@
> +## @file CommonSpiFvHeaderInfo.fdf
> +#
> +# @copyright
> +# Copyright (C) 2020 - 2021 Intel Corporation # #
> +SPDX-License-Identifier: BSD-2-Clause-Patent ##
> +
> +FvAlignment= 16 #FV alignment and FV attributes setting.
> +ERASE_POLARITY = 1
> +MEMORY_MAPPED  = TRUE
> +STICKY_WRITE   = TRUE
> +LOCK_CAP   = TRUE
> +LOCK_STATUS= TRUE
> +WRITE_DISABLED_CAP = TRUE
> +WRITE_ENABLED_CAP  = TRUE
> +WRITE_STATUS   = TRUE
> +WRITE_LOCK_CAP = TRUE
> +WRITE_LOCK_STATUS  = TRUE
> +READ_DISABLED_CAP  = TRUE
> +READ_ENABLED_CAP   = TRUE
> +READ_STATUS= TRUE
> +READ_LOCK_CAP  = TRUE
> +READ_LOCK_STATUS   = TRUE
> --
> 2.27.0.windows.1



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




Re: [edk2-devel][edk2-platforms][PATCH V1 22/27] AdvancedFeaturePkg: Fix all relative package paths

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Chaganty, Rangasai V
> ; Gao, Liming 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 22/27]
> AdvancedFeaturePkg: Fix all relative package paths
> 
> Packages should be at the root of a PACKAGES_PATH entry.
> At some point, paths were relative to edk2-platforms/Features/Intel which
> was functional, but interferes with the proper functioning of packaging tools.
> 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> 
> Signed-off-by: Isaac Oram 
> ---
>  Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc | 15
> ---
>  Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf   | 15
> ---
>  Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf| 15
> ---
>  3 files changed, 24 insertions(+), 21 deletions(-)
> 
> diff --git
> a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
> b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
> index ac9ab80e8e..874b8ce7db 100644
> --- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
> +++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
> @@ -14,45 +14,46 @@
>  # Debug Advanced Features
>  #
>  !if gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable ==
> TRUE
> -  !include Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc
> +  !include AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc
>  !endif
> +
>  !if gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable
> == TRUE
> -  !include
> Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc
> +  !include Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc
>  !endif
> 
>  #
>  # Network Advanced Features
>  #
>  !if gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable ==
> TRUE
> -  !include Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
> +  !include NetworkFeaturePkg/Include/NetworkFeature.dsc
>  !endif
> 
>  #
>  # Out-of-Band Management Advanced Features  #  !if
> gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable == TRUE
> -  !include
> OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc
> +  !include IpmiFeaturePkg/Include/IpmiFeature.dsc
>  !endif
> 
>  #
>  # Power Management Advanced Features
>  #
>  !if gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable == TRUE
> -  !include PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
> +  !include S3FeaturePkg/Include/S3Feature.dsc
>  !endif
> 
>  #
>  # System Information Advanced Features
>  #
>  !if gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable == TRUE
> -  !include
> SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc
> +  !include SmbiosFeaturePkg/Include/SmbiosFeature.dsc
>  !endif
> 
>  #
>  # User Interface Advanced Features
>  #
>  !if
> gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnabl
> e == TRUE
> -  !include
> UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc
> +  !include UserAuthFeaturePkg/Include/UserAuthFeature.dsc
>  !endif
> 
>  !if gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable == TRUE diff --
> git a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
> b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
> index c49a0fd875..e710fe7f01 100644
> --- a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
> +++ b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
> @@ -15,45 +15,46 @@
>  # Debug Advanced Features
>  #
>  !if gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable ==
> TRUE
> -  !include Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf
> +  !include AcpiDebugFeaturePkg/Include/PostMemory.fdf
>  !endif
> +
>  !if gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable
> == TRUE
> -  !include Debugging/Usb3DebugFeaturePkg/Include/PostMemory.fdf
> +  !include Usb3DebugFeaturePkg/Include/PostMemory.fdf
>  !endif
> 
>  #
>  # Network Advanced Features
>  #
>  !if gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable ==
> TRUE
> -  !include Network/NetworkFeaturePkg/Include/PostMemory.fdf
> +  !include NetworkFeaturePkg/Include/PostMemory.fdf
>  !endif
> 
>  #
>  # Out-of-Band Management Advanced Features  #  !if
> gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable == TRUE
> -  !include
> OutOfBandManagement/IpmiFeaturePkg/Include/PostMemory.fdf
> +  !include IpmiFeaturePkg/Include/PostMemory.fdf
>  !endif
> 
>  #
>  # Power Management Advanced Features
>  #
>  !if gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable == TRUE
> -  !include PowerManagement/S3FeaturePkg/Include/PostMemory.fdf
> +  !include S3FeaturePkg/Include/PostMemory.fdf
>  !endif
> 
>  #
>  # System Information Advanced Features
>  #
>  !if gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable == TRUE
> -  !include SystemInformation/SmbiosFeaturePkg/Include/PostMemory.fdf
> +  !include SmbiosFeaturePkg/Include/PostMemory.fdf
>  !endif
> 
>  #
>  

Re: [edk2-devel][edk2-platforms][PATCH V1 21/27] TemplateFeaturePkg: Use MinPlatform build include files

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Chaganty, Rangasai V
> ; Gao, Liming 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 21/27]
> TemplateFeaturePkg: Use MinPlatform build include files
> 
> Extend the template to leverage common library build files.
> 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> 
> Signed-off-by: Isaac Oram 
> ---
>  Features/Intel/TemplateFeaturePkg/Include/TemplateFeature.dsc |  2 +-
>  Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc  | 18
> ++
>  2 files changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git
> a/Features/Intel/TemplateFeaturePkg/Include/TemplateFeature.dsc
> b/Features/Intel/TemplateFeaturePkg/Include/TemplateFeature.dsc
> index 6742eddcf9..dd6d033aca 100644
> --- a/Features/Intel/TemplateFeaturePkg/Include/TemplateFeature.dsc
> +++ b/Features/Intel/TemplateFeaturePkg/Include/TemplateFeature.dsc
> @@ -73,7 +73,7 @@
>  #is completed.
>  [Components.IA32]
>#
> -  #  Feature Package
> +  #  Feature Package
>#
> 
># Add library instances here that are not included in package components
> and should be tested diff --git
> a/Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc
> b/Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc
> index 0ce8debee0..03657047dc 100644
> --- a/Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc
> +++ b/Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc
> @@ -24,6 +24,24 @@
>PEI_ARCH   = IA32
>DXE_ARCH   = X64
> 
> +[Packages]
> +  MinPlatformPkg/MinPlatformPkg.dec
> +
> +[PcdsFeatureFlag]
> +  #
> +  # PCD needed for MinPlatform build includes
> +  #
> +  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable
> |FALSE
> +  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable
> |FALSE
> +  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable
> |FALSE
> +
> +#
> +# Include common libraries
> +#
> +!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> +!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> +!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> +
>  #
>  # This package always builds the feature.
>  #
> --
> 2.27.0.windows.1
> 
> 
> 
> 
> 



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




Re: [edk2-devel][edk2-platforms][PATCH V1 20/27] SpcrFeaturePkg: Use MinPlatform build include files

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Chaganty, Rangasai V
> ; Gao, Liming 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 20/27] SpcrFeaturePkg:
> Use MinPlatform build include files
> 
> Also added feature enable flag
> 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/Sp
> crDeviceLib.h |  2 +-
> 
> Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PostMem
> ory.fdf  | 13 
> 
> Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PreMemo
> ry.fdf   | 11 
> 
> Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeatu
> re.dsc | 62 
>  Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Readme.md
> | 12 ++--
> 
> Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.de
> c  |  6 ++
> 
> Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.ds
> c  | 18 ++
>  7 files changed, 55 insertions(+), 69 deletions(-)
> 
> diff --git
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/
> SpcrDeviceLib.h
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/
> SpcrDeviceLib.h
> index 947813815e..2e50270ee6 100644
> ---
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/
> SpcrDeviceLib.h
> +++
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/
> +++ SpcrDeviceLib.h
> @@ -12,7 +12,7 @@
> 
>  /**
>Get a Serial Port device used for SPCR.
> -  The caller should call FreePool() to free the memory if return value is not
> NULL.
> +  The caller should call FreePool () to free the memory if return value is 
> not
> NULL.
> 
>@retval NULL  Can not get device.
>@retval OthersA serial port device path.
> diff --git
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PostMe
> mory.fdf
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PostMe
> mory.fdf
> new file mode 100644
> index 00..f963f567c2
> --- /dev/null
> +++
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PostMe
> mo
> +++ ry.fdf
> @@ -0,0 +1,13 @@
> +## @file
> +#  FDF file for post-memory SpcrFeature advanced feature.
> +#
> +#  This file is intended to be included into another package so
> +advanced features #  can be conditionally included in the flash image
> +by enabling the respective #  feature via its FeaturePCD.
> +#
> +# Copyright (C) 2022 Intel Corporation.
> +#
> +# SPDX-License-Identifier: BSD-2-Clause-Patent ##
> +
> +INF SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf
> diff --git
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PreMe
> mory.fdf
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PreMe
> mory.fdf
> new file mode 100644
> index 00..3c461e7fbc
> --- /dev/null
> +++
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PreMe
> mor
> +++ y.fdf
> @@ -0,0 +1,11 @@
> +## @file
> +#  FDF file for pre-memory SpcrFeature advanced feature.
> +#
> +#  This file is intended to be included into another package so
> +advanced features #  can be conditionally included in the flash image
> +by enabling the respective #  feature via its FeaturePCD.
> +#
> +# Copyright (C) 2022 Intel Corporation.
> +#
> +# SPDX-License-Identifier: BSD-2-Clause-Patent ##
> diff --git
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFea
> ture.dsc
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFea
> ture.dsc
> index c51e552df5..b06ddf4fe6 100644
> ---
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFea
> ture.dsc
> +++
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFea
> t
> +++ ure.dsc
> @@ -25,40 +25,9 @@
>!error "DXE_ARCH must be specified to build this feature!"
>  !endif
> 
> -
> ##
> ##
> -#
> -# Library Class section - list of all Library Classes needed by this feature.
> -#
> -
> ##
> ##
> -
> -!include MdePkg/MdeLibs.dsc.inc
> -
>  [LibraryClasses]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> -
> BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibR
> epStr.inf
> -  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> -
> UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry
> Point.inf
> -  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> -  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> -  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> -
> 

Re: [edk2-devel][edk2-platforms][PATCH V1 16/27] LogoFeaturePkg: Use MinPlatformPkg build include files

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Bi, Dandan
> ; Gao, Liming 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 16/27] LogoFeaturePkg:
> Use MinPlatformPkg build include files
> 
> Use the MinPlatformPkg common core build files to build libraries needed by
> this feature.
> 
> Cc: Dandan Bi 
> Cc: Liming Gao 
> 
> Signed-off-by: Isaac Oram 
> ---
>  Features/Intel/UserInterface/LogoFeaturePkg/Include/LogoFeature.dsc |
> 69 
>  Features/Intel/UserInterface/LogoFeaturePkg/LogoFeaturePkg.dec  |  2 -
>  Features/Intel/UserInterface/LogoFeaturePkg/LogoFeaturePkg.dsc  | 38
> ---
>  3 files changed, 41 insertions(+), 68 deletions(-)
> 
> diff --git
> a/Features/Intel/UserInterface/LogoFeaturePkg/Include/LogoFeature.dsc
> b/Features/Intel/UserInterface/LogoFeaturePkg/Include/LogoFeature.dsc
> index 1898be12ed..0acce1c7df 100644
> ---
> a/Features/Intel/UserInterface/LogoFeaturePkg/Include/LogoFeature.dsc
> +++
> b/Features/Intel/UserInterface/LogoFeaturePkg/Include/LogoFeature.ds
> +++ c
> @@ -18,36 +18,12 @@
>  #
> 
> ##
> ##
>  [Defines]
> -!ifndef $(PEI_ARCH)
> -  !error "PEI_ARCH must be specified to build this feature!"
> -!endif
> -!ifndef $(DXE_ARCH)
> -  !error "DXE_ARCH must be specified to build this feature!"
> -!endif
> -
> -
> ##
> ##
> -#
> -# Library Class section - list of all Library Classes needed by this feature.
> -#
> -
> ##
> ##
> -
> -!include MdePkg/MdeLibs.dsc.inc
> -
> -[LibraryClasses]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> -
> BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibR
> epStr.inf
> -  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> -
> UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo
> otServicesTableLib.inf
> -
> UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry
> Point.inf
> -
> -[LibraryClasses.common.DXE_DRIVER]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
> +  !ifndef $(PEI_ARCH)
> +!error "PEI_ARCH must be specified to build this feature!"
> +  !endif
> +  !ifndef $(DXE_ARCH)
> +!error "DXE_ARCH must be specified to build this feature!"
> +  !endif
> 
> 
> ##
> ##
>  #
> @@ -71,31 +47,8 @@
>  # @todo: Change below line to [Components.$(DXE_ARCH)] after
> https://bugzilla.tianocore.org/show_bug.cgi?id=2308
>  #is completed.
>  [Components.X64]
> -  #
> -  # Logo Feature Package
> -  #
> -
> -  # Add library instances here that are not included in package components
> and should be tested
> -  # in the package build.
> -
> -  # Add components here that should be included in the package build.
> -!if gLogoFeaturePkgTokenSpaceGuid.PcdJpgEnable == TRUE
> -  LogoFeaturePkg/LogoDxe/JpegLogoDxe.inf
> -!else
> -  LogoFeaturePkg/LogoDxe/LogoDxe.inf
> -!endif
> -
> -
> ##
> #
> -#
> -# BuildOptions Section - Define the module specific tool chain flags that
> should be used as
> -#the default flags for a module. These flags are 
> appended to any
> -#standard flags that are defined by the build 
> process. They can
> be
> -#applied for any modules or only those modules with 
> the
> specific
> -#module style (EDK or EDKII) specified in 
> [Components] section.
> -#
> -#For advanced features, it is recommended to enable
> [BuildOptions] in
> -#the applicable INF file so it does not affect the 
> whole board
> package
> -#build when this DSC file is active.
> -#
> -
> ##
> #
> -[BuildOptions]
> +  !if gLogoFeaturePkgTokenSpaceGuid.PcdJpgEnable == TRUE
> +LogoFeaturePkg/LogoDxe/JpegLogoDxe.inf
> +  !else
> +LogoFeaturePkg/LogoDxe/LogoDxe.inf
> +  !endif
> diff --git
> a/Features/Intel/UserInterface/LogoFeaturePkg/LogoFeaturePkg.dec
> b/Features/Intel/UserInterface/LogoFeaturePkg/LogoFeaturePkg.dec
> index 1418eb2137..4fa7dfea0f 100644
> --- a/Features/Intel/UserInterface/LogoFeaturePkg/LogoFeaturePkg.dec
> +++ 

Re: [edk2-devel][edk2-platforms][PATCH V1 15/27] NetworkFeaturePkg: Use MinPlatformPkg build include files

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Chaganty, Rangasai V
> ; Gao, Liming 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 15/27]
> NetworkFeaturePkg: Use MinPlatformPkg build include files
> 
> Standalong build was not working due to missing libraries.
> Leverage MinPlatformPkg common includes for core libraries.
> 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> 
> Signed-off-by: Isaac Oram 
> ---
>  Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
> | 89 ++--
>  Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc  |
> 18 
>  2 files changed, 24 insertions(+), 83 deletions(-)
> 
> diff --git
> a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.ds
> c
> b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.ds
> c
> index bbc91ecbb1..ca151b4e33 100644
> ---
> a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.ds
> c
> +++
> b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.ds
> c
> @@ -18,12 +18,12 @@
>  #
> 
> ##
> ##
>  [Defines]
> -!ifndef $(PEI_ARCH)
> -  !error "PEI_ARCH must be specified to build this feature!"
> -!endif
> -!ifndef $(DXE_ARCH)
> -  !error "DXE_ARCH must be specified to build this feature!"
> -!endif
> +  !ifndef $(PEI_ARCH)
> +!error "PEI_ARCH must be specified to build this feature!"
> +  !endif
> +  !ifndef $(DXE_ARCH)
> +!error "DXE_ARCH must be specified to build this feature!"
> +  !endif
> 
>!include NetworkPkg/NetworkDefines.dsc.inc
> 
> @@ -41,56 +41,9 @@
>  #
> 
> ##
> ##
> 
> -!include MdePkg/MdeLibs.dsc.inc
> -
>  [LibraryClasses]
>!include NetworkPkg/NetworkLibs.dsc.inc
> -
> -  ###
> -  # Edk2 Packages
> -  ###
> -  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
> -  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> -
> BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibR
> epStr.inf
> -  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> -  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> -  FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
> -  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
> -  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
> -  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
> -  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> -
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/Base
> PeCoffGetEntryPointLib.inf
> -
> PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanc
> eLibNull.inf
> -  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> -
> ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseR
> eportStatusCodeLibNull.inf
> -  SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
> -  SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
> -
> TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTem
> plate.inf
>TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
> -
> UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBoo
> tManagerLib.inf
> -
> UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo
> otServicesTableLib.inf
> -
> UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry
> Point.inf
> -
> UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiService
> sLib.inf
> -  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> -
> UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib
> /UefiRuntimeServicesTableLib.inf
> -
> -
> [LibraryClasses.common.SEC,LibraryClasses.common.PEI_CORE,LibraryClasse
> s.common.PEIM]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemory
> AllocationLib.inf
> -  PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
> -
> -
> [LibraryClasses.common.DXE_CORE,LibraryClasses.common.DXE_SMM_DRI
> VER,LibraryClasses.common.SMM_CORE,LibraryClasses.common.DXE_DRIVE
> R,LibraryClasses.common.DXE_RUNTIME_DRIVER,LibraryClasses.common.U
> EFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
> -
> DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTabl
> eLib.inf
> -  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo
> ryAllocationLib.inf
> -  

Re: [edk2-devel][edk2-platforms][PATCH V1 14/27] VirtualKeyboardFeaturePkg: Add feature enable PCD

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Gao, Liming
> ; Bi, Dandan 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 14/27]
> VirtualKeyboardFeaturePkg: Add feature enable PCD
> 
> VirtualKeyboard missing feature enable PCD.
> 
> Cc: Liming Gao 
> Cc: Dandan Bi 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/PostMe
> mory.fdf| 2 +-
> 
> Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardF
> eaturePkg.dec | 7 ++-
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git
> a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/PostM
> emory.fdf
> b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/PostM
> emory.fdf
> index f40b5087e8..31a9a6c35d 100644
> ---
> a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/PostM
> emory.fdf
> +++
> b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/PostM
> emory.fdf
> @@ -7,4 +7,4 @@
>  #
>  ##
> 
> -  INF
> VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboardDxe.inf
> +INF
> VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboardDxe.inf
> diff --git
> a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboar
> dFeaturePkg.dec
> b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboar
> dFeaturePkg.dec
> index c26db01f09..d4b5d67783 100644
> ---
> a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboar
> dFeaturePkg.dec
> +++
> b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboar
> dFeaturePkg.dec
> @@ -22,5 +22,10 @@
>Include
> 
>  [Guids]
> +  gVirtualKeyboardFeaturePkgTokenSpaceGuid= { 0x7a9af74f, 0x27ca,
> 0x4834, { 0xa7, 0xd4, 0x62, 0x63, 0xf0, 0xe5, 0x7a, 0xd0 } }
> +
>## GUID used for VirtualKeyboardDriver to open TouchPanel protocol.
> -  gEdkiiTouchPanelGuid = { 0x91b1d27b, 0xe126, 
> 0x48d1, {
> 0x82, 0x34, 0xd2, 0x8b, 0x81, 0xc8, 0x83, 0x62 }}
> +  gEdkiiTouchPanelGuid= { 0x91b1d27b, 0xe126, 
> 0x48d1, {
> 0x82, 0x34, 0xd2, 0x8b, 0x81, 0xc8, 0x83, 0x62 }}
> +
> +[PcdsFeatureFlag]
> +
> gVirtualKeyboardFeaturePkgTokenSpaceGuid.PcdVirtualKeyboardFeatureEn
> able|FALSE|BOOLEAN|0x0001
> --
> 2.27.0.windows.1
> 
> 
> 
> 
> 



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




Re: [edk2-devel][edk2-platforms][PATCH V1 13/27] VirtualKeyboardFeaturePkg: Use MinPlatformPkg build include files

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Bi, Dandan
> ; Gao, Liming 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 13/27]
> VirtualKeyboardFeaturePkg: Use MinPlatformPkg build include files
> 
> Use the MinPlatformPkg common core build files to build libraries needed by
> this feature.
> 
> Cc: Dandan Bi 
> Cc: Liming Gao 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/VirtualKe
> yboardFeature.dsc | 62 +++-
> 
> Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardF
> eaturePkg.dsc  | 18 ++
>  2 files changed, 25 insertions(+), 55 deletions(-)
> 
> diff --git
> a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/Virtual
> KeyboardFeature.dsc
> b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/Virtual
> KeyboardFeature.dsc
> index 8179f70c80..0d4f14a412 100644
> ---
> a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/Virtual
> KeyboardFeature.dsc
> +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/Vir
> +++ tualKeyboardFeature.dsc
> @@ -18,43 +18,12 @@
>  #
> 
> ##
> ##
>  [Defines]
> -!ifndef $(PEI_ARCH)
> -  !error "PEI_ARCH must be specified to build this feature!"
> -!endif
> -!ifndef $(DXE_ARCH)
> -  !error "DXE_ARCH must be specified to build this feature!"
> -!endif
> -
> -
> ##
> ##
> -#
> -# Library Class section - list of all Library Classes needed by this feature.
> -#
> -
> ##
> ##
> -
> -!include MdePkg/MdeLibs.dsc.inc
> -
> -[LibraryClasses]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> -  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> -  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> -
> UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo
> otServicesTableLib.inf
> -
> UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry
> Point.inf
> -  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> -  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> -  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
> -  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> -  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> -
> UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiService
> sLib.inf
> -
> UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib
> /UefiRuntimeServicesTableLib.inf
> -
> -[LibraryClasses.common.UEFI_DRIVER]
> -  ###
> -  # Edk2 Packages
> -  ###
> -
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo
> ryAllocationLib.inf
> +  !ifndef $(PEI_ARCH)
> +!error "PEI_ARCH must be specified to build this feature!"
> +  !endif
> +  !ifndef $(DXE_ARCH)
> +!error "DXE_ARCH must be specified to build this feature!"
> +  !endif
> 
> 
> ##
> #
>  #
> @@ -74,26 +43,9 @@
>  #   generated for it, but the binary will not be put into any firmware
> volume.
>  #
> 
> ##
> #
> +
>  #
>  # Feature DXE Components
>  #
>  [Components.X64]
> -  #
> -  # Virtual Keyboard Feature Package
> -  #
>VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboardDxe.inf
> -
> -
> ##
> #
> -#
> -# BuildOptions Section - Define the module specific tool chain flags that
> should be used as
> -#the default flags for a module. These flags are 
> appended to any
> -#standard flags that are defined by the build 
> process. They can
> be
> -#applied for any modules or only those modules with 
> the
> specific
> -#module style (EDK or EDKII) specified in 
> [Components] section.
> -#
> -#For advanced features, it is recommended to enable
> [BuildOptions] in
> -#the applicable INF file so it does not affect the 
> whole board
> package
> -#build when this DSC file is active.
> -#
> -
> ##
> #
> -[BuildOptions]
> diff --git

Re: [edk2-devel][edk2-platforms][PATCH V1 12/27] VirtualKeyboardFeaturePkg: Fix all relative package paths

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Gao, Liming
> ; Bi, Dandan 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 12/27]
> VirtualKeyboardFeaturePkg: Fix all relative package paths
> 
> Packages should be at the root of a PACKAGES_PATH entry.
> At some point, paths were relative to edk2-platforms/Features/Intel which
> was functional, but interferes with the proper functioning of packaging tools.
> 
> Cc: Liming Gao 
> Cc: Dandan Bi 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/PostMe
> mory.fdf | 2 +-
> 
> Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/VirtualKe
> yboardFeature.dsc | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git
> a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/PostM
> emory.fdf
> b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/PostM
> emory.fdf
> index bf4a4d5078..f40b5087e8 100644
> ---
> a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/PostM
> emory.fdf
> +++
> b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/Pos
> +++ tMemory.fdf
> @@ -7,4 +7,4 @@
>  #
>  ##
> 
> -  INF
> UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyb
> oardDxe.inf
> +  INF
> + VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboardDxe.inf
> diff --git
> a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/Virtual
> KeyboardFeature.dsc
> b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/Virtual
> KeyboardFeature.dsc
> index a8c3819480..8179f70c80 100644
> ---
> a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/Virtual
> KeyboardFeature.dsc
> +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/Vir
> +++ tualKeyboardFeature.dsc
> @@ -81,7 +81,7 @@
>#
># Virtual Keyboard Feature Package
>#
> -
> UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyb
> oardDxe.inf
> +  VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboardDxe.inf
> 
> 
> ##
> #
>  #
> --
> 2.27.0.windows.1
> 
> 
> 
> 
> 



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




Re: [edk2-devel][edk2-platforms][PATCH V1 11/27] UserAuthFeaturePkg: Use MinPlatformPkg build include files

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Bi, Dandan
> ; Gao, Liming 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 11/27]
> UserAuthFeaturePkg: Use MinPlatformPkg build include files
> 
> Use the MinPlatformPkg common core build files to build libraries needed by
> this feature.
> 
> Cc: Dandan Bi 
> Cc: Liming Gao 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory.fd
> f  |  6 +-
> 
> Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeatur
> e.dsc | 80 ++--
> 
> Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthFeaturePkg.ds
> c  | 18 +
>  3 files changed, 27 insertions(+), 77 deletions(-)
> 
> diff --git
> a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory.
> fdf
> b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory.
> fdf
> index c534bebcc0..030dcbe763 100644
> ---
> a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory.
> fdf
> +++
> b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory
> +++ .fdf
> @@ -7,6 +7,6 @@
>  #
>  ##
> 
> -  INF
> UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.i
> nf
> -  INF
> UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthentication2Dxe
> .inf
> -  INF
> UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm
> .inf
> +INF
> +UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe
> .inf
> +INF
> +UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthentication2Dx
> e.inf
> +INF
> +UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSm
> m.inf
> diff --git
> a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeat
> ure.dsc
> b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFea
> ture.dsc
> index 7eeaf441c1..2f39a5580c 100644
> ---
> a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeat
> ure.dsc
> +++
> b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFe
> +++ ature.dsc
> @@ -18,12 +18,12 @@
>  #
> 
> ##
> ##
>  [Defines]
> -!ifndef $(PEI_ARCH)
> -  !error "PEI_ARCH must be specified to build this feature!"
> -!endif
> -!ifndef $(DXE_ARCH)
> -  !error "DXE_ARCH must be specified to build this feature!"
> -!endif
> +  !ifndef $(PEI_ARCH)
> +!error "PEI_ARCH must be specified to build this feature!"
> +  !endif
> +  !ifndef $(DXE_ARCH)
> +!error "DXE_ARCH must be specified to build this feature!"
> +  !endif
> 
> 
> ##
> ##
>  #
> @@ -34,47 +34,9 @@
>  !include MdePkg/MdeLibs.dsc.inc
> 
>  [LibraryClasses]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> -  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> -  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> -  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> -  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
> -  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
> -  IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> -  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
> -  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> -  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> -
> TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTem
> plate.inf
> -
> UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo
> otServicesTableLib.inf
> -
> UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry
> Point.inf
> -
> UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiService
> sLib.inf
> -  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> -
> UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib
> /UefiRuntimeServicesTableLib.inf
> -  RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
> -
> -  #
> -  # User Authentication Feature Package
> -  #
> 
> PlatformPasswordLib|UserAuthFeaturePkg/Library/PlatformPasswordLibNul
> l/PlatformPasswordLibNull.inf
> 
> UserPasswordLib|UserAuthFeaturePkg/Library/UserPasswordLib/UserPass
> wordLib.inf
> 
> -[LibraryClasses.common.DXE_DRIVER]
> -  ###
> -  # Edk2 Packages
> -  ###
> -
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo
> ryAllocationLib.inf
> -
> -[LibraryClasses.common.DXE_SMM_DRIVER]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  

Re: [edk2-devel][edk2-platforms][PATCH V1 10/27] UserAuthFeaturePkg: Fix all relative package paths

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Gao, Liming
> ; Bi, Dandan 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 10/27]
> UserAuthFeaturePkg: Fix all relative package paths
> 
> Packages should be at the root of a PACKAGES_PATH entry.
> At some point, paths were relative to edk2-platforms/Features/Intel which
> was functional, but interferes with the proper functioning of packaging tools.
> 
> Cc: Liming Gao 
> Cc: Dandan Bi 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory.fd
> f  |  6 +++---
> 
> Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeatur
> e.dsc | 12 ++--
> 
> Features/Intel/UserInterface/UserAuthFeaturePkg/Library/PlatformPasswo
> rdLibNull/PlatformPasswordLibNull.inf |  2 +-
> 
> Features/Intel/UserInterface/UserAuthFeaturePkg/Library/UserPasswordLi
> b/UserPasswordLib.inf |  2 +-
> 
> Features/Intel/UserInterface/UserAuthFeaturePkg/Library/UserPasswordUi
> Lib/UserPasswordUiLib.inf |  2 +-
> 
> Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxe
> Smm/UserAuthentication2Dxe.inf |  2 +-
> 
> Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxe
> Smm/UserAuthenticationDxe.inf  |  2 +-
> 
> Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxe
> Smm/UserAuthenticationSmm.inf  |  2 +-
>  8 files changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git
> a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory.
> fdf
> b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory.
> fdf
> index f0b33aa44c..c534bebcc0 100644
> ---
> a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory.
> fdf
> +++
> b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory
> +++ .fdf
> @@ -7,6 +7,6 @@
>  #
>  ##
> 
> -  INF
> UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuth
> enticationDxe.inf
> -  INF
> UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuth
> entication2Dxe.inf
> -  INF
> UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuth
> enticationSmm.inf
> +  INF
> +
> UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.i
> nf
> +  INF
> +
> UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthentication2Dxe
> .inf
> +  INF
> +
> UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm
> .inf
> diff --git
> a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeat
> ure.dsc
> b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFea
> ture.dsc
> index d4f7a5ed23..7eeaf441c1 100644
> ---
> a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeat
> ure.dsc
> +++
> b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFe
> +++ ature.dsc
> @@ -58,8 +58,8 @@
>#
># User Authentication Feature Package
>#
> -
> PlatformPasswordLib|UserInterface/UserAuthFeaturePkg/Library/PlatformP
> asswordLibNull/PlatformPasswordLibNull.inf
> -
> UserPasswordLib|UserInterface/UserAuthFeaturePkg/Library/UserPasswor
> dLib/UserPasswordLib.inf
> +
> +
> PlatformPasswordLib|UserAuthFeaturePkg/Library/PlatformPasswordLibNul
> l
> + /PlatformPasswordLibNull.inf
> +
> UserPasswordLib|UserAuthFeaturePkg/Library/UserPasswordLib/UserPass
> wor
> + dLib.inf
> 
>  [LibraryClasses.common.DXE_DRIVER]
>###
> @@ -122,12 +122,12 @@
> 
># Add library instances here that are not included in package components
> and should be tested
># in the package build.
> -
> UserInterface/UserAuthFeaturePkg/Library/UserPasswordUiLib/UserPassw
> ordUiLib.inf
> +  UserAuthFeaturePkg/Library/UserPasswordUiLib/UserPasswordUiLib.inf
> 
># Add components here that should be included in the package build.
> -
> UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuth
> enticationDxe.inf
> -
> UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuth
> entication2Dxe.inf
> -
> UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuth
> enticationSmm.inf
> +
> UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.i
> nf
> +
> +
> UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthentication2Dxe
> .inf
> +
> UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm
> .inf
> 
> 
> ##
> #
>  #
> diff --git
> a/Features/Intel/UserInterface/UserAuthFeaturePkg/Library/PlatformPass
> wordLibNull/PlatformPasswordLibNull.inf
> b/Features/Intel/UserInterface/UserAuthFeaturePkg/Library/PlatformPass
> 

Re: [edk2-devel][edk2-platforms][PATCH V1 09/27] SmbiosFeaturePkg: Use MinPlatformPkg build include files

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Chaganty, Rangasai V
> ; Gao, Liming 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 09/27] SmbiosFeaturePkg:
> Use MinPlatformPkg build include files
> 
> Use the MinPlatformPkg common core build files to build libraries needed by
> this feature.
> 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemory
> .fdf|  2 +-
> 
> Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeatu
> re.dsc | 52 
> 
> Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.ds
> c  | 18 +++
>  3 files changed, 19 insertions(+), 53 deletions(-)
> 
> diff --git
> a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemo
> ry.fdf
> b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMem
> ory.fdf
> index c3a3e81503..d46bacfbd2 100644
> ---
> a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemo
> ry.fdf
> +++
> b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMem
> o
> +++ ry.fdf
> @@ -7,4 +7,4 @@
>  #
>  ##
> 
> -  INF SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
> +INF SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
> diff --git
> a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFea
> ture.dsc
> b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFea
> ture.dsc
> index 094dd957b8..7a165f39d7 100644
> ---
> a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFea
> ture.dsc
> +++
> b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFe
> +++ ature.dsc
> @@ -33,28 +33,6 @@
> 
>  !include MdePkg/MdeLibs.dsc.inc
> 
> -[LibraryClasses]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> -
> BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibR
> epStr.inf
> -  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> -  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> -  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> -
> UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo
> otServicesTableLib.inf
> -
> UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry
> Point.inf
> -  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> -
> UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib
> /UefiRuntimeServicesTableLib.inf
> -
> -[LibraryClasses.common.DXE_DRIVER]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo
> ryAllocationLib.inf
> -  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
> -
> 
> ##
> ##
>  #
>  # Component section - list of all components that need built for this 
> feature.
> @@ -69,21 +47,6 @@
>  #   generated for it, but the binary will not be put into any firmware
> volume.
>  #
> 
> ##
> ##
> -#
> -# Feature PEI Components
> -#
> -
> -# @todo: Change below line to [Components.$(PEI_ARCH)] after
> https://bugzilla.tianocore.org/show_bug.cgi?id=2308
> -#is completed.
> -[Components.IA32]
> -  #
> -  # SMBIOS Feature Package
> -  #
> -
> -  # Add library instances here that are not included in package components
> and should be tested
> -  # in the package build.
> -
> -  # Add components here that should be included in the package build.
> 
>  #
>  # Feature DXE Components
> @@ -101,18 +64,3 @@
> 
># Add components here that should be included in the package build.
>SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
> -
> -
> ##
> #
> -#
> -# BuildOptions Section - Define the module specific tool chain flags that
> should be used as
> -#the default flags for a module. These flags are 
> appended to any
> -#standard flags that are defined by the build 
> process. They can
> be
> -#applied for any modules or only those modules with 
> the
> specific
> -#module style (EDK or EDKII) specified in 
> [Components] section.
> -#
> -#For advanced features, it is recommended to enable
> [BuildOptions] in
> -#the applicable INF file so it does not affect the 
> whole board
> package
> -#  

Re: [edk2-devel][edk2-platforms][PATCH V1 08/27] SmbiosFeaturePkg: Fix all relative package paths

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Chaganty, Rangasai V
> ; Gao, Liming 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 08/27] SmbiosFeaturePkg:
> Fix all relative package paths
> 
> Packages should be at the root of a PACKAGES_PATH entry.
> At some point, paths were relative to edk2-platforms/Features/Intel which
> was functional, but interferes with the proper functioning of packaging tools.
> 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemory
> .fdf|  2 +-
> 
> Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeatu
> re.dsc |  2 +-
> 
> Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/Smb
> iosBasicDxe.inf |  2 +-
> 
> Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.d
> ec  | 10 +-
>  4 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git
> a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemo
> ry.fdf
> b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMem
> ory.fdf
> index 3ed23bd937..c3a3e81503 100644
> ---
> a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemo
> ry.fdf
> +++
> b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMem
> o
> +++ ry.fdf
> @@ -7,4 +7,4 @@
>  #
>  ##
> 
> -  INF
> SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
> +  INF SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
> diff --git
> a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFea
> ture.dsc
> b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFea
> ture.dsc
> index 31d44b68b3..094dd957b8 100644
> ---
> a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFea
> ture.dsc
> +++
> b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFe
> +++ ature.dsc
> @@ -100,7 +100,7 @@
># in the package build.
> 
># Add components here that should be included in the package build.
> -
> SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
> +  SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
> 
> 
> ##
> #
>  #
> diff --git
> a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/S
> mbiosBasicDxe.inf
> b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/S
> mbiosBasicDxe.inf
> index bd8736b621..8e530c4945 100644
> ---
> a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/S
> mbiosBasicDxe.inf
> +++
> b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/S
> +++ mbiosBasicDxe.inf
> @@ -33,7 +33,7 @@
>  [Packages]
>MdePkg/MdePkg.dec
>MdeModulePkg/MdeModulePkg.dec
> -  SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
> +  SmbiosFeaturePkg/SmbiosFeaturePkg.dec
> 
>  [LibraryClasses]
>BaseLib
> diff --git
> a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.
> dec
> b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.
> dec
> index 6170f37969..db3cdbb0d0 100644
> ---
> a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.
> dec
> +++
> b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg
> +++ .dec
> @@ -38,7 +38,7 @@
>IndustryStandard/SmBios.h
>  
>MdePkg/MdePkg.dec
> -  SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
> +  SmbiosFeaturePkg/SmbiosFeaturePkg.dec
>}
> 
> gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.Vend
> or|0x1
> 
> gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosV
> ersion|0x2
> @@ -71,7 +71,7 @@
>IndustryStandard/SmBios.h
>  
>MdePkg/MdePkg.dec
> -  SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
> +  SmbiosFeaturePkg/SmbiosFeaturePkg.dec
>}
> 
> gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.M
> anufacturer|0x1
> 
> gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.Pr
> oductName|0x2
> @@ -87,7 +87,7 @@
>IndustryStandard/SmBios.h
>  
>MdePkg/MdePkg.dec
> -  SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
> +  SmbiosFeaturePkg/SmbiosFeaturePkg.dec
>}
> 
>#
> @@ -111,7 +111,7 @@
>IndustryStandard/SmBios.h
>  
>MdePkg/MdePkg.dec
> -  SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
> +  SmbiosFeaturePkg/SmbiosFeaturePkg.dec
>}
> 
> gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChass
> is.Manufacturer|0x1
> 
> gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChass
> is.Type|MiscChassisTypeRackMountChassis
> @@ -131,7 +131,7 @@
>IndustryStandard/SmBios.h
>  
>MdePkg/MdePkg.dec
> -  

Re: [edk2-devel][edk2-platforms][PATCH V1 07/27] S3FeaturePkg: Use MinPlatformPkg build include files

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Chaganty, Rangasai V
> ; Gao, Liming 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 07/27] S3FeaturePkg: Use
> MinPlatformPkg build include files
> 
> Use the MinPlatformPkg common core build files to build libraries needed by
> this feature.
> 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> 
> Signed-off-by: Isaac Oram 
> ---
>  Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf
> |  2 +-
> Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc |
> 72 ++--
>  Features/Intel/PowerManagement/S3FeaturePkg/S3FeaturePkg.dsc  | 18
> +
>  3 files changed, 26 insertions(+), 66 deletions(-)
> 
> diff --git
> a/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fd
> f
> b/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fd
> f
> index 34caf3dacc..fdd16a4e03 100644
> ---
> a/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fd
> f
> +++
> b/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fd
> f
> @@ -7,4 +7,4 @@
>  #
>  ##
> 
> -  INF S3FeaturePkg/S3Pei/S3Pei.inf
> +INF S3FeaturePkg/S3Pei/S3Pei.inf
> diff --git
> a/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
> b/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
> index f94bd2b431..cc34e78507 100644
> ---
> a/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
> +++
> b/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
> @@ -18,12 +18,12 @@
>  #
> 
> ##
> ##
>  [Defines]
> -!ifndef $(PEI_ARCH)
> -  !error "PEI_ARCH must be specified to build this feature!"
> -!endif
> -!ifndef $(DXE_ARCH)
> -  !error "DXE_ARCH must be specified to build this feature!"
> -!endif
> +  !ifndef $(PEI_ARCH)
> +!error "PEI_ARCH must be specified to build this feature!"
> +  !endif
> +  !ifndef $(DXE_ARCH)
> +!error "DXE_ARCH must be specified to build this feature!"
> +  !endif
> 
> 
> ##
> ##
>  #
> @@ -31,34 +31,7 @@
>  #
> 
> ##
> ##
> 
> -!include MdePkg/MdeLibs.dsc.inc
> -
> -[LibraryClasses]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> -
> BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibR
> epStr.inf
> -  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/BasePciSegmentLibP
> ci.inf
> -
> -[LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemory
> AllocationLib.inf
> -  PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
> -  PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
> -  PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
> -
> PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/P
> eiServicesTablePointerLibIdt.inf
> -
> -  ###
> -  # Silicon Initialization Package
> -  ###
> +[LibraryClasses.common.PEIM]
> 
> SmmAccessLib|IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLi
> b/PeiSmmAccessLib.inf
> 
> 
> ##
> ##
> @@ -92,34 +65,3 @@
> 
># Add components here that should be included in the package build.
>S3FeaturePkg/S3Pei/S3Pei.inf
> -
> -#
> -# Feature DXE Components
> -#
> -
> -# @todo: Change below line to [Components.$(DXE_ARCH)] after
> https://bugzilla.tianocore.org/show_bug.cgi?id=2308
> -#is completed.
> -[Components.X64]
> -  #
> -  # S3 Feature Package
> -  #
> -
> -  # Add library instances here that are not included in package components
> and should be tested
> -  # in the package build.
> -
> -  # Add components here that should be included in the package build.
> -
> -
> ##
> #
> -#
> -# BuildOptions Section - Define the module specific tool chain flags that
> should be used as
> -#the default flags for a module. These flags are 
> appended to any
> -#

Re: [edk2-devel][edk2-platforms][PATCH V1 06/27] S3FeaturePkg: Fix all relative package paths

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Chaganty, Rangasai V
> ; Gao, Liming 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 06/27] S3FeaturePkg: Fix all
> relative package paths
> 
> Packages should be at the root of a PACKAGES_PATH entry.
> At some point, paths were relative to edk2-platforms/Features/Intel which
> was functional, but interferes with the proper functioning of packaging tools.
> 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> 
> Signed-off-by: Isaac Oram 
> ---
>  Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf
> | 2 +-
> Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc | 2
> +-
>  Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf   | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git
> a/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fd
> f
> b/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fd
> f
> index 3cd5cd9628..34caf3dacc 100644
> ---
> a/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fd
> f
> +++
> b/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fd
> f
> @@ -7,4 +7,4 @@
>  #
>  ##
> 
> -  INF PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf
> +  INF S3FeaturePkg/S3Pei/S3Pei.inf
> diff --git
> a/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
> b/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
> index 312870981e..f94bd2b431 100644
> ---
> a/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
> +++
> b/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
> @@ -91,7 +91,7 @@
># in the package build.
> 
># Add components here that should be included in the package build.
> -  PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf
> +  S3FeaturePkg/S3Pei/S3Pei.inf
> 
>  #
>  # Feature DXE Components
> diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf
> b/Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf
> index 46fbb62a46..e485eac952 100644
> --- a/Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf
> +++ b/Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf
> @@ -23,7 +23,7 @@
>  [Packages]
>MdePkg/MdePkg.dec
>IntelSiliconPkg/IntelSiliconPkg.dec
> -  PowerManagement/S3FeaturePkg/S3FeaturePkg.dec
> +  S3FeaturePkg/S3FeaturePkg.dec
> 
>  [Sources]
>S3Pei.c
> --
> 2.27.0.windows.1
> 
> 
> 
> 
> 



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




Re: [edk2-devel][edk2-platforms][PATCH V1 05/27] IpmiFeaturePkg: Fix build errors

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: Oram, Isaac W 
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Desimone, Nathaniel L
> ; Gao, Liming
> 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 05/27] IpmiFeaturePkg: Fix
> build errors
> 
> Fix build issues with standalone build.
> Switch to using MinPlatformPkg common core include for common modules.
> 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeatu
> re.dsc | 54 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/PostMem
> ory.fdf  | 16 +++---
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiFeaturePkg.ds
> c  | 18 +++
>  3 files changed, 26 insertions(+), 62 deletions(-)
> 
> diff --git
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFea
> ture.dsc
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFea
> ture.dsc
> index c1ce340da2..237a4fc006 100644
> ---
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFea
> ture.dsc
> +++
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFea
> t
> +++ ure.dsc
> @@ -34,54 +34,15 @@
>  !include MdePkg/MdeLibs.dsc.inc
> 
>  [LibraryClasses]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> -
> BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibR
> epStr.inf
> -  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
>IpmiLib|MdeModulePkg/Library/BaseIpmiLibNull/BaseIpmiLibNull.inf
> -  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> -
> TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTem
> plate.inf
> 
> -  #
> -  # IPMI Feature Package
> -  #
> 
> IpmiCommandLib|IpmiFeaturePkg/Library/IpmiCommandLib/IpmiCommand
> Lib.inf
> 
> IpmiPlatformHookLib|IpmiFeaturePkg/Library/IpmiPlatformHookLibNull/Ipm
> iPlatformHookLibNull.inf
> 
>  [LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemory
> AllocationLib.inf
> -  PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
> -  PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
> -  PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
> -
> PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/P
> eiServicesTablePointerLibIdt.inf
> -
> ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiR
> eportStatusCodeLib.inf
> -
> -  #
> -  # IPMI Feature Package
> -  #
>IpmiBaseLib|IpmiFeaturePkg/Library/PeiIpmiBaseLib/PeiIpmiBaseLib.inf
> 
>  [LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.UEFI_DRIVER]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo
> ryAllocationLib.inf
> -  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
> -
> UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo
> otServicesTableLib.inf
> -
> UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry
> Point.inf
> -  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> -
> UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib
> /UefiRuntimeServicesTableLib.inf
> -
> -  #
> -  # IPMI Feature Package
> -  #
>IpmiBaseLib|IpmiFeaturePkg/Library/IpmiBaseLib/IpmiBaseLib.inf
> 
> 
> ##
> ##
> @@ -149,18 +110,3 @@
>IpmiFeaturePkg/IpmiInit/DxeIpmiInit.inf
>IpmiFeaturePkg/OsWdt/OsWdt.inf
>IpmiFeaturePkg/SolStatus/SolStatus.inf
> -
> -
> ##
> #
> -#
> -# BuildOptions Section - Define the module specific tool chain flags that
> should be used as
> -#the default flags for a module. These flags are 
> appended to any
> -#standard flags that are defined by the build 
> process. They can
> be
> -#applied for any modules or only those modules with 
> the
> specific
> -#module style (EDK or EDKII) specified in 
> [Components] section.
> -#
> -#For advanced features, it is recommended to enable
> [BuildOptions] in
> -#the 

Re: [edk2-devel][edk2-platforms][PATCH V1 04/27] IpmiFeaturePkg: Fix all relative package paths

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: Oram, Isaac W 
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Gao, Liming
> ; Desimone, Nathaniel L
> 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 04/27] IpmiFeaturePkg: Fix
> all relative package paths
> 
> Packages should be at the root of a PACKAGES_PATH entry.
> At some point, paths were relative to edk2-platforms/Features/Intel which
> was functional, but interferes with the proper functioning of packaging tools.
> 
> Cc: Liming Gao 
> Cc: Nate DeSimone 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.
> inf |  2 +-
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcElog/BmcElog.i
> nf |  2 +-
>  Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Frb/FrbDxe.inf
> |  2 +-
>  Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Frb/FrbPei.inf
> |  2 +-
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Dxe/
> GenericIpmi.inf |  2 +-
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/P
> eiGenericIpmi.inf  |  2 +-
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Smm
> /SmmGenericIpmi.inf  |  2 +-
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeatu
> re.dsc | 36 ++--
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/PostMem
> ory.fdf  | 16 -
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/PreMemo
> ry.fdf   |  6 ++--
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiFru/IpmiFru.in
> f |  2 +-
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiInit/DxeIpmiI
> nit.inf|  2 +-
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiInit/PeiIpmiIni
> t.inf|  2 +-
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiBaseLi
> b/IpmiBaseLib.inf |  2 +-
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiBaseLi
> bNull/IpmiBaseLibNull.inf |  2 +-
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiComm
> andLib/IpmiCommandLib.inf   |  2 +-
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiPlatfor
> mHookLibNull/IpmiPlatformHookLibNull.inf |  2 +-
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/PeiIpmiBas
> eLib/PeiIpmiBaseLib.inf   |  2 +-
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/SmmIpmiB
> aseLib/SmmIpmiBaseLib.inf   |  2 +-
>  Features/Intel/OutOfBandManagement/IpmiFeaturePkg/OsWdt/OsWdt.inf
> |  2 +-
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/SolStatus/SolStatu
> s.inf |  2 +-
>  21 files changed, 47 insertions(+), 47 deletions(-)
> 
> diff --git
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAc
> pi.inf
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAc
> pi.inf
> index a84813f55c..7cd60e417b 100644
> ---
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAc
> pi.inf
> +++
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAc
> pi.
> +++ inf
> @@ -22,7 +22,7 @@
>  [Packages]
>MdePkg/MdePkg.dec
>MdeModulePkg/MdeModulePkg.dec
> -  OutOfBandManagement/IpmiFeaturePkg/IpmiFeaturePkg.dec
> +  IpmiFeaturePkg/IpmiFeaturePkg.dec
> 
>  [LibraryClasses]
>UefiBootServicesTableLib
> diff --git
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcElog/BmcElo
> g.inf
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcElog/BmcElo
> g.inf
> index 665b3d9bda..388dd2740c 100644
> ---
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcElog/BmcElo
> g.inf
> +++
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcElog/BmcElo
> g.
> +++ inf
> @@ -21,7 +21,7 @@
> 
>  [Packages]
>MdePkg/MdePkg.dec
> -  OutOfBandManagement/IpmiFeaturePkg/IpmiFeaturePkg.dec
> +  IpmiFeaturePkg/IpmiFeaturePkg.dec
> 
>  [LibraryClasses]
>UefiDriverEntryPoint
> diff --git
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Frb/FrbDxe.inf
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Frb/FrbDxe.inf
> index 85836cd8ee..61222e0c00 100644
> ---
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Frb/FrbDxe.inf
> +++
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Frb/FrbDxe.inf
> @@ -21,7 +21,7 @@
>  [Packages]
>MdePkg/MdePkg.dec
>MdeModulePkg/MdeModulePkg.dec
> -  OutOfBandManagement/IpmiFeaturePkg/IpmiFeaturePkg.dec
> +  IpmiFeaturePkg/IpmiFeaturePkg.dec
> 
>  [LibraryClasses]
>UefiBootServicesTableLib
> 

Re: [edk2-devel][edk2-platforms][PATCH V1 03/27] AcpiDebugFeaturePkg: Fix all relative package paths

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Chaganty, Rangasai V
> ; Gao, Liming
> ; Dong, Eric 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 03/27]
> AcpiDebugFeaturePkg: Fix all relative package paths
> 
> Packages should be at the root of a PACKAGES_PATH entry.
> At some point, paths were relative to edk2-platforms/Features/Intel which
> was functional, but interferes with the proper functioning of packaging tools.
> 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> Cc: Eric Dong 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiD
> ebugDxe.inf | 2 +-
> Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiD
> ebugSmm.inf | 2 +-
> 
> Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec
> | 2 +-
> 
> Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeatur
> e.dsc | 4 ++--
>  Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf
> | 4 ++--
>  5 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git
> a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/Acp
> iDebugDxe.inf
> b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/Ac
> piDebugDxe.inf
> index b293d83cd9..04b5953bf6 100644
> ---
> a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/Acp
> iDebugDxe.inf
> +++
> b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/Ac
> piD
> +++ ebugDxe.inf
> @@ -32,7 +32,7 @@
>  [Packages]
>MdePkg/MdePkg.dec
>MdeModulePkg/MdeModulePkg.dec
> -  Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec
> +  AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec
> 
>  [Pcd]
>gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureActive  ##
> CONSUMES diff --git
> a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/Acp
> iDebugSmm.inf
> b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/Ac
> piDebugSmm.inf
> index dbb33e4ae2..a0058b51ab 100644
> ---
> a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/Acp
> iDebugSmm.inf
> +++
> b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/Ac
> piD
> +++ ebugSmm.inf
> @@ -33,7 +33,7 @@
>  [Packages]
>MdePkg/MdePkg.dec
>MdeModulePkg/MdeModulePkg.dec
> -  Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec
> +  AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec
> 
>  [Pcd]
>gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureActive  ##
> CONSUMES diff --git
> a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.d
> ec
> b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.d
> ec
> index c3bd89fe2b..9159231007 100644
> ---
> a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.d
> ec
> +++
> b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.d
> +++ ec
> @@ -29,7 +29,7 @@
>  [PcdsFeatureFlag]
> 
> gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable|FALSE
> |BOOLEAN|0xA001
> 
> -[PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic,PcdsDynamicEx]
> +[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
>## This PCD specifies the ACPI debug message buffer size.
> 
> gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugBufferSize|0x1|
> UINT32|0xF001
> 
> diff --git
> a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeat
> ure.dsc
> b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeat
> ure.dsc
> index 856222a53d..b142978be1 100644
> ---
> a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeat
> ure.dsc
> +++
> b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeat
> +++ ure.dsc
> @@ -109,8 +109,8 @@
># in the package build.
> 
># Add components here that should be included in the package build.
> -  Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf
> -  Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf
> +  AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf
> +  AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf
> 
> 
> ##
> #
>  #
> diff --git
> a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fd
> f
> b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fd
> f
> index bbd6eca87b..84560dae50 100644
> ---
> a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fd
> f
> +++
> b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fd
> +++ f
> @@ -7,5 +7,5 @@
>  #
>  ##
> 
> -  INF RuleOverride = DRIVER_ACPITABLE
> Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf
> -  INF RuleOverride = DRIVER_ACPITABLE
> Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf
> +  INF RuleOverride = DRIVER_ACPITABLE
> + AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf
> +  

Re: [edk2-devel][edk2-platforms][PATCH V1 17/27] PostCodeDebugFeaturePkg: Complete as an advanced feature

2022-01-12 Thread Nate DeSimone
Hi Issac,

Comments inline.

Thanks,
Nate

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Dong, Eric
> ; Gao, Liming 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 17/27]
> PostCodeDebugFeaturePkg: Complete as an advanced feature
> 
> Add feature enable PCD.
> Use MinPlatformPkg build include files.
> Fix PEI_COR typo in PEI handler lib.
> Build StatusCodeHandler components with unique filename GUID.
> Add PreMemory.fdf and PostMemory.fdf include files.
> Improve Readme formatting and feature enabling checklist.
> 
> Cc: Eric Dong 
> Cc: Liming Gao 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCodeDe
> bugFeature.dsc | 231 
> +---
> 
> Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostMemor
> y.fdf   |  14 ++
> 
> Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PreMemory.
> fdf|  13 ++
> 
> Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStat
> usCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.inf |   2 +-
> 
> Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeat
> urePkg.dec  |  11 +
> 
> Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeat
> urePkg.dsc  |  30 +++
>  Features/Intel/Debugging/PostCodeDebugFeaturePkg/Readme.md
> |  31 ++-
>  7 files changed, 146 insertions(+), 186 deletions(-)
> 
> diff --git
> a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCode
> DebugFeature.dsc
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCode
> DebugFeature.dsc
> index 3d886fff38..31b0c02e79 100644
> ---
> a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCode
> DebugFeature.dsc
> +++
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCode
> D
> +++ ebugFeature.dsc
> @@ -12,192 +12,71 @@
>  #
>  ##
> 
> -
> ##
> ##
> -#
> -# Defines Section - statements that will be processed to create a Makefile.
> -#
> -
> ##
> ##
>  [Defines]
> -!ifndef $(PEI_ARCH)
> -  !error "PEI_ARCH must be specified to build this feature!"
> -!endif
> -!ifndef $(DXE_ARCH)
> -  !error "DXE_ARCH must be specified to build this feature!"
> -!endif
> +  !ifndef $(PEI_ARCH)
> +!error "PEI_ARCH must be specified to build this feature!"
> +  !endif
> +  !ifndef $(DXE_ARCH)
> +!error "DXE_ARCH must be specified to build this feature!"
> +  !endif
> 
> -
> ##
> ##
> -#
> -# PCD Section - list of PCD Entries modified by the feature.
> -#
> -
> ##
> ##
> +  DEFINE POST_CODE_PEIM_FILENAME  = 3ea07dd3-f837-40c0-ac56-
> f3e18a30d01b
> +  DEFINE POST_CODE_DXE_FILENAME   = e7d785f5-e2f3-45e3-b0e7-
> 2291a6c6dea6
> +  DEFINE POST_CODE_SMM_FILENAME   = 02a955c7-48c0-4178-989b-
> b3fea4b3c6a2
> 
> -# Unmark the following and StatusCodeHandler.efi to build the .dsc file
> directly -#[PcdsDynamicDefault] -#
> gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode|
> TRUE
> +[PcdsDynamicExDefault]
> +  #
> +  # By default, make the functional control DynamicExDefault PCD so that it
> can be enabled when debugging.
> +  #
> +
> gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode
> 
> -
> ##
> ##
> -#
> -# Library Class section - list of all Library Classes needed by this feature.
> -#
> -
> ##
> ##
> +[LibraryClasses.Common]
> +
> +PostCodeMapLib|PostCodeDebugFeaturePkg/Library/PostCodeMapLib/Po
> stCodeM
> +apLib.inf
> 
> -!include MdePkg/MdeLibs.dsc.inc
> +[LibraryClasses.PEIM, LibraryClasses.PEI_CORE]
> +
> +StatusCodeHandlerLib|PostCodeDebugFeaturePkg/Library/PostCodeStatus
> Code
> +HandlerLib/PeiPostCodeStatusCodeHandlerLib.inf
> 
> -[LibraryClasses]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> -  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> -  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> -  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> -  DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
> -  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> -  PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
> -  

Re: [edk2-devel][edk2-platforms][PATCH V1 02/27] BeepDebugFeaturePkg: Fix all relative package paths

2022-01-12 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Chaganty, Rangasai V
> ; Gao, Liming
> ; Dong, Eric 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 02/27]
> BeepDebugFeaturePkg: Fix all relative package paths
> 
> Packages should be at the root of a PACKAGES_PATH entry.
> At some point, paths were relative to edk2-platforms/Features/Intel which
> was functional, but interferes with the proper functioning of packaging tools.
> 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> Cc: Eric Dong 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeat
> ure.dsc | 16 
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git
> a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFe
> ature.dsc
> b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFe
> ature.dsc
> index 251de6932b..00ef022657 100644
> ---
> a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFe
> ature.dsc
> +++
> b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFe
> at
> +++ ure.dsc
> @@ -54,17 +54,17 @@
>gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep
> 
>  [LibraryClasses.Common]
> -
> BeepLib|Debugging/BeepDebugFeaturePkg/Library/BeepLib/BeepLibNull.inf
> -
> BeepMapLib|Debugging/BeepDebugFeaturePkg/Library/BeepMapLib/Beep
> MapLib.inf
> +  BeepLib|BeepDebugFeaturePkg/Library/BeepLib/BeepLibNull.inf
> +
> BeepMapLib|BeepDebugFeaturePkg/Library/BeepMapLib/BeepMapLib.inf
> 
>  [LibraryClasses.PEIM, LibraryClasses.PEI_CORE]
> -
> StatusCodeHandlerLib|Debugging/BeepDebugFeaturePkg/Library/BeepStat
> usCodeHandlerLib/PeiBeepStatusCodeHandlerLib.inf
> +
> +
> StatusCodeHandlerLib|BeepDebugFeaturePkg/Library/BeepStatusCodeHan
> dler
> + Lib/PeiBeepStatusCodeHandlerLib.inf
> 
>  [LibraryClasses.DXE_RUNTIME_DRIVER]
> -
> StatusCodeHandlerLib|Debugging/BeepDebugFeaturePkg/Library/BeepStat
> usCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.inf
> +
> +
> StatusCodeHandlerLib|BeepDebugFeaturePkg/Library/BeepStatusCodeHan
> dler
> + Lib/RuntimeDxeBeepStatusCodeHandlerLib.inf
> 
>  [LibraryClasses.DXE_SMM_DRIVER]
> -
> StatusCodeHandlerLib|Debugging/BeepDebugFeaturePkg/Library/BeepStat
> usCodeHandlerLib/SmmBeepStatusCodeHandlerLib.inf
> +
> +
> StatusCodeHandlerLib|BeepDebugFeaturePkg/Library/BeepStatusCodeHan
> dler
> + Lib/SmmBeepStatusCodeHandlerLib.inf
> 
>  [Components.IA32]
> 
> @@ -77,7 +77,7 @@
>#
>FILE_GUID = $(BEEP_PEIM_FILENAME)
>  
> -
> NULL|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLi
> b/PeiBeepStatusCodeHandlerLib.inf
> +
> +
> NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/PeiBeepSt
> atu
> + sCodeHandlerLib.inf
>}
> 
>  [Components.X64]
> @@ -90,7 +90,7 @@
>#
>FILE_GUID = $(BEEP_DXE_FILENAME)
>  
> -
> NULL|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLi
> b/RuntimeDxeBeepStatusCodeHandlerLib.inf
> +
> +
> NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeD
> xeBe
> + epStatusCodeHandlerLib.inf
>}
> 
> 
> MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSm
> m.inf { @@ -102,5 +102,5 @@
>#
>FILE_GUID = $(BEEP_SMM_FILENAME)
>  
> -
> NULL|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLi
> b/SmmBeepStatusCodeHandlerLib.inf
> +
> +
> NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/SmmBeep
> Statu
> + sCodeHandlerLib.inf
>}
> --
> 2.27.0.windows.1
> 
> 
> 
> 
> 



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




Re: [edk2-devel][edk2-platforms][PATCH V1 18/27] AcpiDebugFeaturePkg: Use MinPlatformPkg build include files

2022-01-12 Thread Nate DeSimone
Hi Isaac,

Comments inline.

Thanks,
Nate

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Dong, Eric
> ; Gao, Liming 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 18/27]
> AcpiDebugFeaturePkg: Use MinPlatformPkg build include files
> 
> Use the MinPlatformPkg common core build files to build libraries needed by
> this feature.
> 
> Cc: Eric Dong 
> Cc: Liming Gao 
> 
> Signed-off-by: Isaac Oram 
> ---
>  Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dsc
> | 21 ++
> 
> Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeatur
> e.dsc | 70 
>  Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf
> |  4 +-
>  3 files changed, 23 insertions(+), 72 deletions(-)
> 
> diff --git
> a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.d
> sc
> b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.d
> sc
> index 62cc559d8f..3b76d39ea8 100644
> ---
> a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.d
> sc
> +++
> b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.d
> +++ sc
> @@ -24,6 +24,27 @@
>PEI_ARCH   = IA32
>DXE_ARCH   = X64
> 
> +[Packages]
> +  MinPlatformPkg/MinPlatformPkg.dec
> +
> +#
> +# Since there are no 32b libraries or components in this package, these
> +PCD are specified for 64b only # [PcdsFeatureFlag.X64]

This should be changed to [PcdsFeatureFlag.$(DXE_ARCH)]

> +  #
> +  # PCD needed for MinPlatform build includes
> +  #
> +  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable
> |FALSE
> +  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable
> |FALSE
> +  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable
> |FALSE
> +
> +#
> +# Include common libraries
> +#
> +!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> +!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> +!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> +
>  #
>  # This package always builds the feature.
>  #
> diff --git
> a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeat
> ure.dsc
> b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeat
> ure.dsc
> index b142978be1..f5b8bacee0 100644
> ---
> a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeat
> ure.dsc
> +++
> b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeat
> +++ ure.dsc
> @@ -25,45 +25,6 @@
>!error "DXE_ARCH must be specified to build this feature!"
>  !endif
> 
> -
> ##
> ##
> -#
> -# Library Class section - list of all Library Classes needed by this feature.
> -#
> -
> ##
> ##
> -
> -!include MdePkg/MdeLibs.dsc.inc
> -
> -[LibraryClasses]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> -  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> -  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> -  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> -  DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
> -  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> -  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> -
> UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo
> otServicesTableLib.inf
> -
> UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry
> Point.inf
> -  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> -
> UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib
> /UefiRuntimeServicesTableLib.inf
> -
> -
> [LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.DXE_RUNTIM
> E_DRIVER]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo
> ryAllocationLib.inf
> -
> -[LibraryClasses.common.DXE_SMM_DRIVER]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMe
> moryAllocationLib.inf
> -
> SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesT
> ableLib.inf
> -
> 
> ##
> ##
>  #
>  # Component section - list of all components that need built for this 
> feature.
> @@ -78,22 +39,6 @@
>  #   generated for it, but the binary will not be put into any firmware
> volume.
>  #
> 
> ##
> ##
> 

Re: [edk2-devel][edk2-platforms][PATCH V1 19/27] Usb3DebugFeaturePkg: Align with feature design guidelines

2022-01-12 Thread Nate DeSimone
Hi Isaac,

Comments inline.

Thanks,
Nate

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Dong, Eric
> ; Gao, Liming 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 19/27]
> Usb3DebugFeaturePkg: Align with feature design guidelines
> 
> Remove build of common libraries.  Boards will already have those.
> 
> Modified Usb3DebugFeature.dsc to treat libraries like libraries.
> Usb3DebugFeaturePkg.dsc uses the component trick for standalone build
> testing of the libraries.
> 
> Added a PCD to allow board to select between NULL, regular, and IO MMU
> library instances.  Prior implementation of Usb3DebugFeature.dsc was not
> useful as an includable file because it didn't specify LibaryClass instance to
> use.
> 
> Removed unused CMOS PCD.
> 
> Updated some of the readme sections.
> 
> Cc: Eric Dong 
> Cc: Liming Gao 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Features/Intel/Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFeatu
> re.dsc | 131 
>  Features/Intel/Debugging/Usb3DebugFeaturePkg/Readme.md|
> 50 +---
> 
> Features/Intel/Debugging/Usb3DebugFeaturePkg/Usb3DebugFeaturePkg.d
> ec  |  14 +--
> 
> Features/Intel/Debugging/Usb3DebugFeaturePkg/Usb3DebugFeaturePkg.d
> sc  |  18 +++
>  4 files changed, 81 insertions(+), 132 deletions(-)
> 
> diff --git
> a/Features/Intel/Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFea
> ture.dsc
> b/Features/Intel/Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFea
> ture.dsc
> index 1e3aaecd5d..a87a5b428b 100644
> ---
> a/Features/Intel/Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFea
> ture.dsc
> +++
> b/Features/Intel/Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFea
> t
> +++ ure.dsc
> @@ -31,122 +31,35 @@
>  #
> 
> ##
> ##
> 
> -!include MdePkg/MdeLibs.dsc.inc
> +[LibraryClasses.Common]
> +
> +Usb3DebugPortParamLibo|Usb3DebugFeaturePkg/Library/Usb3DebugPort
> ParamLi

Typo here. Usb3DebugPortParamLibo should be Usb3DebugPortParamLib.

> +bPcd/Usb3DebugPortParamLibPcd.inf
> 
> -[LibraryClasses]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> -  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> -  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> -  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> -  DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
> -  IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> -  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> -  PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
> -  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> -
> TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTem
> plate.inf
> -
> UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo
> otServicesTableLib.inf
> -
> UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry
> Point.inf
> -  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> -
> UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib
> /UefiRuntimeServicesTableLib.inf
> -
> -[LibraryClasses.common.PEIM]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemory
> AllocationLib.inf
> -
> PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/P
> eiServicesTablePointerLibIdt.inf
> -
> -[LibraryClasses.common.DXE_DRIVER]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo
> ryAllocationLib.inf
> -
> -[LibraryClasses.common.DXE_RUNTIME_DRIVER]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo
> ryAllocationLib.inf
> -  UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
> -
> -[LibraryClasses.common.UEFI_DRIVER]
> -  ###
> -  # Edk2 Packages
> -  ###
> -  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo
> ryAllocationLib.inf
> -
> -
> ##
> ##
> -#
> -# Component section - list of all components that need built for this 
> feature.
> -#
> -# Note: The EDK II DSC file is not used to specify how 

Re: [edk2-devel][edk2-platforms][PATCH V1 26/27] AdvancedFeaturePkg/Build: Add FDF to create FV for all features

2022-01-12 Thread Nate DeSimone
Hi Isaac,

Since FvAdvanced is post-memory and not covered by the boot guard IBB, I 
suspect we should probably also support optional signing of that FV.

Thanks,
Nate

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Oram, Isaac W
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W ; Chaganty, Rangasai V 
; Gao, Liming 
Subject: [edk2-devel][edk2-platforms][PATCH V1 26/27] AdvancedFeaturePkg/Build: 
Add FDF to create FV for all features

This produces three FV and no FD.
FvAdvancedPreMemory.fv contains PEIM for pre-memory use.
FvAdvancedUncompressed.fv contains post memory PEIM and drivers for DXE and SMM.
FvAdvanced.fv contains the compressed FvAdvancedUncompressed.fv in an FV file 
format as is common practice.

These FV are not expected to be used as is, but are needed to test the 
individual features for things like filename collisions.  Some features require 
build customization so binary reuse is not feasible at this time.

Cc: Sai Chaganty 
Cc: Liming Gao 

Signed-off-by: Isaac Oram 
---
 Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc |  1 +  
Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.fdf | 49 

 2 files changed, 50 insertions(+)

diff --git a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc 
b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
index 02636da916..28530b8c67 100644
--- a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
@@ -29,6 +29,7 @@
   SKUID_IDENTIFIER= DEFAULT
   PEI_ARCH= IA32
   DXE_ARCH= X64
+  FLASH_DEFINITION= 
AdvancedFeaturePkg/AdvancedFeaturePkg.fdf
 
 [Packages]
   MdePkg/MdePkg.dec
diff --git a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.fdf 
b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.fdf
new file mode 100644
index 00..76a02c5d1c
--- /dev/null
+++ b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.fdf
@@ -0,0 +1,49 @@
+## @file
+# FDF file generating AdvancedFeature FV for inclusion in a MinPlatform design.
+#
+# There are three FV produced, FvAdvancedPreMemory.fv, 
+FvAdvancedUncompressed.fv, and # FvAdvanced.fv.  The sizes are 
+arbitrary as these are not expected to be used as is # in today's usages.  
Boards will tune FV by selecting or deseleting features and building.
+#
+# @copyright
+# Copyright (C) 2022 Intel Corporation
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent ##
+
+[Defines]
+  DEFINE UNCOMPRESSED_FV_ADVANCED_FILENAME = 
+6d606b5c-2d45-4705-a700-73324306be06
+
+[FV.FvAdvancedPreMemory]
+  !include MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
+  FvNameGuid = ea9da344-a7f3-468c-ae84-2d22fc03b28e
+
+  !include AdvancedFeaturePkg/Include/PreMemory.fdf
+
+[FV.FvAdvancedUncompressed]
+  !include MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
+  FvNameGuid = $(UNCOMPRESSED_FV_ADVANCED_FILENAME)
+
+  !include AdvancedFeaturePkg/Include/PostMemory.fdf
+
+[FV.FvAdvanced]
+  !include MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
+  FvNameGuid = 445b121d-28d6-4801-8958-8253cf426cf7
+
+  FILE FV_IMAGE = $(UNCOMPRESSED_FV_ADVANCED_FILENAME) {
+SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = 
TRUE {
+  SECTION FV_IMAGE = FvAdvancedUncompressed
+}
+  }
+
+
+###
+#
+#
+# Rules are use with the [FV] section's module INF type to define # how 
+an FFS file is created for a given INF file. The following Rule are the 
+default # rules for the different module type. User can add the 
+customized rules to define the # content of the FFS file.
+#
+###
+#
+
+!include MinPlatformPkg/Include/Fdf/RuleInclude.fdf
--
2.27.0.windows.1








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




Re: [edk2-devel][edk2-platforms][PATCH V1 01/27] BeepDebugFeaturePkg: Use MinPlatformPkg build include files

2022-01-12 Thread Nate DeSimone
Hi Isaac,

Comments inline.

Thanks,
Nate

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Chaganty, Rangasai V
> ; Gao, Liming
> ; Dong, Eric ; Tan, Ming
> 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 01/27]
> BeepDebugFeaturePkg: Use MinPlatformPkg build include files
> 
> The BeepDebugFeaturePkg was malformed and did not build anything and
> thus wasn't testable in standalone build.
> 
> Added
> gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable
> to properly control the advanced feature inclusion.
> 
> Use the standard MinPlatform includes for core libraries. This increases the
> build time, but reduces complexity when integrating into a board build. Board
> build optimization is more valuable than standalone build optimization.
> 
> Enable standalone build to test the library build and the component builds
> using edk2 StatusCodeHandler drivers.
> 
> Add unique file names for the StatusCodeHandler components to avoid
> collisions with any existing board handlers when incorporated in board DSC
> and FDF files.
> 
> Add PreMemory.fdf and PostMemory.fdf content for including in board FDF
> or AdvancedFeaturePkg in the future.
> 
> Removed unused sections in DSC and FDF to reduce file clutter.
> 
> Removed stale file header content from prior proprietary licensing.
> 
> Moved feature customization and common include into the package DSC file
> to reduce board complexity when BeepDebugFeature.dsc is included.
> 
> Removed the FixedAtBuild build control for beep feature as it would be
> redundant with the FeatureFlag control of the whole feature. Build control is
> via PcdBeepDebugFeatureEnable and dynamic control is via
> PcdStatusCodeUseBeep.
> 
> Improved Readme content, format, and coding style use.
> 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Cc: Ming Tan 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg.d
> ec |   7 +-
> 
> Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg.d
> sc |  28 +++
> 
> Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeat
> ure.dsc| 222 ++--
> 
> Features/Intel/Debugging/BeepDebugFeaturePkg/Include/Library/BeepLib.
> h   |   6 +-
>  Features/Intel/Debugging/BeepDebugFeaturePkg/Include/PostMemory.fdf
> |  14 ++
>  Features/Intel/Debugging/BeepDebugFeaturePkg/Include/PreMemory.fdf
> |  13 ++
> 
> Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCode
> HandlerLib/PeiBeepStatusCodeHandlerLib.inf|   5 +-
> 
> Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCode
> HandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.inf |   3 -
> 
> Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCode
> HandlerLib/SmmBeepStatusCodeHandlerLib.inf|   3 -
>  Features/Intel/Debugging/BeepDebugFeaturePkg/Readme.md
> |  91 +---
>  10 files changed, 186 insertions(+), 206 deletions(-)
> 
> diff --git
> a/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg
> .dec
> b/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg
> .dec
> index 4f4b36b091..d90611da51 100644
> ---
> a/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg
> .dec
> +++
> b/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg
> .d
> +++ ec
> @@ -31,6 +31,9 @@
>  [Guids]
>gBeepDebugFeaturePkgTokenSpaceGuid  =  {0x54f56fb5, 0xea0e, 0x4518,
> {0xa0, 0x3e, 0x1b, 0xeb, 0x56, 0x94, 0xd2, 0x16}}
> 
> -[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
> +[PcdsFeatureFlag]
> +
> +gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable|FA
> LSE|BOOL
> +EAN|0x
> +
> +[PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
># Beep is a legacy feature, disabled it by default
> -
> gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep|FALSE|B
> OOLEAN|0x0001
> +
> +
> gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep|TRUE|BO
> OLEAN|0
> + x0001
> diff --git
> a/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg
> .dsc
> b/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg
> .dsc
> index 47254f9974..56cad020bf 100644
> ---
> a/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg
> .dsc
> +++
> b/Features/Intel/Debugging/BeepDebugFeaturePkg/BeepDebugFeaturePkg
> .d
> +++ sc
> @@ -24,6 +24,34 @@
>PEI_ARCH   = IA32
>DXE_ARCH   = X64
> 
> +[Packages]
> +  MinPlatformPkg/MinPlatformPkg.dec
> +  BeepDebugFeaturePkg/BeepDebugFeaturePkg.dec
> +
> +[PcdsFeatureFlag]
> +  #
> +  # PCD needed for MinPlatform build includes
> +  #
> +  

Re: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build consistency

2022-01-12 Thread Nate DeSimone
Hi Issac,

Thank you for doing this cleanup work. I have some comments for you. I have 
provided a summary of my feedback below:

PATCH 01/27

* Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc

Line 69: [Components.IA32] should be changed to [Components.$(PEI_ARCH)]
Line 83: [Components.X64] should be changed to [Components.$(DXE_ARCH)]

Note: These comments can also be addressed by restoring the @todo comment 
stating that these changes still need to be done (which you deleted.)

PATCH 18/27

* Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dsc

Line 33: [PcdsFeatureFlag.X64] should be changed to 
[PcdsFeatureFlag.$(DXE_ARCH)]

Note: This comment can also be addressed by adding a @todo comment stating that 
this change still needs to be done.

PATCH 19/27

* Features/Intel/Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc

Line 35: Typo here. Usb3DebugPortParamLibo should be Usb3DebugPortParamLib.

* Features/Intel/Debugging/Usb3DebugFeaturePkg/Usb3DebugFeaturePkg.dsc

Line 40: Did you test compilation for the Usb3DebugFeaturePkg? I've generally 
run into issues when a components sections does not specify a machine 
architecture through some sort of means.

PATCH 26/27

Since FvAdvanced is post-memory and not covered by the boot guard IBB, I 
suspect we should probably also support optional signing of that FV.

Thanks,
Nate

-Original Message-
From: Oram, Isaac W  
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W ; Chaganty, Rangasai V 
; Gao, Liming ; Dong, 
Eric ; Tan, Ming ; Desimone, Nathaniel 
L ; Chiu, Chasel ; Bi, 
Dandan ; Shindo, Miki ; Abbas, 
Mohamed ; KARPAGAVINAYAGAM, MANICKAVASAKAM 

Subject: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build 
consistency

This series addresses inconsistencies in feature implementation and use. Some 
inconsistencies are just conventions of the feature design/template/convention. 
 Some are inconsistency with feature design intent that negatively affect the 
usability of the features and the amount of work required from board porting 
engineers.

Some features were missing feature enable flags.
Some features had non-functional standalone builds.
Many features were implemented to include common core build content in their 
feature include files.
Updated some of the Readme content.
Added AdvancedFeaturePkg.fdf to build all feature content to support verifying 
no build time issues between features.
Removed duplicate and unused content from build files.
Modified the TemplateFeaturePkg to use the common MinPlatform include content.

Removed all instances where features were relative to Features/Intel and made 
them relative to the package roots.
This does mean PACKAGES_PATH may need to be extended for all the feature 
domains.  Debugging, PowerManagement, etc.
However, it should enable packaging tools to function properly as the relative 
paths violate spec.

Use of the common MinPlatformPkg build includes does increase the build time 
for each individual feature in standalone build modes. It does not negatively 
impact board or AdvancedFeaturePkg builds as the common content is only built 
once. Part of MinPlatform arch intent is to reduce cognitive complexity, so the 
simpler build is more valuable than fast build time.

Cc: Sai Chaganty 
Cc: Liming Gao 
Cc: Eric Dong 
Cc: Ming Tan 
Cc: Nate DeSimone 
Cc: Chasel Chiu 
Cc: Dandan Bi 
Cc: Miki Shindo 
Cc: Mohamed Abbas 
Cc: Manickavasakam Karpagavinayagam 

Signed-off-by: Isaac Oram 

Isaac Oram (27):
  BeepDebugFeaturePkg: Use MinPlatformPkg build include files
  BeepDebugFeaturePkg: Fix all relative package paths
  AcpiDebugFeaturePkg: Fix all relative package paths
  IpmiFeaturePkg: Fix all relative package paths
  IpmiFeaturePkg: Fix build errors
  S3FeaturePkg: Fix all relative package paths
  S3FeaturePkg: Use MinPlatformPkg build include files
  SmbiosFeaturePkg: Fix all relative package paths
  SmbiosFeaturePkg: Use MinPlatformPkg build include files
  UserAuthFeaturePkg: Fix all relative package paths
  UserAuthFeaturePkg: Use MinPlatformPkg build include files
  VirtualKeyboardFeaturePkg: Fix all relative package paths
  VirtualKeyboardFeaturePkg: Use MinPlatformPkg build include files
  VirtualKeyboardFeaturePkg: Add feature enable PCD
  NetworkFeaturePkg: Use MinPlatformPkg build include files
  LogoFeaturePkg: Use MinPlatformPkg build include files
  PostCodeDebugFeaturePkg: Complete as an advanced feature
  AcpiDebugFeaturePkg: Use MinPlatformPkg build include files
  Usb3DebugFeaturePkg: Align with feature design guidelines
  SpcrFeaturePkg: Use 

[edk2-devel] [PATCH v1 1/1] UefiCpuPackage: Add APIs for CPU physical address mask calculation

2022-01-12 Thread Yu Pu
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3394

Firmware contains lots of code that deals with page table.These
code need the information of cpu physical address mask which
can be calculated from CPUID result.Today all these code implements
directly calls CPUID and calculates the address mask.
This bugzilla requests to add a new API as below so that all the
duplicated code can be removed.

Cc: Eric Dong 
Cc: Ray Ni 

Signed-off-by: Yu Pu 
Reviewed-by: Rahul Kumar 
---
 IntelFsp2Pkg/Library/BaseCacheLib/CacheLib.c| 
10 +
 MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c|  
9 +---
 MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c | 
14 +-
 MdeModulePkg/Universal/CapsulePei/X64/X64Entry.c| 
14 +-
 OvmfPkg/XenPlatformPei/MemDetect.c  | 
11 +
 StandaloneMmPkg/Library/StandaloneMmMemLib/X86StandaloneMmMemLibInternal.c  |  
9 +---
 UefiCpuPkg/CpuDxe/CpuDxe.c  | 
16 +--
 UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c  | 
47 
 UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c   |  
9 +---
 UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c |  
9 +---
 UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c   |  
9 +---
 UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c  | 
10 +
 UefiPayloadPkg/UefiPayloadEntry/X64/VirtualMemory.c |  
9 +---
 EmulatorPkg/EmulatorPkg.dsc |  
1 +
 IntelFsp2Pkg/Library/BaseCacheLib/BaseCacheLib.inf  |  
1 +
 MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf |  
2 +
 MdeModulePkg/MdeModulePkg.dsc   |  
1 +
 MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf |  
1 +
 StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf   |  
2 +
 StandaloneMmPkg/StandaloneMmPkg.dsc |  
1 +
 UefiCpuPkg/Include/Library/UefiCpuLib.h | 
17 +++
 21 files changed, 95 insertions(+), 107 deletions(-)

diff --git a/IntelFsp2Pkg/Library/BaseCacheLib/CacheLib.c 
b/IntelFsp2Pkg/Library/BaseCacheLib/CacheLib.c
index f879c268e7ec..3f8ed122b2be 100644
--- a/IntelFsp2Pkg/Library/BaseCacheLib/CacheLib.c
+++ b/IntelFsp2Pkg/Library/BaseCacheLib/CacheLib.c
@@ -9,6 +9,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "CacheLibInternal.h"
 
 /**
@@ -388,15 +389,8 @@ SetCacheAttributes (
   UINT32 UsedMsrNum;
   EFI_MEMORY_CACHE_TYPE  UsedMemoryCacheType;
   UINT64 ValidMtrrAddressMask;
-  UINT32 Cpuid_RegEax;
 
-  AsmCpuid (CPUID_EXTENDED_FUNCTION, _RegEax, NULL, NULL, NULL);
-  if (Cpuid_RegEax >= CPUID_VIR_PHY_ADDRESS_SIZE) {
-AsmCpuid (CPUID_VIR_PHY_ADDRESS_SIZE, _RegEax, NULL, NULL, NULL);
-ValidMtrrAddressMask = (LShiftU64 ((UINT64)1, (Cpuid_RegEax & 0xFF)) - 1) 
& (~(UINT64)0x0FFF);
-  } else {
-ValidMtrrAddressMask = (LShiftU64 ((UINT64)1, 36) - 1) & (~(UINT64)0x0FFF);
-  }
+  GetPhysicalAddressBits(NULL, );
 
   //
   // Check for invalid parameter
diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c 
b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
index 0700f310b203..78e91e6e9024 100644
--- a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
+++ b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
@@ -22,6 +22,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
+#include 
 #include 
 #include "DxeIpl.h"
 #include "VirtualMemory.h"
@@ -733,13 +734,7 @@ CreateIdentityMappingPageTables (
   if (Hob != NULL) {
 PhysicalAddressBits = ((EFI_HOB_CPU *)Hob)->SizeOfMemorySpace;
   } else {
-AsmCpuid (0x8000, , NULL, NULL, NULL);
-if (RegEax >= 0x8008) {
-  AsmCpuid (0x8008, , NULL, NULL, NULL);
-  PhysicalAddressBits = (UINT8)RegEax;
-} else {
-  PhysicalAddressBits = 36;
-}
+PhysicalAddressBits = GetPhysicalAddressBits(NULL, NULL);
   }
 
   Page5LevelSupport = FALSE;
diff --git 
a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c 
b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c
index 6b44f50bac70..367bf8cdd1e6 100644
--- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c
+++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c
@@ -10,6 +10,7 @@ Copyright (c) 2017, AMD Incorporated. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
+#include 
 #include "ScriptExecute.h"
 
 //
@@ -51,20 +52,9 @@ HookPageFaultHandler (
   IN IA32_IDT_GATE_DESCRIPTOR  *IdtEntry
   )
 {
-  UINT32  RegEax;
-  UINT8   PhysicalAddressBits;
   UINTN   

[edk2-devel][PATCH] BaseTools/GenFw: Enhance to add export table in PE-COFF

2022-01-12 Thread Lixia Huang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3802

Since PRM module needs to support export table in PE-COFF, we'll
enhance GenFw tool to support this.

Add one export flag in GenFw tool. If export flag is set:
Step1: Scan ELF symbol table based on PRM module descriptor to get
descriptor offset address;
Step2: Find PRM handlers number and name in COFF file based on the
address from step1;
Step3: Write PRM info such as handler name and export RVA into COFF
export table.

Cc: Liming Gao 
Cc: Bob Feng 
Cc: Yuwei Chen 
Signed-off-by: Lixia Huang 
---
 BaseTools/Source/C/GenFw/Elf64Convert.c   | 254 +-
 BaseTools/Source/C/GenFw/ElfConvert.c |  10 +
 BaseTools/Source/C/GenFw/ElfConvert.h |  42 ++-
 BaseTools/Source/C/GenFw/GenFw.c  |  11 +-
 .../C/Include/IndustryStandard/PeImage.h  |   7 +
 5 files changed, 318 insertions(+), 6 deletions(-)

diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c 
b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 0bb3ead228..0079507356 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -56,6 +56,18 @@ WriteDebug64 (
   VOID
   );
 
+STATIC
+VOID
+ScanSymbol64 (
+  VOID
+  );
+
+STATIC
+VOID
+WriteExport64 (
+  VOID
+  );
+
 STATIC
 VOID
 SetImageSize64 (
@@ -122,7 +134,7 @@ STATIC UINT32 mDataOffset;
 STATIC UINT32 mHiiRsrcOffset;
 STATIC UINT32 mRelocOffset;
 STATIC UINT32 mDebugOffset;
-
+STATIC UINT32 mExportOffset;
 //
 // Used for RISC-V relocations.
 //
@@ -132,6 +144,14 @@ STATIC Elf64_Half  mRiscVPass1SymSecIndex = 0;
 STATIC INT32   mRiscVPass1Offset;
 STATIC INT32   mRiscVPass1GotFixup;
 
+//
+// Used for Export section.
+//
+STATIC UINT32  mExportSize;
+STATIC UINT32  mExportRVA[PRM_MODULE_EXPORT_SYMBOL_NUM];
+STATIC UINT32  mExportSymNum;
+STATIC CHAR8   
mExportSymName[PRM_MODULE_EXPORT_SYMBOL_NUM][PRM_HANDLER_NAME_MAXIMUM_LENGTH];
+
 //
 // Initialization Function
 //
@@ -200,6 +220,10 @@ InitializeElf64 (
   ElfFunctions->SetImageSize = SetImageSize64;
   ElfFunctions->CleanUp = CleanUp64;
 
+  if (mExportFlag) {
+ElfFunctions->ScanSymbol = ScanSymbol64;
+ElfFunctions->WriteExport = WriteExport64;
+  }
   return TRUE;
 }
 
@@ -263,6 +287,17 @@ IsHiiRsrcShdr (
   return (BOOLEAN) (strcmp((CHAR8*)mEhdr + Namedr->sh_offset + Shdr->sh_name, 
ELF_HII_SECTION_NAME) == 0);
 }
 
+STATIC
+BOOLEAN
+IsSymbolShdr (
+  Elf_Shdr *Shdr
+  )
+{
+  Elf_Shdr *Namehdr = GetShdrByIndex(mEhdr->e_shstrndx);
+
+  return (BOOLEAN) (strcmp((CHAR8*)mEhdr + Namehdr->sh_offset + Shdr->sh_name, 
ELF_SYMBOL_SECTION_NAME) == 0);
+}
+
 STATIC
 BOOLEAN
 IsDataShdr (
@@ -335,6 +370,38 @@ GetSymName (
   return StrtabContents + Sym->st_name;
 }
 
+//
+// Get Prm Handler number and name
+//
+STATIC
+VOID
+FindPrmHandler (
+  UINT64 Offset
+  )
+{
+  PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT_HEADER *PrmExport;
+  UINT32   NameOffset;
+  UINT32   HandlerNum;
+  UINT32   Index;
+  UINT8SymName[PRM_HANDLER_NAME_MAXIMUM_LENGTH];
+
+  PrmExport = (PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT_HEADER*)(mCoffFile + 
Offset);
+  NameOffset = sizeof(PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT_HEADER) + 
sizeof(EFI_GUID);
+
+  for (HandlerNum = 0; HandlerNum < PrmExport->NumberPrmHandlers; 
HandlerNum++) {
+for (Index = 0; Index < PRM_HANDLER_NAME_MAXIMUM_LENGTH; Index++) {
+  SymName[Index] = *((UINT8 *)PrmExport + NameOffset + Index);
+  if (SymName[Index] == 0) {
+break;
+  }
+}
+
+strcpy(mExportSymName[mExportSymNum], (CHAR8*)SymName);
+NameOffset += PRM_HANDLER_NAME_MAXIMUM_LENGTH + sizeof(EFI_GUID);
+mExportSymNum ++;
+  }
+}
+
 //
 // Find the ELF section hosting the GOT from an ELF Rva
 //   of a single GOT entry.  Normally, GOT is placed in
@@ -717,6 +784,7 @@ ScanSections64 (
   UINT32  CoffEntry;
   UINT32  SectionCount;
   BOOLEAN FoundSection;
+  UINT32  Offset;
 
   CoffEntry = 0;
   mCoffOffset = 0;
@@ -750,7 +818,7 @@ ScanSections64 (
 if (shdr->sh_addralign <= mCoffAlignment) {
   continue;
 }
-if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {
+if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr) || 
IsSymbolShdr(shdr)) {
   mCoffAlignment = (UINT32)shdr->sh_addralign;
 }
   }
@@ -880,6 +948,16 @@ ScanSections64 (
 Warning (NULL, 0, 0, NULL, "Multiple sections in %s are merged into 1 data 
section. Source level debug might not work correctly.", mInImageName);
   }
 
+  //
+  //  The Symbol sections.
+  //
+  if (mExportFlag) {
+mExportOffset = mCoffOffset;
+mExportSize = sizeof(EFI_IMAGE_EXPORT_DIRECTORY) + strlen(mInImageName) + 
1;
+mCoffOffset += mExportSize;
+mCoffOffset = CoffAlign(mCoffOffset);
+  }
+
   //
   //  The HII resource sections.
   //
@@ -962,7 +1040,11 @@ ScanSections64 (
 | EFI_IMAGE_FILE_LARGE_ADDRESS_AWARE;
 
   

Re: [edk2-devel] [PATCH v2 0/6] Add ACPI support for Kvmtool

2022-01-12 Thread PierreGondois
Hi Ard,

On 1/12/22 12:16 PM, Ard Biesheuvel wrote:
> On Wed, 12 Jan 2022 at 11:51, Ard Biesheuvel  wrote:
>> On Tue, 11 Jan 2022 at 17:16,  wrote:
>>> From: Pierre Gondois 
>>>
>>> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3742
>>> V1: https://edk2.groups.io/g/devel/message/76990
>>> V2:
>>> - New patch: "DynamicTablesPkg: Print specifier macro for
>>>   CM_OBJECT_ID" [Laszlo]
>>> - Only add AcpiView for ArmVirtKvmTool instead of all ArmVirt
>>>   platforms. This is done using a 'ACPIVIEW_ENABLE' switch.
>>>   [Laszlo]
>>> - Only generate ACPI tables for AARCH64. [Laszlo]
>>> - Various modifications (error handling, patch organization,
>>>   coding style, etc). [Laszlo]
>>>
>>> The changes can be seen at: 
>>> https://github.com/PierreARM/edk2/tree/1456_Add_ACPI_support_for_Kvmtool_v2
>>>
>>> Kvmtool dynamically generates a device tree describing the platform
>>> to boot on. Using the patch-sets listed below, the DynamicTables
>>> framework generates ACPI tables describing a similar platform.
>>>
>>> This patch-set:
>>>  - adds a ConfigurationManager and make use of the DynamicTablesPkg
>>>in for Kvmtool for AARCH64, allowing to generate ACPI tables
>>>  - adds the acpiview command line utility to the ArmVirtPkg
>>>platform that request if via the ACPIVIEW_ENABLE macro
>>>  - update ArmVirtPkg.ci.yaml to add new words and use the
>>>DynamicTablesPkg
>>>  - adds a print specifier macro for the CM_OBJECT_ID type
>>>
>>> With this patchset, KvmTool on AARCH64 will use ACPI tables instead
>>> of a Device Tree (cf PcdForceNoAcpi Pcd).
>>>
>> How did you test this? Can we boot Linux in ACPI mode with these changes?
>>
> I managed to run this with a recent kvmtool and a recent kernel
> (v5.15+), which recognizes DBG2 serial port type 18.
>
> I do see some errors in the log, though:
>
> [4.590652] No ACPI PMU IRQ for CPUn
>
> (for each CPU)
>
> and
>
> ACPI: IORT: [Firmware Bug]: Root complex missing memory address limit
> ACPI: \_SB_.PCI0.LNKA: _CRS 36 not found in _PRS
> ACPI: \_SB_.PCI0.LNKA: No IRQ available. Try pci=noacpi or acpi=off
>
> (for each virtio-pci device)

Yes effectively, a recent kernel handling 'ACPI_DBG2_16550_WITH_GAS' is 
required to boot.

About the error messages, I should have seen them. I will send a v3 handling 
them.

Regards,

Pierre



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




Re: [edk2-devel] [edk2-platform PATCH v1] Silicon/Marvell/Armada7k8k: Fix wrong SMBIOS version issue

2022-01-12 Thread Sunny Wang
Ah.. I forgot that. I just blindly added copyright to all modified files. Sorry 
about that and thanks for catching this, Ard.
I will pay more attention to this in the future.

Best Regards,
Sunny
-Original Message-
From: Ard Biesheuvel 
Sent: 12 January 2022 10:36
To: Marcin Wojtas 
Cc: Sunny Wang ; edk2-devel-groups-io 
; Leif Lindholm ; Ard Biesheuvel 
; Samer El-Haj-Mahmoud 
Subject: Re: [edk2-platform PATCH v1] Silicon/Marvell/Armada7k8k: Fix wrong 
SMBIOS version issue

On Wed, 12 Jan 2022 at 00:00, Marcin Wojtas  wrote:
>
> wt., 11 sty 2022 o 22:46 Sunny Wang  napisał(a):
> >
> > The SMBIOS data is based on v3.3.0, but its version is set to v3.2.0.
> > Since PcdSmbiosVersion in MdeModulePkg.dec is v3.3.0, so just remove
> > the platform overridden value in .dsc file to fix this issue.
> >
> > This also fixed the FWTS failure below:
> >  dmicheck: Type 17 expects length of 0x54, has incorrect length of 0x5c
> >
> > Cc: Leif Lindholm 
> > Cc: Ard Biesheuvel 
> > Cc: Marcin Wojtas 
> > Cc: Samer El-Haj-Mahmoud 
> >
> > Signed-off-by: Sunny Wang 
> > ---
> >  Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc 
> > b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
> > index 3b76acd99c..5e15378207 100644
> > --- a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
> > +++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
> > @@ -1,5 +1,5 @@
> >  #
> > -#Copyright (c) 2011-2012, ARM Limited. All rights reserved.
> > +#Copyright (c) 2011-2022, ARM Limited. All rights reserved.
> >  #Copyright (C) 2016 Marvell International Ltd.
> >  #
> >  #SPDX-License-Identifier: BSD-2-Clause-Patent
> > @@ -387,7 +387,6 @@
> ># SMBIOS/DMI
> >gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
> >gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosEntryPointProvideMethod|0x2
> > -  gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0302
> >gMarvellTokenSpaceGuid.PcdFirmwareVersion|"EDK2 SH 1.1"
> >
>
>
> Reviewed-by: Marcin Wojtas 
>

Pushed as d5ead8b73d62..60bb320b9e47

But in the future, please omit the copyright banner updates if you are
not making changes that establish copyright on the code (and I don't
see how that could be the case when you are deleting a single line)
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85616): https://edk2.groups.io/g/devel/message/85616
Mute This Topic: https://groups.io/mt/88360051/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 0/6] Add ACPI support for Kvmtool

2022-01-12 Thread Ard Biesheuvel
On Wed, 12 Jan 2022 at 11:51, Ard Biesheuvel  wrote:
>
> On Tue, 11 Jan 2022 at 17:16,  wrote:
> >
> > From: Pierre Gondois 
> >
> > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3742
> > V1: https://edk2.groups.io/g/devel/message/76990
> > V2:
> > - New patch: "DynamicTablesPkg: Print specifier macro for
> >   CM_OBJECT_ID" [Laszlo]
> > - Only add AcpiView for ArmVirtKvmTool instead of all ArmVirt
> >   platforms. This is done using a 'ACPIVIEW_ENABLE' switch.
> >   [Laszlo]
> > - Only generate ACPI tables for AARCH64. [Laszlo]
> > - Various modifications (error handling, patch organization,
> >   coding style, etc). [Laszlo]
> >
> > The changes can be seen at: 
> > https://github.com/PierreARM/edk2/tree/1456_Add_ACPI_support_for_Kvmtool_v2
> >
> > Kvmtool dynamically generates a device tree describing the platform
> > to boot on. Using the patch-sets listed below, the DynamicTables
> > framework generates ACPI tables describing a similar platform.
> >
> > This patch-set:
> >  - adds a ConfigurationManager and make use of the DynamicTablesPkg
> >in for Kvmtool for AARCH64, allowing to generate ACPI tables
> >  - adds the acpiview command line utility to the ArmVirtPkg
> >platform that request if via the ACPIVIEW_ENABLE macro
> >  - update ArmVirtPkg.ci.yaml to add new words and use the
> >DynamicTablesPkg
> >  - adds a print specifier macro for the CM_OBJECT_ID type
> >
> > With this patchset, KvmTool on AARCH64 will use ACPI tables instead
> > of a Device Tree (cf PcdForceNoAcpi Pcd).
> >
>
> How did you test this? Can we boot Linux in ACPI mode with these changes?
>

I managed to run this with a recent kvmtool and a recent kernel
(v5.15+), which recognizes DBG2 serial port type 18.

I do see some errors in the log, though:

[4.590652] No ACPI PMU IRQ for CPUn

(for each CPU)

and

ACPI: IORT: [Firmware Bug]: Root complex missing memory address limit
ACPI: \_SB_.PCI0.LNKA: _CRS 36 not found in _PRS
ACPI: \_SB_.PCI0.LNKA: No IRQ available. Try pci=noacpi or acpi=off

(for each virtio-pci device)


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85615): https://edk2.groups.io/g/devel/message/85615
Mute This Topic: https://groups.io/mt/88352397/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 0/6] Add ACPI support for Kvmtool

2022-01-12 Thread Ard Biesheuvel
On Tue, 11 Jan 2022 at 17:16,  wrote:
>
> From: Pierre Gondois 
>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3742
> V1: https://edk2.groups.io/g/devel/message/76990
> V2:
> - New patch: "DynamicTablesPkg: Print specifier macro for
>   CM_OBJECT_ID" [Laszlo]
> - Only add AcpiView for ArmVirtKvmTool instead of all ArmVirt
>   platforms. This is done using a 'ACPIVIEW_ENABLE' switch.
>   [Laszlo]
> - Only generate ACPI tables for AARCH64. [Laszlo]
> - Various modifications (error handling, patch organization,
>   coding style, etc). [Laszlo]
>
> The changes can be seen at: 
> https://github.com/PierreARM/edk2/tree/1456_Add_ACPI_support_for_Kvmtool_v2
>
> Kvmtool dynamically generates a device tree describing the platform
> to boot on. Using the patch-sets listed below, the DynamicTables
> framework generates ACPI tables describing a similar platform.
>
> This patch-set:
>  - adds a ConfigurationManager and make use of the DynamicTablesPkg
>in for Kvmtool for AARCH64, allowing to generate ACPI tables
>  - adds the acpiview command line utility to the ArmVirtPkg
>platform that request if via the ACPIVIEW_ENABLE macro
>  - update ArmVirtPkg.ci.yaml to add new words and use the
>DynamicTablesPkg
>  - adds a print specifier macro for the CM_OBJECT_ID type
>
> With this patchset, KvmTool on AARCH64 will use ACPI tables instead
> of a Device Tree (cf PcdForceNoAcpi Pcd).
>

How did you test this? Can we boot Linux in ACPI mode with these changes?


> Pierre Gondois (2):
>   DynamicTablesPkg: Print specifier macro for CM_OBJECT_ID
>   ArmVirtPkg: Add cspell exceptions
>
> Sami Mujawar (4):
>   ArmVirtPkg/Kvmtool: Add DSDT ACPI table
>   ArmVirtPkg/Kvmtool: Add Configuration Manager
>   ArmVirtPkg/Kvmtool: Enable ACPI support
>   ArmVirtPkg/Kvmtool: Enable Acpiview
>
>  ArmVirtPkg/ArmVirt.dsc.inc|5 +-
>  ArmVirtPkg/ArmVirtKvmTool.dsc |   22 +-
>  ArmVirtPkg/ArmVirtKvmTool.fdf |   15 +-
>  ArmVirtPkg/ArmVirtPkg.ci.yaml |6 +-
>  .../KvmtoolCfgMgrDxe/AslTables/Dsdt.asl   |   21 +
>  .../KvmtoolCfgMgrDxe/ConfigurationManager.c   | 1061 +
>  .../KvmtoolCfgMgrDxe/ConfigurationManager.h   |  120 ++
>  .../ConfigurationManagerDxe.inf   |   54 +
>  .../Include/ConfigurationManagerObject.h  |7 +-
>  9 files changed, 1303 insertions(+), 8 deletions(-)
>  create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/AslTables/Dsdt.asl
>  create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.c
>  create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.h
>  create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManagerDxe.inf
>
> --
> 2.25.1


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




Re: [edk2-devel] [edk2-platform PATCH v1] Silicon/Marvell/Armada7k8k: Fix wrong SMBIOS version issue

2022-01-12 Thread Ard Biesheuvel
On Wed, 12 Jan 2022 at 00:00, Marcin Wojtas  wrote:
>
> wt., 11 sty 2022 o 22:46 Sunny Wang  napisał(a):
> >
> > The SMBIOS data is based on v3.3.0, but its version is set to v3.2.0.
> > Since PcdSmbiosVersion in MdeModulePkg.dec is v3.3.0, so just remove
> > the platform overridden value in .dsc file to fix this issue.
> >
> > This also fixed the FWTS failure below:
> >  dmicheck: Type 17 expects length of 0x54, has incorrect length of 0x5c
> >
> > Cc: Leif Lindholm 
> > Cc: Ard Biesheuvel 
> > Cc: Marcin Wojtas 
> > Cc: Samer El-Haj-Mahmoud 
> >
> > Signed-off-by: Sunny Wang 
> > ---
> >  Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc 
> > b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
> > index 3b76acd99c..5e15378207 100644
> > --- a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
> > +++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
> > @@ -1,5 +1,5 @@
> >  #
> > -#Copyright (c) 2011-2012, ARM Limited. All rights reserved.
> > +#Copyright (c) 2011-2022, ARM Limited. All rights reserved.
> >  #Copyright (C) 2016 Marvell International Ltd.
> >  #
> >  #SPDX-License-Identifier: BSD-2-Clause-Patent
> > @@ -387,7 +387,6 @@
> ># SMBIOS/DMI
> >gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
> >gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosEntryPointProvideMethod|0x2
> > -  gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0302
> >gMarvellTokenSpaceGuid.PcdFirmwareVersion|"EDK2 SH 1.1"
> >
>
>
> Reviewed-by: Marcin Wojtas 
>

Pushed as d5ead8b73d62..60bb320b9e47

But in the future, please omit the copyright banner updates if you are
not making changes that establish copyright on the code (and I don't
see how that could be the case when you are deleting a single line)


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




[edk2-devel] [PATCH] MdeModulePkg/HiiDatabaseDxe: Add Support for authenticated variable

2022-01-12 Thread Long1 Huang
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3796

Database.c:
1. Replace PcdGetExPtr with PcdGetExPtr.
2. Add FindAuthVariableData function to parse authenticated variable 
type for getting a correct default value in PcdNvStoreDefaultValueBuffer.

Signed-off-by: Huang Long 

Cc: Bob Feng 
Cc: Liming Gao 
Cc: Dandan Bi 
Cc: Lin Z Chen 
Cc: Zhuangzhi Li 
---
 .../Universal/HiiDatabaseDxe/Database.c   | 130 ++
 .../HiiDatabaseDxe/HiiDatabaseDxe.inf |   3 +
 2 files changed, 105 insertions(+), 28 deletions(-)

diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c 
b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
index 0b09c24d52..c7a92d6aed 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
@@ -603,6 +603,45 @@ FindVariableData (
   return NULL;
 }
 
+/**
+  Find the matched authenticated variable from the input variable storage.
+
+  @param[in] VariableStorage Point to the variable storage header.
+  @param[in] VarGuid A unique identifier for the variable.
+  @param[in] VarAttributeThe attributes bitmask for the variable.
+  @param[in] VarName A Null-terminated ascii string that is the name 
of the variable.
+
+  @return Pointer to the matched variable header or NULL if not found.
+**/
+AUTHENTICATED_VARIABLE_HEADER *
+FindAuthVariableData (
+  IN  VARIABLE_STORE_HEADER  *VariableStorage,
+  IN  EFI_GUID   *VarGuid,
+  IN  UINT32 VarAttribute,
+  IN  CHAR16 *VarName
+  )
+{
+  AUTHENTICATED_VARIABLE_HEADER  *AuthVariableHeader;
+  AUTHENTICATED_VARIABLE_HEADER  *AuthVariableEnd;
+
+  AuthVariableEnd= (AUTHENTICATED_VARIABLE_HEADER *)((UINT8 
*)VariableStorage + VariableStorage->Size);
+  AuthVariableHeader = (AUTHENTICATED_VARIABLE_HEADER *)(VariableStorage + 1);
+  AuthVariableHeader = (AUTHENTICATED_VARIABLE_HEADER *)HEADER_ALIGN 
(AuthVariableHeader);
+  while (AuthVariableHeader < AuthVariableEnd) {
+if (CompareGuid (>VendorGuid, VarGuid) &&
+(AuthVariableHeader->Attributes == VarAttribute) &&
+(StrCmp (VarName, (CHAR16 *)(AuthVariableHeader + 1)) == 0))
+{
+  return AuthVariableHeader;
+}
+
+AuthVariableHeader = (AUTHENTICATED_VARIABLE_HEADER *)((UINT8 
*)AuthVariableHeader + sizeof (AUTHENTICATED_VARIABLE_HEADER) + 
AuthVariableHeader->NameSize + AuthVariableHeader->DataSize);
+AuthVariableHeader = (AUTHENTICATED_VARIABLE_HEADER *)HEADER_ALIGN 
(AuthVariableHeader);
+  }
+
+  return NULL;
+}
+
 /**
   Find question default value from PcdNvStoreDefaultValueBuffer
 
@@ -626,25 +665,29 @@ FindQuestionDefaultSetting (
   IN  BOOLEAN  BitFieldQuestion
   )
 {
-  VARIABLE_HEADER  *VariableHeader;
-  VARIABLE_STORE_HEADER*VariableStorage;
-  LIST_ENTRY   *Link;
-  VARSTORAGE_DEFAULT_DATA  *Entry;
-  VARIABLE_STORE_HEADER*NvStoreBuffer;
-  UINT8*DataBuffer;
-  UINT8*BufferEnd;
-  BOOLEAN  IsFound;
-  UINTNIndex;
-  UINT32   BufferValue;
-  UINT32   BitFieldVal;
-  UINTNBitOffset;
-  UINTNByteOffset;
-  UINTNBitWidth;
-  UINTNStartBit;
-  UINTNEndBit;
-  PCD_DEFAULT_DATA *DataHeader;
-  PCD_DEFAULT_INFO *DefaultInfo;
-  PCD_DATA_DELTA   *DeltaData;
+  VARIABLE_HEADER   *VariableHeader;
+  AUTHENTICATED_VARIABLE_HEADER *AuthVariableHeader;
+  VARIABLE_STORE_HEADER *VariableStorage;
+  LIST_ENTRY*Link;
+  VARSTORAGE_DEFAULT_DATA   *Entry;
+  VARIABLE_STORE_HEADER *NvStoreBuffer;
+  VOID  *ValueSource;
+  VOID  *BitValueSource;
+  UINT8 *DataBuffer;
+  UINT8 *BufferEnd;
+  BOOLEAN   AuthFormat;
+  BOOLEAN   IsFound;
+  UINTN Index;
+  UINT32BufferValue;
+  UINT32BitFieldVal;
+  UINTN BitOffset;
+  UINTN ByteOffset;
+  UINTN BitWidth;
+  UINTN StartBit;
+  UINTN EndBit;
+  PCD_DEFAULT_DATA  *DataHeader;
+  PCD_DEFAULT_INFO  *DefaultInfo;
+  PCD_DATA_DELTA*DeltaData;
 
   if (gSkuId == 0x) {
 gSkuId = LibPcdGetSku ();
@@ -666,7 +709,7 @@ FindQuestionDefaultSetting (
   }
 
   if (Link == ) {
-DataBuffer  = (UINT8 *)PcdGetPtr (PcdNvStoreDefaultValueBuffer);
+DataBuffer  = (UINT8 *)PcdGetExPtr 
(, PcdNvStoreDefaultValueBuffer);
 gNvDefaultStoreSize =