Re: [edk2-devel] [PATCH v6 0/3] IntelFsp2Pkg: Fsp T new ARCH UPD Support

2024-04-05 Thread Chiu, Chasel


Thanks for taking all the feedbacks and update patches.
For the patch series: Reviewed-by: Chasel Chiu 


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of cbduggap
> Sent: Friday, April 5, 2024 10:06 AM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH v6 0/3] IntelFsp2Pkg: Fsp T new ARCH UPD Support
> 
> This Patch will add changes to support FSP T new ARCH UPD and Fix Bug in
> IntelFsp2WrapperPkg
> 
> cbduggap (3):
>   IntelFsp2Pkg: Fsp T new ARCH UPD Support
>   IntelFsp2WrapperPkg: Fsp T new ARCH UPD Support
>   IntelFsp2WrapperPkg: Fix UPD structure Reserved bytes
> 
>  IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf |  1 +
>  IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf   |  1 +
>  .../FspSecCore/Ia32/Fsp24ApiEntryM.nasm   |  1 -
>  .../FspSecCore/Ia32/FspApiEntryM.nasm |  1 -
>  .../FspSecCore/Ia32/FspApiEntryT.nasm | 60 +---
>  .../FspSecCore/Ia32/SaveRestoreSseNasm.inc| 11 +++
>  IntelFsp2Pkg/FspSecCore/SecFsp.c  |  9 +++
>  IntelFsp2Pkg/FspSecCore/SecFsp.h  |  1 +
>  IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm | 68 +++
>  IntelFsp2Pkg/Include/FspEas/FspApi.h  | 12 +++-
>  IntelFsp2Pkg/Include/Library/FspPlatformLib.h | 13 
>  .../Include/SaveRestoreSseAvxNasm.inc | 21 ++
>  .../BaseFspPlatformLib/FspPlatformMemory.c| 38 +++
>  .../SecRamInitData.c  | 12 ++--
>  14 files changed, 219 insertions(+), 30 deletions(-)
> 
> --
> 2.39.1.windows.1
> 
> 
> 
> 
> 



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




Re: [edk2-devel] [PATCH v5] IntelFsp2Pkg: Fsp T new ARCH UPD Support

2024-04-03 Thread Chiu, Chasel


Hi Chinni,

Thanks for working on this, please see my feedbacks below inline.

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of cbduggap
> Sent: Thursday, March 21, 2024 10:02 PM
> To: devel@edk2.groups.io
> Cc: Chaganty, Rangasai V ; Desimone, Nathaniel
> L ; Chiu, Chasel ;
> Duggapu, Chinni B 
> Subject: [edk2-devel] [PATCH v5] IntelFsp2Pkg: Fsp T new ARCH UPD Support
> 
> Changes to support spec changes
> 
> 1. Remove usage of Pcd.
> 2. Change code to validate the Temporary Ram size input.
> 3. Consume the input saved in YMM Register
> 
> Cc: Sai Chaganty 
> Cc: Nate DeSimone 
> Cc: Chiu Chasel 
> Cc: Duggapu Chinni B 
> 
> 
> Signed-off-by: Duggapu Chinni B 
> ---
>  IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf |  1 +
>  IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf   |  1 +
>  .../FspSecCore/Ia32/Fsp24ApiEntryM.nasm   |  1 -
>  .../FspSecCore/Ia32/FspApiEntryM.nasm |  1 -
>  .../FspSecCore/Ia32/FspApiEntryT.nasm | 62 ++---
>  .../FspSecCore/Ia32/SaveRestoreSseNasm.inc| 11 +++
>  IntelFsp2Pkg/FspSecCore/SecFsp.c  |  9 +++
>  IntelFsp2Pkg/FspSecCore/SecFsp.h  |  1 +
>  IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm | 69 +++
>  IntelFsp2Pkg/Include/FspEas/FspApi.h  |  5 +-
>  IntelFsp2Pkg/Include/Library/FspPlatformLib.h | 13 
>  .../Include/SaveRestoreSseAvxNasm.inc | 21 ++
>  .../BaseFspPlatformLib/FspPlatformMemory.c| 38 ++
>  .../SecRamInitData.c  |  3 +-
>  14 files changed, 209 insertions(+), 27 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf
> b/IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf
> index cb011f99f9..8cb0e6411f 100644
> --- a/IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf
> +++ b/IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf
> @@ -60,6 +60,7 @@
>FspSecPlatformLib   CpuLib   FspMultiPhaseLib+  FspPlatformLib  [Pcd]
> gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase  ## CONSUMESdiff
> --git a/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> b/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> index 8029832235..ef19c6ae78 100644
> --- a/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> +++ b/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> @@ -59,6 +59,7 @@
>FspCommonLib   FspSecPlatformLib   CpuLib+  FspPlatformLib  [Pcd]
> gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase  ## CONSUMESdiff
> --git a/IntelFsp2Pkg/FspSecCore/Ia32/Fsp24ApiEntryM.nasm
> b/IntelFsp2Pkg/FspSecCore/Ia32/Fsp24ApiEntryM.nasm
> index 15f8ecea83..5fa5c03569 100644
> --- a/IntelFsp2Pkg/FspSecCore/Ia32/Fsp24ApiEntryM.nasm
> +++ b/IntelFsp2Pkg/FspSecCore/Ia32/Fsp24ApiEntryM.nasm
> @@ -11,7 +11,6 @@
>  ; Following are fixed PCDs ; extern
> ASM_PFX(PcdGet32(PcdTemporaryRamBase))-extern
> ASM_PFX(PcdGet32(PcdTemporaryRamSize)) extern
> ASM_PFX(PcdGet32(PcdFspTemporaryRamSize)) extern   ASM_PFX(PcdGet8
> (PcdFspHeapSizePercentage)) diff --git
> a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryM.nasm
> b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryM.nasm
> index 61ab4612a3..861cce4d01 100644
> --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryM.nasm
> +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryM.nasm
> @@ -11,7 +11,6 @@
>  ; Following are fixed PCDs ; extern
> ASM_PFX(PcdGet32(PcdTemporaryRamBase))-extern
> ASM_PFX(PcdGet32(PcdTemporaryRamSize)) extern
> ASM_PFX(PcdGet32(PcdFspTemporaryRamSize)) extern   ASM_PFX(PcdGet8
> (PcdFspHeapSizePercentage)) diff --git
> a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
> b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
> index 900126b93b..f72da0d5a9 100644
> --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
> +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
> @@ -109,7 +109,8 @@ struc LoadMicrocodeParamsFsp24
>  .FsptArchReserved:resb3 .FsptArchLength:  resd
> 1 .FspDebugHandler  resq1-.FsptArchUpd: resd
> 4+.FspTemporaryRamSize: resd1  ; Supported only if ArchRevison is 
> >=
> 3+.FsptArchUpd: resd3 ; } ; FSPT_CORE_UPD
> { .MicrocodeCodeAddr:   resq1@@ -267,7 +268,7 @@
> ASM_PFX(LoadMicrocodeDefault):
> cmpbyte [esp + LoadMicrocodeParamsFsp22.FspUpdHeaderRevision], 2jb
> Fsp20UpdHeadercmpbyte [esp +
> LoadMicrocodeParamsFsp22.FsptArchRevision], 2-   je Fsp24UpdHeader+   jae
> Fsp24UpdHeaderjmpFsp22UpdHeader  Fsp20UpdHeader:@@ -405,7 +406,7
> @@ CheckAddress:
> cmp   byte [esp + LoadMicrocodeParamsFsp22.FspUpdHeaderRevision], 2jb
> Fsp20UpdHeader1cmpbyte [esp +
> LoadMicrocodeParamsFsp22.FsptArchRevision], 2-   je Fsp24UpdHeader1;+
> jaeFsp24Upd

Re: [edk2-devel] [edk2-platforms V2 3/3] MinPlatformPkg: Sort ApicIdOrderTable by special rules

2024-04-02 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Tan, Dun 
> Sent: Sunday, March 31, 2024 11:04 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray ; Lou, Yun ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Liming Gao ;
> Dong, Eric 
> Subject: [edk2-platforms V2 3/3] MinPlatformPkg: Sort ApicIdOrderTable by
> special rules
> 
> Sort ApicIdOrderTable by following special rules:
> 1. Make sure BSP is the first entry.
> 2. For APs, big core first, then small core.
> 
> With this implementation, BIOS can present cores in order of relative
> performance in MADT. Linux OS would schedule cores by the order that they are
> presented in the MADT LocalX2ApicStruct entries.Then Linux OS would think of
> this as relative performance order. This implementation can benefit the linux 
> os
> usage case.
> 
> Signed-off-by: Dun Tan 
> Cc: Ray Ni 
> Cc: Jason Lou 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 63
> +++
>  1 file changed, 63 insertions(+)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> index 1fa70e3df9..389df48824 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> @@ -132,6 +132,62 @@ AppendCpuMapTableEntry (
> 
>  }
> 
> +/**
> +  Sort CpuApicIdOrderTable based on the following rules:
> +  1.Make sure BSP is the first entry.
> +  2.Big core first, then small core.
> +
> +  @param[in] CpuApicIdOrderTable  Pointer to EFI_CPU_ID_ORDER_MAP
> +  @param[in] CountNumber to EFI_CPU_ID_ORDER_MAP
> +  @param[in] BspIndex BSP index
> +**/
> +VOID
> +SortApicIdOrderTable (
> +  IN  EFI_CPU_ID_ORDER_MAP  *CpuApicIdOrderTable,
> +  IN  UINTN Count,
> +  IN  UINTN BspIndex
> +  )
> +{
> +  UINTN Index;
> +  UINTN SubIndex;
> +  EFI_CPU_ID_ORDER_MAP  SortBuffer;
> +
> +  //
> +  // Put BSP at the first entry.
> +  //
> +  if (BspIndex != 0) {
> +CopyMem (, [BspIndex], sizeof
> (EFI_CPU_ID_ORDER_MAP));
> +CopyMem ([1], CpuApicIdOrderTable, (BspIndex) *
> sizeof (EFI_CPU_ID_ORDER_MAP));
> +CopyMem (CpuApicIdOrderTable, , sizeof
> + (EFI_CPU_ID_ORDER_MAP));  }
> +
> +  //
> +  // If there are more than 2 cores, perform insertion sort for rest
> + cores except the bsp in first entry  // to move big cores in front of small 
> cores.
> +  // Also the original order based on the MpService index inside big cores 
> and
> small cores are retained.
> +  //
> +  for (Index = 2; Index < Count; Index++) {
> +if (CpuApicIdOrderTable[Index].CoreType ==
> CPUID_CORE_TYPE_INTEL_ATOM) {
> +  continue;
> +}
> +
> +CopyMem (, [Index], sizeof
> + (EFI_CPU_ID_ORDER_MAP));
> +
> +for (SubIndex = Index - 1; SubIndex >= 1; SubIndex--) {
> +  if (CpuApicIdOrderTable[SubIndex].CoreType ==
> CPUID_CORE_TYPE_INTEL_ATOM) {
> +CopyMem ([SubIndex + 1],
> [SubIndex], sizeof (EFI_CPU_ID_ORDER_MAP));
> +  } else {
> +//
> +// Except the BSP, all cores in front of SubIndex must be big cores.
> +//
> +break;
> +  }
> +}
> +
> +CopyMem ([SubIndex + 1], , sizeof
> +(EFI_CPU_ID_ORDER_MAP));
> +  }
> +}
> +
>  /**
>Get CPU core type.
> 
> @@ -174,6 +230,7 @@ CreateCpuLocalApicInTable (
>EFI_CPU_ID_ORDER_MAP  *CpuIdMapPtr;
>UINT32Socket;
>UINT32CpuidMaxInput;
> +  UINTN BspIndex;
> 
>Status = EFI_SUCCESS;
> 
> @@ -198,6 +255,10 @@ CreateCpuLocalApicInTable (
> 
> );
> 
> +if ((ProcessorInfoBuffer.StatusFlag & PROCESSOR_AS_BSP_BIT) != 0) {
> +  BspIndex = Index;
> +}
> +
>  CpuIdMapPtr = (EFI_CPU_ID_ORDER_MAP *) [Index];
>  if ((ProcessorInfoBuffer.StatusFlag & PROCESSOR_ENABLED_BIT) != 0) {
>CpuIdMapPtr->ApicId  = (UINT32)ProcessorInfoBuffer.ProcessorId;
> @@ -230,6 +291,8 @@ CreateCpuLocalApicInTable (
>  }
>}
> 
> +  SortApicIdOrderTable (CpuApicIdOrderTable, mNumberOfCpus, BspIndex);
> +
>DEBUG ((DEBUG_INFO, "::ACPI::  APIC ID Order Table Init.   mNumOfBitShift =
> %x\n", mNumOfBitShift));
>DebugDisplayReOrderTable (CpuApicIdOrderTable);
> 
> --
> 2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117329): https://edk2.groups.io/g/devel/message/117329
Mute This Topic: https://groups.io/mt/105259125/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 V2 2/3] MinPlatformPkg: Get CoreType for all cores

2024-04-02 Thread Chiu, Chasel
Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Tan, Dun 
> Sent: Sunday, March 31, 2024 11:04 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray ; Lou, Yun ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Liming Gao ;
> Dong, Eric 
> Subject: [edk2-platforms V2 2/3] MinPlatformPkg: Get CoreType for all cores
> 
> Add a new field CoreType in EFI_CPU_ID_ORDER_MAP and get CoreType for all
> cores.
> 
> Signed-off-by: Dun Tan 
> Cc: Ray Ni 
> Cc: Jason Lou 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 50
> ++
>  1 file changed, 46 insertions(+), 4 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> index 62a7da290a..1fa70e3df9 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> @@ -18,6 +18,7 @@ typedef struct {
>UINT32   Flags;
>UINT32   SocketNum;
>UINT32   Thread;
> +  UINT8CoreType;
>  } EFI_CPU_ID_ORDER_MAP;
> 
>  //
> @@ -71,15 +72,16 @@ DebugDisplayReOrderTable (  {
>UINT32 Index;
> 
> -  DEBUG ((DEBUG_INFO, "Index  AcpiProcId  ApicId   Thread  Flags   Skt\n"));
> +  DEBUG ((DEBUG_INFO, "Index  AcpiProcId  ApicId   Thread  Flags   Skt
> CoreType\n"));
>for (Index = 0; Index < mNumberOfCpus; Index++) {
> -DEBUG ((DEBUG_INFO, " %02d   0x%02X  0x%02X   %d  %d 
>  %d\n",
> +DEBUG ((DEBUG_INFO, " %02d   0x%02X  0x%02X   %d  %d 
>  %d
> 0x%x\n",
> Index,
> CpuApicIdOrderTable[Index].AcpiProcessorUid,
> CpuApicIdOrderTable[Index].ApicId,
> CpuApicIdOrderTable[Index].Thread,
> CpuApicIdOrderTable[Index].Flags,
> -   CpuApicIdOrderTable[Index].SocketNum));
> +   CpuApicIdOrderTable[Index].SocketNum,
> +   CpuApicIdOrderTable[Index].CoreType));
>}
>  }
> 
> @@ -130,6 +132,31 @@ AppendCpuMapTableEntry (
> 
>  }
> 
> +/**
> +  Get CPU core type.
> +
> +  @param[in] CpuApicIdOrderTable Point to a buffer which will be 
> filled in
> Core type information.
> +**/
> +VOID
> +EFIAPI
> +CollectCpuCoreType (
> +  IN EFI_CPU_ID_ORDER_MAP  *CpuApicIdOrderTable
> +  )
> +{
> +  UINTNApNumber;
> +  EFI_STATUS   Status;
> +  CPUID_NATIVE_MODEL_ID_AND_CORE_TYPE_EAX
> NativeModelIdAndCoreTypeEax;
> +
> +  Status = mMpService->WhoAmI (
> + mMpService,
> + 
> + );
> +  ASSERT_EFI_ERROR (Status);
> +
> +  AsmCpuidEx (CPUID_HYBRID_INFORMATION,
> +CPUID_HYBRID_INFORMATION_MAIN_LEAF,
> +, NULL, NULL, NULL);
> +  CpuApicIdOrderTable[ApNumber].CoreType =
> +(UINT8)NativeModelIdAndCoreTypeEax.Bits.CoreType;
> +}
> +
>  /**
>Collect all processors information and create a Cpu Apic Id table.
> 
> @@ -146,8 +173,23 @@ CreateCpuLocalApicInTable (
>UINT32CurrProcessor;
>EFI_CPU_ID_ORDER_MAP  *CpuIdMapPtr;
>UINT32Socket;
> +  UINT32CpuidMaxInput;
> 
> -  Status = EFI_SUCCESS;
> +  Status = EFI_SUCCESS;
> +
> +  AsmCpuid (CPUID_SIGNATURE, , NULL, NULL, NULL);  if
> + (CpuidMaxInput >= CPUID_HYBRID_INFORMATION) {
> +CollectCpuCoreType (CpuApicIdOrderTable);
> +mMpService->StartupAllAPs (
> +  mMpService,   // This
> +  (EFI_AP_PROCEDURE) CollectCpuCoreType,// Procedure
> +  TRUE, // SingleThread
> +  NULL, // WaitEvent
> +  0,// 
> TimeoutInMicrosecsond
> +  CpuApicIdOrderTable,  // 
> ProcedureArgument
> +  NULL  // FailedCpuList
> +  );
> +  }
> 
>for (CurrProcessor = 0, Index = 0; CurrProcessor < mNumberOfCpus;
> CurrProcessor++, Index++) {
>  Status = mMpService->GetProcessorInfo (
> --
> 2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117328): https://edk2.groups.io/g/devel/message/117328
Mute This Topic: https://groups.io/mt/105259124/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 V2 1/3] MinPlatformPkg: Remove the global variable mForceX2ApicId

2024-04-02 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Tan, Dun 
> Sent: Sunday, March 31, 2024 11:04 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray ; Lou, Yun ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Liming Gao ;
> Dong, Eric 
> Subject: [edk2-platforms V2 1/3] MinPlatformPkg: Remove the global variable
> mForceX2ApicId
> 
> This global variable mForceX2ApicId is not assigned to any value in code and 
> will
> be initialized to 0 when the driver is loaded. So remove the global variable 
> and
> related code that will not be executed.
> 
> Signed-off-by: Dun Tan 
> Cc: Ray Ni 
> Cc: Jason Lou 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 10 --
>  1 file changed, 10 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> index 2a833ec99c..62a7da290a 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> @@ -53,7 +53,6 @@ VOID  *mLocalTable[] = {
>  EFI_ACPI_TABLE_PROTOCOL *mAcpiTable;
> 
>  UINT32  mNumOfBitShift = 6;
> -BOOLEAN mForceX2ApicId;
>  BOOLEAN mX2ApicEnabled;
> 
>  EFI_MP_SERVICES_PROTOCOL*mMpService;
> @@ -163,14 +162,6 @@ CreateCpuLocalApicInTable (
>CpuIdMapPtr->Thread  = ProcessorInfoBuffer.Location.Thread;
>CpuIdMapPtr->Flags   = ((ProcessorInfoBuffer.StatusFlag &
> PROCESSOR_ENABLED_BIT) != 0);
>CpuIdMapPtr->SocketNum = ProcessorInfoBuffer.Location.Package;
> -
> -  //update processorbitMask
> -  if (CpuIdMapPtr->Flags == 1) {
> -if (mForceX2ApicId) {
> -  CpuIdMapPtr->SocketNum&= 0x7;
> -  CpuIdMapPtr->AcpiProcessorUid &= 0xFF; //keep lower 8bit due to use
> Proc obj in dsdt
> -}
> -  }
>  } else {  //not enabled
>CpuIdMapPtr->ApicId = (UINT32)-1;
>CpuIdMapPtr->Thread = (UINT32)-1;
> @@ -1537,7 +1528,6 @@ InstallAcpiPlatform (
>}
> 
>DEBUG ((DEBUG_INFO, "mX2ApicEnabled - 0x%x\n", mX2ApicEnabled));
> -  DEBUG ((DEBUG_INFO, "mForceX2ApicId - 0x%x\n", mForceX2ApicId));
> 
>// support up to 64 threads/socket
>AsmCpuidEx (CPUID_EXTENDED_TOPOLOGY, 1, , NULL, NULL,
> NULL);
> --
> 2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117327): https://edk2.groups.io/g/devel/message/117327
Mute This Topic: https://groups.io/mt/105259123/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 V2] MinPlatformPkg: Corret AcpiProcessorUid in MADT

2024-04-02 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Tan, Dun 
> Sent: Sunday, March 31, 2024 11:00 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray ; Lou, Yun ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Liming Gao ;
> Dong, Eric 
> Subject: [edk2-platforms V2] MinPlatformPkg: Corret AcpiProcessorUid in MADT
> 
> Change AcpiProcessorUid in CpuApicIdOrderTable to the index in MpService
> regardless of disabled core.
> 
> Let's take a simple example:
> There are 2 enabled cores and 1 disabled core.
>   APICID   Index in MpService
> 0x_0
> 0x_0010(disbaled)  1
> 0x_00402
> 
> With current implementation, the results of the x2apic structure entries in 
> MADT
> are:
> MADT Entry  APICID AcpiProcessorUid
> 0 0x_  0
> 1 0x_0040  1
> 
> The AcpiProcessorUid will be associated with the processor device defined in
> DSDT/SSDT. To make sure the x2apic structure entries in MADT can be mapped to
> the right processor devices in DSDT, the AcpiProcessorUid of the second x2apic
> structure entry in MADT should be kept as 2, which is the core index in
> MpService.
> 
> Signed-off-by: Dun Tan 
> Cc: Ray Ni 
> Cc: Jason Lou 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> index 2a833ec99c..f6ea7454d3 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> @@ -190,7 +190,7 @@ CreateCpuLocalApicInTable (
>//
>for (Socket = 0; Socket < FixedPcdGet32 (PcdMaxCpuSocketCount); Socket++) {
>  for (CurrProcessor = 0, Index = 0; CurrProcessor < mNumberOfCpus;
> CurrProcessor++) {
> -  if (CpuApicIdOrderTable[CurrProcessor].Flags &&
> (CpuApicIdOrderTable[CurrProcessor].SocketNum == Socket)) {
> +  if (CpuApicIdOrderTable[CurrProcessor].SocketNum == Socket) {
>  CpuApicIdOrderTable[CurrProcessor].AcpiProcessorUid =
> (CpuApicIdOrderTable[CurrProcessor].SocketNum << mNumOfBitShift) + Index;
>  Index++;
>}
> --
> 2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117326): https://edk2.groups.io/g/devel/message/117326
Mute This Topic: https://groups.io/mt/105259071/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 v2] MinPlatformPkg: Add missed call to FreePool

2024-04-01 Thread Chiu, Chasel


Patch pushed:
https://github.com/tianocore/edk2-platforms/commit/ce4b8e394077f7f10ace2c6e96767f676c000355

Thanks,
Chasel


> -Original Message-
> From: Pabba, PhanindraX Babu 
> Sent: Wednesday, March 27, 2024 2:27 PM
> To: devel@edk2.groups.io
> Cc: Pabba, PhanindraX Babu ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Liming Gao ;
> Dong, Eric 
> Subject: [edk2-platforms: PATCH v2] MinPlatformPkg: Add missed call to 
> FreePool
> 
> From: PhanindraX Babu Pabba 
> 
> Adding missed out call to FreePool API to free the allocated memory.
> 
> Signed-off-by: PhanindraX Babu Pabba 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 5 +++--
>  Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c | 1 +
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> index 2a833ec9..9a91d131 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> @@ -975,7 +975,7 @@ InstallMcfgFromScratch (
>   FixedPcdGet32 (PcdAcpiDefaultOemRevision)
>   );
>if (EFI_ERROR (Status)) {
> -return Status;
> +goto Done;
>}
> 
>//
> @@ -1002,7 +1002,8 @@ InstallMcfgFromScratch (
>   McfgTable->Header.Length,
>   
>   );
> -
> +Done:
> +  FreePool (McfgTable);
>return Status;
>  }
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
> b/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
> index 9bc22245..f5b1a71c 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
> @@ -195,6 +195,7 @@ PublishAcpiTablesFromFv (
>// Increment the instance
>//
>Instance++;
> +  FreePool (CurrentTable);
>CurrentTable = NULL;
>  }
>}
> --
> 2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117316): https://edk2.groups.io/g/devel/message/117316
Mute This Topic: https://groups.io/mt/105186400/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 v2] MinPlatformPkg: Add missed call to FreePool

2024-03-27 Thread Chiu, Chasel


Thanks Phanindra!
Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Pabba, PhanindraX Babu 
> Sent: Wednesday, March 27, 2024 2:27 PM
> To: devel@edk2.groups.io
> Cc: Pabba, PhanindraX Babu ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Liming Gao ;
> Dong, Eric 
> Subject: [edk2-platforms: PATCH v2] MinPlatformPkg: Add missed call to 
> FreePool
> 
> From: PhanindraX Babu Pabba 
> 
> Adding missed out call to FreePool API to free the allocated memory.
> 
> Signed-off-by: PhanindraX Babu Pabba 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 5 +++--
>  Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c | 1 +
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> index 2a833ec9..9a91d131 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> @@ -975,7 +975,7 @@ InstallMcfgFromScratch (
>   FixedPcdGet32 (PcdAcpiDefaultOemRevision)
>   );
>if (EFI_ERROR (Status)) {
> -return Status;
> +goto Done;
>}
> 
>//
> @@ -1002,7 +1002,8 @@ InstallMcfgFromScratch (
>   McfgTable->Header.Length,
>   
>   );
> -
> +Done:
> +  FreePool (McfgTable);
>return Status;
>  }
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
> b/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
> index 9bc22245..f5b1a71c 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
> @@ -195,6 +195,7 @@ PublishAcpiTablesFromFv (
>// Increment the instance
>//
>Instance++;
> +  FreePool (CurrentTable);
>CurrentTable = NULL;
>  }
>}
> --
> 2.39.1.windows.1



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




Re: [edk2-devel] [PATCH] IpmiFeaturePkg: Add missed call to FreePool

2024-03-25 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of
> phanindrax.babu.pa...@intel.com
> Sent: Thursday, February 22, 2024 10:52 PM
> To: devel@edk2.groups.io
> Cc: Pabba, PhanindraX Babu ; Desimone,
> Nathaniel L ; Liming Gao
> 
> Subject: [edk2-devel] [PATCH] IpmiFeaturePkg: Add missed call to FreePool
> 
> From: PhanindraX Babu Pabba 
> 
> Adding missed out call to FreePool API to free the allocated memory.
> 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Signed-off-by: PhanindraX Babu Pabba 
> ---
>  .../Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c   | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c
> index 990b4b9e..070a3452 100644
> ---
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c
> +++
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.
> +++ c
> @@ -250,6 +250,7 @@ BmcAcpiEntryPoint (
>// Increment the instance   //   Instance++;+  FreePool
> (CurrentTable); }   } --
> 2.39.1.windows.1
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#115876): https://edk2.groups.io/g/devel/message/115876
> Mute This Topic: https://groups.io/mt/104524860/1777047
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [chasel.c...@intel.com] -=-
> =-=-=-=-=
> 



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




Re: [edk2-devel] [PATCH v1] PurleyOpenBoardPkg/TiogaPass: Fix Build

2024-02-23 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel

> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Friday, February 9, 2024 2:48 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel 
> Subject: [PATCH v1] PurleyOpenBoardPkg/TiogaPass: Fix Build
> 
> Adds library instances for MM_Standalone, which are now required to build
> IpmiFeaturePkg.
> 
> Cc: Chasel Chiu 
> Signed-off-by: Nate DeSimone 
> ---
>  .../Intel/PurleyOpenBoardPkg/BoardTiogaPass/OpenBoardPkg.dsc  | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git
> a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/OpenBoardPkg.dsc
> b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/OpenBoardPkg.dsc
> index 64e8978942..7738120017 100644
> --- a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/OpenBoardPkg.dsc
> +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/OpenBoardPkg.dsc
> @@ -160,6 +160,8 @@
>  !else
> 
> BoardBdsHookLib|$(PLATFORM_BOARD_PACKAGE)/Override/Platform/Intel/Boa
> rdModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib.inf
>  !endif
> +
> +[LibraryClasses.common.DXE_DRIVER, LibraryClasses.common.UEFI_DRIVER]
>  !if gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable == TRUE
> 
> IpmiBaseLib|OutOfBandManagement/IpmiFeaturePkg/Library/IpmiBaseLib/Ipmi
> BaseLib.inf
>  !endif
> @@ -169,6 +171,8 @@
> 
> TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/Smm
> TestPointCheckLib.inf
>  !endif
> 
> TestPointLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointLib/SmmTestPointLib
> .inf
> +
> +[LibraryClasses.common.DXE_SMM_DRIVER,
> +LibraryClasses.common.MM_STANDALONE]
>  !if gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable == TRUE
> 
> IpmiBaseLib|OutOfBandManagement/IpmiFeaturePkg/Library/SmmIpmiBaseLib
> /SmmIpmiBaseLib.inf
>  !endif
> --
> 2.39.2.windows.1



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




Re: [edk2-devel] [PATCH] MinPlatformPkg/PhatAcpiLib: Add to CoreDxeLib dsc

2024-02-23 Thread Chiu, Chasel


Patch merged:
https://github.com/tianocore/edk2-platforms/commit/e19e5d583d204a2011cab42e7b669ed274d1a8fb

Thanks,
Chasel


> -Original Message-
> From: Clark-williams, Zachary 
> Sent: Tuesday, February 20, 2024 9:18 PM
> To: devel@edk2.groups.io
> Cc: Clark-williams, Zachary ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Liming Gao ;
> Dong, Eric 
> Subject: [PATCH] MinPlatformPkg/PhatAcpiLib: Add to CoreDxeLib dsc
> 
> From: Zachary Clark-Williams 
> 
> PhatAcpiLib update to match all file names to PhatAcpiLib and add the library 
> to
> CoreDxeLib for use.
> 
> Hsd-es-id: 22019504949
> 
> Change-Id: Ic184715a2b5ab117d464bad5cb251c674416e0dd
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Zachary Clark-Williams 
> ---
>  .../MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.inf  | 2 +-
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc| 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.inf
> b/Platform/Intel/MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.inf
> index d2e0d070f..7e238eb8d 100644
> --- 
> a/Platform/Intel/MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.inf
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpi
> +++ Lib.inf
> @@ -12,7 +12,7 @@
>FILE_GUID  = 3932BB84-ADFB-4C7A-BC59-E33FC7AD6E20
>VERSION_STRING = 1.0
>MODULE_TYPE= DXE_DRIVER
> -  LIBRARY_CLASS  = DxePhatAcpiLib|DXE_DRIVER
> +  LIBRARY_CLASS  = PhatAcpiLib|DXE_DRIVER
> 
>  [Sources]
>DxePhatAcpiLib.c
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> index b46993882..80cc12904 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> @@ -42,6 +42,7 @@
>  [LibraryClasses.common.DXE_CORE, LibraryClasses.common.DXE_DRIVER,
> LibraryClasses.common.DXE_RUNTIME_DRIVER,
> LibraryClasses.common.UEFI_DRIVER,
> LibraryClasses.common.UEFI_APPLICATION]
> 
> VariableReadLib|MinPlatformPkg/Library/DxeRuntimeVariableReadLib/DxeRunti
> meVariableReadLib.inf
> 
> VariableWriteLib|MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRunti
> meVariableWriteLib.inf
> +
> + PhatAcpiLib|MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.inf
> 
>  [LibraryClasses.common.DXE_DRIVER,
> LibraryClasses.common.DXE_RUNTIME_DRIVER,
> LibraryClasses.common.UEFI_DRIVER,
> LibraryClasses.common.UEFI_APPLICATION]
>  !if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE
> --
> 2.39.1.windows.1



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




Re: [edk2-devel] [PATCH] MinPlatformPkg/PhatAcpiLib: Add to CoreDxeLib dsc

2024-02-20 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Clark-williams, Zachary 
> Sent: Tuesday, February 20, 2024 9:18 PM
> To: devel@edk2.groups.io
> Cc: Clark-williams, Zachary ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Liming Gao ;
> Dong, Eric 
> Subject: [PATCH] MinPlatformPkg/PhatAcpiLib: Add to CoreDxeLib dsc
> 
> From: Zachary Clark-Williams 
> 
> PhatAcpiLib update to match all file names to PhatAcpiLib and add the library 
> to
> CoreDxeLib for use.
> 
> Hsd-es-id: 22019504949
> 
> Change-Id: Ic184715a2b5ab117d464bad5cb251c674416e0dd
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Zachary Clark-Williams 
> ---
>  .../MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.inf  | 2 +-
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc| 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.inf
> b/Platform/Intel/MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.inf
> index d2e0d070f..7e238eb8d 100644
> --- 
> a/Platform/Intel/MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.inf
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpi
> +++ Lib.inf
> @@ -12,7 +12,7 @@
>FILE_GUID  = 3932BB84-ADFB-4C7A-BC59-E33FC7AD6E20
>VERSION_STRING = 1.0
>MODULE_TYPE= DXE_DRIVER
> -  LIBRARY_CLASS  = DxePhatAcpiLib|DXE_DRIVER
> +  LIBRARY_CLASS  = PhatAcpiLib|DXE_DRIVER
> 
>  [Sources]
>DxePhatAcpiLib.c
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> index b46993882..80cc12904 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> @@ -42,6 +42,7 @@
>  [LibraryClasses.common.DXE_CORE, LibraryClasses.common.DXE_DRIVER,
> LibraryClasses.common.DXE_RUNTIME_DRIVER,
> LibraryClasses.common.UEFI_DRIVER,
> LibraryClasses.common.UEFI_APPLICATION]
> 
> VariableReadLib|MinPlatformPkg/Library/DxeRuntimeVariableReadLib/DxeRunti
> meVariableReadLib.inf
> 
> VariableWriteLib|MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRunti
> meVariableWriteLib.inf
> +
> + PhatAcpiLib|MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.inf
> 
>  [LibraryClasses.common.DXE_DRIVER,
> LibraryClasses.common.DXE_RUNTIME_DRIVER,
> LibraryClasses.common.UEFI_DRIVER,
> LibraryClasses.common.UEFI_APPLICATION]
>  !if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE
> --
> 2.39.1.windows.1



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




Re: [edk2-devel] [PATCH] MinPlatformPkg/DxePhatLib: Add to CoreCommon dsc

2024-02-20 Thread Chiu, Chasel


Hi Zack,

Usually we would like the LIBRARY_CLASS to be "phase agnostic" so we can share 
the same API cross different phase implementation.
Please see if we only need to update DxePhatAcpiLib.inf LIBRARY_CLASS and add 
INF to CoreCommon.dsc

Thanks,
Chasel



> -Original Message-
> From: Clark-williams, Zachary 
> Sent: Tuesday, February 20, 2024 1:42 PM
> To: devel@edk2.groups.io
> Cc: Clark-williams, Zachary ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Liming Gao ;
> Dong, Eric 
> Subject: [PATCH] MinPlatformPkg/DxePhatLib: Add to CoreCommon dsc
> 
> From: Zachary Clark-Williams 
> 
> PhatAcpiLib update to match all file names to DxePhatAcpiLib and add the 
> library
> to CoreCommonPkg for use.
> 
> Change-Id: I6e18ecf5acfdbc2053cf60b9a151b891e4e0fdfe
> Hsd-es-id: 22019504949
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Zachary Clark-Williams 
> ---
>  .../Library/{PhatAcpiLib => DxePhatAcpiLib}/DxePhatAcpiLib.c| 2 +-
>  .../Library/{PhatAcpiLib => DxePhatAcpiLib}/DxePhatAcpiLib.inf  | 0
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc | 1 +
>  .../Include/Library/{PhatAcpiLib.h => DxePhatAcpiLib.h} | 0
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec| 2 +-
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc| 2 +-
>  6 files changed, 4 insertions(+), 3 deletions(-)  rename
> Platform/Intel/MinPlatformPkg/Acpi/Library/{PhatAcpiLib =>
> DxePhatAcpiLib}/DxePhatAcpiLib.c (96%)  rename
> Platform/Intel/MinPlatformPkg/Acpi/Library/{PhatAcpiLib =>
> DxePhatAcpiLib}/DxePhatAcpiLib.inf (100%)  rename
> Platform/Intel/MinPlatformPkg/Include/Library/{PhatAcpiLib.h =>
> DxePhatAcpiLib.h} (100%)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.c
> b/Platform/Intel/MinPlatformPkg/Acpi/Library/DxePhatAcpiLib/DxePhatAcpiLib.c
> similarity index 96%
> rename from
> Platform/Intel/MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.c
> rename to
> Platform/Intel/MinPlatformPkg/Acpi/Library/DxePhatAcpiLib/DxePhatAcpiLib.c
> index e0e502cf0..ebfc542a3 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/Library/DxePhatAcpiLib/DxePhatA
> +++ cpiLib.c
> @@ -6,7 +6,7 @@
>SPDX-License-Identifier: BSD-2-Clause-Patent  **/
> 
> -#include 
> +#include 
> 
>  #include 
>  #include 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.inf
> b/Platform/Intel/MinPlatformPkg/Acpi/Library/DxePhatAcpiLib/DxePhatAcpiLib.in
> f
> similarity index 100%
> rename from
> Platform/Intel/MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.inf
> rename to
> Platform/Intel/MinPlatformPkg/Acpi/Library/DxePhatAcpiLib/DxePhatAcpiLib.inf
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> index 790fccf40..657a9decc 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> @@ -150,6 +150,7 @@
> 
> LargeVariableReadLib|MinPlatformPkg/Library/BaseLargeVariableLib/BaseLarge
> VariableReadLib.inf
> 
> LargeVariableWriteLib|MinPlatformPkg/Library/BaseLargeVariableLib/BaseLarge
> VariableWriteLib.inf
>CompressLib|MinPlatformPkg/Library/CompressLib/CompressLib.inf
> +
> + DxePhatAcpiLib|MinPlatformPkg/Acpi/Library/DxePhatAcpiLib/DxePhatAcpiL
> + ib.inf
> 
>#
># CryptLib
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/PhatAcpiLib.h
> b/Platform/Intel/MinPlatformPkg/Include/Library/DxePhatAcpiLib.h
> similarity index 100%
> rename from Platform/Intel/MinPlatformPkg/Include/Library/PhatAcpiLib.h
> rename to Platform/Intel/MinPlatformPkg/Include/Library/DxePhatAcpiLib.h
> diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> index 09312d329..d006d7117 100644
> --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> @@ -88,7 +88,7 @@
>LargeVariableReadLib|Include/Library/LargeVariableReadLib.h
>LargeVariableWriteLib|Include/Library/LargeVariableWriteLib.h
> 
> -  PhatAcpiLib|Include/Library/PhatAcpiLib.h
> +  DxePhatAcpiLib|Include/Library/DxePhatAcpiLib.h
> 
>  [PcdsFixedAtBuild, PcdsPatchableInModule]
> 
> diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> index 4b295babf..f9227e014 100644
> --- a/Platform/Intel/MinPlatformPkg/MinPl

Re: [edk2-devel] [PATCH 2/2] Update Maintainers for Intel packages

2024-02-20 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Haller, Nathaniel D 
> Sent: Friday, February 16, 2024 5:48 PM
> To: devel@edk2.groups.io
> Cc: Desimone, Nathaniel L ; Chiu, Chasel
> 
> Subject: [PATCH 2/2] Update Maintainers for Intel packages
> 
> Update PurleySiliconBinPkg, WhitleyOpenBoardBinPkg, and WhitleySiliconBinPkg
> maintainers.
> 
> Cc: Nate DeSimone 
> Cc: Chasel Chiu 
> Signed-off-by: Nathaniel Haller 
> ---
>  Maintainers.txt | 7 ---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt index 66ac96d..eaf13fd 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -46,9 +46,9 @@ M: Chasel Chiu 
>  M: Nate DeSimone 
> 
>  Platform/Intel/WhitleyOpenBoardBinPkg
> -M: Isaac Oram 
>  M: Nate DeSimone 
>  M: Chasel Chiu 
> +M: Nathaniel Haller 
> 
>  Platform/Intel/EaglestreamOpenBoardBinPkg
>  M: Nate DeSimone  @@ -87,11 +87,12 @@
> M: Sai Chaganty 
> 
>  Silicon/Intel/PurleySiliconBinPkg
>  M: Nate DeSimone 
> -M: Isaac W Oram 
> +M: Chasel Chiu 
> 
>  Silicon/Intel/WhitleySiliconBinPkg
>  M: Nate DeSimone 
> -M: Isaac W Oram 
> +M: Chasel Chiu 
> +M: Nathaniel Haller 
> 
>  Silicon/Intel/EaglestreamSiliconBinPkg
>  M: Nate DeSimone 
> --
> 2.43.0.windows.1



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




Re: [edk2-devel] [PATCH 1/2] Add maintainers for EaglestreamSiliconBinPkg and EaglestreamOpenBoardBinPkg

2024-02-20 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Haller, Nathaniel D 
> Sent: Friday, February 16, 2024 5:47 PM
> To: devel@edk2.groups.io
> Cc: Desimone, Nathaniel L ; Chiu, Chasel
> 
> Subject: [PATCH 1/2] Add maintainers for EaglestreamSiliconBinPkg and
> EaglestreamOpenBoardBinPkg
> 
> Cc: Nate DeSimone 
> Cc: Chasel Chiu 
> Signed-off-by: Nathaniel Haller 
> ---
>  Maintainers.txt | 10 ++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt index 1d5dacb..66ac96d 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -50,6 +50,11 @@ M: Isaac Oram 
>  M: Nate DeSimone 
>  M: Chasel Chiu 
> 
> +Platform/Intel/EaglestreamOpenBoardBinPkg
> +M: Nate DeSimone 
> +M: Chasel Chiu 
> +M: Nathaniel Haller 
> +
>  Platform/Intel/CoffeelakeSiliconBinPkg
>  M: Chasel Chiu 
>  M: Sai Chaganty  @@ -88,6 +93,11 @@
> Silicon/Intel/WhitleySiliconBinPkg
>  M: Nate DeSimone 
>  M: Isaac W Oram 
> 
> +Silicon/Intel/EaglestreamSiliconBinPkg
> +M: Nate DeSimone 
> +M: Chasel Chiu 
> +M: Nathaniel Haller 
> +
>  Silicon/Intel/QuarkSocBinPkg
>  M: Michael D Kinney 
>  M: Kelly Steele 
> --
> 2.43.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115675): https://edk2.groups.io/g/devel/message/115675
Mute This Topic: https://groups.io/mt/104454912/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] UefiPayloadPkg/Crypto: Support external Crypto drivers.

2024-01-25 Thread Chiu, Chasel


Thanks Gua!
Reviewed-by: Chasel Chiu 


> -Original Message-
> From: Guo, Gua 
> Sent: Wednesday, January 24, 2024 9:09 PM
> To: devel@edk2.groups.io
> Cc: Guo, Gua ; Chiu, Chasel ;
> Dong, Guo ; Rhodes, Sean ; Lu,
> James 
> Subject: [PATCH v2] UefiPayloadPkg/Crypto: Support external Crypto drivers.
> 
> From: Gua Guo 
> 
> 
> Crypto in serveral case will use old version or latest version,
> 
> Platform may choose to only update Crypto drivers without updating
> 
> whole UPL, in this case the Crypto driver will provide by platform
> 
> payload outside the common UPL binary.
> 
> 
> 
> Cc: Chasel Chiu 
> 
> Cc: Guo Dong 
> 
> Cc: Sean Rhodes 
> 
> Cc: James Lu 
> 
> Cc: Gua Guo 
> 
> Signed-off-by: Gua Guo 
> 
> ---
> 
>  UefiPayloadPkg/UefiPayloadPkg.dsc | 10 +-
> 
>  UefiPayloadPkg/UefiPayloadPkg.fdf |  2 ++
> 
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> 
> 
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc
> b/UefiPayloadPkg/UefiPayloadPkg.dsc
> 
> index 4f195c1e52..2c4013bd9d 100644
> 
> --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> 
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> 
> @@ -37,12 +37,18 @@
> 
>DEFINE ATA_ENABLE   = TRUE
> 
>DEFINE SD_ENABLE= TRUE
> 
>DEFINE PS2_MOUSE_ENABLE = TRUE
> 
> -  DEFINE CRYPTO_PROTOCOL_SUPPORT  = FALSE
> 
>DEFINE SD_MMC_TIMEOUT   = 100
> 
>DEFINE USE_CBMEM_FOR_CONSOLE= FALSE
> 
>DEFINE BOOTSPLASH_IMAGE = FALSE
> 
>DEFINE NVME_ENABLE  = TRUE
> 
>DEFINE CAPSULE_SUPPORT  = FALSE
> 
> +
> 
> +  #
> 
> +  # Crypto Support
> 
> +  #
> 
> +  DEFINE CRYPTO_PROTOCOL_SUPPORT= FALSE
> 
> +  DEFINE CRYPTO_DRIVER_EXTERNAL_SUPPORT = FALSE
> 
> +
> 
>#
> 
># Setup Universal Payload
> 
>#
> 
> @@ -860,11 +866,13 @@
> 
># Misc
> 
>#
> 
>  !if $(CRYPTO_PROTOCOL_SUPPORT) == TRUE
> 
> +!if $(CRYPTO_DRIVER_EXTERNAL_SUPPORT) == FALSE
> 
>CryptoPkg/Driver/CryptoDxe.inf {
> 
>  
> 
>BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
> 
>TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
> 
>}
> 
> +!endif
> 
>  !endif
> 
> 
> 
>#--
> 
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf
> b/UefiPayloadPkg/UefiPayloadPkg.fdf
> 
> index 7d04a8cffd..c1b1e35f32 100644
> 
> --- a/UefiPayloadPkg/UefiPayloadPkg.fdf
> 
> +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
> 
> @@ -154,8 +154,10 @@ INF
> MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCo
> deRou
> 
>  INF
> MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerR
> untimeDxe.inf
> 
> 
> 
>  !if $(CRYPTO_PROTOCOL_SUPPORT) == TRUE
> 
> +!if $(CRYPTO_DRIVER_EXTERNAL_SUPPORT) == FALSE
> 
>  INF CryptoPkg/Driver/CryptoDxe.inf
> 
>  !endif
> 
> +!endif
> 
>  !if $(SECURITY_STUB_ENABLE) == TRUE
> 
>  INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
> 
>  !endif
> 
> --
> 
> 2.39.2.windows.1
> 
> 



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




Re: [edk2-devel] [PATCH v1] Platform/Intel: Specifies SmmCpuSyncLib instance

2023-12-21 Thread Chiu, Chasel


Patch merged: 
https://github.com/tianocore/edk2-platforms/commit/9c9a4821e0866f219f1d03ba24a6a433ea408223

Thanks,
Chasel



> -Original Message-
> From: Wu, Jiaxin 
> Sent: Wednesday, December 20, 2023 7:42 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Kinney, Michael D
> ; Gao, Liming ; Ni,
> Ray 
> Subject: [PATCH v1] Platform/Intel: Specifies SmmCpuSyncLib instance
> 
> This patch is to specify SmmCpuSyncLib instance for MinPlatformPkg
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Ray Ni 
> Signed-off-by: Jiaxin Wu 
> ---
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> index e40b2ff6e1..790fccf400 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> @@ -105,10 +105,11 @@
>MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
>LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
> 
> SmmCpuFeaturesLib|UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeatures
> Lib.inf
>MicrocodeLib|UefiCpuPkg/Library/MicrocodeLib/MicrocodeLib.inf
>CpuPageTableLib|UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableLib.inf
> +  SmmCpuSyncLib|UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf
> 
>#
># Platform
>#
>TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf
> --
> 2.16.2.windows.1



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




Re: [edk2-devel] [PATCH v1] Platform/Intel: Specifies SmmCpuSyncLib instance

2023-12-21 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel



> -Original Message-
> From: Wu, Jiaxin 
> Sent: Wednesday, December 20, 2023 7:42 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Kinney, Michael D
> ; Gao, Liming ; Ni,
> Ray 
> Subject: [PATCH v1] Platform/Intel: Specifies SmmCpuSyncLib instance
> 
> This patch is to specify SmmCpuSyncLib instance for MinPlatformPkg
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Ray Ni 
> Signed-off-by: Jiaxin Wu 
> ---
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> index e40b2ff6e1..790fccf400 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> @@ -105,10 +105,11 @@
>MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
>LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
> 
> SmmCpuFeaturesLib|UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeatures
> Lib.inf
>MicrocodeLib|UefiCpuPkg/Library/MicrocodeLib/MicrocodeLib.inf
>CpuPageTableLib|UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableLib.inf
> +  SmmCpuSyncLib|UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf
> 
>#
># Platform
>#
>TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf
> --
> 2.16.2.windows.1



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




Re: [edk2-devel] [PATCH] [Patch V2]IntelFsp2Pkg\Tools\ConfigEditor: Added new USF config workstream.

2023-12-05 Thread Chiu, Chasel


Hi Arun,

This looks good.
Reviewed-by: Chasel Chiu 
We may merge this first version for basic functionality, and below are just 
some small suggestions that we may consider in following patches.

By reviewing the outcome of test_vfr_yaml.yml:
1. if aligning with VFR output, the formset title should be "Bluetooth 
Configuration" and Help string is "Config the Bluetooth parameter", current 
version it showed YAML file subject "Bluetooth Connection Manager"
2. currently "title data" and "configurable data" both showing like 
configurable, may consider to show title data as static information. (for 
example, "Active Device: " without edit box)
3. I think configurable fields maximum and minimum values are helpful so maybe 
show it as part of help string or in certain way so users could see it.

Thanks,
Chasel


> -Original Message-
> From: Soundara Pandian, Arun SuraX 
> Sent: Thursday, November 23, 2023 11:29 PM
> To: devel@edk2.groups.io
> Cc: Soundara Pandian, Arun SuraX ;
> Chiu, Chasel ; Duggapu, Chinni B
> ; Desimone, Nathaniel L
> ; Ng, Ray Han Lim
> ; Zeng, Star ; Kuo, Ted
> ; S, Ashraf Ali ; Mohapatra, 
> Susovan
> 
> Subject: [PATCH] [Patch V2]IntelFsp2Pkg\Tools\ConfigEditor: Added new USF
> config workstream.
> 
> Config Editor utility addition/changes:
> Support to enable config editor tool to have a new feature that can load and 
> view
> the configuration data of compiled VFR or HFR in form of YAML.
> This can help users to understand and track the configuration data when
> modifications are made.
> 
> Requires compiled vfr file as input in YAML format.
> 
> Running Configuration Editor:
> python ConfigEditor.py
> 
> Cc: Chasel Chiu 
> Cc: Duggapu Chinni B 
> Cc: Nate DeSimone 
> Cc: Ray Han Lim Ng 
> Cc: Star Zeng 
> Cc: Ted Kuo 
> Cc: Ashraf Ali S 
> Cc: Susovan Mohapatra 
> Signed-off-by: Arun Sura 
> ---
>  IntelFsp2Pkg/Tools/ConfigEditor/ConfigEditor.py  | 226
> +
> +
> +--
> -
>  IntelFsp2Pkg/Tools/ConfigEditor/GenYamlCfg.py| 197
> +
> +
> +++
>  IntelFsp2Pkg/Tools/Tests/test_vfr_yaml.yml   | 233
> +
> +
> +
> ++
>  IntelFsp2Pkg/Tools/UserManuals/ConfigEditorUserManual.md |   2 ++
>  4 files changed, 603 insertions(+), 55 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/ConfigEditor/ConfigEditor.py
> b/IntelFsp2Pkg/Tools/ConfigEditor/ConfigEditor.py
> index 5271504282..228ebe91a6 100644
> --- a/IntelFsp2Pkg/Tools/ConfigEditor/ConfigEditor.py
> +++ b/IntelFsp2Pkg/Tools/ConfigEditor/ConfigEditor.py
> @@ -1015,6 +1015,10 @@ class application(tkinter.Frame):
>   "Unsupported file '%s' !" % path)
>  return
> 
> +# VFR Format Page modification
> +def page_construct(self):
> +self.left.bind("<>",
> + self.on_config_page_select_change)
> +
>  def search_bar(self):
>  # get data from text box
>  self.search_text = self.edit.get() @@ -1165,7 +1169,8 @@ class
> application(tkinter.Frame):
>  page_id = next(iter(page))
>  # Put CFG items into related page list
>  self.page_list[page_id] = self.cfg_data_obj.get_cfg_list(page_id)
> -self.page_list[page_id].sort(key=lambda x: x['order'])
> +if self.mode == 'fsp':
> +self.page_list[page_id].sort(key=lambda x: x['order'])
>  page_name = self.cfg_data_obj.get_page_title(page_id)
>  child = self.left.insert(
>  parent, 'end',
> @@ -1199,17 +1204,23 @@ class application(tkinter.Frame):
>  for item in self.get_current_config_data():
>  disp_list.append(item)
>  row = 0
> -disp_list.sort(key=lambda x: x['order'])
> -for item in disp_list:
> -self.add_config_item(item, row)
> -row += 2
> -if self.invalid_values:
> -string = 'The following contails invalid options/values \n\n'
> -for i in self.invalid_values:
> -string +=

Re: [edk2-devel] [PATCH v1] MinPlatformPkg: Remove PeiDxeTpmPlatformHierarchyLib

2023-12-04 Thread Chiu, Chasel


Patch pushed: 
https://github.com/tianocore/edk2-platforms/commit/f446fff05003f69a4396b2ec375301ecb5f63a2a

Thanks,
Chasel


> -Original Message-
> From: Chiang, Chris 
> Sent: Monday, December 4, 2023 12:51 AM
> To: devel@edk2.groups.io
> Cc: Chiang, Chris ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Gao, Liming ;
> Dong, Eric 
> Subject: [PATCH v1] MinPlatformPkg: Remove PeiDxeTpmPlatformHierarchyLib
> 
> From: Chiang-Chris 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4612
> 
> Remove PeiDxeTpmPlatformHierarchyLib in Tcg/Library
> Signed-off-by: Chiang-Chris 
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> |   2 +-
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> |   2 +-
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> |   1 -
> 
> Platform/Intel/MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierarchyLib/Pei
> DxeTpmPlatformHierarchyLib.c   | 266 
> 
> Platform/Intel/MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierarchyLib/Pei
> DxeTpmPlatformHierarchyLib.inf |  45 
>  5 files changed, 2 insertions(+), 314 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> index 260f3b94c5..b469938823 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> @@ -66,7 +66,7 @@
> 
> Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf
> 
> 
> 
>  [LibraryClasses.common.DXE_DRIVER]
> 
> -
> TpmPlatformHierarchyLib|MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierar
> chyLib/PeiDxeTpmPlatformHierarchyLib.inf
> 
> +
> TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/P
> eiDxeTpmPlatformHierarchyLib.inf
> 
> 
> 
>  [LibraryClasses.common.DXE_SMM_DRIVER]
> 
> 
> SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableL
> ib.inf
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> index 595f0ee490..7afbb2900f 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> @@ -52,7 +52,7 @@
> 
> Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRoute
> rPei.inf
> 
> 
> HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRout
> erPei.inf
> 
> 
> Tcg2PhysicalPresenceLib|SecurityPkg/Library/PeiTcg2PhysicalPresenceLib/PeiTcg
> 2PhysicalPresenceLib.inf
> 
> -
> TpmPlatformHierarchyLib|MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierar
> chyLib/PeiDxeTpmPlatformHierarchyLib.inf
> 
> +
> TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/P
> eiDxeTpmPlatformHierarchyLib.inf
> 
> 
> 
> 
> FspMeasurementLib|IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/Ba
> seFspMeasurementLib.inf
> 
> 
> FspWrapperPlatformMultiPhaseLib|IntelFsp2WrapperPkg/Library/BaseFspWrapp
> erPlatformMultiPhaseLibNull/BaseFspWrapperPlatformMultiPhaseLibNull.inf
> 
> diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> index 087fa48dd0..ee5d211128 100644
> --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> @@ -203,7 +203,6 @@
>MinPlatformPkg/Test/TestPointStubDxe/TestPointStubDxe.inf
> 
>MinPlatformPkg/Test/TestPointDumpApp/TestPointDumpApp.inf
> 
> 
> 
> -
> MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatfor
> mHierarchyLib.inf
> 
>MinPlatformPkg/Tcg/Tcg2PlatformPei/Tcg2PlatformPei.inf
> 
>MinPlatformPkg/Tcg/Tcg2PlatformDxe/Tcg2PlatformDxe.inf
> 
> 
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierarchyLib/P
> eiDxeTpmPlatformHierarchyLib.c
> b/Platform/Intel/MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierarchyLib/P
> eiDxeTpmPlatformHierarchyLib.c
> deleted file mode 100644
> index 9812ab99ab..00
> ---
> a/Platform/Intel/MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierarchyLib/P
> eiDxeTpmPlatformHierarchyLib.c
> +++ /dev/null
> @@ -1,266 +0,0 @@
> -/** @file
> 
> -TPM Platform Hierarchy configuration library.
> 
> -
> 
> -This library provides functions for customizing the TPM's Platform 
> Hierarchy
> 
> -Authorization Value (platformAuth) and Platform Hierarchy Authorization
> 
> -Policy (p

Re: [edk2-devel] [PATCH v1] MinPlatformPkg: Remove PeiDxeTpmPlatformHierarchyLib

2023-12-04 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel



> -Original Message-
> From: Chiang, Chris 
> Sent: Monday, December 4, 2023 12:51 AM
> To: devel@edk2.groups.io
> Cc: Chiang, Chris ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Gao, Liming ;
> Dong, Eric 
> Subject: [PATCH v1] MinPlatformPkg: Remove PeiDxeTpmPlatformHierarchyLib
> 
> From: Chiang-Chris 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4612
> 
> Remove PeiDxeTpmPlatformHierarchyLib in Tcg/Library
> Signed-off-by: Chiang-Chris 
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> |   2 +-
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> |   2 +-
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> |   1 -
> 
> Platform/Intel/MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierarchyLib/Pei
> DxeTpmPlatformHierarchyLib.c   | 266 
> 
> Platform/Intel/MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierarchyLib/Pei
> DxeTpmPlatformHierarchyLib.inf |  45 
>  5 files changed, 2 insertions(+), 314 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> index 260f3b94c5..b469938823 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> @@ -66,7 +66,7 @@
> 
> Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf
> 
> 
> 
>  [LibraryClasses.common.DXE_DRIVER]
> 
> -
> TpmPlatformHierarchyLib|MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierar
> chyLib/PeiDxeTpmPlatformHierarchyLib.inf
> 
> +
> TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/P
> eiDxeTpmPlatformHierarchyLib.inf
> 
> 
> 
>  [LibraryClasses.common.DXE_SMM_DRIVER]
> 
> 
> SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableL
> ib.inf
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> index 595f0ee490..7afbb2900f 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> @@ -52,7 +52,7 @@
> 
> Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRoute
> rPei.inf
> 
> 
> HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRout
> erPei.inf
> 
> 
> Tcg2PhysicalPresenceLib|SecurityPkg/Library/PeiTcg2PhysicalPresenceLib/PeiTcg
> 2PhysicalPresenceLib.inf
> 
> -
> TpmPlatformHierarchyLib|MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierar
> chyLib/PeiDxeTpmPlatformHierarchyLib.inf
> 
> +
> TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/P
> eiDxeTpmPlatformHierarchyLib.inf
> 
> 
> 
> 
> FspMeasurementLib|IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/Ba
> seFspMeasurementLib.inf
> 
> 
> FspWrapperPlatformMultiPhaseLib|IntelFsp2WrapperPkg/Library/BaseFspWrapp
> erPlatformMultiPhaseLibNull/BaseFspWrapperPlatformMultiPhaseLibNull.inf
> 
> diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> index 087fa48dd0..ee5d211128 100644
> --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> @@ -203,7 +203,6 @@
>MinPlatformPkg/Test/TestPointStubDxe/TestPointStubDxe.inf
> 
>MinPlatformPkg/Test/TestPointDumpApp/TestPointDumpApp.inf
> 
> 
> 
> -
> MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatfor
> mHierarchyLib.inf
> 
>MinPlatformPkg/Tcg/Tcg2PlatformPei/Tcg2PlatformPei.inf
> 
>MinPlatformPkg/Tcg/Tcg2PlatformDxe/Tcg2PlatformDxe.inf
> 
> 
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierarchyLib/P
> eiDxeTpmPlatformHierarchyLib.c
> b/Platform/Intel/MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierarchyLib/P
> eiDxeTpmPlatformHierarchyLib.c
> deleted file mode 100644
> index 9812ab99ab..00
> ---
> a/Platform/Intel/MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierarchyLib/P
> eiDxeTpmPlatformHierarchyLib.c
> +++ /dev/null
> @@ -1,266 +0,0 @@
> -/** @file
> 
> -TPM Platform Hierarchy configuration library.
> 
> -
> 
> -This library provides functions for customizing the TPM's Platform 
> Hierarchy
> 
> -Authorization Value (platformAuth) and Platform Hierarchy Authorization
> 
> -Policy (platformPolicy) can be defined through this function.
> 
> -
> 
> -  

Re: [edk2-devel] [edk2-platforms][PATCH v1] Intel-MinPlatform: Fix DxeCore Build Failures

2023-11-30 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Thursday, November 30, 2023 4:06 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Ni, Ray ; 
> Chaganty,
> Rangasai V ; Gao, Liming
> ; Kinney, Michael D ;
> Taylor Beebe ; Kubacki, Michael
> 
> Subject: [edk2-platforms][PATCH v1] Intel-MinPlatform: Fix DxeCore Build 
> Failures
> 
> Commit 7284c44 in edk2 introduces an incompatibility that causes any project
> that uses DxeMain.inf to fail to build. This is due to the addition of
> ImagePropertiesRecordLib, and a new added dependency on that library in
> DxeMain. Platforms will not have this LibraryClass defined in their DSC yet 
> and
> hence currently fail to build.
> 
> This changes addes ImagePropertiesRecordLib to CoreCommonLib.dsc, which will
> be picked up by all platforms that adhere to the MinPlatform Architecture. 
> This
> will fix most Intel platform builds in edk2-platforms.
> 
> Cc: Chasel Chiu 
> Cc: Ray Ni 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> Cc: Michael D Kinney 
> Cc: Taylor Beebe 
> Cc: Michael Kubacki 
> Signed-off-by: Nate DeSimone 
> ---
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> index 300b7d7652..e40b2ff6e1 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> @@ -174,3 +174,4 @@
> 
> VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVari
> ableFlashInfoLib.inf
> 
> VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
> 
> VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/Variabl
> ePolicyHelperLib.inf
> +
> + ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib
> + /ImagePropertiesRecordLib.inf
> --
> 2.39.2.windows.1



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




Re: [edk2-devel] [PATCH v3 1/1] MdeModulePkg: Fix issue with ACPI table creation

2023-11-28 Thread Chiu, Chasel


Thanks for update! Change looks good to me.
Acked-by: Chasel Chiu 


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Dhaval
> Sharma
> Sent: Sunday, November 19, 2023 8:24 PM
> To: devel@edk2.groups.io
> Cc: Gao, Liming ; Liu, Zhiguang
> ; Bi, Dandan 
> Subject: [edk2-devel] [PATCH v3 1/1] MdeModulePkg: Fix issue with ACPI table
> creation
> 
> As per ACPI Spec 6.5+ Table 5-9 if xDSDT is avaialble, it should be used 
> first.
> Handle required flow when xDSDT is abscent or present.
> 
> Test: Tested on RISCV64 Qemu platform with xDSDT and booted to linux kernel.
> 
> Cc: Liming Gao 
> Cc: Zhiguang Liu 
> Cc: Dandan Bi 
> Signed-off-by: Dhaval Sharma 
> ---
> 
> Notes:
> v2:
> - Added proper indentation for else if
> 
>  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 22
> +---
>  1 file changed, 15 insertions(+), 7 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> index e09bc9b704f5..ead8376177c9 100644
> --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> @@ -1892,14 +1892,22 @@ InstallAcpiTableFromHob (
>} } -if 
> (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE
> *)ChildTable)->Dsdt != 0) {+//+// First check if xDSDT is 
> available that is
> preferred as per+// ACPI Spec 6.5+ Table 5-9 X_DSDT definition+   
>  //+
> if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->XDsdt != 0)
> {+  TableToInstall = (VOID
> *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)-
> >XDsdt;+} else if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE
> *)ChildTable)->Dsdt != 0) {   TableToInstall = (VOID
> *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)-
> >Dsdt;-  Status = AddTableToList (AcpiTableInstance, 
> >TableToInstall,
> TRUE, Version, TRUE, );-  if (EFI_ERROR (Status)) {- 
>DEBUG
> ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACPI table DSDT\n"));-
> ASSERT_EFI_ERROR (Status);-break;-  }+} else {+
> break;+}+Status = AddTableToList (AcpiTableInstance, 
> TableToInstall,
> TRUE, Version, TRUE, );+if (EFI_ERROR (Status)) {+  
> DEBUG
> ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACPI table DSDT\n"));+
> ASSERT_EFI_ERROR (Status);+  break; }   } }--
> 2.39.2
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#111451): https://edk2.groups.io/g/devel/message/111451
> Mute This Topic: https://groups.io/mt/102702109/1777047
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [chasel.c...@intel.com] -=-
> =-=-=-=-=
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111823): https://edk2.groups.io/g/devel/message/111823
Mute This Topic: https://groups.io/mt/102702109/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 1/2] WhitleyOpenBoardPkg: remove references

2023-11-27 Thread Chiu, Chasel


> -Original Message-
> From: Pedro Falcato 
> Sent: Monday, November 27, 2023 3:14 PM
> To: devel@edk2.groups.io; Chiu, Chasel 
> Cc: Laszlo Ersek ; Chaganty, Rangasai V
> ; Desimone, Nathaniel L
> 
> Subject: Re: [edk2-devel] [edk2-platforms PATCH 1/2] WhitleyOpenBoardPkg:
> remove  references
> 
> On Tue, Nov 21, 2023 at 2:17 AM Chiu, Chasel  wrote:
> >
> >
> > Hi Laszlo,
> >
> > I think you have to clone all the required repos.
> > edk2 repository
> > git clone https://github.com/tianocore/edk2.git
> >
> > edk2-platforms repository
> > git clone https://github.com/tianocore/edk2-platforms.git
> >
> > edk2-non-osi repository
> > git clone https://github.com/tianocore/edk2-non-osi.git
> >
> > FSP repository
> > git clone https://github.com/IntelFsp/FSP.git
> 
> I wonder if the docs are outdated? I had heard of 
> https://github.com/Intel/FSP,
> not IntelFsp/FSP.
> Does https://github.com/Intel/FSP work?


Yes, https://github.com/intel/FSP.git is the one, however, In my case both 
links work the same and I can clone successfully by either one.


> 
> --
> Pedro


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111790): https://edk2.groups.io/g/devel/message/111790
Mute This Topic: https://groups.io/mt/102483850/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] PurleyOpenBoardPkg/BoardMtOlympus: Fix Build

2023-11-27 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Monday, November 27, 2023 5:04 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel 
> Subject: [edk2-platforms][PATCH v1] PurleyOpenBoardPkg/BoardMtOlympus: Fix
> Build
> 
> Updates Microcode and Silicon FV sizes so they can accomodate the newest
> content.
> 
> Cc: Chasel Chiu 
> Signed-off-by: Nate DeSimone 
> ---
>  .../BoardMtOlympus/OpenBoardPkg.fdf   | 25 +++
>  1 file changed, 14 insertions(+), 11 deletions(-)
> 
> diff --git
> a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/OpenBoardPkg.fdf
> b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/OpenBoardPkg.fdf
> index 413d98a070..86d1673458 100644
> --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/OpenBoardPkg.fdf
> +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/OpenBoardPkg.fdf
> @@ -1,7 +1,7 @@
>  ## @file
>  #  FDF file for the MtOlympus board.
>  #
> -# Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.
> +# Copyright (c) 2018 - 2023, Intel Corporation. All rights
> +reserved.
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -43,11 +43,11 @@ FV =
> FvOsBoot
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspUBase|gMinPlatformPkgTokenSp
> aceGuid.PcdFlashFvFspUSize
>  FV = FvLateSiliconCompressed
> 
> -0x0090|0x0040
> +0x0090|0x0030
> 
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootBase|gMinPlatformPkgToke
> nSpaceGuid.PcdFlashFvUefiBootSize
>  FV = FvUefiBoot
> 
> -0x00D0|0x0007C000
> +0x00C0|0x0007C000
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|gEfiMdeMo
> dulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
>  #NV_VARIABLE_STORE
>  DATA = {
> @@ -86,10 +86,10 @@ DATA = {
>0x5A, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00  }
> 
> -0x00D7C000|0x2000
> +0x00C7C000|0x2000
>  #NV_EVENT_LOG
> 
> -0x00D7E000|0x2000
> +0x00C7E000|0x2000
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|gEfiMde
> ModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
>  #NV_FTW_WORKING
>  DATA = {
> @@ -103,28 +103,28 @@ DATA = {
>0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00  }
> 
> -0x00D8|0x0008
> +0x00C8|0x0008
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|gEfiMdeM
> odulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
>  #NV_FTW_SPARE
> 
> 
> -0x00E0|0x0001
> +0x00D0|0x0003
> 
> gCpuUncoreTokenSpaceGuid.PcdFlashNvStorageMicrocodeBase|gCpuUncoreTok
> enSpaceGuid.PcdFlashNvStorageMicrocodeSize
>  FV = MICROCODE_FV
> 
> -0x00E1|0x0001
> +0x00D3|0x0001
> 
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemoryBase|gMinPlatformPkgT
> okenSpaceGuid.PcdFlashFvPostMemorySize
>  FV = FvPostMemory
> 
> -0x00E2|0x0003
> +0x00D4|0x0002
> 
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase|gMinPlatformPkgTokenSp
> aceGuid.PcdFlashFvFspSSize
>  FILE =
> $(PLATFORM_SI_BIN_PACKAGE)/FV/FvPostMemorySilicon/$(TARGET)/FvPostMe
> morySilicon.Fv
> 
> -0x00E5|0x0006
> +0x00D6|0x0005
> 
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPreMemoryBase|gMinPlatformPkgT
> okenSpaceGuid.PcdFlashFvPreMemorySize
>  FV = FvPreMemory
> 
> -0x00EB|0x0013
> +0x00DB|0x0023
> 
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMBase|gMinPlatformPkgTokenSp
> aceGuid.PcdFlashFvFspMSize
>  FILE =
> $(PLATFORM_SI_BIN_PACKAGE)/FV/FvPreMemorySilicon/$(TARGET)/FvPreMemo
> rySilicon.Fv
> 
> @@ -135,6 +135,9 @@ FILE =
> $(PLATFORM_SI_BIN_PACKAGE)/FV/FvTempMemorySilicon/$(TARGET)/FvTempM
> emoryS
>  SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeBase=
> gEfiPchTokenSpaceGuid.PcdFlashAreaBaseAddress +
> gCpuUncoreTokenSpaceGuid.PcdFlashNvStorageMicrocodeBase
>  SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeSize=
> gCpuUncoreTokenSpaceGuid.PcdFlashNvStorageMicrocodeSize
> 
> +SET gIntelSiliconPkgTokenSpaceGuid.PcdFlashMicrocodeFvBase   =
> gCpuUncoreTokenSpaceGuid.PcdFlashNvStorageMicrocodeBase
> +SET gIntelSiliconPkgTokenSpaceGuid.PcdFlashMicrocodeFvSize   =
> gCpuUncoreTokenSpaceGuid.PcdFlashNvStorageMicrocodeSize
> +
>  SET gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress=
> gEfiPchTokenSpaceGuid.PcdFlashAreaBaseAddress +
> gCpuUncoreTokenSpaceGuid.PcdFlashNvStorageMicrocodeBase + 0x60
>  SET gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize =
> gCpuUncoreTokenSpaceGuid.PcdFlashNvStorageMicrocodeSize - 0x60
> 
> --
> 2.39.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111789): https://edk2.groups.io/g/devel/message/111789
Mute This Topic: https://groups.io/mt/102842750/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] PurleyOpenBoardPkg: Fix Build

2023-11-27 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Monday, November 27, 2023 5:04 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel 
> Subject: [edk2-platforms][PATCH v1] PurleyOpenBoardPkg: Fix Build
> 
> Adds SmmLockBox driver which is needed to build with the newest version of
> MinPlatformPkg
> 
> Cc: Chasel Chiu 
> Signed-off-by: Nate DeSimone 
> ---
>  .../Intel/PurleyOpenBoardPkg/BoardMtOlympus/OpenBoardPkg.dsc   | 3 ++-
>  .../Intel/PurleyOpenBoardPkg/BoardTiogaPass/OpenBoardPkg.dsc   | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git
> a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/OpenBoardPkg.dsc
> b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/OpenBoardPkg.dsc
> index 39c5cf78ab..65f22bb90e 100644
> --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/OpenBoardPkg.dsc
> +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/OpenBoardPkg.dsc
> @@ -1,7 +1,7 @@
>  ## @file
>  #  The main build description file for the MtOlympus board.
>  #
> -# Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.
> +# Copyright (c) 2018 - 2023, Intel Corporation. All rights
> +reserved.
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -195,6 +195,7 @@
>$(PLATFORM_PACKAGE)/PlatformInit/PlatformInitSmm/PlatformInitSmm.inf
> 
>$(PLATFORM_BOARD_PACKAGE)/Policy/S3NvramSave/S3NvramSave.inf
> +  MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
> 
>#
># Shell
> diff --git
> a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/OpenBoardPkg.dsc
> b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/OpenBoardPkg.dsc
> index 5747717ecb..64e8978942 100644
> --- a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/OpenBoardPkg.dsc
> +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/OpenBoardPkg.dsc
> @@ -1,7 +1,7 @@
>  ## @file
>  #  The main build description file for the TiogaPass board.
>  #
> -# Copyright (c) 2018, Intel Corporation. All rights reserved.
> +# Copyright (c) 2018 - 2023, Intel Corporation. All rights
> +reserved.
>  # Copyright (c) 2021, American Megatrends International LLC.  # SPDX-
> License-Identifier: BSD-2-Clause-Patent  # @@ -226,6 +226,7 @@
> 
>$(PLATFORM_BOARD_PACKAGE)/Policy/S3NvramSave/S3NvramSave.inf
>BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.inf
> +  MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
> 
>#
># Shell
> --
> 2.39.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111788): https://edk2.groups.io/g/devel/message/111788
Mute This Topic: https://groups.io/mt/102842752/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] MinPlatformPkg: Update PatchFv Tools for Python 3.x

2023-11-27 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Monday, November 27, 2023 5:04 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Gao, Liming
> ; Dong, Eric 
> Subject: [edk2-platforms][PATCH v1] MinPlatformPkg: Update PatchFv Tools for
> Python 3.x
> 
> PatchFv tools now run on Python 3.x
> 
> Cc: Chasel Chiu 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Nate DeSimone 
> ---
>  .../MinPlatformPkg/Tools/PatchFv/PatchBfv.py  | 35 
>  .../Tools/PatchFv/PatchBinFv.py   | 69 
>  .../Tools/PatchFv/RebaseBinFv.py  | 82 +--
>  3 files changed, 92 insertions(+), 94 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Tools/PatchFv/PatchBfv.py
> b/Platform/Intel/MinPlatformPkg/Tools/PatchFv/PatchBfv.py
> index 1312bfc328..f05480b91f 100644
> --- a/Platform/Intel/MinPlatformPkg/Tools/PatchFv/PatchBfv.py
> +++ b/Platform/Intel/MinPlatformPkg/Tools/PatchFv/PatchBfv.py
> @@ -1,6 +1,6 @@
>  ## @ PatchBfv.py
>  #
> -# Copyright (c) 2017, Intel Corporation. All rights reserved.
> +# Copyright (c) 2017 - 2023, Intel Corporation. All rights
> +reserved.
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  #  ## @@ -11,8 +11,7 @@
> import sys  import time  import shutil  import struct -import binascii
> -from   ctypes import *
> +from ctypes import *
> 
>  class FileChecker:
>  def __init__(self):
> @@ -21,17 +20,17 @@ class FileChecker:
>  self.pcd = ["", "", ""]
> 
>  def PrintPcd(self):
> -print "PCD: " + self.pcd[0] + "|" + self.pcd[1] + "(" + self.pcd[2] 
> + ")"
> +print("PCD: {0}|{1}({2})".format(*(self.pcd)))
> 
>  def ProcessReport(self):
>  try :
>  file = open(self.reportFile)
>  except Exception:
> -print "fail to open " + self.reportFile
> +print("fail to open " + self.reportFile)
>  return
>  try:
>  file.seek(0)
> -print "checking - " + self.pcd[0]
> +print("checking - " + self.pcd[0])
>  ValuePair = self.GetPcdFromReport (file, self.pcd[0])
>  self.pcd[1] = ValuePair[0]
>  self.pcd[2] = ValuePair[1]
> @@ -42,12 +41,12 @@ class FileChecker:
> 
>  def PatchFd(self):
>  fileName = self.fdName
> -print "patching BFV - " + fileName
> +print("patching BFV - " + fileName)
> 
>  try :
>  file = open(fileName, "rb")
>  except Exception:
> -print "fail to open " + fileName
> +print("fail to open " + fileName)
>  return
>  try:
>  buffer = file.read()
> @@ -57,7 +56,7 @@ class FileChecker:
>  offset = -4
> 
>  l = struct.pack("L", int(self.pcd[1],16))
> -print "  [" + hex(offset) + "] " + binascii.hexlify(data[-4:]) + 
> " <= " +
> binascii.hexlify(l)
> +print("  [" + hex(offset) + "] " + bytes(data[-4:]).hex() +
> + " <= " + bytes(l).hex())
>  data[-4:] = l
> 
>  file = open(fileName, "wb") @@ -77,36 +76,36 @@ class 
> FileChecker:
> 
>  newline = line[:-1]
> 
> -if (cmp (newline, TargetPkg) == 0):
> +if newline == TargetPkg:
>  FoundPkg = True
>  continue
> 
> -if (cmp (newline, "") == 0) or ((cmp (newline[0], " ") != 0) and 
> (cmp
> (newline[0], "0") != 0)):
> +if newline == "" or (newline[0] != " " and newline[0] != "0"):
>  FoundPkg = False
> 
>  if (FoundPkg == True) :
>  newline = newline.strip()
>  splitLine = newline.split(" ", 2)
> -if (cmp (splitLine[0], "*F") == 0) or (cmp (splitLine[0], 
> "*P") == 0) :
> -if (cmp (splitLine[1], TargetPcd) == 0):
> -print "found - " + TargetPkg + "." + TargetPcd
> +if splitLine[0] == "*F" or splitLine[0] == "*P":
> +if splitLine[1] == TargetPcd:
> +print("found - " + TargetPkg + "." + TargetPcd)
> 
>  splitLine = splitLine[2].strip()[1:].s

Re: [edk2-devel] [edk2-platforms][PATCH v1] MinPlatformPkg: Add edk2-platforms/Features to PACKAGES_PATH

2023-11-27 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Monday, November 27, 2023 5:04 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Gao, Liming
> ; Dong, Eric 
> Subject: [edk2-platforms][PATCH v1] MinPlatformPkg: Add edk2-
> platforms/Features to PACKAGES_PATH
> 
> Cc: Chasel Chiu 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Nate DeSimone 
> ---
>  Platform/Intel/build.cfg |  5 +++--
>  Platform/Intel/build_bios.py | 11 +++
>  2 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/Platform/Intel/build.cfg b/Platform/Intel/build.cfg index
> 2ff536bb3e..6ab2ced1a5 100644
> --- a/Platform/Intel/build.cfg
> +++ b/Platform/Intel/build.cfg
> @@ -1,7 +1,7 @@
>  # @ build.cfg
>  # This is the main/default build configuration file  # -# Copyright (c) 2019 
> - 2021,
> Intel Corporation. All rights reserved.
> +# Copyright (c) 2019 - 2023, Intel Corporation. All rights
> +reserved.
>  # Copyright (c) 2021 - 2022, American Megatrends International LLC.  #
> SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -13,7 +13,8 @@
> WORKSPACE_FSP_BIN = FSP  EDK_TOOLS_BIN = edk2-BaseTools-win32
> EDK_BASETOOLS = BaseTools  WORKSPACE_DRIVERS = edk2-platforms/Drivers -
> WORKSPACE_FEATURES = edk2-platforms/Features/Intel
> +WORKSPACE_FEATURES = edk2-platforms/Features
> WORKSPACE_FEATURES_INTEL =
> +edk2-platforms/Features/Intel
>  WORKSPACE_PLATFORM = edk2-platforms/Platform/Intel  WORKSPACE_SILICON
> = edk2-platforms/Silicon/Intel  WORKSPACE_PLATFORM_BIN = diff --git
> a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index
> 43a241c837..c79a653f4d 100755
> --- a/Platform/Intel/build_bios.py
> +++ b/Platform/Intel/build_bios.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python3
> +#!/usr/bin/env python3
>  #
>  # @ build_bios.py
>  # Builds BIOS using configuration files and dynamically @@ -109,6 +109,8 @@
> def pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None):
> config["WORKSPACE_SILICON"])
>  config["WORKSPACE_FEATURES"] = os.path.join(config["WORKSPACE"],
> config["WORKSPACE_FEATURES"])
> +config["WORKSPACE_FEATURES_INTEL"] =
> os.path.join(config["WORKSPACE"],
> +
> + config["WORKSPACE_FEATURES_INTEL"])
>  config["WORKSPACE_DRIVERS"] = os.path.join(config["WORKSPACE"],
> config["WORKSPACE_DRIVERS"])
>  config["WORKSPACE_PLATFORM_BIN"] = \ @@ -123,9 +125,10 @@ def
> pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None):
>  config["PACKAGES_PATH"] += os.pathsep + config["WORKSPACE_SILICON"]
>  config["PACKAGES_PATH"] += os.pathsep +
> config["WORKSPACE_SILICON_BIN"]
>  config["PACKAGES_PATH"] += os.pathsep + config["WORKSPACE_FEATURES"]
> -# add all feature domains in WORKSPACE_FEATURES to package path
> -for filename in os.listdir(config["WORKSPACE_FEATURES"]):
> -filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
> +config["PACKAGES_PATH"] += os.pathsep +
> config["WORKSPACE_FEATURES_INTEL"]
> +# add all feature domains in WORKSPACE_FEATURES_INTEL to package path
> +for filename in os.listdir(config["WORKSPACE_FEATURES_INTEL"]):
> +filepath = os.path.join(config["WORKSPACE_FEATURES_INTEL"],
> + filename)
>  # feature domains folder does not contain dec file
>  if os.path.isdir(filepath) and \
>not glob.glob(os.path.join(filepath, "*.dec")):
> --
> 2.39.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111786): https://edk2.groups.io/g/devel/message/111786
Mute This Topic: https://groups.io/mt/102842749/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] PurleyOpenBoardPkg: Replace Python Interpreter Name

2023-11-27 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Friday, November 17, 2023 10:36 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel 
> Subject: [edk2-platforms][PATCH v1] PurleyOpenBoardPkg: Replace Python
> Interpreter Name
> 
> Removes the assumption that the python interpreter will have the name python.
> 
> Cc: Chasel Chiu 
> Signed-off-by: Nate DeSimone 
> ---
>  .../PurleyOpenBoardPkg/BoardMtOlympus/build_board.py   |  8 
>  .../PurleyOpenBoardPkg/BoardTiogaPass/build_board.py   | 10 +-
>  2 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py
> b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py
> index 2ba615d3e4..ffe762e289 100644
> --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py
> +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py
> @@ -1,7 +1,7 @@
>  # @ build_board.py
>  # This adds additional functions to the build_bios.py  # -# Copyright (c) 
> 2019, Intel
> Corporation. All rights reserved.
> +# Copyright (c) 2019 - 2023, Intel Corporation. All rights
> +reserved.
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  #
> 
> @@ -48,7 +48,7 @@ def pre_build_ex(config, functions):
>  print("AML_FILTER= ", config.get("AML_FILTER"))
> 
>  # build the command with arguments
> -command = ["python",
> +command = [sys.executable,
> os.path.join(config["MIN_PACKAGE_TOOLS"],
>  "AmlGenOffset",
>  "AmlGenOffset.py"), @@ -110,7 +110,7 @@ def
> post_build_ex(config, functions):
>  print("post_build_ex Error")
>  sys.exit(1)
> 
> -common_patch_command = [os.path.join(config["PYTHON_HOME"],
> "python"),
> +common_patch_command = [sys.executable,
>  os.path.join(config["MIN_PACKAGE_TOOLS"],
>   "PatchFv", "PatchBinFv.py"),
>  config["TARGET"], @@ -131,7 +131,7 @@ def
> post_build_ex(config, functions):
>  print("Patch Error!")
>  sys.exit(1)
> 
> -common_rebase_command = [os.path.join(config["PYTHON_HOME"],
> "python"),
> +common_rebase_command = [sys.executable,
>   os.path.join(config["MIN_PACKAGE_TOOLS"],
>"PatchFv", "RebaseBinFv.py"),
>   config["TARGET"], diff --git
> a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/build_board.py
> b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/build_board.py
> index 46fd389ef1..3b66df7115 100644
> --- a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/build_board.py
> +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/build_board.py
> @@ -1,7 +1,7 @@
>  # @ build_board.py
>  # This adds additional functions to the build_bios.py  # -# Copyright (c) 
> 2018, Intel
> Corporation. All rights reserved.
> +# Copyright (c) 2018 - 2023, Intel Corporation. All rights
> +reserved.
>  # Copyright (c) 2021, American Megatrends International LLC.  # SPDX-
> License-Identifier: BSD-2-Clause-Patent  # @@ -49,7 +49,7 @@ def
> pre_build_ex(config, functions):
>  print("AML_FILTER= ", config.get("AML_FILTER"))
> 
>  # build the command with arguments
> -command = ["python",
> +command = [sys.executable,
> os.path.join(config["MIN_PACKAGE_TOOLS"],
>  "AmlGenOffset",
>  "AmlGenOffset.py"), @@ -111,7 +111,7 @@ def
> post_build_ex(config, functions):
>  print("post_build_ex Error")
>  sys.exit(1)
> 
> -common_patch_command = [os.path.join(config["PYTHON_HOME"],
> "python"),
> +common_patch_command = [sys.executable,
>  os.path.join(config["MIN_PACKAGE_TOOLS"],
>   "PatchFv", "PatchBinFv.py"),
>  config["TARGET"], @@ -132,7 +132,7 @@ def
> post_build_ex(config, functions):
>  print("Patch Error!")
>  sys.exit(1)
> 
> -common_rebase_command = [os.path.join(config["PYTHON_HOME"],
> "python"),
> +common_rebase_command = [sys.executable,
> 

Re: [edk2-devel] [edk2-platforms][PATCH v1] WhitleyOpenBoardPkg: Replace Python Interpreter Name

2023-11-27 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Friday, November 17, 2023 10:36 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel 
> Subject: [edk2-platforms][PATCH v1] WhitleyOpenBoardPkg: Replace Python
> Interpreter Name
> 
> Removes the assumption that the python interpreter will have the name python.
> 
> Cc: Chasel Chiu 
> Signed-off-by: Nate DeSimone  ---
>  Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py | 4 ++--
>  .../Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py | 4 ++--
>  .../Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py| 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py
> b/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py
> index af6985019b..70ef4c2201 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py
> @@ -2,7 +2,7 @@
>  # Extensions for building Aowanda using build_bios.py  #  # -# Copyright (c) 
> 2021,
> Intel Corporation. All rights reserved.
> +# Copyright (c) 2021 - 2023, Intel Corporation. All rights
> +reserved.
>  # Copyright (c) 2022, American Megatrends International LLC.   # SPDX-
> License-Identifier: BSD-2-Clause-Patent  # @@ -107,7 +107,7 @@ def
> pre_build_ex(config, functions):
>  if not os.path.exists(out_file_dir):
>  os.mkdir(out_file_dir)
> 
> -command = ["python",
> +command = [sys.executable,
> os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset",
> "AmlGenOffset.py"),
> "-d", "--aml_filter", config["AML_FILTER"],
> "-o", out_file_path,
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
> b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
> index ccf7a8c55a..61b893686c 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
> @@ -2,7 +2,7 @@
>  # Extensions for building JunctionCity using build_bios.py  #  # -# 
> Copyright (c)
> 2021, Intel Corporation. All rights reserved.
> +# Copyright (c) 2021 - 2023, Intel Corporation. All rights
> +reserved.
>  # Copyright (c) 2021, American Megatrends International LLC.   # SPDX-
> License-Identifier: BSD-2-Clause-Patent  # @@ -107,7 +107,7 @@ def
> pre_build_ex(config, functions):
>  if not os.path.exists(out_file_dir):
>  os.mkdir(out_file_dir)
> 
> -command = ["python",
> +command = [sys.executable,
> os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset",
> "AmlGenOffset.py"),
> "-d", "--aml_filter", config["AML_FILTER"],
> "-o", out_file_path,
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
> b/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
> index e2d32d3e13..8d62dd43b8 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
> @@ -1,7 +1,7 @@
>  # @ build_board.py
>  # Extensions for building WilsonCityRvp using build_bios.py  # -# Copyright 
> (c)
> 2021, Intel Corporation. All rights reserved.
> +# Copyright (c) 2021 - 2023, Intel Corporation. All rights
> +reserved.
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  #
> 
> @@ -105,7 +105,7 @@ def pre_build_ex(config, functions):
>  if not os.path.exists(out_file_dir):
>  os.mkdir(out_file_dir)
> 
> -command = ["python",
> +command = [sys.executable,
> os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset",
> "AmlGenOffset.py"),
> "-d", "--aml_filter", config["AML_FILTER"],
> "-o", out_file_path,
> --
> 2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111784): https://edk2.groups.io/g/devel/message/111784
Mute This Topic: https://groups.io/mt/102667306/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] MinPlatformPkg: Remove usage of PYTHON_HOME

2023-11-27 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel



> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Friday, November 17, 2023 10:36 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Gao, Liming
> ; Dong, Eric 
> Subject: [edk2-platforms][PATCH v1] MinPlatformPkg: Remove usage of
> PYTHON_HOME
> 
> Removes usage PYTHON_HOME from RebaseFspBinBaseAddress.py
> 
> Cc: Chasel Chiu 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Nate DeSimone 
> ---
>  .../MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py   | 8 ++--
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> index b7e4bcf5f9..32db9eb1c4 100644
> --- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> +++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> @@ -1,6 +1,6 @@
>  ## @ RebaseFspBinBaseAddress.py
>  #
> -# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
> +# Copyright (c) 2019 - 2023, Intel Corporation. All rights
> +reserved.
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  #
> 
> @@ -65,11 +65,7 @@ file.close()
>  # Get FSP-M Size, in order to calculate the FSP-T Base. Used SplitFspBin.py 
> script
> # to dump the header, and get the ImageSize in FSP-M section  # -pythontool =
> 'python'
> -if 'PYTHON_HOME' in os.environ:
> -pythontool = os.environ['PYTHON_HOME'] + os.sep + 'python'
> -else:
> -pythontool = sys.executable
> +pythontool = sys.executable
>  Process = subprocess.Popen([pythontool, splitFspBinPath, "info","-
> f",fspBinFilePath], stdout=subprocess.PIPE)  Output = Process.communicate()[0]
> FsptInfo = Output.rsplit(b"FSP_M", 1);
> --
> 2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111782): https://edk2.groups.io/g/devel/message/111782
Mute This Topic: https://groups.io/mt/102667304/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 1/2] WhitleyOpenBoardPkg: remove references

2023-11-27 Thread Chiu, Chasel

Hi Laszlo,

Thanks for your support too!
By the way, do we still plan to remove LgacyBiosMpTable.h? We can follow up 
with relevant OpenBoardPkg fixes if that's the goal.

Thanks,
Chasel



> -Original Message-
> From: Laszlo Ersek 
> Sent: Thursday, November 23, 2023 2:05 AM
> To: devel@edk2.groups.io; Chiu, Chasel 
> Cc: Chaganty, Rangasai V ; Desimone, Nathaniel
> L 
> Subject: Re: [edk2-devel] [edk2-platforms PATCH 1/2] WhitleyOpenBoardPkg:
> remove  references
> 
> Hi Chasel,
> 
> On 11/21/23 03:17, Chiu, Chasel wrote:
> >
> > Hi Laszlo,
> >
> > I think you have to clone all the required repos.
> > edk2 repository
> > git clone https://github.com/tianocore/edk2.git
> >
> > edk2-platforms repository
> > git clone https://github.com/tianocore/edk2-platforms.git
> >
> > edk2-non-osi repository
> > git clone https://github.com/tianocore/edk2-non-osi.git
> >
> > FSP repository
> > git clone https://github.com/IntelFsp/FSP.git
> 
> But that's the thing exactly: this repository is not public, and I'm not a 
> member of
> the IntelFsp organization. When I log in to GitHub, and open
> 
>   https://github.com/IntelFsp/
> 
> the page says
> 
>   This organization has no public repositories.
> 
> This is basically what I meant earlier, when I asked: "How can I satisfy the 
> FSP
> blob requirement?".
> 
> Anyway... this is taking too long; I don't want to waste your time with it. 
> We can't
> reasonably expect any contributor to send patches for a subsystem they can't
> even build due to not being permitted access to various proprietary blobs. I'm
> dropping this patch set now (for edk2 as well), and removing myself from the 
> BZ.
> 
> Thanks for the help thus far!
> Laszlo
> 
> >
> > check if you got all repos like below:
> > edk2
> > edk2-non-osi
> > edk2-platforms
> > FSP
> >
> > Then switch to edk2-platforms/Platform/Intel/build_bios.py -p
> > WilsonCityRvp to start the build
> >
> > Detail information is in readme:
> > https://github.com/tianocore/edk2-platforms/blob/master/Platform/Intel
> > /Readme.md
> >
> > Please let me know if any question.
> >
> > Thanks,
> > Chasel
> >
> >
> >
> >
> >
> >> -Original Message-
> >> From: Laszlo Ersek 
> >> Sent: Wednesday, November 15, 2023 3:51 AM
> >> To: devel@edk2.groups.io; Chiu, Chasel 
> >> Cc: Chaganty, Rangasai V ; Desimone,
> >> Nathaniel L 
> >> Subject: Re: [edk2-devel] [edk2-platforms PATCH 1/2] WhitleyOpenBoardPkg:
> >> remove  references
> >>
> >> Hi Chasel,
> >>
> >> On 11/10/23 02:13, Chiu, Chasel wrote:
> >>>
> >>> Hi Laszlo,
> >>>
> >>> I verified and encountered build failure as some files still
> >>> consuming definitions
> >> from LegacyBiosMpTable.h, for example:
> >>> https://github.com/tianocore/edk2-platforms/blob/899a9dc97cd54690513
> >>> 38
> >>>
> >>
> 0ad01ee8b2609dbefd5/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/Co
> >> m
> >>> mon/Dxe/SystemBoardInfoDxe/SystemBoardInfoDxe.c#L22
> >>>
> >>> Any suggestion that we can reduce impact to existing platforms?
> >>
> >> I've been hoping to get comments from Nate on the expected contents
> >> of DEVICE_DATA_HW_LOCAL_INT. Barring such comments, here is my
> proposal:
> >> I'd like to just replace the enum constants in question with their 
> >> numerical
> values.
> >>
> >> However, even for that, I'd really like to be able to build-test the 
> >> platform
> locally.
> >> Do you have build instructions? How can I satisfy the FSP blob requirement?
> >>
> >> Thanks!
> >> Laszlo
> >
> >
> >
> > 
> >
> >



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111754): https://edk2.groups.io/g/devel/message/111754
Mute This Topic: https://groups.io/mt/102483850/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 1/2] WhitleyOpenBoardPkg: remove references

2023-11-20 Thread Chiu, Chasel

Hi Laszlo,

I think you have to clone all the required repos.
edk2 repository
git clone https://github.com/tianocore/edk2.git

edk2-platforms repository
git clone https://github.com/tianocore/edk2-platforms.git

edk2-non-osi repository
git clone https://github.com/tianocore/edk2-non-osi.git

FSP repository
git clone https://github.com/IntelFsp/FSP.git

check if you got all repos like below:
edk2
edk2-non-osi
edk2-platforms
FSP

Then switch to edk2-platforms/Platform/Intel/build_bios.py -p WilsonCityRvp to 
start the build

Detail information is in readme: 
https://github.com/tianocore/edk2-platforms/blob/master/Platform/Intel/Readme.md

Please let me know if any question.

Thanks,
Chasel





> -Original Message-
> From: Laszlo Ersek 
> Sent: Wednesday, November 15, 2023 3:51 AM
> To: devel@edk2.groups.io; Chiu, Chasel 
> Cc: Chaganty, Rangasai V ; Desimone, Nathaniel
> L 
> Subject: Re: [edk2-devel] [edk2-platforms PATCH 1/2] WhitleyOpenBoardPkg:
> remove  references
> 
> Hi Chasel,
> 
> On 11/10/23 02:13, Chiu, Chasel wrote:
> >
> > Hi Laszlo,
> >
> > I verified and encountered build failure as some files still consuming 
> > definitions
> from LegacyBiosMpTable.h, for example:
> > https://github.com/tianocore/edk2-platforms/blob/899a9dc97cd5469051338
> >
> 0ad01ee8b2609dbefd5/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/Co
> m
> > mon/Dxe/SystemBoardInfoDxe/SystemBoardInfoDxe.c#L22
> >
> > Any suggestion that we can reduce impact to existing platforms?
> 
> I've been hoping to get comments from Nate on the expected contents of
> DEVICE_DATA_HW_LOCAL_INT. Barring such comments, here is my proposal:
> I'd like to just replace the enum constants in question with their numerical 
> values.
> 
> However, even for that, I'd really like to be able to build-test the platform 
> locally.
> Do you have build instructions? How can I satisfy the FSP blob requirement?
> 
> Thanks!
> Laszlo



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




Re: [edk2-devel] [PATCH v1] MinPlatformPkg: If BaseTools doesn't build, try a clean build

2023-11-17 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel



> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Monday, September 25, 2023 5:47 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Isaac Oram
> ; Gao, Liming ; Dong,
> Eric 
> Subject: [PATCH v1] MinPlatformPkg: If BaseTools doesn't build, try a clean 
> build
> 
> Cc: Chasel Chiu 
> Cc: Isaac Oram 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Nate DeSimone 
> ---
>  Platform/Intel/build_bios.py | 17 -
>  1 file changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index
> 9c95cfff76..b396017c8c 100755
> --- a/Platform/Intel/build_bios.py
> +++ b/Platform/Intel/build_bios.py
> @@ -207,7 +207,22 @@ def pre_build(build_config, build_type="DEBUG",
> silent=False, toolchain=None):
> 
>  _, _, result, return_code = execute_script(command, config, shell=shell)
>  if return_code != 0:
> -build_failed(config)
> +#
> +# If the BaseTools build fails, then run a clean build and retry
> +#
> +clean_command = ["nmake", "-f",
> + os.path.join(config["BASE_TOOLS_PATH"], "Makefile"),
> + "clean"]
> +if os.name == "posix":
> +clean_command = ["make", "-C",
> + os.path.join(config["BASE_TOOLS_PATH"]), 
> "clean"]
> +_, _, result, return_code = execute_script(clean_command, config,
> +   shell=shell)
> +if return_code != 0:
> +build_failed(config)
> +_, _, result, return_code = execute_script(command, config, 
> shell=shell)
> +if return_code != 0:
> +build_failed(config)
> 
>  #
>  # build platform silicon tools
> --
> 2.39.2.windows.1



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




Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Fix issue with ACPI table creation

2023-11-17 Thread Chiu, Chasel


Hi Dhaval,

Just a small feedback,
the only difference will be TableToInstall between XDsdt and Dsdt, could we 
optimize the code flow to reduce duplicate lines?

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Dhaval
> Sharma
> Sent: Friday, November 17, 2023 3:35 AM
> To: devel@edk2.groups.io
> Cc: Gao, Liming ; Liu, Zhiguang
> ; Bi, Dandan 
> Subject: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Fix issue with ACPI table
> creation
> 
> As per spec if xDSDT is avaialble, it should be used first.
> Handle required flow when xDSDT is abscent or present.
> 
> Test: Tested on RISCV64 Qemu platform with xDSDT and booted to linux kernel.
> 
> Cc: Liming Gao 
> Cc: Zhiguang Liu 
> Cc: Dandan Bi 
> Signed-off-by: Dhaval Sharma 
> ---
> 
> Notes:
> v2:
> - Added proper indentation for else if
> 
>  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 13
> -
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> index e09bc9b704f5..11097ed4c3be 100644
> --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> @@ -1892,7 +1892,18 @@ InstallAcpiTableFromHob (
>} } -if 
> (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE
> *)ChildTable)->Dsdt != 0) {+//+// First check if xDSDT is 
> available that is
> preferred+//+if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE
> *)ChildTable)->XDsdt != 0) {+  TableToInstall = (VOID
> *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)-
> >XDsdt;+  Status = AddTableToList (AcpiTableInstance, 
> >TableToInstall,
> TRUE, Version, TRUE, );+  if (EFI_ERROR (Status)) {+ 
>DEBUG
> ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACPI table xDSDT\n"));+
> ASSERT_EFI_ERROR (Status);+break;+  }+} else if
> (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->Dsdt != 0)
> {   TableToInstall = (VOID
> *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)-
> >Dsdt;   Status = AddTableToList (AcpiTableInstance, 
> >TableToInstall,
> TRUE, Version, TRUE, );   if (EFI_ERROR (Status)) {--
> 2.39.2
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#111395): https://edk2.groups.io/g/devel/message/111395
> Mute This Topic: https://groups.io/mt/102645488/1777047
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [chasel.c...@intel.com] -=-
> =-=-=-=-=
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111405): https://edk2.groups.io/g/devel/message/111405
Mute This Topic: https://groups.io/mt/102645488/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 1/2] WhitleyOpenBoardPkg: remove references

2023-11-09 Thread Chiu, Chasel


Hi Laszlo,

I verified and encountered build failure as some files still consuming 
definitions from LegacyBiosMpTable.h, for example:
https://github.com/tianocore/edk2-platforms/blob/899a9dc97cd54690513380ad01ee8b2609dbefd5/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/Common/Dxe/SystemBoardInfoDxe/SystemBoardInfoDxe.c#L22

Any suggestion that we can reduce impact to existing platforms?

Thanks,
Chasel



> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Laszlo Ersek
> Sent: Thursday, November 9, 2023 4:06 AM
> To: devel@edk2.groups.io
> Cc: Chaganty, Rangasai V ; Desimone, Nathaniel
> L ; Chiu, Chasel 
> Subject: [edk2-devel] [edk2-platforms PATCH 1/2] WhitleyOpenBoardPkg:
> remove  references
> 
> For removing "MdePkg/Include/IndustryStandard/LegacyBiosMpTable.h" from
> edk2, first remove the edk2-platforms references to that header file.
> 
> I can't build-test this change. As far as I can tell, building the 
> CooperCityRvp and
> WilsonCityRvp platforms with "build_bios.py" should build these changes;
> however, both platforms fail to build without FSP blobs.
> 
> I think there's a fair chance that this patch should work nonetheless;
>  introduces names prefixed with
> EFI_LEGACY_MP_TABLE_, and edk2-platforms doesn't contain that string. (The
> one exception is FEATUREBYTE2_5, which is also absent from edk2-platforms.)
> 
> Cc: Sai Chaganty 
> Cc: Nate DeSimone 
> Cc: Chasel Chiu 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1754
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/Common/Dxe/SystemBoar
> dInfoDxe/SystemBoardInfoDxe.h | 1 -
> 
> Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/Platform
> DeviceDataSRP10nm.c   | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git
> a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/Common/Dxe/SystemBo
> ardInfoDxe/SystemBoardInfoDxe.h
> b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/Common/Dxe/SystemBo
> ardInfoDxe/SystemBoardInfoDxe.h
> index 32c16ff9110a..d8c209a57f75 100644
> ---
> a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/Common/Dxe/SystemBo
> ardInfoDxe/SystemBoardInfoDxe.h
> +++
> b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/Common/Dxe/SystemBo
> +++ ardInfoDxe/SystemBoardInfoDxe.h
> @@ -27,7 +27,6 @@
>  #include 
>  #include 
> 
> -#include 
>  #include 
> 
>  #endif  //_SYSTEM_BOARD_INFO_DXE_H_
> diff --git
> a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/Platfor
> mDeviceDataSRP10nm.c
> b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/Platfor
> mDeviceDataSRP10nm.c
> index ed9f80734cd7..b69ae1736bb8 100644
> ---
> a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/Platfor
> mDeviceDataSRP10nm.c
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/StaticSkuDataDxe/Pl
> +++ atformDeviceDataSRP10nm.c
> @@ -8,7 +8,6 @@
> 
>  #include 
>  #include 
> -#include 
> 
>  #ifndef V_INTEL_VID
>  #define V_INTEL_VID   0x8086
> 
> 
> 
> 
> 



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




Re: [edk2-devel] [PATCH] IntelFsp2Pkg\Tools\ConfigEditor: Added new USF config workstream support Config Edit utility addition/changes.

2023-11-08 Thread Chiu, Chasel


Hi Arun,

I gave it a try and with test_vfr_yaml.yml there are just some label, numbers, 
string_index and empty blocks which look to me not very helpful for users to 
understand and track the configuration data.
Do we need to include certain string table file so the string_index can be more 
readable to users?

Some small feedbacks on coding style:
1. please run BaseTools/Scripts/PatchCheck.py to capture and resolve format 
issues.
2. please send V2 (or V3...) patch when you updated something so it will be 
easier to know this is same patch/fix but different versions (example: git 
format-patch -v2 -1)

Thanks,
Chasel


> -Original Message-
> From: Soundara Pandian, Arun SuraX 
> Sent: Tuesday, November 7, 2023 8:53 PM
> To: devel@edk2.groups.io
> Cc: Soundara Pandian, Arun SuraX ;
> Chiu, Chasel ; Duggapu, Chinni B
> ; Desimone, Nathaniel L
> ; Ng, Ray Han Lim
> ; Zeng, Star ; Kuo, Ted
> ; S, Ashraf Ali ; Mohapatra, 
> Susovan
> 
> Subject: [PATCH] IntelFsp2Pkg\Tools\ConfigEditor: Added new USF config
> workstream support Config Edit utility addition/changes.
> 
> This patch is to enable config editor to have a new feature that can load and 
> view
> the configuration data of compiled VFR or HFR in form of YAML.
> This can help users to understand and track the configuration data when
> modifications are made.
> 
> Running Configuration Editor:
> python ConfigEditor.py
> 
> Cc: Chasel Chiu 
> Cc: Duggapu Chinni B 
> Cc: Nate DeSimone 
> Cc: Ray Han Lim Ng 
> Cc: Star Zeng 
> Cc: Ted Kuo 
> Cc: Ashraf Ali S 
> Cc: Susovan Mohapatra 
> Signed-off-by: Arun Sura 
> ---
>  IntelFsp2Pkg/Tools/ConfigEditor/ConfigEditor.py  | 226
> +
> +
> +--
> -
>  IntelFsp2Pkg/Tools/ConfigEditor/GenYamlCfg.py| 197
> +
> +
> +++
>  IntelFsp2Pkg/Tools/Tests/test_vfr_yaml.yml   | 110
> +
> +
>  IntelFsp2Pkg/Tools/UserManuals/ConfigEditorUserManual.md |   2 ++
>  4 files changed, 480 insertions(+), 55 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/ConfigEditor/ConfigEditor.py
> b/IntelFsp2Pkg/Tools/ConfigEditor/ConfigEditor.py
> index 5271504282..35c418a9a9 100644
> --- a/IntelFsp2Pkg/Tools/ConfigEditor/ConfigEditor.py
> +++ b/IntelFsp2Pkg/Tools/ConfigEditor/ConfigEditor.py
> @@ -1015,6 +1015,10 @@ class application(tkinter.Frame):
>   "Unsupported file '%s' !" % path)
>  return
> 
> +# VFR Format Page modification
> +def page_construct(self):
> +self.left.bind("<>",
> + self.on_config_page_select_change)
> +
>  def search_bar(self):
>  # get data from text box
>  self.search_text = self.edit.get() @@ -1165,7 +1169,8 @@ class
> application(tkinter.Frame):
>  page_id = next(iter(page))
>  # Put CFG items into related page list
>  self.page_list[page_id] = self.cfg_data_obj.get_cfg_list(page_id)
> -self.page_list[page_id].sort(key=lambda x: x['order'])
> +if self.mode == 'fsp':
> +self.page_list[page_id].sort(key=lambda x: x['order'])
>  page_name = self.cfg_data_obj.get_page_title(page_id)
>  child = self.left.insert(
>  parent, 'end',
> @@ -1199,17 +1204,23 @@ class application(tkinter.Frame):
>  for item in self.get_current_config_data():
>  disp_list.append(item)
>  row = 0
> -disp_list.sort(key=lambda x: x['order'])
> -for item in disp_list:
> -self.add_config_item(item, row)
> -row += 2
> -if self.invalid_values:
> -string = 'The following contails invalid options/values \n\n'
> -for i in self.invalid_values:
> -string += i + ": " + str(self.invalid_values[i]) + "\n"
> -reply = messagebox.showwarning('Warning!', string)
> -if reply == 'ok':
> -self.invalid_values.clear()
> +if self.mode == 'fsp':
> +disp_list.sort(key=lambda x: x['order'])
> +for item in disp_list:
> +self.add_config_item(item, row)
> +row += 2
> + 

Re: [edk2-devel] [PATCH v1] IntelFsp2Pkg: Add get and set FspSmmInit upd data pointer functions

2023-08-28 Thread Chiu, Chasel
merged:
https://github.com/tianocore/edk2/commit/b1e558f6369fc85ae053e0c16ffcd600880fe78d

Thanks,
Chasel


> -Original Message-
> From: Zhang, Hongbin1 
> Sent: Thursday, August 24, 2023 8:15 PM
> To: devel@edk2.groups.io
> Cc: Zhang, Hongbin1 ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Duggapu, Chinni B
> ; Ng, Ray Han Lim ;
> Zeng, Star ; Kuo, Ted ; S, Ashraf Ali
> ; Mohapatra, Susovan 
> Subject: [PATCH v1] IntelFsp2Pkg: Add get and set FspSmmInit upd data pointer
> functions
> 
> FSP-SMM module need get and set FspSmmInit upd data pointer functions to get
> and set upd settings.
> 
> Signed-off-by: Hongbin1 Zhang 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Duggapu Chinni B 
> Cc: Ray Han Lim Ng 
> Cc: Star Zeng 
> Cc: Ted Kuo 
> Cc: Ashraf Ali S 
> Cc: Susovan Mohapatra 
> ---
>  IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c | 41
> 
>  IntelFsp2Pkg/Include/Library/FspCommonLib.h  | 22 +++
>  2 files changed, 63 insertions(+)
> 
> diff --git a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> index 6f6a086111..d33d01fe22 100644
> --- a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> +++ b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> @@ -372,6 +372,47 @@ GetFspSiliconInitUpdDataPointer (
>return FspData->SiliconInitUpdPtr;
>  }
> 
> +/**
> +  This function sets the FspSmmInit UPD data pointer.
> +
> +  @param[in] SmmInitUpdPtr   FspSmmInit UPD data pointer.
> +**/
> +VOID
> +EFIAPI
> +SetFspSmmInitUpdDataPointer (
> +  IN VOID  *SmmInitUpdPtr
> +  )
> +{
> +  FSP_GLOBAL_DATA  *FspData;
> +
> +  //
> +  // Get the FSP Global Data Pointer
> +  //
> +  FspData = GetFspGlobalDataPointer ();
> +
> +  //
> +  // Set the FspSmmInit UPD data pointer.
> +  //
> +  FspData->SmmInitUpdPtr = SmmInitUpdPtr; }
> +
> +/**
> +  This function gets the FspSmmInit UPD data pointer.
> +
> +  @return FspSmmInit UPD data pointer.
> +**/
> +VOID *
> +EFIAPI
> +GetFspSmmInitUpdDataPointer (
> +  VOID
> +  )
> +{
> +  FSP_GLOBAL_DATA  *FspData;
> +
> +  FspData = GetFspGlobalDataPointer ();
> +  return FspData->SmmInitUpdPtr;
> +}
> +
>  /**
>Set FSP measurement point timestamp.
> 
> diff --git a/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> b/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> index 13b67f8822..12d993b7cc 100644
> --- a/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> +++ b/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> @@ -192,6 +192,28 @@ GetFspSiliconInitUpdDataPointer (
>VOID
>);
> 
> +/**
> +  This function sets the smm init UPD data pointer.
> +
> +  @param[in] SmmInitUpdPtr   smm init UPD data pointer.
> +**/
> +VOID
> +EFIAPI
> +SetFspSmmInitUpdDataPointer (
> +  IN VOID  *SmmInitUpdPtr
> +  );
> +
> +/**
> +  This function gets the smm init UPD data pointer.
> +
> +  @return smm init UPD data pointer.
> +**/
> +VOID *
> +EFIAPI
> +GetFspSmmInitUpdDataPointer (
> +  VOID
> +  );
> +
>  /**
>Set FSP measurement point timestamp.
> 
> --
> 2.37.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108069): https://edk2.groups.io/g/devel/message/108069
Mute This Topic: https://groups.io/mt/100950055/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] IntelFsp2Pkg: Support child FV in SplitFspBin.py

2023-08-28 Thread Chiu, Chasel


Merged:
https://github.com/tianocore/edk2/commit/2c7fd32676272e22ed44fdfc8fa7e47f5c7a93b8

Thanks,
Chasel


> -Original Message-
> From: Kuo, Ted 
> Sent: Thursday, July 20, 2023 3:20 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Zeng, Star ; S, Ashraf
> Ali ; Duggapu, Chinni B ;
> Ng, Ray Han Lim ; Mohapatra, Susovan
> 
> Subject: [edk2-devel][PATCH v2] IntelFsp2Pkg: Support child FV in 
> SplitFspBin.py
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=4502
> Update SplitFspBin.py to support child FV in FSP binary. Without the patch, 
> the
> tool won't be able to rebase the images in child FV in FSP binary.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Ashraf Ali S 
> Cc: Chinni B Duggapu 
> Cc: Ray Han Lim Ng 
> Cc: Susovan Mohapatra 
> Signed-off-by: Ted Kuo 
> ---
>  IntelFsp2Pkg/Tools/SplitFspBin.py | 44 ++-
>  1 file changed, 37 insertions(+), 7 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/SplitFspBin.py 
> b/IntelFsp2Pkg/Tools/SplitFspBin.py
> index 419e5ba985..558eaf401a 100644
> --- a/IntelFsp2Pkg/Tools/SplitFspBin.py
> +++ b/IntelFsp2Pkg/Tools/SplitFspBin.py
> @@ -469,6 +469,7 @@ class FirmwareVolume:
>  else: self.FvExtHdr = None self.FfsList  = []+   
>  self.ChildFvList  =
> []  def ParseFv(self): fvsize = len(self.FvData)@@ -483,8 +484,30 
> @@ class
> FirmwareVolume:
>  offset = fvsize else: ffs = 
> FirmwareFile (offset,
> self.FvData[offset:offset + int(ffshdr.Size)])-ffs.ParseFfs()-
> self.FfsList.append(ffs)+# check if there is child fv+
> childfvfound
> = 0+if (ffs.FfsHdr.Type ==
> EFI_FV_FILETYPE.FIRMWARE_VOLUME_IMAGE):+csoffset = offset 
> +
> sizeof (EFI_FFS_FILE_HEADER)+csoffset = 
> AlignPtr(csoffset, 4)+
> # find fv section+while csoffset < (offset + 
> int(ffs.FfsHdr.Size)):+
> cshdr = EFI_COMMON_SECTION_HEADER.from_buffer (self.FvData, csoffset)+
> if (cshdr.Type == EFI_SECTION_TYPE.FIRMWARE_VOLUME_IMAGE):+
> childfvfound = 1+break+
> else:+#
> check next section+csoffset += int(cshdr.Size)+
> csoffset = AlignPtr(csoffset, 4)+if (childfvfound):+  
>   childfvoffset
> = csoffset + sizeof (EFI_COMMON_SECTION_HEADER)+
> childfvhdr =
> EFI_FIRMWARE_VOLUME_HEADER.from_buffer (self.FvData, childfvoffset)+
> childfv = FirmwareVolume (childfvoffset, 
> self.FvData[childfvoffset:childfvoffset +
> int(childfvhdr.FvLength)])+childfv.ParseFv ()+
> self.ChildFvList.append(childfv)+else:+
> ffs.ParseFfs()+
> self.FfsList.append(ffs) offset += int(ffshdr.Size)   
>   offset =
> AlignPtr(offset) @@ -789,6 +812,13 @@ def SplitFspBin (fspfile, outdir,
> nametemplate):
>  hfsp.write(fv.FvData) hfsp.close() +def GetImageFromFv 
> (fd,
> parentfvoffset, fv, imglist):+for ffs in fv.FfsList:+for sec in 
> ffs.SecList:+
> if sec.SecHdr.Type in [EFI_SECTION_TYPE.TE, EFI_SECTION_TYPE.PE32]:   # TE or
> PE32+offset = fd.Offset + parentfvoffset + fv.Offset + 
> ffs.Offset +
> sec.Offset + sizeof(sec.SecHdr)+imglist.append ((offset, 
> len(sec.SecData)
> - sizeof(sec.SecHdr)))+ def RebaseFspBin (FspBinary, FspComponent, FspBase,
> OutputDir, OutputFile): fd = FirmwareDevice(0, FspBinary) fd.ParseFd  
> ()@@ -
> 832,11 +862,11 @@ def RebaseFspBin (FspBinary, FspComponent, FspBase,
> OutputDir, OutputFile):
>  imglist = [] for fvidx in fsp.FvIdxList: fv = 
> fd.FvList[fvidx]-for
> ffs in fv.FfsList:-for sec in ffs.SecList:-   
>  if sec.SecHdr.Type in
> [EFI_SECTION_TYPE.TE, EFI_SECTION_TYPE.PE32]:   # TE or PE32-
> offset = fd.Offset + fv.Offset + ffs.Offset + sec.Offset + sizeof(sec.SecHdr)-
> imglist.append ((offset, len(sec.SecData) - sizeof(sec.SecHdr)))+
> GetImageFromFv (fd, 0, fv, imglist)+# get image from child fv+
> for
> childfv in fv.ChildFvList:+print ("Get image from child fv of 
> fv%d, parent
> fv offset: 0x%x" % (fvidx, fv.Offset))+GetImageFromFv (fd, 
> fv.Offset,
> childfv, imglist)  fcount  = 0 pcount  = 0--
> 2.40.1.windows.1



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




Re: [edk2-devel] [PATCH v1] IntelFsp2Pkg: Add get and set FspSmmInit upd data pointer functions

2023-08-24 Thread Chiu, Chasel
Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Zhang, Hongbin1 
> Sent: Thursday, August 24, 2023 8:15 PM
> To: devel@edk2.groups.io
> Cc: Zhang, Hongbin1 ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Duggapu, Chinni B
> ; Ng, Ray Han Lim ;
> Zeng, Star ; Kuo, Ted ; S, Ashraf Ali
> ; Mohapatra, Susovan 
> Subject: [PATCH v1] IntelFsp2Pkg: Add get and set FspSmmInit upd data pointer
> functions
> 
> FSP-SMM module need get and set FspSmmInit upd data pointer functions to get
> and set upd settings.
> 
> Signed-off-by: Hongbin1 Zhang 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Duggapu Chinni B 
> Cc: Ray Han Lim Ng 
> Cc: Star Zeng 
> Cc: Ted Kuo 
> Cc: Ashraf Ali S 
> Cc: Susovan Mohapatra 
> ---
>  IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c | 41
> 
>  IntelFsp2Pkg/Include/Library/FspCommonLib.h  | 22 +++
>  2 files changed, 63 insertions(+)
> 
> diff --git a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> index 6f6a086111..d33d01fe22 100644
> --- a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> +++ b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> @@ -372,6 +372,47 @@ GetFspSiliconInitUpdDataPointer (
>return FspData->SiliconInitUpdPtr;
>  }
> 
> +/**
> +  This function sets the FspSmmInit UPD data pointer.
> +
> +  @param[in] SmmInitUpdPtr   FspSmmInit UPD data pointer.
> +**/
> +VOID
> +EFIAPI
> +SetFspSmmInitUpdDataPointer (
> +  IN VOID  *SmmInitUpdPtr
> +  )
> +{
> +  FSP_GLOBAL_DATA  *FspData;
> +
> +  //
> +  // Get the FSP Global Data Pointer
> +  //
> +  FspData = GetFspGlobalDataPointer ();
> +
> +  //
> +  // Set the FspSmmInit UPD data pointer.
> +  //
> +  FspData->SmmInitUpdPtr = SmmInitUpdPtr; }
> +
> +/**
> +  This function gets the FspSmmInit UPD data pointer.
> +
> +  @return FspSmmInit UPD data pointer.
> +**/
> +VOID *
> +EFIAPI
> +GetFspSmmInitUpdDataPointer (
> +  VOID
> +  )
> +{
> +  FSP_GLOBAL_DATA  *FspData;
> +
> +  FspData = GetFspGlobalDataPointer ();
> +  return FspData->SmmInitUpdPtr;
> +}
> +
>  /**
>Set FSP measurement point timestamp.
> 
> diff --git a/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> b/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> index 13b67f8822..12d993b7cc 100644
> --- a/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> +++ b/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> @@ -192,6 +192,28 @@ GetFspSiliconInitUpdDataPointer (
>VOID
>);
> 
> +/**
> +  This function sets the smm init UPD data pointer.
> +
> +  @param[in] SmmInitUpdPtr   smm init UPD data pointer.
> +**/
> +VOID
> +EFIAPI
> +SetFspSmmInitUpdDataPointer (
> +  IN VOID  *SmmInitUpdPtr
> +  );
> +
> +/**
> +  This function gets the smm init UPD data pointer.
> +
> +  @return smm init UPD data pointer.
> +**/
> +VOID *
> +EFIAPI
> +GetFspSmmInitUpdDataPointer (
> +  VOID
> +  );
> +
>  /**
>Set FSP measurement point timestamp.
> 
> --
> 2.37.0.windows.1



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




Re: [edk2-devel] [PATCH] MinPlatformPkg: Remove IA32 in PeiFspWrapperPlatformLib

2023-07-26 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel



> -Original Message-
> From: Hsueh, DoraX 
> Sent: Monday, July 24, 2023 2:43 AM
> To: devel@edk2.groups.io
> Cc: Hsueh, DoraX ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Oram, Isaac W ;
> Gao, Liming ; Dong, Eric ;
> Chuang, Rosen ; Kuo, Ted 
> Subject: [PATCH] MinPlatformPkg: Remove IA32 in PeiFspWrapperPlatformLib
> 
> From: DoraX Hsueh 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4508
> 
> Remove IA32 only dependency, Because we need to support both IA32 and X64.
> Apply to a modern platform supporting x64.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Isaac Oram 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Cc: Rosen Chuang 
> Cc: Ted Kuo 
> Signed-off-by: DoraX Hsueh 
> ---
>  .../PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf   | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib
> /PeiFspWrapperPlatformLib.inf
> b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib
> /PeiFspWrapperPlatformLib.inf
> index dafd17dc..489b34cf 100644
> ---
> a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib
> /PeiFspWrapperPlatformLib.inf
> +++
> b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib
> /PeiFspWrapperPlatformLib.inf
> @@ -51,7 +51,7 @@
>IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> 
>MinPlatformPkg/MinPlatformPkg.dec
> 
> 
> 
> -[LibraryClasses.IA32]
> 
> +[LibraryClasses]
> 
>SiliconPolicyInitLib
> 
>SiliconPolicyUpdateLib
> 
>PeiServicesTablePointerLib
> 
> --
> 2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107271): https://edk2.groups.io/g/devel/message/107271
Mute This Topic: https://groups.io/mt/100333272/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] IntelFsp2Pkg: Support child FV in SplitFspBin.py

2023-07-21 Thread Chiu, Chasel


Looks good to me. Thanks Ted!
Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Kuo, Ted 
> Sent: Thursday, July 20, 2023 3:20 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Zeng, Star ; S, Ashraf
> Ali ; Duggapu, Chinni B ;
> Ng, Ray Han Lim ; Mohapatra, Susovan
> 
> Subject: [edk2-devel][PATCH v2] IntelFsp2Pkg: Support child FV in 
> SplitFspBin.py
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=4502
> Update SplitFspBin.py to support child FV in FSP binary. Without the patch, 
> the
> tool won't be able to rebase the images in child FV in FSP binary.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Ashraf Ali S 
> Cc: Chinni B Duggapu 
> Cc: Ray Han Lim Ng 
> Cc: Susovan Mohapatra 
> Signed-off-by: Ted Kuo 
> ---
>  IntelFsp2Pkg/Tools/SplitFspBin.py | 44 ++-
>  1 file changed, 37 insertions(+), 7 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/SplitFspBin.py 
> b/IntelFsp2Pkg/Tools/SplitFspBin.py
> index 419e5ba985..558eaf401a 100644
> --- a/IntelFsp2Pkg/Tools/SplitFspBin.py
> +++ b/IntelFsp2Pkg/Tools/SplitFspBin.py
> @@ -469,6 +469,7 @@ class FirmwareVolume:
>  else: self.FvExtHdr = None self.FfsList  = []+   
>  self.ChildFvList  =
> []  def ParseFv(self): fvsize = len(self.FvData)@@ -483,8 +484,30 
> @@ class
> FirmwareVolume:
>  offset = fvsize else: ffs = 
> FirmwareFile (offset,
> self.FvData[offset:offset + int(ffshdr.Size)])-ffs.ParseFfs()-
> self.FfsList.append(ffs)+# check if there is child fv+
> childfvfound
> = 0+if (ffs.FfsHdr.Type ==
> EFI_FV_FILETYPE.FIRMWARE_VOLUME_IMAGE):+csoffset = offset 
> +
> sizeof (EFI_FFS_FILE_HEADER)+csoffset = 
> AlignPtr(csoffset, 4)+
> # find fv section+while csoffset < (offset + 
> int(ffs.FfsHdr.Size)):+
> cshdr = EFI_COMMON_SECTION_HEADER.from_buffer (self.FvData, csoffset)+
> if (cshdr.Type == EFI_SECTION_TYPE.FIRMWARE_VOLUME_IMAGE):+
> childfvfound = 1+break+
> else:+#
> check next section+csoffset += int(cshdr.Size)+
> csoffset = AlignPtr(csoffset, 4)+if (childfvfound):+  
>   childfvoffset
> = csoffset + sizeof (EFI_COMMON_SECTION_HEADER)+
> childfvhdr =
> EFI_FIRMWARE_VOLUME_HEADER.from_buffer (self.FvData, childfvoffset)+
> childfv = FirmwareVolume (childfvoffset, 
> self.FvData[childfvoffset:childfvoffset +
> int(childfvhdr.FvLength)])+childfv.ParseFv ()+
> self.ChildFvList.append(childfv)+else:+
> ffs.ParseFfs()+
> self.FfsList.append(ffs) offset += int(ffshdr.Size)   
>   offset =
> AlignPtr(offset) @@ -789,6 +812,13 @@ def SplitFspBin (fspfile, outdir,
> nametemplate):
>  hfsp.write(fv.FvData) hfsp.close() +def GetImageFromFv 
> (fd,
> parentfvoffset, fv, imglist):+for ffs in fv.FfsList:+for sec in 
> ffs.SecList:+
> if sec.SecHdr.Type in [EFI_SECTION_TYPE.TE, EFI_SECTION_TYPE.PE32]:   # TE or
> PE32+offset = fd.Offset + parentfvoffset + fv.Offset + 
> ffs.Offset +
> sec.Offset + sizeof(sec.SecHdr)+imglist.append ((offset, 
> len(sec.SecData)
> - sizeof(sec.SecHdr)))+ def RebaseFspBin (FspBinary, FspComponent, FspBase,
> OutputDir, OutputFile): fd = FirmwareDevice(0, FspBinary) fd.ParseFd  
> ()@@ -
> 832,11 +862,11 @@ def RebaseFspBin (FspBinary, FspComponent, FspBase,
> OutputDir, OutputFile):
>  imglist = [] for fvidx in fsp.FvIdxList: fv = 
> fd.FvList[fvidx]-for
> ffs in fv.FfsList:-for sec in ffs.SecList:-   
>  if sec.SecHdr.Type in
> [EFI_SECTION_TYPE.TE, EFI_SECTION_TYPE.PE32]:   # TE or PE32-
> offset = fd.Offset + fv.Offset + ffs.Offset + sec.Offset + sizeof(sec.SecHdr)-
> imglist.append ((offset, len(sec.SecData) - sizeof(sec.SecHdr)))+
> GetImageFromFv (fd, 0, fv, imglist)+# get image from child fv+
> for
> childfv in fv.ChildFvList:+print ("Get image from child fv of 
> fv%d, parent
> fv offset: 0x%x" % (fvidx, fv.Offset))+GetImageFromFv (fd, 
> fv.Offset,
> childfv, imglist)  fcount  = 0 pcount  = 0--
> 2.40.1.windows.1



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




Re: [edk2-devel][PATCH v1] SplitFspBin.py cannot support FSP binary with child FV included

2023-07-19 Thread Chiu, Chasel


Hi Ted,

One question below inline.
Another minor feedback is the commit/patch subject format should be "Package: 
title"

Thanks,
Chasel


> -Original Message-
> From: Kuo, Ted 
> Sent: Tuesday, July 18, 2023 7:16 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Zeng, Star ; S, Ashraf
> Ali ; Duggapu, Chinni B ;
> Ng, Ray Han Lim ; Mohapatra, Susovan
> 
> Subject: [edk2-devel][PATCH v1] SplitFspBin.py cannot support FSP binary with
> child FV included
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=4502
> Update SplitFspBin.py to support child FV in FSP binary. Without the patch, 
> the
> tool won't be able to rebase the images in child FV in FSP binary.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Ashraf Ali S 
> Cc: Chinni B Duggapu 
> Cc: Ray Han Lim Ng 
> Cc: Susovan Mohapatra 
> Signed-off-by: Ted Kuo 
> ---
>  IntelFsp2Pkg/Tools/SplitFspBin.py | 32 ---
>  1 file changed, 25 insertions(+), 7 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/SplitFspBin.py 
> b/IntelFsp2Pkg/Tools/SplitFspBin.py
> index 419e5ba985..2e7550dbb2 100644
> --- a/IntelFsp2Pkg/Tools/SplitFspBin.py
> +++ b/IntelFsp2Pkg/Tools/SplitFspBin.py
> @@ -469,6 +469,7 @@ class FirmwareVolume:
>  else: self.FvExtHdr = None self.FfsList  = []+   
>  self.ChildFvList  =
> []  def ParseFv(self): fvsize = len(self.FvData)@@ -483,8 +484,18 
> @@ class
> FirmwareVolume:
>  offset = fvsize else: ffs = 
> FirmwareFile (offset,
> self.FvData[offset:offset + int(ffshdr.Size)])-ffs.ParseFfs()-
> self.FfsList.append(ffs)+csoffset = offset + sizeof
> (EFI_FFS_FILE_HEADER)+cshdr =
> EFI_COMMON_SECTION_HEADER.from_buffer (self.FvData, csoffset)+
> #
> check if there is child fv+if (ffs.FfsHdr.Type ==
> EFI_FV_FILETYPE.FIRMWARE_VOLUME_IMAGE and cshdr.Type ==
> EFI_SECTION_TYPE.RAW):+childfvoffset = csoffset + sizeof


Is child FV always with EFI_SECTION_TYPE.RAW? Or it could be other types like 
EFI_SECTION_TYPE.FIRMWARE_VOLUME_IMAGE?



> (EFI_COMMON_SECTION_HEADER) + int(cshdr.Size)+childfvhdr =
> EFI_FIRMWARE_VOLUME_HEADER.from_buffer (self.FvData, childfvoffset)+
> childfv = FirmwareVolume (childfvoffset, 
> self.FvData[childfvoffset:childfvoffset +
> int(childfvhdr.FvLength)])+childfv.ParseFv ()+
> self.ChildFvList.append(childfv)+else:+
> ffs.ParseFfs()+
> self.FfsList.append(ffs) offset += int(ffshdr.Size)   
>   offset =
> AlignPtr(offset) @@ -789,6 +800,13 @@ def SplitFspBin (fspfile, outdir,
> nametemplate):
>  hfsp.write(fv.FvData) hfsp.close() +def GetImageFromFv 
> (fd,
> parentfvoffset, fv, imglist):+for ffs in fv.FfsList:+for sec in 
> ffs.SecList:+
> if sec.SecHdr.Type in [EFI_SECTION_TYPE.TE, EFI_SECTION_TYPE.PE32]:   # TE or
> PE32+offset = fd.Offset + parentfvoffset + fv.Offset + 
> ffs.Offset +
> sec.Offset + sizeof(sec.SecHdr)+imglist.append ((offset, 
> len(sec.SecData)
> - sizeof(sec.SecHdr)))+ def RebaseFspBin (FspBinary, FspComponent, FspBase,
> OutputDir, OutputFile): fd = FirmwareDevice(0, FspBinary) fd.ParseFd  
> ()@@ -
> 832,11 +850,11 @@ def RebaseFspBin (FspBinary, FspComponent, FspBase,
> OutputDir, OutputFile):
>  imglist = [] for fvidx in fsp.FvIdxList: fv = 
> fd.FvList[fvidx]-for
> ffs in fv.FfsList:-for sec in ffs.SecList:-   
>  if sec.SecHdr.Type in
> [EFI_SECTION_TYPE.TE, EFI_SECTION_TYPE.PE32]:   # TE or PE32-
> offset = fd.Offset + fv.Offset + ffs.Offset + sec.Offset + sizeof(sec.SecHdr)-
> imglist.append ((offset, len(sec.SecData) - sizeof(sec.SecHdr)))+
> GetImageFromFv (fd, 0, fv, imglist)+# get image from child fv+
> for
> childfv in fv.ChildFvList:+print ("Get image from child fv of 
> fv%d, parent
> fv offset: 0x%x" % (fvidx, fv.Offset))+GetImageFromFv (fd, 
> fv.Offset,
> childfv, imglist)  fcount  = 0 pcount  = 0--
> 2.40.1.windows.1



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




Re: [edk2-devel] [PATCH] IntelFsp2WrapperPkg: Get HobListPtr before calling the Multiphase FSPS

2023-06-25 Thread Chiu, Chasel


Patch merged: 
https://github.com/tianocore/edk2/commit/ac33eee8b83999ba591af04fe22e773cf8fc8193

Thanks,
Chasel


> -Original Message-
> From: Aishwarya, KurugoduMelmatamX
> 
> Sent: Sunday, June 11, 2023 10:24 PM
> To: devel@edk2.groups.io
> Cc: Aishwarya, KurugoduMelmatamX
> ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Duggapu, Chinni B
> ; Chen, Gang C ; Zeng,
> Star ; Kuo, Ted ; S, Ashraf Ali
> ; Mohapatra, Susovan 
> Subject: [PATCH] IntelFsp2WrapperPkg: Get HobListPtr before calling the
> Multiphase FSPS
> 
> REF : https://bugzilla.tianocore.org/show_bug.cgi?id=4480
> 
> In the FspsWrapperPeim, before calling FspWrapperVariableRequestHandler and
> FspWrapperMultiPhaseHandler ,FspHobListPtr should be available so that BL will
> be able to get the correct FspHobListPtr value
> 
> Signed-off-by: kurugodx 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Duggapu Chinni B 
> Cc: Chen Gang C 
> Cc: Star Zeng 
> Cc: Ted Kuo 
> Cc: Ashraf Ali S 
> Cc: Susovan Mohapatra 
> ---
>  .../FspsWrapperPeim/FspsWrapperPeim.c | 15 ---
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> index 08fe0fdb7e..1d4dd60577 100644
> --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> @@ -336,6 +336,14 @@ PeiMemoryDiscoveredNotify (
> 
>DEBUG ((DEBUG_INFO, "FspSiliconInit status: %r\n", Status));
> 
> +  //
> +  // Get FspHobList
> +  //
> +  GuidHob = GetFirstGuidHob ();  ASSERT (GuidHob != NULL);
> + FspHobListPtr = *(VOID **)GET_GUID_HOB_DATA (GuidHob);  DEBUG
> + ((DEBUG_INFO, "FspHobListPtr - 0x%x\n", FspHobListPtr));
> +
>if (Status == FSP_STATUS_VARIABLE_REQUEST) {
>  //
>  // call to Variable request handler @@ -356,13 +364,6 @@
> PeiMemoryDiscoveredNotify (
>  DEBUG ((DEBUG_ERROR, "ERROR - TestFspSiliconInitApiOutput () fail, 
> Status =
> %r\n", Status));
>}
> 
> -  //
> -  // Now FspHobList complete, process it
> -  //
> -  GuidHob = GetFirstGuidHob ();
> -  ASSERT (GuidHob != NULL);
> -  FspHobListPtr = *(VOID **)GET_GUID_HOB_DATA (GuidHob);
> -  DEBUG ((DEBUG_INFO, "FspHobListPtr - 0x%x\n", FspHobListPtr));
>PostFspsHobProcess (FspHobListPtr);
> 
>//
> --
> 2.41.0.windows.1



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




Re: [edk2-devel] Need help to add me to the edk-ii-maintainers and edk-ii-reviewers team

2023-06-20 Thread Chiu, Chasel
Hello, edk2 stewards,

Could you please help this case?

Thanks,
Chasel


From: devel@edk2.groups.io  On Behalf Of cbduggap
Sent: Sunday, June 18, 2023 10:28 PM
To: devel@edk2.groups.io
Subject: [edk2-devel] Need help to add me to the edk-ii-maintainers and 
edk-ii-reviewers team


HI All
I signed up to work as Maintainer for InteFsp2Pkg and IntelFsp2WrapperPkg and 
part of https://github.com/tianocore/edk2/blob/master/Maintainers.txt
Need help to add me to the edk-ii-maintainers and edk-ii-reviewers team.

Maintainer: https://github.com/orgs/tianocore/teams/edk-ii-maintainers

Reviewer: https://github.com/orgs/tianocore/teams/edk-ii-reviewers

Thanks,
Chinni.




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




Re: [edk2-devel] [PATCH] IntelFsp2WrapperPkg: Get HobListPtr before calling the Multiphase FSPS

2023-06-12 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Aishwarya, KurugoduMelmatamX
> 
> Sent: Sunday, June 11, 2023 10:24 PM
> To: devel@edk2.groups.io
> Cc: Aishwarya, KurugoduMelmatamX
> ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Duggapu, Chinni B
> ; Chen, Gang C ; Zeng,
> Star ; Kuo, Ted ; S, Ashraf Ali
> ; Mohapatra, Susovan
> 
> Subject: [PATCH] IntelFsp2WrapperPkg: Get HobListPtr before calling the
> Multiphase FSPS
> 
> REF : https://bugzilla.tianocore.org/show_bug.cgi?id=4480
> 
> In the FspsWrapperPeim, before calling FspWrapperVariableRequestHandler and
> FspWrapperMultiPhaseHandler ,FspHobListPtr should be available so that BL will
> be able to get the correct FspHobListPtr value
> 
> Signed-off-by: kurugodx 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Duggapu Chinni B 
> Cc: Chen Gang C 
> Cc: Star Zeng 
> Cc: Ted Kuo 
> Cc: Ashraf Ali S 
> Cc: Susovan Mohapatra 
> ---
>  .../FspsWrapperPeim/FspsWrapperPeim.c | 15 ---
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> index 08fe0fdb7e..1d4dd60577 100644
> --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> @@ -336,6 +336,14 @@ PeiMemoryDiscoveredNotify (
> 
>DEBUG ((DEBUG_INFO, "FspSiliconInit status: %r\n", Status));
> 
> +  //
> +  // Get FspHobList
> +  //
> +  GuidHob = GetFirstGuidHob ();  ASSERT (GuidHob != NULL);
> + FspHobListPtr = *(VOID **)GET_GUID_HOB_DATA (GuidHob);  DEBUG
> + ((DEBUG_INFO, "FspHobListPtr - 0x%x\n", FspHobListPtr));
> +
>if (Status == FSP_STATUS_VARIABLE_REQUEST) {
>  //
>  // call to Variable request handler @@ -356,13 +364,6 @@
> PeiMemoryDiscoveredNotify (
>  DEBUG ((DEBUG_ERROR, "ERROR - TestFspSiliconInitApiOutput () fail, Status
> = %r\n", Status));
>}
> 
> -  //
> -  // Now FspHobList complete, process it
> -  //
> -  GuidHob = GetFirstGuidHob ();
> -  ASSERT (GuidHob != NULL);
> -  FspHobListPtr = *(VOID **)GET_GUID_HOB_DATA (GuidHob);
> -  DEBUG ((DEBUG_INFO, "FspHobListPtr - 0x%x\n", FspHobListPtr));
>PostFspsHobProcess (FspHobListPtr);
> 
>//
> --
> 2.41.0.windows.1



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




Re: [edk2-devel] [PATCH] Get HobListPtr before calling the Multiphase FSPS

2023-06-09 Thread Chiu, Chasel


Please update the subject per format requirement -
PackageName: title

With this update, Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Aishwarya, KurugoduMelmatamX
> 
> Sent: Friday, June 9, 2023 6:40 AM
> To: devel@edk2.groups.io
> Cc: Aishwarya, KurugoduMelmatamX
> ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Duggapu, Chinni B
> ; Chen, Gang C ; Zeng,
> Star ; Kuo, Ted ; S, Ashraf Ali
> ; Mohapatra, Susovan
> 
> Subject: [PATCH] Get HobListPtr before calling the Multiphase FSPS
> 
> REF : https://bugzilla.tianocore.org/show_bug.cgi?id=4480
> 
> In the FspsWrapperPeim, before calling FspWrapperVariableRequestHandler and
> FspWrapperMultiPhaseHandler ,FspHobListPtr should be available so that BL will
> be able to get the correct FspHobListPtr value
> 
> Signed-off-by: kurugodx 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Duggapu Chinni B 
> Cc: Chen Gang C 
> Cc: Star Zeng 
> Cc: Ted Kuo 
> Cc: Ashraf Ali S 
> Cc: Susovan Mohapatra 
> ---
>  .../FspsWrapperPeim/FspsWrapperPeim.c | 15 ---
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> index 08fe0fdb7e..1d4dd60577 100644
> --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> @@ -336,6 +336,14 @@ PeiMemoryDiscoveredNotify (
> 
>DEBUG ((DEBUG_INFO, "FspSiliconInit status: %r\n", Status));
> 
> +  //
> +  // Get FspHobList
> +  //
> +  GuidHob = GetFirstGuidHob ();  ASSERT (GuidHob != NULL);
> + FspHobListPtr = *(VOID **)GET_GUID_HOB_DATA (GuidHob);  DEBUG
> + ((DEBUG_INFO, "FspHobListPtr - 0x%x\n", FspHobListPtr));
> +
>if (Status == FSP_STATUS_VARIABLE_REQUEST) {
>  //
>  // call to Variable request handler @@ -356,13 +364,6 @@
> PeiMemoryDiscoveredNotify (
>  DEBUG ((DEBUG_ERROR, "ERROR - TestFspSiliconInitApiOutput () fail, Status
> = %r\n", Status));
>}
> 
> -  //
> -  // Now FspHobList complete, process it
> -  //
> -  GuidHob = GetFirstGuidHob ();
> -  ASSERT (GuidHob != NULL);
> -  FspHobListPtr = *(VOID **)GET_GUID_HOB_DATA (GuidHob);
> -  DEBUG ((DEBUG_INFO, "FspHobListPtr - 0x%x\n", FspHobListPtr));
>PostFspsHobProcess (FspHobListPtr);
> 
>//
> --
> 2.41.0.windows.1



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




Re: [edk2-devel] [PATCH] MinPlatform: Add CpuPageTableLib required by CpuMpPeim

2023-06-01 Thread Chiu, Chasel


Patch merged:
https://github.com/tianocore/edk2-platforms/commit/ce9ea07a8b56dc12165ca4f7e975d3b2f798881e

Thanks,
Chasel


> -Original Message-
> From: Ni, Ray 
> Sent: Wednesday, May 31, 2023 2:18 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Oram, Isaac W ;
> Gao, Liming ; Dong, Eric 
> Subject: [PATCH] MinPlatform: Add CpuPageTableLib required by CpuMpPeim
> 
> The patch moves the CpuPageTableLib reference from CoreDxeLib.dsc to
> CoreCommonLib.dsc since now not only DxeMpInitLib but also CpuMpPei
> depends on it.
> 
> Signed-off-by: Ray Ni 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Isaac Oram 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc | 1 +
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc| 3 +--
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> index dfe7d836d3..300b7d7652 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> @@ -106,6 +106,7 @@
>LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
> SmmCpuFeaturesLib|UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeatures
> Lib.inf   MicrocodeLib|UefiCpuPkg/Library/MicrocodeLib/MicrocodeLib.inf+
> CpuPageTableLib|UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableLib.inf#
> # Platformdiff --git
> a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> index af30f985ca..5a2cb130b3 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> @@ -1,7 +1,7 @@
>  ## @file #  Platform description. #-# Copyright (c) 2017 - 2021, Intel
> Corporation. All rights reserved.+# Copyright (c) 2017 - 2023, Intel
> Corporation. All rights reserved. # # SPDX-License-Identifier: 
> BSD-2-Clause-
> Patent #@@ -27,7 +27,6 @@
>LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuE
> xceptionHandlerLib.inf-
> CpuPageTableLib|UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableLib.inf
> MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
> FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLi
> b.inf   TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf--
> 2.39.1.windows.1



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




Re: [edk2-devel] [PATCH] MinPlatform: Add CpuPageTableLib required by CpuMpPeim

2023-05-31 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel



> -Original Message-
> From: Ni, Ray 
> Sent: Wednesday, May 31, 2023 2:18 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Oram, Isaac W ;
> Gao, Liming ; Dong, Eric 
> Subject: [PATCH] MinPlatform: Add CpuPageTableLib required by CpuMpPeim
> 
> The patch moves the CpuPageTableLib reference from CoreDxeLib.dsc to
> CoreCommonLib.dsc since now not only DxeMpInitLib but also CpuMpPei
> depends on it.
> 
> Signed-off-by: Ray Ni 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Isaac Oram 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc | 1 +
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc| 3 +--
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> index dfe7d836d3..300b7d7652 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> @@ -106,6 +106,7 @@
>LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
> SmmCpuFeaturesLib|UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeatures
> Lib.inf   MicrocodeLib|UefiCpuPkg/Library/MicrocodeLib/MicrocodeLib.inf+
> CpuPageTableLib|UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableLib.inf#
> # Platformdiff --git
> a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> index af30f985ca..5a2cb130b3 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> @@ -1,7 +1,7 @@
>  ## @file #  Platform description. #-# Copyright (c) 2017 - 2021, Intel
> Corporation. All rights reserved.+# Copyright (c) 2017 - 2023, Intel
> Corporation. All rights reserved. # # SPDX-License-Identifier: 
> BSD-2-Clause-
> Patent #@@ -27,7 +27,6 @@
>LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuE
> xceptionHandlerLib.inf-
> CpuPageTableLib|UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableLib.inf
> MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
> FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLi
> b.inf   TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf--
> 2.39.1.windows.1



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




Re: [edk2-devel] [PATCH v10] MinPlatformPkg: Update HWSignature field in FACS

2023-05-30 Thread Chiu, Chasel


Patch merged:
https://github.com/tianocore/edk2-platforms/commit/1a7bd150d39007bfb72c4727feda3184c23efe96

Thanks,
Chasel


> -Original Message-
> From: Ke, VincentX 
> Sent: Tuesday, May 30, 2023 7:48 PM
> To: devel@edk2.groups.io
> Cc: Ke, VincentX ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Oram, Isaac W ;
> Gao, Liming ; Dong, Eric ;
> Sinha, Ankit 
> Subject: [PATCH v10] MinPlatformPkg: Update HWSignature field in FACS
> 
> From: VincentX Ke 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4428
> 
> Calculating CRC based on each ACPI table.
> Update HWSignature field in FACS based on CRC while ACPI table changed.
> 
> Change-Id: Ic0ca66ff10cda0fbcd0683020fab1bc9aea9b78c
> Signed-off-by: VincentX Ke 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Isaac Oram 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Cc: Ankit Sinha
> Signed-off-by: VincentX Ke 
> ---
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c   | 284
> +++-
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf |   1 +
>  2 files changed, 217 insertions(+), 68 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> index 2f2c96f907..2a833ec99c 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> @@ -1191,98 +1191,246 @@ PlatformUpdateTables (
>  }
> 
> 
> 
>  /**
> 
> -  This function calculates RCR based on PCI Device ID and Vendor ID from the
> devices
> 
> -  available on the platform.
> 
> -  It also includes other instances of BIOS change to calculate CRC and 
> provides
> as
> 
> -  HWSignature filed in FADT table.
> 
> +  Function prototype for GetAcpiTableCount/CalculateAcpiTableCrc.
> 
> +
> 
> +  @param[in] TableThe pointer to ACPI table.
> 
> +  @param[in] TableIndex   The ACPI table index.
> 
> +  @param[in] Context  The pointer to UINTN for GetAcpiTableCount.
> 
> +  The pointer to UINT32 array for 
> CalculateAcpiTableCrc.
> 
>  **/
> 
> +typedef
> 
>  VOID
> 
> -IsHardwareChange (
> 
> -  VOID
> 
> +(EFIAPI *ACPI_TABLE_CALLBACK)(
> 
> +  IN  EFI_ACPI_COMMON_HEADER  *Table,
> 
> +  IN  UINTN   TableIndex,
> 
> +  IN  VOID*Context
> 
> +  );
> 
> +
> 
> +/**
> 
> +  Enumerate all ACPI tables in RSDT/XSDT.
> 
> +
> 
> +  @param[in] SdtACPI XSDT/RSDT.
> 
> +  @param[in] TablePointerSize   Size of table pointer:
> 
> +4(RSDT) or 8(XSDT).
> 
> +  @param[in] CallbackFunction   The pointer to
> GetAcpiTableCount/CalculateAcpiTableCrc.
> 
> +  @param[in] ContextThe pointer to UINTN for GetAcpiTableCount.
> 
> +The pointer to UINT32 array for 
> CalculateAcpiTableCrc.
> 
> +**/
> 
> +VOID
> 
> +EnumerateAllAcpiTables (
> 
> +  IN  EFI_ACPI_DESCRIPTION_HEADER  *Sdt,
> 
> +  IN  UINTNTablePointerSize,
> 
> +  IN  ACPI_TABLE_CALLBACK  CallbackFunction,
> 
> +  IN  VOID *Context
> 
>)
> 
>  {
> 
> -  EFI_STATUS   Status;
> 
> -  UINTNIndex;
> 
> -  UINTNHandleCount;
> 
> -  EFI_HANDLE   *HandleBuffer;
> 
> -  EFI_PCI_IO_PROTOCOL  *PciIo;
> 
> -  UINT32   CRC;
> 
> -  UINT32   *HWChange;
> 
> -  UINTNHWChangeSize;
> 
> -  UINT32   PciId;
> 
> -  UINTNHandle;
> 
> -  EFI_ACPI_6_5_FIRMWARE_ACPI_CONTROL_STRUCTURE *FacsPtr;
> 
> -  EFI_ACPI_6_5_FIXED_ACPI_DESCRIPTION_TABLE*pFADT;
> 
> -
> 
> -  HandleCount  = 0;
> 
> -  HandleBuffer = NULL;
> 
> -
> 
> -  Status = gBS->LocateHandleBuffer (
> 
> -  ByProtocol,
> 
> -  ,
> 
> -  NULL,
> 
> -  ,
> 
> -  
> 
> -  );
> 
> -  if (EFI_ERROR (Status)) {
> 
> -return; // PciIO protocol not installed yet!
> 
> +  UINTN  Index;
> 
> +  UINTN  TableIndex;
> 
> +  UINTN  

Re: [edk2-devel] [PATCH v9] MinPlatformPkg: Update HWSignature field in FACS

2023-05-30 Thread Chiu, Chasel


Thanks for the reviewing Ankit!
It looks to me current version is good enough for merging, if no other 
feedbacks I will help to merge it tomorrow.

Thanks,
Chasel


> -Original Message-
> From: Sinha, Ankit 
> Sent: Tuesday, May 30, 2023 8:53 AM
> To: Ke, VincentX ; devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Oram, Isaac W ;
> Gao, Liming ; Dong, Eric 
> Subject: RE: [PATCH v9] MinPlatformPkg: Update HWSignature field in FACS
> 
> Reviewed-by: Ankit Sinha 
> 
> Thank you,
> Ankit
> 
> > -Original Message-
> > From: Ke, VincentX 
> > Sent: Wednesday, May 24, 2023 1:39 AM
> > To: devel@edk2.groups.io
> > Cc: Ke, VincentX ; Chiu, Chasel
> > ; Desimone, Nathaniel L
> > ; Oram, Isaac W
> > ; Gao, Liming ;
> > Dong, Eric ; Sinha, Ankit 
> > Subject: [PATCH v9] MinPlatformPkg: Update HWSignature field in FACS
> >
> > From: VincentX Ke 
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4428
> >
> > Calculating CRC based on each ACPI table.
> > Update HWSignature field in FACS based on CRC while ACPI table changed.
> >
> > Change-Id: Ic0ca66ff10cda0fbcd0683020fab1bc9aea9b78c
> > Signed-off-by: VincentX Ke 
> > Cc: Chasel Chiu 
> > Cc: Nate DeSimone 
> > Cc: Isaac Oram 
> > Cc: Liming Gao 
> > Cc: Eric Dong 
> > Cc: Ankit Sinha
> > Signed-off-by: VincentX Ke 
> > ---
> >  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c   | 282
> > +++-
> >  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf |   1 +
> >  2 files changed, 215 insertions(+), 68 deletions(-)
> >
> > diff --git
> > a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> > b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> > index 2f2c96f907..ca1c73f6fe 100644
> > --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> > +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> > @@ -1191,98 +1191,244 @@ PlatformUpdateTables (  }
> >
> >
> >
> >  /**
> >
> > -  This function calculates RCR based on PCI Device ID and Vendor ID
> > from the devices
> >
> > -  available on the platform.
> >
> > -  It also includes other instances of BIOS change to calculate CRC
> > and provides as
> >
> > -  HWSignature filed in FADT table.
> >
> > +  Function prototype for GetAcpiTableCount/CalculateAcpiTableCrc.
> >
> > +
> >
> > +  @param[in] TableThe pointer to ACPI table.
> >
> > +  @param[in] TableIndex   The ACPI table index.
> >
> > +  @param[in] Context  The pointer to UINTN for GetAcpiTableCount.
> >
> > +  The pointer to UINT32 array for 
> > CalculateAcpiTableCrc.
> >
> >  **/
> >
> > +typedef
> >
> >  VOID
> >
> > -IsHardwareChange (
> >
> > -  VOID
> >
> > +(EFIAPI *ACPI_TABLE_CALLBACK)(
> >
> > +  IN  EFI_ACPI_COMMON_HEADER  *Table,
> >
> > +  IN  UINTN   TableIndex,
> >
> > +  IN  VOID*Context
> >
> > +  );
> >
> > +
> >
> > +/**
> >
> > +  Enumerate all ACPI tables in RSDT/XSDT.
> >
> > +
> >
> > +  @param[in] SdtACPI XSDT/RSDT.
> >
> > +  @param[in] TablePointerSize   Size of table pointer:
> >
> > +4(RSDT) or 8(XSDT).
> >
> > +  @param[in] CallbackFunction   The pointer to
> > GetAcpiTableCount/CalculateAcpiTableCrc.
> >
> > +  @param[in] ContextThe pointer to UINTN for GetAcpiTableCount.
> >
> > +The pointer to UINT32 array for 
> > CalculateAcpiTableCrc.
> >
> > +**/
> >
> > +VOID
> >
> > +EnumerateAllAcpiTables (
> >
> > +  IN  EFI_ACPI_DESCRIPTION_HEADER  *Sdt,
> >
> > +  IN  UINTNTablePointerSize,
> >
> > +  IN  ACPI_TABLE_CALLBACK  CallbackFunction,
> >
> > +  IN  VOID *Context
> >
> >)
> >
> >  {
> >
> > -  EFI_STATUS   Status;
> >
> > -  UINTNIndex;
> >
> > -  UINTNHandleCount;
> >
> > -  EFI_HANDLE   *HandleBuffer;
> >
> > -  EFI_PCI_IO_PROTOCOL  *PciIo;
> >
> &g

Re: [edk2-devel] [PATCH 1/1] IntelFsp2Pkg/Library/BaseFspCommonLib: Fix OVERRUN Coverity issue

2023-05-29 Thread Chiu, Chasel


Patch merged:
https://github.com/tianocore/edk2/commit/48c53994e649d51a388dc414944c9a9b717a1c3c

Thanks,
Chasel



> -Original Message-
> From: Ranbir Singh 
> Sent: Wednesday, May 17, 2023 11:29 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Zeng, Star ; Ranbir
> Singh 
> Subject: [PATCH 1/1] IntelFsp2Pkg/Library/BaseFspCommonLib: Fix OVERRUN
> Coverity issue
> 
> FspData->PerfIdx is getting increased for every call unconditionally
> in the function SetFspMeasurePoint and hence memory access can happen for
> out of bound FspData->PerfData[] array entries also.
> 
> Example -
>FspData->PerfData is an array of 32 UINT64 entries. Assume a call
>is made to SetFspMeasurePoint function when the FspData->PerfIdx
>last value is 31. It gets incremented to 32 at line 400.
>Any subsequent call to SetFspMeasurePoint functions leads to
>FspData->PerfData[32] getting accessed which is out of the PerfData
>array as well as the FSP_GLOBAL_DATA structure boundary.
> 
> Hence keep array access and index increment inside if block only and return
> invalid performance timestamp when PerfIdx is invalid.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4200
> Signed-off-by: Ranbir Singh 
> Signed-off-by: Ranbir Singh 
> ---
>  IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> index a22b0e7825ad..cda2a7b2478e 100644
> --- a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> +++ b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> @@ -377,7 +377,8 @@ GetFspSiliconInitUpdDataPointer (
> @param[in] Id   Measurement point ID. -  @return performance
> timestamp.+  @return performance timestamp if current PerfIdx is valid,+
> else return 0 as invalid performance timestamp **/ UINT64 EFIAPI@@ -395,9
> +396,10 @@ SetFspMeasurePoint (
>if (FspData->PerfIdx < sizeof (FspData->PerfData) / sizeof (FspData-
> >PerfData[0])) { FspData->PerfData[FspData->PerfIdx]  =
> AsmReadTsc (); ((UINT8 *)(>PerfData[FspData->PerfIdx]))[7] = Id;+
> return FspData->PerfData[(FspData->PerfIdx)++];   } -  return FspData-
> >PerfData[(FspData->PerfIdx)++];+  return (UINT64)0x; }
> /**--
> 2.34.1



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




Re: [edk2-devel] [PATCH] IntelFsp2WrapperPkg: Fix ASSERT when FSP-S/M use FFS3

2023-05-29 Thread Chiu, Chasel


Patch merged: 
https://github.com/tianocore/edk2/commit/69e10f02111bf7e719237f05233abff4e50016fa

Thanks,
Chasel


> -Original Message-
> From: Tan, Ming 
> Sent: Sunday, May 21, 2023 11:13 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Duggapu, Chinni B
> 
> Subject: [PATCH] IntelFsp2WrapperPkg: Fix ASSERT when FSP-S/M use FFS3
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4458
> 
> Original code call PeiServicesInstallFvInfoPpi() with NULL for the FvFormat
> parameter, then PeiServicesInstallFvInfoPpi() will assume it use FFS2, then
> ASSERT if FSP-S/M use FFS3.
> Now set the FvFormat to the info got from FvHeader.
> 
> Cc: Chasel Chiu 
> Cc: Duggapu Chinni B 
> Signed-off-by: Ming Tan 
> ---
>  IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 2 +-
> IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> index ea206a7960..ba0c742fea 100644
> --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> @@ -217,7 +217,7 @@ FspmWrapperInit (
>  ASSERT_EFI_ERROR (Status);  PeiServicesInstallFvInfoPpi (-  
> NULL,+
> &((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32
> (PcdFspmBaseAddress))->FileSystemGuid,   (VOID *)(UINTN)PcdGet32
> (PcdFspmBaseAddress),   (UINT32)((EFI_FIRMWARE_VOLUME_HEADER
> *)(UINTN)PcdGet32 (PcdFspmBaseAddress))->FvLength,   NULL,diff --git
> a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> index 091ddb697a..08fe0fdb7e 100644
> --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> @@ -438,7 +438,7 @@ FspsWrapperInitDispatchMode (
>// FSP-S Wrapper running in Dispatch mode and reports FSP-S FV to PEI
> dispatcher.   //   PeiServicesInstallFvInfoPpi (-NULL,+
> &((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32
> (PcdFspsBaseAddress))->FileSystemGuid, (VOID *)(UINTN)PcdGet32
> (PcdFspsBaseAddress), (UINT32)((EFI_FIRMWARE_VOLUME_HEADER
> *)(UINTN)PcdGet32 (PcdFspsBaseAddress))->FvLength, NULL,--
> 2.31.1.windows.1



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




Re: [edk2-devel] [PATCH 1/1] IntelFsp2Pkg/Library/BaseFspCommonLib: Fix OVERRUN Coverity issue

2023-05-29 Thread Chiu, Chasel

That’s good suggestion Pedro!
Ranbir, would you like me to modify your patch to "return 0" during merging?

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Pedro
> Falcato
> Sent: Friday, May 19, 2023 5:29 AM
> To: devel@edk2.groups.io; rsi...@ventanamicro.com
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Zeng, Star ; Ranbir
> Singh 
> Subject: Re: [edk2-devel] [PATCH 1/1] IntelFsp2Pkg/Library/BaseFspCommonLib:
> Fix OVERRUN Coverity issue
> 
> On Thu, May 18, 2023 at 4:16 PM Ranbir Singh 
> wrote:
> >
> > FspData->PerfIdx is getting increased for every call unconditionally
> > in the function SetFspMeasurePoint and hence memory access can happen
> > for out of bound FspData->PerfData[] array entries also.
> >
> > Example -
> >FspData->PerfData is an array of 32 UINT64 entries. Assume a call
> >is made to SetFspMeasurePoint function when the FspData->PerfIdx
> >last value is 31. It gets incremented to 32 at line 400.
> >Any subsequent call to SetFspMeasurePoint functions leads to
> >FspData->PerfData[32] getting accessed which is out of the PerfData
> >array as well as the FSP_GLOBAL_DATA structure boundary.
> >
> > Hence keep array access and index increment inside if block only and
> > return invalid performance timestamp when PerfIdx is invalid.
> >
> > Cc: Chasel Chiu 
> > Cc: Nate DeSimone 
> > Cc: Star Zeng 
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4200
> > Signed-off-by: Ranbir Singh 
> > Signed-off-by: Ranbir Singh 
> > ---
> >  IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c | 6 --
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> > b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> > index a22b0e7825ad..cda2a7b2478e 100644
> > --- a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> > +++ b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> > @@ -377,7 +377,8 @@ GetFspSiliconInitUpdDataPointer (
> >
> >@param[in] Id   Measurement point ID.
> >
> > -  @return performance timestamp.
> > +  @return performance timestamp if current PerfIdx is valid,
> > +  else return 0 as invalid performance timestamp
> >  **/
> >  UINT64
> >  EFIAPI
> > @@ -395,9 +396,10 @@ SetFspMeasurePoint (
> >if (FspData->PerfIdx < sizeof (FspData->PerfData) / sizeof (FspData-
> >PerfData[0])) {
> >  FspData->PerfData[FspData->PerfIdx]  = AsmReadTsc ();
> >  ((UINT8 *)(>PerfData[FspData->PerfIdx]))[7] = Id;
> > +return FspData->PerfData[(FspData->PerfIdx)++];
> >}
> >
> > -  return FspData->PerfData[(FspData->PerfIdx)++];
> > +  return (UINT64)0x;
> 
> return 0;
> 
> Works just as well. You also don't need a cast.
> 
> https://godbolt.org/z/e5vvGcWWo
> 
> --
> Pedro
> 
> 
> 
> 



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




Re: [edk2-devel] [PATCH 4/6] MinPlatform/build_bios.py: Support performance enabled build

2023-05-24 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel



> -Original Message-
> From: Ni, Ray 
> Sent: Wednesday, May 24, 2023 5:29 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Oram, Isaac W ;
> Gao, Liming ; Dong, Eric 
> Subject: [PATCH 4/6] MinPlatform/build_bios.py: Support performance enabled
> build
> 
> build_bios.py supports caller to pass in "--performance" flag but the script
> implemnetation just ignores this flag.
> 
> The patch adds the missing logic to invoke build.py with "--pcd
> gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable=True"
> when "--performance" is supplied.
> 
> Signed-off-by: Ray Ni 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Isaac Oram 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  Platform/Intel/build_bios.py | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index
> da4097d5db..9c95cfff76 100755
> --- a/Platform/Intel/build_bios.py
> +++ b/Platform/Intel/build_bios.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python3
> +#!/usr/bin/env python3 # # @ build_bios.py # Builds BIOS using configuration
> files and dynamically@@ -421,6 +421,10 @@ def build(config):
>  command.append("--pcd")
> command.append("gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection=1
> ") +if config.get("PERFORMANCE_BUILD", "FALSE") == "TRUE":+
> command.append("--pcd")+
> command.append("gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable=T
> rue")+ shell = True if os.name == "posix": shell = False--
> 2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105286): https://edk2.groups.io/g/devel/message/105286
Mute This Topic: https://groups.io/mt/99107260/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 v2] MinPlatformPkg: Fix SetLargeVariable fail issue

2023-05-24 Thread Chiu, Chasel


Patch merged:
https://github.com/tianocore/edk2-platforms/commit/b71f2bda9e4fc183068eef5d1d90a631181a2506

Thanks,
Chasel


> -Original Message-
> From: Shindo, Miki 
> Sent: Tuesday, May 23, 2023 5:44 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Gao, Liming ;
> Dong, Eric ; Zhang, Xiaoqiang
> 
> Subject: [edk2-platforms:PATCH v2] MinPlatformPkg: Fix SetLargeVariable fail
> issue
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4454
> 
> On Server platform, when the large variable "FspNvsBuffer" is already in the
> UEFI variable store and the remaining variable storage space is less than the
> large variable size, and also not in OS runtime, then we need to add the size 
> of
> the current data that will end up being replaced by the new data to the
> remaining space before we decide that there is not enough space to store the
> large variable.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Co-authored-by: Xiaoqiang Zhang 
> Signed-off-by: Miki Shindo 
> ---
> 
> Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/LargeVariableWri
> teLib.c   | 10 +-
> 
> Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRunti
> meVariableWriteLib.c| 15 +++
> 
> Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/SmmVariableWrit
> eCommon.c   | 16 
> 
> Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVa
> riableWriteLibConstructor.c  | 30 ++
> Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVa
> riableWriteLibConstructor.c | 30 ++
>  Platform/Intel/MinPlatformPkg/Include/Library/VariableWriteLib.h
> | 12 
> 
> Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/BaseLargeVariabl
> eWriteLib.inf |  1 +
> 
> Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVa
> riableWriteLib.inf   |  3 ++-
> 
> Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVa
> riableWriteLib.inf  |  3 ++-
>  9 files changed, 117 insertions(+), 3 deletions(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/LargeVariable
> WriteLib.c
> b/Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/LargeVariable
> WriteLib.c
> index de23ae6160..4bf9a6994f 100644
> ---
> a/Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/LargeVariable
> WriteLib.c
> +++ b/Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/LargeVa
> +++ riableWriteLib.c
> @@ -22,7 +22,7 @@
>  #include  #include  #include
> -+#include 
> #include "LargeVariableCommon.h"  /**@@ -270,6 +270,7 @@
> SetLargeVariable (
>UINT8 *OffsetPtr;   UINTN BytesRemaining;   UINTN
> SizeToSave;+  UINTN BufferSize = 0;//   // Check input 
> parameters.@@ -
> 365,6 +366,13 @@ SetLargeVariable (
>  // Non-Volatile storage to store the data. // 
> RemainingVariableStorage =
> GetRemainingVariableStorageSpace ();+//+// Check if current variable
> already existed in NV storage variable space+//+Status = 
> GetLargeVariable
> (VariableName, VendorGuid, , NULL);+if ((Status ==
> EFI_BUFFER_TOO_SMALL) && (BufferSize != 0) && !VarLibAtOsRuntime ()) {+
> RemainingVariableStorage = RemainingVariableStorage + BufferSize;+} if
> (DataSize > RemainingVariableStorage) {   DEBUG ((DEBUG_ERROR,
> "SetLargeVariable: Not enough NV storage space to store the data\n"));
> Status = EFI_OUT_OF_RESOURCES;diff --git
> a/Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRun
> timeVariableWriteLib.c
> b/Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRun
> timeVariableWriteLib.c
> index 28730f858b..9ca4734f24 100644
> ---
> a/Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRun
> timeVariableWriteLib.c
> +++ b/Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/D
> +++ xeRuntimeVariableWriteLib.c
> @@ -195,6 +195,21 @@ VarLibVariableRequestToLock (
>return Status; } +/**+  Indicator of whether it is runtime or not.++  
> @retval
> TRUEIt is Runtime.+  @retval FALSE   It is not
> Runtime.+**/+BOOLEAN+EFIAPI+VarLibAtOsRuntime (+  VOID+  )+{+  return
> (mVariableWriteLibVariablePolicy == NULL) ? TRUE : FALSE;+}+ /**   Close
> events when driver unloaded. diff --git
> a/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/SmmVariableW
> riteCommon.c
> b/Platform/Intel/MinPlatformPkg/Library/SmmV

Re: [edk2-devel] [edk2-platforms:PATCH v2] MinPlatformPkg: Fix SetLargeVariable fail issue

2023-05-23 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu mailto:chasel.c...@intel.com>>

Thanks,
Chasel


From: Desimone, Nathaniel L 
Sent: Tuesday, May 23, 2023 5:59 PM
To: Shindo, Miki ; devel@edk2.groups.io
Cc: Chiu, Chasel ; Gao, Liming 
; Dong, Eric ; Zhang, Xiaoqiang 

Subject: Re: [edk2-platforms:PATCH v2] MinPlatformPkg: Fix SetLargeVariable 
fail issue

Thank you, Miki, and Xiaoqiang!

Reviewed-by: Nate DeSimone 
mailto:nathaniel.l.desim...@intel.com>>

From: Shindo, Miki mailto:miki.shi...@intel.com>>
Date: Tuesday, May 23, 2023 at 5:44 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>>
Cc: Chiu, Chasel mailto:chasel.c...@intel.com>>, 
Desimone, Nathaniel L 
mailto:nathaniel.l.desim...@intel.com>>, Gao, 
Liming mailto:gaolim...@byosoft.com.cn>>, Dong, Eric 
mailto:eric.d...@intel.com>>, Zhang, Xiaoqiang 
mailto:xiaoqiang.zh...@intel.com>>
Subject: [edk2-platforms:PATCH v2] MinPlatformPkg: Fix SetLargeVariable fail 
issue
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4454

On Server platform, when the large variable "FspNvsBuffer" is already in the 
UEFI variable store and the remaining variable storage space is less than the 
large variable size, and also not in OS runtime, then we need to add the size 
of the current data that will end up being replaced by the new data to the 
remaining space before we decide that there is not enough space to store the 
large variable.

Cc: Chasel Chiu mailto:chasel.c...@intel.com>>
Cc: Nate DeSimone 
mailto:nathaniel.l.desim...@intel.com>>
Cc: Liming Gao mailto:gaolim...@byosoft.com.cn>>
Cc: Eric Dong mailto:eric.d...@intel.com>>
Co-authored-by: Xiaoqiang Zhang 
mailto:xiaoqiang.zh...@intel.com>>
Signed-off-by: Miki Shindo mailto:miki.shi...@intel.com>>
---
 
Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/LargeVariableWriteLib.c
   | 10 +-
 
Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRuntimeVariableWriteLib.c
| 15 +++
 
Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/SmmVariableWriteCommon.c
   | 16 
 
Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVariableWriteLibConstructor.c
  | 30 ++
 
Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVariableWriteLibConstructor.c
 | 30 ++
 Platform/Intel/MinPlatformPkg/Include/Library/VariableWriteLib.h   
  | 12 
 
Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/BaseLargeVariableWriteLib.inf
 |  1 +
 
Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVariableWriteLib.inf
   |  3 ++-
 
Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVariableWriteLib.inf
  |  3 ++-
 9 files changed, 117 insertions(+), 3 deletions(-)

diff --git 
a/Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/LargeVariableWriteLib.c
 
b/Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/LargeVariableWriteLib.c
index de23ae6160..4bf9a6994f 100644
--- 
a/Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/LargeVariableWriteLib.c
+++ 
b/Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/LargeVariableWriteLib.c
@@ -22,7 +22,7 @@
 #include 

 #include 

 #include 

-

+#include 

 #include "LargeVariableCommon.h"



 /**

@@ -270,6 +270,7 @@ SetLargeVariable (
   UINT8 *OffsetPtr;

   UINTN BytesRemaining;

   UINTN SizeToSave;

+  UINTN BufferSize = 0;



   //

   // Check input parameters.

@@ -365,6 +366,13 @@ SetLargeVariable (
 // Non-Volatile storage to store the data.

 //

 RemainingVariableStorage = GetRemainingVariableStorageSpace ();

+//

+// Check if current variable already existed in NV storage variable space

+//

+Status = GetLargeVariable (VariableName, VendorGuid, , NULL);

+if ((Status == EFI_BUFFER_TOO_SMALL) && (BufferSize != 0) && 
!VarLibAtOsRuntime ()) {

+  RemainingVariableStorage = RemainingVariableStorage + BufferSize;

+}

 if (DataSize > RemainingVariableStorage) {

   DEBUG ((DEBUG_ERROR, "SetLargeVariable: Not enough NV storage space to 
store the data\n"));

   Status = EFI_OUT_OF_RESOURCES;

diff --git 
a/Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRuntimeVariableWriteLib.c
 
b/Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRuntimeVariableWriteLib.c
index 28730f858b..9ca4734f24 100644
--- 
a/Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRuntimeVariableWriteLib.c
+++ 
b/Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRuntimeVariableWriteLib.c
@@ -195,6 +195,21 @@ VarLibVariableRequestToLock (
   return Status;

 }



+/**

+

Re: [edk2-devel] [PATCH] IntelFsp2WrapperPkg: Fix ASSERT when FSP-S/M use FFS3

2023-05-22 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Tan, Ming 
> Sent: Sunday, May 21, 2023 11:13 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Duggapu, Chinni B
> 
> Subject: [PATCH] IntelFsp2WrapperPkg: Fix ASSERT when FSP-S/M use FFS3
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4458
> 
> Original code call PeiServicesInstallFvInfoPpi() with NULL for the FvFormat
> parameter, then PeiServicesInstallFvInfoPpi() will assume it use FFS2, then
> ASSERT if FSP-S/M use FFS3.
> Now set the FvFormat to the info got from FvHeader.
> 
> Cc: Chasel Chiu 
> Cc: Duggapu Chinni B 
> Signed-off-by: Ming Tan 
> ---
>  IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 2 +-
> IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> index ea206a7960..ba0c742fea 100644
> --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> @@ -217,7 +217,7 @@ FspmWrapperInit (
>  ASSERT_EFI_ERROR (Status);  PeiServicesInstallFvInfoPpi (-  
> NULL,+
> &((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32
> (PcdFspmBaseAddress))->FileSystemGuid,   (VOID *)(UINTN)PcdGet32
> (PcdFspmBaseAddress),   (UINT32)((EFI_FIRMWARE_VOLUME_HEADER
> *)(UINTN)PcdGet32 (PcdFspmBaseAddress))->FvLength,   NULL,diff --git
> a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> index 091ddb697a..08fe0fdb7e 100644
> --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> @@ -438,7 +438,7 @@ FspsWrapperInitDispatchMode (
>// FSP-S Wrapper running in Dispatch mode and reports FSP-S FV to PEI
> dispatcher.   //   PeiServicesInstallFvInfoPpi (-NULL,+
> &((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32
> (PcdFspsBaseAddress))->FileSystemGuid, (VOID *)(UINTN)PcdGet32
> (PcdFspsBaseAddress), (UINT32)((EFI_FIRMWARE_VOLUME_HEADER
> *)(UINTN)PcdGet32 (PcdFspsBaseAddress))->FvLength, NULL,--
> 2.31.1.windows.1



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




Re: [edk2-devel] [PATCH 1/1] IntelFsp2Pkg/Library/BaseFspCommonLib: Fix OVERRUN Coverity issue

2023-05-18 Thread Chiu, Chasel


This fix looks good to me! Thanks Ranbir!
Reviewed-by: Chasel Chiu 


> -Original Message-
> From: Ranbir Singh 
> Sent: Wednesday, May 17, 2023 11:29 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Zeng, Star ; Ranbir
> Singh 
> Subject: [PATCH 1/1] IntelFsp2Pkg/Library/BaseFspCommonLib: Fix OVERRUN
> Coverity issue
> 
> FspData->PerfIdx is getting increased for every call unconditionally
> in the function SetFspMeasurePoint and hence memory access can happen for
> out of bound FspData->PerfData[] array entries also.
> 
> Example -
>FspData->PerfData is an array of 32 UINT64 entries. Assume a call
>is made to SetFspMeasurePoint function when the FspData->PerfIdx
>last value is 31. It gets incremented to 32 at line 400.
>Any subsequent call to SetFspMeasurePoint functions leads to
>FspData->PerfData[32] getting accessed which is out of the PerfData
>array as well as the FSP_GLOBAL_DATA structure boundary.
> 
> Hence keep array access and index increment inside if block only and return
> invalid performance timestamp when PerfIdx is invalid.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4200
> Signed-off-by: Ranbir Singh 
> Signed-off-by: Ranbir Singh 
> ---
>  IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> index a22b0e7825ad..cda2a7b2478e 100644
> --- a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> +++ b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> @@ -377,7 +377,8 @@ GetFspSiliconInitUpdDataPointer (
> @param[in] Id   Measurement point ID. -  @return performance
> timestamp.+  @return performance timestamp if current PerfIdx is valid,+
> else return 0 as invalid performance timestamp **/ UINT64 EFIAPI@@ -395,9
> +396,10 @@ SetFspMeasurePoint (
>if (FspData->PerfIdx < sizeof (FspData->PerfData) / sizeof (FspData-
> >PerfData[0])) { FspData->PerfData[FspData->PerfIdx]  =
> AsmReadTsc (); ((UINT8 *)(>PerfData[FspData->PerfIdx]))[7] = Id;+
> return FspData->PerfData[(FspData->PerfIdx)++];   } -  return FspData-
> >PerfData[(FspData->PerfIdx)++];+  return (UINT64)0x; }
> /**--
> 2.34.1



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




Re: [edk2-devel] [PATCH v3] MinPlatformPkg: Update ACPI 6.5 definition

2023-05-16 Thread Chiu, Chasel


Patch merged:
https://github.com/tianocore/edk2-platforms/commit/3c8ea51b1285c983fa81806d75a924d87cc7e732

Thanks,
Chasel


> -Original Message-
> From: Chen, Aryeh 
> Sent: Wednesday, May 10, 2023 8:58 PM
> To: devel@edk2.groups.io
> Cc: Chen, Aryeh ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Oram, Isaac W ;
> Gao, Liming ; Dong, Eric ;
> Yao, Jiewen ; Sinha, Ankit 
> Subject: [PATCH v3] MinPlatformPkg: Update ACPI 6.5 definition
> 
> From: Aryeh Chen 
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=4442
> 
> Update ACPI 6.5 definition on MinPlatformPkg
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Isaac Oram 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Cc: Jiewen Yao 
> Cc: Ankit Sinha
> 
> Signed-off-by: Aryeh Chen 
> ---
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c 
>  |
> 154 ++--
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/Facs/Facs.c
>  |
> 8 +-
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/Fadt/Fadt.c
>  |
> 46 +++---
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/Hpet/Hpet.c
>  |
> 4 +-
> 
> Platform/Intel/MinPlatformPkg/Acpi/Library/DxeAslUpdateLib/DxeAslUpdateLib
> .c  |   2 +-
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec 
>  |   2
> +-
> 
> Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckAcpi.c
> | 154 ++--
> 
> Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckAcpi
> Madt.c   | 150 +--
> 
> Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckDmaP
> rotection.c  |   4 +-
> 
> Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckTcgTr
> ustedBoot.c |   2 +-
> 
> Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeTestPointCh
> eckLib.c   |   2 +-
>  11 files changed, 264 insertions(+), 264 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> index e967031a3b..2f2c96f907 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> @@ -27,9 +27,9 @@ typedef struct {
>  // Define Union of IO APIC & Local APIC structure;
> 
>  //
> 
>  typedef union {
> 
> -  EFI_ACPI_6_3_PROCESSOR_LOCAL_APIC_STRUCTURE   AcpiLocalApic;
> 
> -  EFI_ACPI_6_3_IO_APIC_STRUCTUREAcpiIoApic;
> 
> -  EFI_ACPI_6_3_PROCESSOR_LOCAL_X2APIC_STRUCTURE AcpiLocalx2Apic;
> 
> +  EFI_ACPI_6_5_PROCESSOR_LOCAL_APIC_STRUCTURE   AcpiLocalApic;
> 
> +  EFI_ACPI_6_5_IO_APIC_STRUCTUREAcpiIoApic;
> 
> +  EFI_ACPI_6_5_PROCESSOR_LOCAL_X2APIC_STRUCTURE AcpiLocalx2Apic;
> 
>struct {
> 
>  UINT8 Type;
> 
>  UINT8 Length;
> 
> @@ -38,8 +38,8 @@ typedef union {
> 
> 
>  #pragma pack()
> 
> 
> 
> -extern EFI_ACPI_6_3_FIRMWARE_ACPI_CONTROL_STRUCTURE Facs;
> 
> -extern EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLEFadt;
> 
> +extern EFI_ACPI_6_5_FIRMWARE_ACPI_CONTROL_STRUCTURE Facs;
> 
> +extern EFI_ACPI_6_5_FIXED_ACPI_DESCRIPTION_TABLEFadt;
> 
>  extern EFI_ACPI_HIGH_PRECISION_EVENT_TIMER_TABLE_HEADER Hpet;
> 
>  extern EFI_ACPI_WSMT_TABLE Wsmt;
> 
> 
> 
> @@ -92,16 +92,16 @@ AppendCpuMapTableEntry (
>)
> 
>  {
> 
>EFI_STATUSStatus;
> 
> -  EFI_ACPI_6_3_PROCESSOR_LOCAL_APIC_STRUCTURE   *LocalApicPtr;
> 
> -  EFI_ACPI_6_3_PROCESSOR_LOCAL_X2APIC_STRUCTURE *LocalX2ApicPtr;
> 
> +  EFI_ACPI_6_5_PROCESSOR_LOCAL_APIC_STRUCTURE   *LocalApicPtr;
> 
> +  EFI_ACPI_6_5_PROCESSOR_LOCAL_X2APIC_STRUCTURE *LocalX2ApicPtr;
> 
>UINT8 Type;
> 
> 
> 
>Status = EFI_SUCCESS;
> 
>Type = ((ACPI_APIC_STRUCTURE_PTR *)ApicPtr)->AcpiApicCommon.Type;
> 
> -  LocalApicPtr = (EFI_ACPI_6_3_PROCESSOR_LOCAL_APIC_STRUCTURE
> *)(&((ACPI_APIC_STRUCTURE_PTR *)ApicPtr)->AcpiLocalApic);
> 
> -  LocalX2ApicPtr = (EFI_ACPI_6_3_PROCESSOR_LOCAL_X2APIC_STRUCTURE
> *)(&((ACPI_APIC_STRUCTURE_PTR *)ApicPtr)->AcpiLocalx2Apic);
> 
> +  LocalApicPtr = (EFI_ACPI_6_5_PROCESSOR_LOCAL_APIC_STRUCTURE
> *)(&((ACPI_APIC_STRUCTURE_PTR *)ApicPtr)->AcpiLocalApic);
> 
> +  LocalX2ApicPtr = (EFI_ACPI_6_5_PROCESSOR_LOCAL_X2APIC_STRUCTURE
> *)(&((ACPI_APIC_STRUCTURE_PTR *)ApicPtr)->AcpiLocalx2Apic);
> 
> 
> 
> -  if(Type == EFI_ACPI_6_3_PROCESSOR_LOCAL_APIC) {
> 
> +  if(Type == EFI_ACPI_6_5_PRO

Re: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update reviewers and maintainer for FdtLib

2023-05-15 Thread Chiu, Chasel

Thanks Liming!

> -Original Message-
> From: gaoliming 
> Sent: Sunday, May 14, 2023 6:01 PM
> To: devel@edk2.groups.io; Chiu, Chasel ; Guo, Gua
> 
> Cc: 'Andrew Fish' ; 'Leif Lindholm'
> ; Kinney, Michael D 
> Subject: 回复: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update reviewers
> and maintainer for FdtLib
> 
> Chasel:
>   I just merge it.
> 
> Thanks
> Liming
> > -----邮件原件-
> > 发件人: devel@edk2.groups.io  代表 Chiu, Chasel
> > 发送时间: 2023年5月12日 15:15
> > 收件人: devel@edk2.groups.io; Chiu, Chasel ; Gao,
> > Liming ; Guo, Gua 
> > 抄送: 'Andrew Fish' ; 'Leif Lindholm'
> > ; Kinney, Michael D
> > 
> > 主题: Re: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update reviewers
> > and maintainer for FdtLib
> >
> >
> > Hi Liming,
> >
> > PR has been updated with all RB:
> > https://github.com/tianocore/edk2/pull/4389/commits
> >
> > Thanks,
> > Chasel
> >
> >
> > > -Original Message-
> > > From: devel@edk2.groups.io  On Behalf Of Chiu,
> > Chasel
> > > Sent: Friday, May 12, 2023 12:11 AM
> > > To: devel@edk2.groups.io; Gao, Liming ;
> > > Guo, Gua 
> > > Cc: 'Andrew Fish' ; 'Leif Lindholm'
> > > ; Kinney, Michael D
> > 
> > > Subject: Re: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update
> > > reviewers
> > and
> > > maintainer for FdtLib
> > >
> > >
> > > Thanks Liming!
> > >
> > > > -Original Message-
> > > > From: devel@edk2.groups.io  On Behalf Of
> > > > gaoliming via groups.io
> > > > Sent: Thursday, May 11, 2023 7:45 PM
> > > > To: Chiu, Chasel ; devel@edk2.groups.io;
> > > > Guo, Gua 
> > > > Cc: 'Andrew Fish' ; 'Leif Lindholm'
> > > > ; Kinney, Michael D
> > > > 
> > > > Subject: 回复: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update
> > > > reviewers and maintainer for FdtLib
> > > >
> > > > Chasel:
> > > >   I agree to merge this change together with code change for this
> > > > stable
> > tag.
> > > >
> > > > Thanks
> > > > Liming
> > > > > -邮件原件-
> > > > > 发件人: Chiu, Chasel 
> > > > > 发送时间: 2023年5月12日 10:35
> > > > > 收件人: devel@edk2.groups.io; Guo, Gua ; Gao,
> > > Liming
> > > > > 
> > > > > 抄送: Andrew Fish ; Leif Lindholm
> > > > > ; Kinney, Michael D
> > > > > 
> > > > > 主题: RE: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update
> > > > > reviewers
> > > > and
> > > > > maintainer for FdtLib
> > > > >
> > > > >
> > > > > Hi Liming,
> > > > >
> > > > > We are considering this is a missing when merging FdtLib support 
> > > > > earlier.
> > > > > Do we need to wait for Stewards approval for adding maintainers?
> > > > >
> > > > > Thanks,
> > > > > Chasel
> > > > >
> > > > >
> > > > > > -Original Message-
> > > > > > From: devel@edk2.groups.io  On Behalf Of
> > > > > > Guo,
> > > > > Gua
> > > > > > Sent: Thursday, May 11, 2023 7:31 PM
> > > > > > To: devel@edk2.groups.io; Gao, Liming
> > > > > > 
> > > > > > Subject: Re: [edk2-devel] [PATCH v1 0/1] Maintainers.txt:
> > > > > > Update
> > > > reviewers
> > > > > and
> > > > > > maintainer for FdtLib
> > > > > >
> > > > > > Hi Liming,
> > > > > >
> > > > > > Do you know whether for code freeze also include
> > > > > > Maintainers.txt update
> > > > ?
> > > > > > Or maybe we can submit it once the change approve.
> > > > > >
> > > > > > Thanks,
> > > > > > Gua
> > > > > > -Original Message-
> > > > > > From: Guo, Gua 
> > > > > > Sent: Friday, May 12, 2023 10:11 AM
> > > > > > To: devel@edk2.groups.io
> > > > > > Cc: Guo, Gua 
> > > > > > Subject: [PATCH v1 0/1] Maintainers.txt: Update reviewers and
> > > > > > maintainer
> > > > > for
> > > > > > FdtLib
> > > > > >
> > > > > > From: Gua Guo 
> > > > > >
> > > > > > V1
> > > > > >   PR: https://github.com/tianocore/edk2/pull/4389
> > > > > >   Maintainer: Benny Lin 
> > > > > >   Reviewer: Gua Guo 
> > > > > >   Reviewer: Chasel Chiu 
> > > > > >   Reviewer: James Lu 
> > > > > >
> > > > > > Gua Guo (1):
> > > > > >   Maintainers.txt: Update reviewers and maintainers for FdtLib.
> > Update
> > > > > > reviewers and maintainers for FdtLib.
> > > > > >
> > > > > >  Maintainers.txt | 8 
> > > > > >  1 file changed, 8 insertions(+)
> > > > > >
> > > > > > --
> > > > > > 2.39.2.windows.1
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> > 
> >
> 
> 



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




Re: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update reviewers and maintainer for FdtLib

2023-05-12 Thread Chiu, Chasel

Hi Liming,

PR has been updated with all RB: 
https://github.com/tianocore/edk2/pull/4389/commits

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Chiu, Chasel
> Sent: Friday, May 12, 2023 12:11 AM
> To: devel@edk2.groups.io; Gao, Liming ; Guo,
> Gua 
> Cc: 'Andrew Fish' ; 'Leif Lindholm'
> ; Kinney, Michael D 
> Subject: Re: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update reviewers and
> maintainer for FdtLib
> 
> 
> Thanks Liming!
> 
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of
> > gaoliming via groups.io
> > Sent: Thursday, May 11, 2023 7:45 PM
> > To: Chiu, Chasel ; devel@edk2.groups.io; Guo,
> > Gua 
> > Cc: 'Andrew Fish' ; 'Leif Lindholm'
> > ; Kinney, Michael D
> > 
> > Subject: 回复: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update
> > reviewers and maintainer for FdtLib
> >
> > Chasel:
> >   I agree to merge this change together with code change for this stable 
> > tag.
> >
> > Thanks
> > Liming
> > > -邮件原件-
> > > 发件人: Chiu, Chasel 
> > > 发送时间: 2023年5月12日 10:35
> > > 收件人: devel@edk2.groups.io; Guo, Gua ; Gao,
> Liming
> > > 
> > > 抄送: Andrew Fish ; Leif Lindholm
> > > ; Kinney, Michael D
> > > 
> > > 主题: RE: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update
> > > reviewers
> > and
> > > maintainer for FdtLib
> > >
> > >
> > > Hi Liming,
> > >
> > > We are considering this is a missing when merging FdtLib support earlier.
> > > Do we need to wait for Stewards approval for adding maintainers?
> > >
> > > Thanks,
> > > Chasel
> > >
> > >
> > > > -Original Message-
> > > > From: devel@edk2.groups.io  On Behalf Of
> > > > Guo,
> > > Gua
> > > > Sent: Thursday, May 11, 2023 7:31 PM
> > > > To: devel@edk2.groups.io; Gao, Liming 
> > > > Subject: Re: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update
> > reviewers
> > > and
> > > > maintainer for FdtLib
> > > >
> > > > Hi Liming,
> > > >
> > > > Do you know whether for code freeze also include Maintainers.txt
> > > > update
> > ?
> > > > Or maybe we can submit it once the change approve.
> > > >
> > > > Thanks,
> > > > Gua
> > > > -Original Message-
> > > > From: Guo, Gua 
> > > > Sent: Friday, May 12, 2023 10:11 AM
> > > > To: devel@edk2.groups.io
> > > > Cc: Guo, Gua 
> > > > Subject: [PATCH v1 0/1] Maintainers.txt: Update reviewers and
> > > > maintainer
> > > for
> > > > FdtLib
> > > >
> > > > From: Gua Guo 
> > > >
> > > > V1
> > > >   PR: https://github.com/tianocore/edk2/pull/4389
> > > >   Maintainer: Benny Lin 
> > > >   Reviewer: Gua Guo 
> > > >   Reviewer: Chasel Chiu 
> > > >   Reviewer: James Lu 
> > > >
> > > > Gua Guo (1):
> > > >   Maintainers.txt: Update reviewers and maintainers for FdtLib. Update
> > > > reviewers and maintainers for FdtLib.
> > > >
> > > >  Maintainers.txt | 8 
> > > >  1 file changed, 8 insertions(+)
> > > >
> > > > --
> > > > 2.39.2.windows.1
> > > >
> > > >
> > > >
> > > >
> > > >
> >
> >
> >
> >
> >
> >
> >
> 
> 
> 
> 
> 



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




Re: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update reviewers and maintainer for FdtLib

2023-05-12 Thread Chiu, Chasel

Thanks Liming!

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of gaoliming
> via groups.io
> Sent: Thursday, May 11, 2023 7:45 PM
> To: Chiu, Chasel ; devel@edk2.groups.io; Guo, Gua
> 
> Cc: 'Andrew Fish' ; 'Leif Lindholm'
> ; Kinney, Michael D 
> Subject: 回复: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update reviewers
> and maintainer for FdtLib
> 
> Chasel:
>   I agree to merge this change together with code change for this stable tag.
> 
> Thanks
> Liming
> > -邮件原件-
> > 发件人: Chiu, Chasel 
> > 发送时间: 2023年5月12日 10:35
> > 收件人: devel@edk2.groups.io; Guo, Gua ; Gao, Liming
> > 
> > 抄送: Andrew Fish ; Leif Lindholm
> > ; Kinney, Michael D
> > 
> > 主题: RE: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update reviewers
> and
> > maintainer for FdtLib
> >
> >
> > Hi Liming,
> >
> > We are considering this is a missing when merging FdtLib support earlier.
> > Do we need to wait for Stewards approval for adding maintainers?
> >
> > Thanks,
> > Chasel
> >
> >
> > > -Original Message-
> > > From: devel@edk2.groups.io  On Behalf Of Guo,
> > Gua
> > > Sent: Thursday, May 11, 2023 7:31 PM
> > > To: devel@edk2.groups.io; Gao, Liming 
> > > Subject: Re: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update
> reviewers
> > and
> > > maintainer for FdtLib
> > >
> > > Hi Liming,
> > >
> > > Do you know whether for code freeze also include Maintainers.txt
> > > update
> ?
> > > Or maybe we can submit it once the change approve.
> > >
> > > Thanks,
> > > Gua
> > > -Original Message-
> > > From: Guo, Gua 
> > > Sent: Friday, May 12, 2023 10:11 AM
> > > To: devel@edk2.groups.io
> > > Cc: Guo, Gua 
> > > Subject: [PATCH v1 0/1] Maintainers.txt: Update reviewers and
> > > maintainer
> > for
> > > FdtLib
> > >
> > > From: Gua Guo 
> > >
> > > V1
> > >   PR: https://github.com/tianocore/edk2/pull/4389
> > >   Maintainer: Benny Lin 
> > >   Reviewer: Gua Guo 
> > >   Reviewer: Chasel Chiu 
> > >   Reviewer: James Lu 
> > >
> > > Gua Guo (1):
> > >   Maintainers.txt: Update reviewers and maintainers for FdtLib. Update
> > > reviewers and maintainers for FdtLib.
> > >
> > >  Maintainers.txt | 8 
> > >  1 file changed, 8 insertions(+)
> > >
> > > --
> > > 2.39.2.windows.1
> > >
> > >
> > >
> > >
> > >
> 
> 
> 
> 
> 
> 
> 



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




Re: [edk2-devel] [PATCH v1 1/1] Maintainers.txt: Update reviewers and maintainers for FdtLib. Update reviewers and maintainers for FdtLib.

2023-05-11 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Guo, Gua 
> Sent: Thursday, May 11, 2023 7:11 PM
> To: devel@edk2.groups.io
> Cc: Guo, Gua ; Kinney, Michael D
> ; Andrew Fish ; Leif Lindholm
> ; Lin, Benny ; Chiu, Chasel
> ; Lu, James 
> Subject: [PATCH v1 1/1] Maintainers.txt: Update reviewers and maintainers for
> FdtLib. Update reviewers and maintainers for FdtLib.
> 
> From: Gua Guo 
> 
> Cc: Michael D Kinney 
> Cc: Andrew Fish 
> Cc: Leif Lindholm 
> Cc: Benny Lin 
> Cc: Gua Guo 
> Cc: Chasel Chiu 
> Cc: James Lu 
> Signed-off-by: Guo Gua 
> ---
>  Maintainers.txt | 8 
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt index 30e2d2686d..97886accd5
> 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -462,6 +462,14 @@ M: Prakashan Krishnadas Veliyathuparambil
>   R: Chan Laura  [lauracha] R: K N Karthik
>  [karthikkabbigere1] +MdePkg: FDT related library
> instance+F: MdePkg/Library/BaseFdtLib/FdtLib.c+F:
> MdePkg/Include/Library/FdtLib.h+M: Benny Lin 
> [Benny3345678]+R: Gua Guo  [gguo11837463]+R: Chasel
> Chiu  [ChaselChiu]+R: James Lu 
> [jameslu8]+ NetworkPkg F: NetworkPkg/ W:
> https://github.com/tianocore/tianocore.github.io/wiki/NetworkPkg--
> 2.39.2.windows.1



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




Re: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update reviewers and maintainer for FdtLib

2023-05-11 Thread Chiu, Chasel


Hi Liming,

We are considering this is a missing when merging FdtLib support earlier.
Do we need to wait for Stewards approval for adding maintainers?

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Guo, Gua
> Sent: Thursday, May 11, 2023 7:31 PM
> To: devel@edk2.groups.io; Gao, Liming 
> Subject: Re: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update reviewers and
> maintainer for FdtLib
> 
> Hi Liming,
> 
> Do you know whether for code freeze also include Maintainers.txt update ?
> Or maybe we can submit it once the change approve.
> 
> Thanks,
> Gua
> -Original Message-
> From: Guo, Gua 
> Sent: Friday, May 12, 2023 10:11 AM
> To: devel@edk2.groups.io
> Cc: Guo, Gua 
> Subject: [PATCH v1 0/1] Maintainers.txt: Update reviewers and maintainer for
> FdtLib
> 
> From: Gua Guo 
> 
> V1
>   PR: https://github.com/tianocore/edk2/pull/4389
>   Maintainer: Benny Lin 
>   Reviewer: Gua Guo 
>   Reviewer: Chasel Chiu 
>   Reviewer: James Lu 
> 
> Gua Guo (1):
>   Maintainers.txt: Update reviewers and maintainers for FdtLib. Update
> reviewers and maintainers for FdtLib.
> 
>  Maintainers.txt | 8 
>  1 file changed, 8 insertions(+)
> 
> --
> 2.39.2.windows.1
> 
> 
> 
> 
> 



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




Re: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update reviewers and maintainer for FdtLib

2023-05-11 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Guo, Gua
> Sent: Thursday, May 11, 2023 7:11 PM
> To: devel@edk2.groups.io
> Cc: Guo, Gua 
> Subject: [edk2-devel] [PATCH v1 0/1] Maintainers.txt: Update reviewers and
> maintainer for FdtLib
> 
> From: Gua Guo 
> 
> V1
>   PR: https://github.com/tianocore/edk2/pull/4389
>   Maintainer: Benny Lin 
>   Reviewer: Gua Guo 
>   Reviewer: Chasel Chiu 
>   Reviewer: James Lu 
> 
> Gua Guo (1):
>   Maintainers.txt: Update reviewers and maintainers for FdtLib. Update
> reviewers and maintainers for FdtLib.
> 
>  Maintainers.txt | 8 
>  1 file changed, 8 insertions(+)
> 
> --
> 2.39.2.windows.1
> 
> 
> 
> 
> 



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




Re: [edk2-devel] [PATCH v9 0/5] Trace Hub debug library support

2023-05-10 Thread Chiu, Chasel


Hello Andrew Fish,

Sorry that we seem to miss you from previous patch CC list mistakenly, please 
help to review this series about new submodule we are adding and let us know if 
any feedbacks.

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Guo, Gua
> Sent: Wednesday, May 10, 2023 4:39 PM
> To: devel@edk2.groups.io
> Cc: Guo, Gua 
> Subject: [edk2-devel] [PATCH v9 0/5] Trace Hub debug library support
> 
> From: Gua Guo 
> 
> V9: Add more maintainers into CC list
> - https://github.com/tianocore/edk2/pull/3901
>   F: *
>   M: Andrew Fish  [ajfish]
>   M: Leif Lindholm  [leiflindholm]
>   M: Michael D Kinney  [mdkinney]
> 
>   MdeModulePkg
>   M: Jian J Wang  [jwang36]
>   M: Liming Gao  [lgao4]
> 
>   .pytool/
>   M: Sean Brogan  [spbrogan]
>   M: Michael Kubacki  [makubacki]
>   R: Michael D Kinney  [mdkinney]
>   R: Liming Gao  [lgao4]
> 
>   MdePkg/
>   M: Michael D Kinney  [mdkinney]
>   M: Liming Gao  [lgao4]
>   R: Zhiguang Liu  [LiuZhiguang001]
> 
> 
> V8: Add MdeModulePkg maintainers into CC list
> 
> V7: Miss one patch on V6
> 
> V6:
> - https://github.com/tianocore/edk2/pull/3901
>   Split submodule into new patch
>   Fix formatting issue
>   Add Review-by message
>   Offline check with Victor to use my sign-off name.
> 
> V5: if no other open, it will be final change
> - https://github.com/tianocore/edk2/pull/3901
>   Fix random exception when long run catalog debug message
> 
> V4
> - https://github.com/tianocore/edk2/pull/3901 - Done
>   Enhance SwapBytesGuid to use CopyGuid instead of CopyMem, to make
> implement code more simple.
> 
> V3
> - https://github.com/tianocore/edk2/pull/3901 - Done
>   - Open: MdeModulePkg/Include/Guid/TraceHubDebugInfoHob.h: why
> MAX_TRACE_HUB_DEBUG_INSTANCE hardcoded to 5?
> Solution: Remove this macro, use Library Constructor to allocate it 
> dynamiclly.
>   - Open:
> MdeModulePkg/Library/TraceHubDebugSysTLib/InternalTraceHubApiCommon.c:
> SwapBytesGuid () algorithm wrong.
> Solution: Follow correct algorithm to implement it.
> VOID
> EFIAPI
> SwapBytesGuid (
>   IN  GUID  *Guid,<--- In PreMem, guid is global data 
> so region is
> readonly, add output data to support it.
>   OUT GUID  *ConvertedGuid
> );
> 
>   - Open: Merge MSFT and GCC CC_FLAGS as they both supports -D
> Solution: use *_*_*_CC_FLAGS  = -DMIPI_SYST_STATIC to unified both.
> 
> 
> V2
> - https://github.com/tianocore/edk2/pull/3901
>   - Open: MdeModulePkg/Include/Guid/TraceHubDebugInfoHob.h: why
> MAX_TRACE_HUB_DEBUG_INSTANCE hardcoded to 5?
>   - Open:
> MdeModulePkg/Library/TraceHubDebugSysTLib/InternalTraceHubApiCommon.c:
> SwapBytesGuid () algorithm wrong.
>   - Open: Merge MSFT and GCC CC_FLAGS as they both supports -D
> 
> V1
> Previous PR:
> - https://github.com/tianocore/edk2/pull/3613
>   - TraceHubDebugLib without submodule - Reject
> 
> - https://github.com/tianocore/edk2/pull/3793
>   - TraceHubDebugLib with submodule and without seperate into MipiSysTLib
> and TraceHubDebugLib - Reject
> 
> Gua Guo (5):
>   MdePkg: Add mipisyst submodule
>   MdePkg: Add MipiSysTLib library
>   MdePkg: Add NULL library of TraceHubDebugSysTLib
>   MdeModulePkg: Add TraceHubDebugSysTLib library
>   Maintainers.txt: Update reviewers and maintainers for
> TraceHubDebugLib.
> 
>  .gitmodules   |   3 +
>  .pytool/CISettings.py |   2 +
>  Maintainers.txt   |  18 +
>  .../Include/Guid/TraceHubDebugInfoHob.h   |  24 +
>  .../BaseTraceHubDebugSysTLib.c| 245 ++
>  .../BaseTraceHubDebugSysTLib.inf  |  44 +
>  .../DxeSmmTraceHubDebugSysTLib.c  | 263 ++
>  .../DxeSmmTraceHubDebugSysTLib.inf|  51 ++
>  .../InternalTraceHubApi.c |  74 ++
>  .../InternalTraceHubApi.h |  37 +
>  .../InternalTraceHubApiCommon.c   | 200 +
>  .../InternalTraceHubApiCommon.h   | 119 +++
>  .../PeiTraceHubDebugSysTLib.c | 282 +++
>  .../PeiTraceHubDebugSysTLib.inf   |  50 ++
>  .../Library/TraceHubDebugSysTLib/Readme.md|  26 +
>  MdeModulePkg/MdeModulePkg.dec |  21 +
>  MdeModulePkg/MdeModulePkg.dsc |   3 +
>  MdeModulePkg/MdeModulePkg.uni |  18 +
>  MdePkg/Include/Library/MipiSysTLib.h  |  66 ++
>  MdePkg/Include/Library/TraceHubDebugSysTLib.h |  81 ++
>  MdePkg/Library/MipiSysTLib/GenMipiSystH.py| 132 +++
>  MdePkg/Library/MipiSysTLib/MipiSysTLib.c  | 123 +++
>  MdePkg/Library/MipiSysTLib/MipiSysTLib.inf|  52 ++
>  MdePkg/Library/MipiSysTLib/Platform.c | 164 
>  MdePkg/Library/MipiSysTLib/Platform.h | 138 +++
>  MdePkg/Library/MipiSysTLib/Readme.md  |  25 +
>  MdePkg/Library/MipiSysTLib/mipi_syst.h| 789 ++
>  MdePkg/Library/MipiSysTLib/mipisyst   |   1 +
>  

Re: [edk2-devel] [PATCH v5 0/4] MdePkg: Add MipiSysTLib library

2023-05-10 Thread Chiu, Chasel


Thanks a lot Mike for your detail reviewing and providing better implementation 
suggestions!


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Michael D
> Kinney
> Sent: Wednesday, May 10, 2023 9:00 AM
> To: Guo, Gua ; devel@edk2.groups.io; Gao, Liming
> 
> Cc: Kinney, Michael D 
> Subject: Re: [edk2-devel] [PATCH v5 0/4] MdePkg: Add MipiSysTLib library
> 
> Series Reviewed-by: Michael D Kinney 
> 
> Liming, this code review started well before the soft freeze.  It has now 
> passed
> review.
> 
> We should include this in this stable-tag release.
> 
> Mike
> 
> 
> > -Original Message-
> > From: Guo, Gua 
> > Sent: Wednesday, May 10, 2023 2:20 AM
> > To: devel@edk2.groups.io
> > Cc: Kinney, Michael D ; Guo, Gua
> > 
> > Subject: [PATCH v5 0/4] MdePkg: Add MipiSysTLib library
> >
> > From: Gua Guo 
> >
> > V5: if no other open, it will be final change
> > - https://github.com/tianocore/edk2/pull/3901
> >   Fix random exception when long run catalog debug message
> >
> > V4
> > - https://github.com/tianocore/edk2/pull/3901 - Done
> >   Enhance SwapBytesGuid to use CopyGuid instead of CopyMem, to make
> > implement code more simple.
> >
> > V3
> > - https://github.com/tianocore/edk2/pull/3901 - Done
> >   - Open: MdeModulePkg/Include/Guid/TraceHubDebugInfoHob.h: why
> > MAX_TRACE_HUB_DEBUG_INSTANCE hardcoded to 5?
> > Solution: Remove this macro, use Library Constructor to allocate
> > it dynamiclly.
> >   - Open:
> > MdeModulePkg/Library/TraceHubDebugSysTLib/InternalTraceHubApiCommon
> > .c: SwapBytesGuid () algorithm wrong.
> > Solution: Follow correct algorithm to implement it.
> > VOID
> > EFIAPI
> > SwapBytesGuid (
> >   IN  GUID  *Guid,<--- In PreMem, guid is global 
> > data so region
> > is readonly, add output data to support it.
> >   OUT GUID  *ConvertedGuid
> > );
> >
> >   - Open: Merge MSFT and GCC CC_FLAGS as they both supports -D
> > Solution: use *_*_*_CC_FLAGS  = -DMIPI_SYST_STATIC to unified both.
> >
> >
> > V2
> > - https://github.com/tianocore/edk2/pull/3901
> >   - Open: MdeModulePkg/Include/Guid/TraceHubDebugInfoHob.h: why
> > MAX_TRACE_HUB_DEBUG_INSTANCE hardcoded to 5?
> >   - Open:
> > MdeModulePkg/Library/TraceHubDebugSysTLib/InternalTraceHubApiCommon
> > .c: SwapBytesGuid () algorithm wrong.
> >   - Open: Merge MSFT and GCC CC_FLAGS as they both supports -D
> >
> > V1
> > Previous PR:
> > - https://github.com/tianocore/edk2/pull/3613
> >   - TraceHubDebugLib without submodule - Reject
> >
> > - https://github.com/tianocore/edk2/pull/3793
> >   - TraceHubDebugLib with submodule and without seperate into
> > MipiSysTLib and TraceHubDebugLib - Reject
> >
> > Gua Guo (4):
> >   MdePkg: Add MipiSysTLib library
> >   MdePkg: Add NULL library of TraceHubDebugSysTLib
> >   MdeModulePkg: Add TraceHubDebugSysTLib library
> >   Maintainers.txt: Update reviewers and maintainers for
> > TraceHubDebugLib.
> >
> >  .gitmodules   |  11 +-
> >  .pytool/CISettings.py |   2 +
> >  Maintainers.txt   |  18 +
> >  .../Include/Guid/TraceHubDebugInfoHob.h   |  24 +
> >  .../BaseTraceHubDebugSysTLib.c| 245 ++
> >  .../BaseTraceHubDebugSysTLib.inf  |  44 +
> >  .../DxeSmmTraceHubDebugSysTLib.c  | 263 ++
> >  .../DxeSmmTraceHubDebugSysTLib.inf|  51 ++
> >  .../InternalTraceHubApi.c |  74 ++
> >  .../InternalTraceHubApi.h |  37 +
> >  .../InternalTraceHubApiCommon.c   | 200 +
> >  .../InternalTraceHubApiCommon.h   | 119 +++
> >  .../PeiTraceHubDebugSysTLib.c | 282 +++
> >  .../PeiTraceHubDebugSysTLib.inf   |  50 ++
> >  .../Library/TraceHubDebugSysTLib/Readme.md|  26 +
> >  MdeModulePkg/MdeModulePkg.dec |  21 +
> >  MdeModulePkg/MdeModulePkg.dsc |   3 +
> >  MdeModulePkg/MdeModulePkg.uni |  18 +
> >  MdePkg/Include/Library/MipiSysTLib.h  |  66 ++
> >  MdePkg/Include/Library/TraceHubDebugSysTLib.h |  81 ++
> >  MdePkg/Library/MipiSysTLib/GenMipiSystH.py| 132 +++
> >  MdePkg/Library/MipiSysTLib/MipiSysTLib.c  | 123 +++
> >  MdePkg/Library/MipiSysTLib/MipiSysTLib.inf|  52 ++
> >  MdePkg/Library/MipiSysTLib/Platform.c | 164 
> >  MdePkg/Library/MipiSysTLib/Platform.h | 138 +++
> >  MdePkg/Library/MipiSysTLib/Readme.md  |  25 +
> >  MdePkg/Library/MipiSysTLib/mipi_syst.h| 789 ++
> >  MdePkg/Library/MipiSysTLib/mipisyst   |   1 +
> >  .../TraceHubDebugSysTLibNull.c|  76 ++
> >  .../TraceHubDebugSysTLibNull.inf  |  29 +
> >  MdePkg/MdePkg.ci.yaml |  12 +-
> >  MdePkg/MdePkg.dec |   9 +
> >  MdePkg/MdePkg.dsc |   2 +
> >  ReadMe.rst

Re: [edk2-devel] [edk2-platforms][PATCH v4 1/1] MinPlatformPkg: Add FspNvsBuffer compression option

2023-05-10 Thread Chiu, Chasel


Patch merged:
https://github.com/tianocore/edk2-platforms/commit/dbd802cd273ad1b51be46ca09a58a15e4b70863f

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Michael
> Kubacki
> Sent: Wednesday, May 10, 2023 8:02 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Oram, Isaac W ;
> Gao, Liming ; Dong, Eric ;
> Gudla, Raghava 
> Subject: [edk2-devel] [edk2-platforms][PATCH v4 1/1] MinPlatformPkg: Add
> FspNvsBuffer compression option
> 
> From: Michael Kubacki 
> 
> Adds a PCD called "PcdEnableCompressedFspNvsBuffer" that allows the
> "FspNvsBuffer" UEFI variable data to be saved as compressed data.
> 
> Especially due to the nature of the data saved in this variable, it 
> compresses well.
> For example, it has been found to reduce ~63KB of data to ~13KB. Boot time
> impact has been found to be negligible.
> 
> The default value is FALSE to keep default behavior consistent.
> 
> Decompression can be performed on the variable data using the standard
> UefiDecompressLib.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Isaac Oram 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Cc: Raghava Gudla 
> Signed-off-by: Michael Kubacki 
> ---
> 
> Notes:
> v4:
>   - Rebase onto 42a677e992d2
>   - Add CompressLib to MinPlatformPkg.dsc as well
> v3:
>   - Rebase onto 7ac91ec277db
>   - Add CompressLib instance to CoreCommonLib.dsc
> v2: Rebase onto 9769bf28d1fc
> 
> 
> Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryC
> onfig.c   | 62 
> 
> Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryC
> onfig.inf |  4 ++
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc  
>   |
> 1 +
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec 
>   |  6 ++
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc 
>   |  1 +
>  5 files changed, 61 insertions(+), 13 deletions(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemor
> yConfig.c
> b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemor
> yConfig.c
> index 0215e8eeddfb..95b8cef8b32b 100644
> ---
> a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemor
> yConfig.c
> +++
> b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemo
> +++ ryConfig.c
> @@ -3,6 +3,7 @@
>exists, and saves the data to nvRAM.
> 
>  Copyright (c) 2017 - 2022, Intel Corporation. All rights reserved.
> +Copyright (c) Microsoft Corporation.
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -10,6 +11,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include
>   #include   #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -19,6 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include
>   #include 
> #include 
> +#include 
>  #include 
>  #include 
> 
> @@ -38,20 +41,26 @@ SaveMemoryConfigEntryPoint (
>IN EFI_SYSTEM_TABLE   *SystemTable
>)
>  {
> -  EFI_STATUSStatus;
> -  EFI_HOB_GUID_TYPE *GuidHob;
> -  VOID  *HobData;
> -  VOID  *VariableData;
> -  UINTN DataSize;
> -  UINTN BufferSize;
> -  BOOLEAN   DataIsIdentical;
> +  EFI_STATUS Status;
> +  EFI_HOB_GUID_TYPE  *GuidHob;
> +  VOID   *HobData;
> +  VOID   *VariableData;
> +  UINTN  DataSize;
> +  UINTN  BufferSize;
> +  BOOLEANDataIsIdentical;
> +  VOID   *CompressedData;
> +  UINT64 CompressedSize;
> +  UINTN  CompressedAllocationPages;
> 
> -  DataSize= 0;
> -  BufferSize  = 0;
> -  VariableData= NULL;
> -  GuidHob = NULL;
> -  HobData = NULL;
> -  DataIsIdentical = FALSE;
> +  DataSize  = 0;
> +  BufferSize= 0;
> +  VariableData  = NULL;
> +  GuidHob   = NULL;
> +  HobData   = NULL;
> +  DataIsIdentical   = FALSE;
> +  CompressedData= NULL;
> +  CompressedSize= 0;
> +  CompressedAllocationPages = 0;
> 
>//
>// Search for the Memory Configuration GUID HOB.  If it is not present, 
> then
> @@ -73,6 +82,29 @@ SaveMemoryConfigEntryPoint (
>  }
>}
> 
> +  if (PcdGetBool (PcdEnableCompressedFspNvsBuffer)) {
> +if (DataSize > 0) {
> +  CompressedAllocationPages = EFI_SIZE_TO_PAGES (DataSize);
> +  CompressedData= AllocatePages (C

Re: [edk2-devel] [edk2-platforms][PATCH v4 1/1] MinPlatformPkg: Add FspNvsBuffer compression option

2023-05-10 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Michael
> Kubacki
> Sent: Wednesday, May 10, 2023 8:02 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Oram, Isaac W ;
> Gao, Liming ; Dong, Eric ;
> Gudla, Raghava 
> Subject: [edk2-devel] [edk2-platforms][PATCH v4 1/1] MinPlatformPkg: Add
> FspNvsBuffer compression option
> 
> From: Michael Kubacki 
> 
> Adds a PCD called "PcdEnableCompressedFspNvsBuffer" that allows the
> "FspNvsBuffer" UEFI variable data to be saved as compressed data.
> 
> Especially due to the nature of the data saved in this variable, it 
> compresses well.
> For example, it has been found to reduce ~63KB of data to ~13KB. Boot time
> impact has been found to be negligible.
> 
> The default value is FALSE to keep default behavior consistent.
> 
> Decompression can be performed on the variable data using the standard
> UefiDecompressLib.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Isaac Oram 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Cc: Raghava Gudla 
> Signed-off-by: Michael Kubacki 
> ---
> 
> Notes:
> v4:
>   - Rebase onto 42a677e992d2
>   - Add CompressLib to MinPlatformPkg.dsc as well
> v3:
>   - Rebase onto 7ac91ec277db
>   - Add CompressLib instance to CoreCommonLib.dsc
> v2: Rebase onto 9769bf28d1fc
> 
> 
> Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryC
> onfig.c   | 62 
> 
> Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryC
> onfig.inf |  4 ++
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc  
>   |
> 1 +
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec 
>   |  6 ++
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc 
>   |  1 +
>  5 files changed, 61 insertions(+), 13 deletions(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemor
> yConfig.c
> b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemor
> yConfig.c
> index 0215e8eeddfb..95b8cef8b32b 100644
> ---
> a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemor
> yConfig.c
> +++
> b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemo
> +++ ryConfig.c
> @@ -3,6 +3,7 @@
>exists, and saves the data to nvRAM.
> 
>  Copyright (c) 2017 - 2022, Intel Corporation. All rights reserved.
> +Copyright (c) Microsoft Corporation.
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -10,6 +11,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include
>   #include   #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -19,6 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include
>   #include 
> #include 
> +#include 
>  #include 
>  #include 
> 
> @@ -38,20 +41,26 @@ SaveMemoryConfigEntryPoint (
>IN EFI_SYSTEM_TABLE   *SystemTable
>)
>  {
> -  EFI_STATUSStatus;
> -  EFI_HOB_GUID_TYPE *GuidHob;
> -  VOID  *HobData;
> -  VOID  *VariableData;
> -  UINTN DataSize;
> -  UINTN BufferSize;
> -  BOOLEAN   DataIsIdentical;
> +  EFI_STATUS Status;
> +  EFI_HOB_GUID_TYPE  *GuidHob;
> +  VOID   *HobData;
> +  VOID   *VariableData;
> +  UINTN  DataSize;
> +  UINTN  BufferSize;
> +  BOOLEANDataIsIdentical;
> +  VOID   *CompressedData;
> +  UINT64 CompressedSize;
> +  UINTN  CompressedAllocationPages;
> 
> -  DataSize= 0;
> -  BufferSize  = 0;
> -  VariableData= NULL;
> -  GuidHob = NULL;
> -  HobData = NULL;
> -  DataIsIdentical = FALSE;
> +  DataSize  = 0;
> +  BufferSize= 0;
> +  VariableData  = NULL;
> +  GuidHob   = NULL;
> +  HobData   = NULL;
> +  DataIsIdentical   = FALSE;
> +  CompressedData= NULL;
> +  CompressedSize= 0;
> +  CompressedAllocationPages = 0;
> 
>//
>// Search for the Memory Configuration GUID HOB.  If it is not present, 
> then
> @@ -73,6 +82,29 @@ SaveMemoryConfigEntryPoint (
>  }
>}
> 
> +  if (PcdGetBool (PcdEnableCompressedFspNvsBuffer)) {
> +if (DataSize > 0) {
> +  CompressedAllocationPages = EFI_SIZE_TO_PAGES (DataSize);
> +  CompressedData= AllocatePages (CompressedAllocationPages);
> +  if (CompressedData == NULL) {
> +D

Re: [edk2-devel] [edk2-platforms][PATCH v3 1/1] MinPlatformPkg: Add FspNvsBuffer compression option

2023-05-10 Thread Chiu, Chasel


Just found one minor issue but I think it can be fixed during merging.

We also need to add below libraryClass in MinPlatform.dsc:
  CompressLib|MinPlatformPkg/Library/CompressLib/CompressLib.inf


Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Chiu, Chasel
> Sent: Tuesday, May 9, 2023 8:28 PM
> To: devel@edk2.groups.io; mikub...@linux.microsoft.com
> Cc: Desimone, Nathaniel L ; Oram, Isaac W
> ; Gao, Liming ; Dong,
> Eric ; Gudla, Raghava 
> Subject: Re: [edk2-devel] [edk2-platforms][PATCH v3 1/1] MinPlatformPkg: Add
> FspNvsBuffer compression option
> 
> 
> Reviewed-by: Chasel Chiu 
> 
> Thanks,
> Chasel
> 
> 
> 
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of Michael
> > Kubacki
> > Sent: Tuesday, May 9, 2023 8:21 PM
> > To: devel@edk2.groups.io
> > Cc: Chiu, Chasel ; Desimone, Nathaniel L
> > ; Oram, Isaac W
> > ; Gao, Liming ;
> > Dong, Eric ; Gudla, Raghava
> > 
> > Subject: [edk2-devel] [edk2-platforms][PATCH v3 1/1] MinPlatformPkg:
> > Add FspNvsBuffer compression option
> >
> > From: Michael Kubacki 
> >
> > Adds a PCD called "PcdEnableCompressedFspNvsBuffer" that allows the
> > "FspNvsBuffer" UEFI variable data to be saved as compressed data.
> >
> > Especially due to the nature of the data saved in this variable, it 
> > compresses
> well.
> > For example, it has been found to reduce ~63KB of data to ~13KB. Boot
> > time impact has been found to be negligible.
> >
> > The default value is FALSE to keep default behavior consistent.
> >
> > Decompression can be performed on the variable data using the standard
> > UefiDecompressLib.
> >
> > Cc: Chasel Chiu 
> > Cc: Nate DeSimone 
> > Cc: Isaac Oram 
> > Cc: Liming Gao 
> > Cc: Eric Dong 
> > Cc: Raghava Gudla 
> > Signed-off-by: Michael Kubacki 
> > ---
> >
> > Notes:
> > v3:
> >   - Rebase onto 7ac91ec277db
> >   - Add CompressLib instance to CoreCommonLib.dsc
> > v2: Rebase onto 9769bf28d1fc
> >
> >
> >
> Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryC
> > onfig.c   | 62 
> >
> >
> Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryC
> > onfig.inf |  4 ++
> >  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> > |
> > 1 +
> >  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec   
> > |  6 ++
> >  4 files changed, 60 insertions(+), 13 deletions(-)
> >
> > diff --git
> >
> a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemor
> > yConfig.c
> >
> b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemor
> > yConfig.c
> > index 0215e8eeddfb..95b8cef8b32b 100644
> > ---
> >
> a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemor
> > yConfig.c
> > +++
> >
> b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemo
> > +++ ryConfig.c
> > @@ -3,6 +3,7 @@
> >exists, and saves the data to nvRAM.
> >
> >  Copyright (c) 2017 - 2022, Intel Corporation. All rights
> > reserved.
> > +Copyright (c) Microsoft Corporation.
> >  SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> >  **/
> > @@ -10,6 +11,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> > #include   #include   #include 
> > +#include 
> >  #include 
> >  #include 
> >  #include 
> > @@ -19,6 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> > #include   #include
> >  #include
> > 
> > +#include 
> >  #include   #include
> > 
> >
> > @@ -38,20 +41,26 @@ SaveMemoryConfigEntryPoint (
> >IN EFI_SYSTEM_TABLE   *SystemTable
> >)
> >  {
> > -  EFI_STATUSStatus;
> > -  EFI_HOB_GUID_TYPE *GuidHob;
> > -  VOID  *HobData;
> > -  VOID  *VariableData;
> > -  UINTN DataSize;
> > -  UINTN BufferSize;
> > -  BOOLEAN   DataIsIdentical;
> > +  EFI_STATUS Status;
> > +  EFI_HOB_GUID_TYPE  *GuidHob;
> > +  VOID   *HobData;
> > +  VOID   *VariableData;
> > +  UINTN  DataSize;
> > +  UINTN  BufferSize;
> > +  BOOLEANDataIsIdentical;
> > +  VOID   *CompressedData;
> > +  UINT64 CompressedSize;
> > +  UINTN

Re: [edk2-devel] [edk2-platforms][PATCH v3 1/1] MinPlatformPkg: Add FspNvsBuffer compression option

2023-05-09 Thread Chiu, Chasel

Reviewed-by: Chasel Chiu 

Thanks,
Chasel



> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Michael
> Kubacki
> Sent: Tuesday, May 9, 2023 8:21 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Oram, Isaac W ;
> Gao, Liming ; Dong, Eric ;
> Gudla, Raghava 
> Subject: [edk2-devel] [edk2-platforms][PATCH v3 1/1] MinPlatformPkg: Add
> FspNvsBuffer compression option
> 
> From: Michael Kubacki 
> 
> Adds a PCD called "PcdEnableCompressedFspNvsBuffer" that allows the
> "FspNvsBuffer" UEFI variable data to be saved as compressed data.
> 
> Especially due to the nature of the data saved in this variable, it 
> compresses well.
> For example, it has been found to reduce ~63KB of data to ~13KB. Boot time
> impact has been found to be negligible.
> 
> The default value is FALSE to keep default behavior consistent.
> 
> Decompression can be performed on the variable data using the standard
> UefiDecompressLib.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Isaac Oram 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Cc: Raghava Gudla 
> Signed-off-by: Michael Kubacki 
> ---
> 
> Notes:
> v3:
>   - Rebase onto 7ac91ec277db
>   - Add CompressLib instance to CoreCommonLib.dsc
> v2: Rebase onto 9769bf28d1fc
> 
> 
> Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryC
> onfig.c   | 62 
> 
> Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryC
> onfig.inf |  4 ++
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc  
>   |
> 1 +
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec 
>   |  6 ++
>  4 files changed, 60 insertions(+), 13 deletions(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemor
> yConfig.c
> b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemor
> yConfig.c
> index 0215e8eeddfb..95b8cef8b32b 100644
> ---
> a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemor
> yConfig.c
> +++
> b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemo
> +++ ryConfig.c
> @@ -3,6 +3,7 @@
>exists, and saves the data to nvRAM.
> 
>  Copyright (c) 2017 - 2022, Intel Corporation. All rights reserved.
> +Copyright (c) Microsoft Corporation.
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -10,6 +11,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include
>   #include   #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -19,6 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include
>   #include 
> #include 
> +#include 
>  #include 
>  #include 
> 
> @@ -38,20 +41,26 @@ SaveMemoryConfigEntryPoint (
>IN EFI_SYSTEM_TABLE   *SystemTable
>)
>  {
> -  EFI_STATUSStatus;
> -  EFI_HOB_GUID_TYPE *GuidHob;
> -  VOID  *HobData;
> -  VOID  *VariableData;
> -  UINTN DataSize;
> -  UINTN BufferSize;
> -  BOOLEAN   DataIsIdentical;
> +  EFI_STATUS Status;
> +  EFI_HOB_GUID_TYPE  *GuidHob;
> +  VOID   *HobData;
> +  VOID   *VariableData;
> +  UINTN  DataSize;
> +  UINTN  BufferSize;
> +  BOOLEANDataIsIdentical;
> +  VOID   *CompressedData;
> +  UINT64 CompressedSize;
> +  UINTN  CompressedAllocationPages;
> 
> -  DataSize= 0;
> -  BufferSize  = 0;
> -  VariableData= NULL;
> -  GuidHob = NULL;
> -  HobData = NULL;
> -  DataIsIdentical = FALSE;
> +  DataSize  = 0;
> +  BufferSize= 0;
> +  VariableData  = NULL;
> +  GuidHob   = NULL;
> +  HobData   = NULL;
> +  DataIsIdentical   = FALSE;
> +  CompressedData= NULL;
> +  CompressedSize= 0;
> +  CompressedAllocationPages = 0;
> 
>//
>// Search for the Memory Configuration GUID HOB.  If it is not present, 
> then
> @@ -73,6 +82,29 @@ SaveMemoryConfigEntryPoint (
>  }
>}
> 
> +  if (PcdGetBool (PcdEnableCompressedFspNvsBuffer)) {
> +if (DataSize > 0) {
> +  CompressedAllocationPages = EFI_SIZE_TO_PAGES (DataSize);
> +  CompressedData= AllocatePages (CompressedAllocationPages);
> +  if (CompressedData == NULL) {
> +DEBUG ((DEBUG_ERROR, "[%a] - Failed to allocate compressed data
> buffer.\n", __FUNCTION__));
> +ASSERT_EFI_ERROR (EFI_OUT_OF_RESOURCES);
> +return EFI_OUT_OF_RESO

Re: [edk2-devel] [edk2-platforms:PATCH V1] MinPlatformPkg/SaveMemoryConfig: Support NVS Data compression.

2023-05-09 Thread Chiu, Chasel


Hi Michael,

Please also add CompressLib to CoreCommonLib.dsc to prevent build failure from 
open source platforms.

Thanks,
Chasel


> -Original Message-
> From: Chiu, Chasel
> Sent: Tuesday, May 9, 2023 12:30 PM
> To: devel@edk2.groups.io; Kubacki, Michael ;
> Michael Kubacki ; Gudla, Raghava
> ; Oram, Isaac W ; Kinney,
> Michael D 
> Cc: Desimone, Nathaniel L ; Chaganty,
> Rangasai V 
> Subject: RE: [edk2-devel] [edk2-platforms:PATCH V1]
> MinPlatformPkg/SaveMemoryConfig: Support NVS Data compression.
> 
> 
> Just reviewed the branch code and it is functionality the same so agree we can
> switch to Mike's implementation.
> Would you help to rebase and send updated patch for reviewing?
> 
> Thanks,
> Chasel
> 
> 
> 
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of Michael
> > Kubacki via groups.io
> > Sent: Tuesday, May 9, 2023 12:18 PM
> > To: Chiu, Chasel ; Michael Kubacki
> > ; Gudla, Raghava
> > ; Oram, Isaac W ;
> > devel@edk2.groups.io; Kinney, Michael D 
> > Cc: Desimone, Nathaniel L ; Chaganty,
> > Rangasai V 
> > Subject: Re: [edk2-devel] [edk2-platforms:PATCH V1]
> > MinPlatformPkg/SaveMemoryConfig: Support NVS Data compression.
> >
> > I haven't done a deep comparison of the changes, but I'd lean toward
> > using what is in the branch that I referenced earlier since it has
> > been used for a while now.
> >
> > Is there anything of value in the new set of changes?
> >
> > Thanks,
> > Michael
> >
> > -Original Message-
> > From: Chiu, Chasel 
> > Sent: Tuesday, May 9, 2023 2:56 PM
> > To: Michael Kubacki ; Gudla, Raghava
> > ; Oram, Isaac W ;
> > devel@edk2.groups.io; Kinney, Michael D 
> > Cc: Desimone, Nathaniel L ; Michael
> > Kubacki ; Chaganty, Rangasai V
> > 
> > Subject: [EXTERNAL] RE: [edk2-devel] [edk2-platforms:PATCH V1]
> > MinPlatformPkg/SaveMemoryConfig: Support NVS Data compression.
> >
> >
> > Hi Michael Kubacki,
> >
> > Since Rahava has rebased the patch it might be easier to add " 
> > Signed-off-by:
> > Michael Kubacki " to Rahave's patch
> > commit message so both of you are authors.
> > What do you think?
> >
> > By the way, I found a bug in SaveMemoryConfig.c: FreePool() should be
> > FreePages (CompressedData, CompressedAllocationPages); Raghava, please
> > help to fix it by sending V2 patch  (adding -v2 to git format-patch
> > command)
> >
> > Thanks,
> > Chasel
> >
> >
> >
> > > -Original Message-
> > > From: Michael Kubacki 
> > > Sent: Tuesday, May 9, 2023 11:06 AM
> > > To: Gudla, Raghava ; Oram, Isaac W
> > > ; devel@edk2.groups.io; Kinney, Michael D
> > > ; Chiu, Chasel 
> > > Cc: Desimone, Nathaniel L ; Kubacki,
> > > Michael ; Chaganty, Rangasai V
> > > 
> > > Subject: Re: [edk2-devel] [edk2-platforms:PATCH V1]
> > > MinPlatformPkg/SaveMemoryConfig: Support NVS Data compression.
> > >
> > > Thanks for reraising this. If you need me to rebase or help in
> > > anyway let me know.
> > >
> > > On 5/9/2023 1:41 PM, Gudla, Raghava wrote:
> > > > My patch is based on Michael's fix. I took his change to do a PoC
> > > > a while back
> > > and totally forgot that his patch is still available. We can proceed
> > > to merge Michael's patch.
> > > >
> > > > Thanks,
> > > > Raghava
> > > >
> > > > -Original Message-
> > > > From: Oram, Isaac W 
> > > > Sent: Tuesday, May 9, 2023 10:35 AM
> > > > To: devel@edk2.groups.io; mikub...@linux.microsoft.com; Kinney,
> > > > Michael D ; Chiu, Chasel
> > > > ; Gudla, Raghava 
> > > > Cc: Desimone, Nathaniel L ;
> > > > Kubacki, Michael ; Chaganty,
> > > > Rangasai V 
> > > > Subject: RE: [edk2-devel] [edk2-platforms:PATCH V1]
> > > MinPlatformPkg/SaveMemoryConfig: Support NVS Data compression.
> > > >
> > > > Rereading that thread and this request, other opinions, etc, I am
> > > > convinced
> > > that the simpler interface and board responsibility is the correct
> > > short/medium term answer.  I don't have an opinion on Mike Kinney's
> > > question on encapsulated services.  I generally like that design,
> > > though I am sensitive to Michael Kubacki's feedback that variable
> > > services are too complex as it is.  I guess it probably depends a

Re: [edk2-devel] [edk2-platforms:PATCH V1] MinPlatformPkg/SaveMemoryConfig: Support NVS Data compression.

2023-05-09 Thread Chiu, Chasel


Just reviewed the branch code and it is functionality the same so agree we can 
switch to Mike's implementation.
Would you help to rebase and send updated patch for reviewing?

Thanks,
Chasel



> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Michael
> Kubacki via groups.io
> Sent: Tuesday, May 9, 2023 12:18 PM
> To: Chiu, Chasel ; Michael Kubacki
> ; Gudla, Raghava ;
> Oram, Isaac W ; devel@edk2.groups.io; Kinney,
> Michael D 
> Cc: Desimone, Nathaniel L ; Chaganty,
> Rangasai V 
> Subject: Re: [edk2-devel] [edk2-platforms:PATCH V1]
> MinPlatformPkg/SaveMemoryConfig: Support NVS Data compression.
> 
> I haven't done a deep comparison of the changes, but I'd lean toward using
> what is in the branch that I referenced earlier since it has been used for a 
> while
> now.
> 
> Is there anything of value in the new set of changes?
> 
> Thanks,
> Michael
> 
> -Original Message-
> From: Chiu, Chasel 
> Sent: Tuesday, May 9, 2023 2:56 PM
> To: Michael Kubacki ; Gudla, Raghava
> ; Oram, Isaac W ;
> devel@edk2.groups.io; Kinney, Michael D 
> Cc: Desimone, Nathaniel L ; Michael Kubacki
> ; Chaganty, Rangasai V
> 
> Subject: [EXTERNAL] RE: [edk2-devel] [edk2-platforms:PATCH V1]
> MinPlatformPkg/SaveMemoryConfig: Support NVS Data compression.
> 
> 
> Hi Michael Kubacki,
> 
> Since Rahava has rebased the patch it might be easier to add " Signed-off-by:
> Michael Kubacki " to Rahave's patch commit
> message so both of you are authors.
> What do you think?
> 
> By the way, I found a bug in SaveMemoryConfig.c: FreePool() should be
> FreePages (CompressedData, CompressedAllocationPages); Raghava, please
> help to fix it by sending V2 patch  (adding -v2 to git format-patch command)
> 
> Thanks,
> Chasel
> 
> 
> 
> > -Original Message-
> > From: Michael Kubacki 
> > Sent: Tuesday, May 9, 2023 11:06 AM
> > To: Gudla, Raghava ; Oram, Isaac W
> > ; devel@edk2.groups.io; Kinney, Michael D
> > ; Chiu, Chasel 
> > Cc: Desimone, Nathaniel L ; Kubacki,
> > Michael ; Chaganty, Rangasai V
> > 
> > Subject: Re: [edk2-devel] [edk2-platforms:PATCH V1]
> > MinPlatformPkg/SaveMemoryConfig: Support NVS Data compression.
> >
> > Thanks for reraising this. If you need me to rebase or help in anyway
> > let me know.
> >
> > On 5/9/2023 1:41 PM, Gudla, Raghava wrote:
> > > My patch is based on Michael's fix. I took his change to do a PoC a
> > > while back
> > and totally forgot that his patch is still available. We can proceed
> > to merge Michael's patch.
> > >
> > > Thanks,
> > > Raghava
> > >
> > > -Original Message-
> > > From: Oram, Isaac W 
> > > Sent: Tuesday, May 9, 2023 10:35 AM
> > > To: devel@edk2.groups.io; mikub...@linux.microsoft.com; Kinney,
> > > Michael D ; Chiu, Chasel
> > > ; Gudla, Raghava 
> > > Cc: Desimone, Nathaniel L ; Kubacki,
> > > Michael ; Chaganty, Rangasai V
> > > 
> > > Subject: RE: [edk2-devel] [edk2-platforms:PATCH V1]
> > MinPlatformPkg/SaveMemoryConfig: Support NVS Data compression.
> > >
> > > Rereading that thread and this request, other opinions, etc, I am
> > > convinced
> > that the simpler interface and board responsibility is the correct
> > short/medium term answer.  I don't have an opinion on Mike Kinney's
> > question on encapsulated services.  I generally like that design,
> > though I am sensitive to Michael Kubacki's feedback that variable
> > services are too complex as it is.  I guess it probably depends a lot
> > on the specifics of the proposal.  That said, it is pretty easy to
> > migrate from a board specific solution to a more base layer solution in the
> future, so adopting this now doesn't seem harmful to me.
> > >
> > > Raghava, can you look at Michael's fix?  It looks nearly identical
> > > to yours and
> > general convention is to accept the earlier one in case of collision I
> > believe.  I like his PCD naming a little better, but both are fine to me.
> > >
> > > Regards,
> > > Isaac
> > >
> > > -Original Message-
> > > From: devel@edk2.groups.io  On Behalf Of
> > > Michael Kubacki
> > > Sent: Tuesday, May 9, 2023 8:26 AM
> > > To: devel@edk2.groups.io; Kinney, Michael D
> > > ; Chiu, Chasel ;
> > > Oram, Isaac W ; Gudla, Raghava
> > > 
> > > Cc: Desimone, Nathaniel L ; Kubacki,
> > > Michael ; Chaganty, Rangasai V
> > > 
> > > Subject: Re: [edk2-devel] 

Re: [edk2-devel] [edk2-platforms:PATCH V1] MinPlatformPkg/SaveMemoryConfig: Support NVS Data compression.

2023-05-09 Thread Chiu, Chasel

Hi Michael Kubacki,

Since Rahava has rebased the patch it might be easier to add " Signed-off-by: 
Michael Kubacki " to Rahave's patch commit 
message so both of you are authors.
What do you think?

By the way, I found a bug in SaveMemoryConfig.c: FreePool() should be FreePages 
(CompressedData, CompressedAllocationPages);
Raghava, please help to fix it by sending V2 patch  (adding -v2 to git 
format-patch command)

Thanks,
Chasel



> -Original Message-
> From: Michael Kubacki 
> Sent: Tuesday, May 9, 2023 11:06 AM
> To: Gudla, Raghava ; Oram, Isaac W
> ; devel@edk2.groups.io; Kinney, Michael D
> ; Chiu, Chasel 
> Cc: Desimone, Nathaniel L ; Kubacki, Michael
> ; Chaganty, Rangasai V
> 
> Subject: Re: [edk2-devel] [edk2-platforms:PATCH V1]
> MinPlatformPkg/SaveMemoryConfig: Support NVS Data compression.
> 
> Thanks for reraising this. If you need me to rebase or help in anyway let me
> know.
> 
> On 5/9/2023 1:41 PM, Gudla, Raghava wrote:
> > My patch is based on Michael's fix. I took his change to do a PoC a while 
> > back
> and totally forgot that his patch is still available. We can proceed to merge
> Michael's patch.
> >
> > Thanks,
> > Raghava
> >
> > -Original Message-
> > From: Oram, Isaac W 
> > Sent: Tuesday, May 9, 2023 10:35 AM
> > To: devel@edk2.groups.io; mikub...@linux.microsoft.com; Kinney,
> > Michael D ; Chiu, Chasel
> > ; Gudla, Raghava 
> > Cc: Desimone, Nathaniel L ; Kubacki,
> > Michael ; Chaganty, Rangasai V
> > 
> > Subject: RE: [edk2-devel] [edk2-platforms:PATCH V1]
> MinPlatformPkg/SaveMemoryConfig: Support NVS Data compression.
> >
> > Rereading that thread and this request, other opinions, etc, I am convinced
> that the simpler interface and board responsibility is the correct 
> short/medium
> term answer.  I don't have an opinion on Mike Kinney's question on
> encapsulated services.  I generally like that design, though I am sensitive to
> Michael Kubacki's feedback that variable services are too complex as it is.  I
> guess it probably depends a lot on the specifics of the proposal.  That said, 
> it is
> pretty easy to migrate from a board specific solution to a more base layer
> solution in the future, so adopting this now doesn't seem harmful to me.
> >
> > Raghava, can you look at Michael's fix?  It looks nearly identical to yours 
> > and
> general convention is to accept the earlier one in case of collision I 
> believe.  I
> like his PCD naming a little better, but both are fine to me.
> >
> > Regards,
> > Isaac
> >
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of Michael
> > Kubacki
> > Sent: Tuesday, May 9, 2023 8:26 AM
> > To: devel@edk2.groups.io; Kinney, Michael D
> > ; Chiu, Chasel ;
> > Oram, Isaac W ; Gudla, Raghava
> > 
> > Cc: Desimone, Nathaniel L ; Kubacki,
> > Michael ; Chaganty, Rangasai V
> > 
> > Subject: Re: [edk2-devel] [edk2-platforms:PATCH V1]
> MinPlatformPkg/SaveMemoryConfig: Support NVS Data compression.
> >
> > At the surface, this looks similar to the following patch I sent a
> > while
> > back:
> >
> > https://edk2.groups.io/g/devel/message/92644
> >
> > That triggered a thread where we had a similar discussion about
> LargeVariableLib responsibilities, etc.
> >
> > We still have a fork of SaveMemoryConfig that uses the PCD I sent in
> > the
> > patch:
> >
> > https://github.com/microsoft/mu_common_intel_min_platform/blob/release
> >
> /202208/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryConfig.
> in
> > f
> >
> > I believe a challenge that led to adding compression (in our fork code) to
> SaveMemoryConfig was the fact that the data was produced in pre-mem PEI
> and compression is expensive in CAR.
> >
> > In general though, I still believe that it is simpler to separate data 
> > mutation
> from service APIs. Platforms can manipulate data to achieve their goals 
> whether
> size, security, and so on and the service APIs provide a simple interface to 
> store
> and retrieve that data blob.
> >
> > I'd also like to see FSP reduce in size and eliminate operations that are 
> > not
> essential to its role and can be consolidated/reused in the wrapper.
> >
> > Thanks,
> > Michael
> >
> > On 5/8/2023 5:48 PM, Michael D Kinney wrote:
> >> When reviewing the Variable feature that adds integrity and
> >> confidentiality, I suggested that the interface between the Variable
> >> services and the NVStorage could provide an abstraction to
> >>

Re: [edk2-devel] [edk2-platforms:PATCH V1] MinPlatformPkg/SaveMemoryConfig: Support NVS Data compression.

2023-05-08 Thread Chiu, Chasel


Hi Isaac,

Just my thoughts, I would vote for platform/bootloader to decide compressing 
the variable data before saving to NVRAM or not.
It should be optional and when platform having big SPI flash they might not 
want to do this.

Thanks,
Chasel


> -Original Message-
> From: Oram, Isaac W 
> Sent: Monday, May 8, 2023 12:15 PM
> To: Gudla, Raghava ; devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Kubacki, Michael
> ; Chaganty, Rangasai V
> 
> Subject: RE: [edk2-platforms:PATCH V1] MinPlatformPkg/SaveMemoryConfig:
> Support NVS Data compression.
> 
> The proposed implementation is fine and I will reviewed-by and push if that is
> the desired direction.
> 
> My question is if we generally like the design of doing compression in common
> MinPlatform code, decompression in board specific FSP wrapper code.  The
> alternative design is to do compression and decompression inside the FSP.  
> This
> seems like a slightly simpler separation of responsibilities.
> The board code is responsible for save/restore, the FSP code is responsible 
> for
> data blob creation and use.  Data integrity, authentication, compression, etc 
> all
> can be done based on more detailed knowledge of the silicon implementation
> requirements.
> 
> I can see another argument though that doing it inside FSP effectively forces
> both bootloader and FSP to carry compression/decompression.  The
> compression/decompression aren't likely to need to be silicon specific.  And
> bootloader may have more requirements to balance than just the silicon
> requirements.
> 
> Can I get some votes on preferred answer for compressing/decompressing FSP
> non-volatile data in bootloader or FSP?
> 
> Thanks,
> Isaac
> 
> -Original Message-----
> From: Gudla, Raghava 
> Sent: Friday, May 5, 2023 5:03 PM
> To: devel@edk2.groups.io
> Cc: Gudla, Raghava ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Oram, Isaac W 
> Subject: [edk2-platforms:PATCH V1] MinPlatformPkg/SaveMemoryConfig:
> Support NVS Data compression.
> 
> Around 50KB "FspNonVolatileStorageHob" data can be compressed to
> approximately 3 KB which can save NVRAM space and enhance life of the SPI
> part by decreasing the number of reclaim cycles needed.
> 
> This patch added support to compress "FspNonVolatileStorageHob" data before
> saving to NVRAM.
> 
> A PcdEnableCompressFspNvsHob is introduced to enable/disable this feature per
> platform usage.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Isaac Oram 
> 
> Signed-off-by: Raghava Gudla 
> ---
>  .../SaveMemoryConfig/SaveMemoryConfig.c   | 34 +++
>  .../SaveMemoryConfig/SaveMemoryConfig.inf |  6 +++-
>  .../Include/Dsc/CoreCommonLib.dsc |  1 +
>  .../Intel/MinPlatformPkg/MinPlatformPkg.dec   |  5 +++
>  4 files changed, 45 insertions(+), 1 deletion(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemor
> yConfig.c
> b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemor
> yConfig.c
> index 0215e8eed..8aa935b54 100644
> ---
> a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemor
> yConfig.c
> +++
> b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemo
> +++ ryConfig.c
> @@ -21,6 +21,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>  #include  #include
>  #include
> +#include +#include
>   /**   This is the standard EFI driver point that 
> detects
> whether there is a@@ -45,6 +47,9 @@ SaveMemoryConfigEntryPoint (
>UINTN DataSize;   UINTN BufferSize;   BOOLEAN
> DataIsIdentical;+  VOID  *CompressedData;+  UINT64
> CompressedSize;+  UINTN CompressedAllocationPages;DataSize
> = 0;
> BufferSize  = 0;@@ -73,6 +78,35 @@ SaveMemoryConfigEntryPoint (
>  }   } +  if (PcdGetBool (PcdEnableCompressFspNvsHob) == 1) {+
> CompressedData= NULL;+CompressedSize= 0;+
> CompressedAllocationPages = 0;++DEBUG ((DEBUG_INFO, "compressing mem
> config nvs variable\n"));+if (DataSize > 0) {+  
> CompressedAllocationPages =
> EFI_SIZE_TO_PAGES (DataSize);+  CompressedData = AllocatePages
> (CompressedAllocationPages);+  if (CompressedData == NULL) {+DEBUG
> ((DEBUG_ERROR, "[%a] - Failed to allocate compressed data buffer.\n",
> __func__));+ASSERT_EFI_ERROR (EFI_OUT_OF_RESOURCES);+return
> EFI_OUT_OF_RESOURCES;+  }++  CompressedSize = EFI_PAGES_TO_SIZE
> (CompressedAllocationPages);+  Status = Compress (HobData, DataSize,
> CompressedData, );+  if (EFI_ERROR (Status)) {+
> DEBUG
> ((DEBU

Re: [edk2-devel] [PATCH v7 0/3] Support FDT library.

2023-05-05 Thread Chiu, Chasel


Patch series merged:
https://github.com/tianocore/edk2/commit/10416bf46e7e7b82472c3f1205572c6e628fcc01
https://github.com/tianocore/edk2/commit/5d586606c7cf5fa4a086917329ca7618a788c064
https://github.com/tianocore/edk2/commit/ff7cb2d7c98f8b832180e054848459fc24a0910a

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Chiu, Chasel
> Sent: Thursday, May 4, 2023 4:48 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Kinney, Michael D
> ; Gao, Liming ; Liu,
> Zhiguang ; Sean Brogan
> ; Michael Kubacki
> ; Pedro Falcato ;
> Lin, Benny 
> Subject: [edk2-devel] [PATCH v7 0/3] Support FDT library.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392
> Add FDT support in EDK2 by submodule 3rd party libfdt
> (https://github.com/devicetree-org/pylibfdt/tree/main/libfdt)
> and refer to LibcLib implementation by Pedro.
> 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Zhiguang Liu 
> Cc: Sean Brogan 
> Cc: Michael Kubacki 
> Acked-by: Pedro Falcato 
> Signed-off-by: Benny Lin 
> 
> 
> V7:
> Update FdtLib.h comments to replace SwapBytes*() with CpuToFdt*() and
> Fdt*ToCpu() provided by current library.
> Benny Lin (3):
>   Tianocore: Support FDT library.
>   MdePkg: Support FDT library.
>   .pytool: Support FDT library.
> 
>  MdePkg/Library/BaseFdtLib/FdtLib.c| 404
> +
> +
> +
> +
> +
> +
> ++
>  MdePkg/Library/BaseFdtLib/LibFdtWrapper.c | 173
> +
> +
> +++
>  .gitmodules   |   3 +++
>  .pytool/CISettings.py |   2 ++
>  MdePkg/Include/Library/FdtLib.h   | 401
> +
> +
> +
> +
> +
> +
> +++
>  MdePkg/Library/BaseFdtLib/BaseFdtLib.inf  |  62
> ++
>  MdePkg/Library/BaseFdtLib/BaseFdtLib.uni  |  14 ++
> MdePkg/Library/BaseFdtLib/LibFdtSupport.h |  99
> +
> ++
>  MdePkg/Library/BaseFdtLib/libfdt  |   1 +
>  MdePkg/Library/BaseFdtLib/limits.h|  10 ++
>  MdePkg/Library/BaseFdtLib/stdbool.h   |  10 ++
>  MdePkg/Library/BaseFdtLib/stddef.h|  10 ++
>  MdePkg/Library/BaseFdtLib/stdint.h|  10 ++
>  MdePkg/Library/BaseFdtLib/stdlib.h|  10 ++
>  MdePkg/Library/BaseFdtLib/string.h|  10 ++
>  MdePkg/MdePkg.ci.yaml |  15 ++-
>  MdePkg/MdePkg.dec |   4 
>  MdePkg/MdePkg.dsc |   1 +
>  ReadMe.rst|   1 +
>  19 files changed, 1239 insertions(+), 1 deletion(-)  create mode 100644
> MdePkg/Library/BaseFdtLib/FdtLib.c
>  create mode 100644 MdePkg/Library/BaseFdtLib/LibFdtWrapper.c
>  create mode 100644 MdePkg/Include/Library/FdtLib.h  create mode 100644
> MdePkg/Library/BaseFdtLib/BaseFdtLib.inf
>  create mode 100644 MdePkg/Library/BaseFdtLib/BaseFdtLib.uni
>  create mode 100644 MdePkg/Library/BaseFdtLib/LibFdtSupport.h
>  create mode 16 MdePkg/Library/BaseFdtLib/libfdt  create mode 100644
> MdePkg/Library/BaseFdtLib/limits.h
>  create mode 100644 MdePkg/Library/BaseFdtLib/stdbool.h
>  create mode 100644 MdePkg/Library/BaseFdtLib/stddef.h
>  create mode 100644 MdePkg/Library/BaseFdtLib/stdint.h
>  create mode 100644 MdePkg/Library/BaseFdtLib/stdlib.h
>  create mode 100644 MdePkg/Library/BaseFdtLib/string.h
> 
> --
> 2.35.0.windows.1
> 
> 
> 
> 
> 



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




Re: [edk2-devel] [PATCH v1] MinPlatformPkg: Update ACPI 6.5 definition

2023-05-04 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Chen, Aryeh 
> Sent: Thursday, May 4, 2023 10:11 AM
> To: devel@edk2.groups.io
> Cc: Chen, Aryeh ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Oram, Isaac W ;
> Gao, Liming ; Dong, Eric ;
> Yao, Jiewen 
> Subject: [PATCH v1] MinPlatformPkg: Update ACPI 6.5 definition
> 
> From: Aryeh Chen 
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=4442
> 
> Update ACPI 6.5 definition on MinPlatformPkg
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Isaac Oram 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Cc: Jiewen Yao 
> 
> Signed-off-by: Aryeh Chen 
> ---
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c 
>  |
> 128 -
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/Facs/Facs.c
>  |
> 8 +-
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/Fadt/Fadt.c
>  |
> 46 +++---
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/Hpet/Hpet.c
>  |
> 4 +-
> 
> Platform/Intel/MinPlatformPkg/Acpi/Library/DxeAslUpdateLib/DxeAslUpdateLib
> .c  |   2 +-
> 
> Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckAcpi.c
> | 138 +-
> 
> Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckAcpi
> Madt.c   | 146 ++--
> 
> Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckDmaP
> rotection.c  |   4 +-
> 
> Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckTcgTr
> ustedBoot.c |   2 +-
> 
> Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeTestPointCh
> eckLib.c   |   2 +-
>  10 files changed, 240 insertions(+), 240 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> index e967031a3b..d3e8f8f154 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> @@ -27,9 +27,9 @@ typedef struct {
>  // Define Union of IO APIC & Local APIC structure;
> 
>  //
> 
>  typedef union {
> 
> -  EFI_ACPI_6_3_PROCESSOR_LOCAL_APIC_STRUCTURE   AcpiLocalApic;
> 
> -  EFI_ACPI_6_3_IO_APIC_STRUCTUREAcpiIoApic;
> 
> -  EFI_ACPI_6_3_PROCESSOR_LOCAL_X2APIC_STRUCTURE AcpiLocalx2Apic;
> 
> +  EFI_ACPI_6_5_PROCESSOR_LOCAL_APIC_STRUCTURE   AcpiLocalApic;
> 
> +  EFI_ACPI_6_5_IO_APIC_STRUCTUREAcpiIoApic;
> 
> +  EFI_ACPI_6_5_PROCESSOR_LOCAL_X2APIC_STRUCTURE AcpiLocalx2Apic;
> 
>struct {
> 
>  UINT8 Type;
> 
>  UINT8 Length;
> 
> @@ -38,8 +38,8 @@ typedef union {
> 
> 
>  #pragma pack()
> 
> 
> 
> -extern EFI_ACPI_6_3_FIRMWARE_ACPI_CONTROL_STRUCTURE Facs;
> 
> -extern EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLEFadt;
> 
> +extern EFI_ACPI_6_5_FIRMWARE_ACPI_CONTROL_STRUCTURE Facs;
> 
> +extern EFI_ACPI_6_5_FIXED_ACPI_DESCRIPTION_TABLEFadt;
> 
>  extern EFI_ACPI_HIGH_PRECISION_EVENT_TIMER_TABLE_HEADER Hpet;
> 
>  extern EFI_ACPI_WSMT_TABLE Wsmt;
> 
> 
> 
> @@ -92,16 +92,16 @@ AppendCpuMapTableEntry (
>)
> 
>  {
> 
>EFI_STATUSStatus;
> 
> -  EFI_ACPI_6_3_PROCESSOR_LOCAL_APIC_STRUCTURE   *LocalApicPtr;
> 
> -  EFI_ACPI_6_3_PROCESSOR_LOCAL_X2APIC_STRUCTURE *LocalX2ApicPtr;
> 
> +  EFI_ACPI_6_5_PROCESSOR_LOCAL_APIC_STRUCTURE   *LocalApicPtr;
> 
> +  EFI_ACPI_6_5_PROCESSOR_LOCAL_X2APIC_STRUCTURE *LocalX2ApicPtr;
> 
>UINT8 Type;
> 
> 
> 
>Status = EFI_SUCCESS;
> 
>Type = ((ACPI_APIC_STRUCTURE_PTR *)ApicPtr)->AcpiApicCommon.Type;
> 
> -  LocalApicPtr = (EFI_ACPI_6_3_PROCESSOR_LOCAL_APIC_STRUCTURE
> *)(&((ACPI_APIC_STRUCTURE_PTR *)ApicPtr)->AcpiLocalApic);
> 
> -  LocalX2ApicPtr = (EFI_ACPI_6_3_PROCESSOR_LOCAL_X2APIC_STRUCTURE
> *)(&((ACPI_APIC_STRUCTURE_PTR *)ApicPtr)->AcpiLocalx2Apic);
> 
> +  LocalApicPtr = (EFI_ACPI_6_5_PROCESSOR_LOCAL_APIC_STRUCTURE
> *)(&((ACPI_APIC_STRUCTURE_PTR *)ApicPtr)->AcpiLocalApic);
> 
> +  LocalX2ApicPtr = (EFI_ACPI_6_5_PROCESSOR_LOCAL_X2APIC_STRUCTURE
> *)(&((ACPI_APIC_STRUCTURE_PTR *)ApicPtr)->AcpiLocalx2Apic);
> 
> 
> 
> -  if(Type == EFI_ACPI_6_3_PROCESSOR_LOCAL_APIC) {
> 
> +  if(Type == EFI_ACPI_6_5_PROCESSOR_LOCAL_APIC) {
> 
>  if(!mX2ApicEnabled) {
> 
>LocalApicPtr->Flags=
> (UINT8)CpuApicIdOrderTable[LocalApicCounter].Flags;
> 
>LocalApicPtr->ApicId   =
> (UINT8)CpuApicIdOrderTable

[edk2-devel] [PATCH v7 2/3] MdePkg: Support FDT library.

2023-05-04 Thread Chiu, Chasel
From: Benny Lin 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392
Add FDT support in EDK2 by submodule 3rd party libfdt
(https://github.com/devicetree-org/pylibfdt/tree/main/libfdt)
and refer to LibcLib implementation by Pedro.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Acked-by: Pedro Falcato 
Signed-off-by: Benny Lin 
---
 MdePkg/Library/BaseFdtLib/FdtLib.c| 404 

 MdePkg/Library/BaseFdtLib/LibFdtWrapper.c | 173 
+
 MdePkg/Include/Library/FdtLib.h   | 401 
+
 MdePkg/Library/BaseFdtLib/BaseFdtLib.inf  |  62 
++
 MdePkg/Library/BaseFdtLib/BaseFdtLib.uni  |  14 ++
 MdePkg/Library/BaseFdtLib/LibFdtSupport.h |  99 
+++
 MdePkg/Library/BaseFdtLib/limits.h|  10 ++
 MdePkg/Library/BaseFdtLib/stdbool.h   |  10 ++
 MdePkg/Library/BaseFdtLib/stddef.h|  10 ++
 MdePkg/Library/BaseFdtLib/stdint.h|  10 ++
 MdePkg/Library/BaseFdtLib/stdlib.h|  10 ++
 MdePkg/Library/BaseFdtLib/string.h|  10 ++
 MdePkg/MdePkg.ci.yaml |  15 ++-
 MdePkg/MdePkg.dec |   4 
 MdePkg/MdePkg.dsc |   1 +
 15 files changed, 1232 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Library/BaseFdtLib/FdtLib.c 
b/MdePkg/Library/BaseFdtLib/FdtLib.c
new file mode 100644
index 00..090b0b3fd4
--- /dev/null
+++ b/MdePkg/Library/BaseFdtLib/FdtLib.c
@@ -0,0 +1,404 @@
+/** @file
+  Flattened Device Tree Library.
+
+  Copyright (c) 2023, Intel Corporation. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include 
+
+/**
+  Convert UINT16 data of the FDT blob to little-endian
+
+  @param[in] ValueThe value to the blob data.
+
+  @return The value to be converted to little-endian.
+
+**/
+UINT16
+EFIAPI
+Fdt16ToCpu (
+  IN UINT16  Value
+  )
+{
+  return fdt16_to_cpu (Value);
+}
+
+/**
+  Convert UINT16 data to big-endian for aligned with the FDT blob
+
+  @param[in] ValueThe value to align with the FDT blob.
+
+  @return The value to be converted to big-endian.
+
+**/
+UINT16
+EFIAPI
+CpuToFdt16 (
+  IN UINT16  Value
+  )
+{
+  return cpu_to_fdt16 (Value);
+}
+
+/**
+  Convert UINT32 data of the FDT blob to little-endian
+
+  @param[in] ValueThe value to the blob data.
+
+  @return The value to be converted to little-endian.
+
+**/
+UINT32
+EFIAPI
+Fdt32ToCpu (
+  IN UINT32  Value
+  )
+{
+  return fdt32_to_cpu (Value);
+}
+
+/**
+  Convert UINT32 data to big-endian for aligned with the FDT blob
+
+  @param[in] ValueThe value to align with the FDT blob.
+
+  @return The value to be converted to big-endian.
+
+**/
+UINT32
+EFIAPI
+CpuToFdt32 (
+  IN UINT32  Value
+  )
+{
+  return cpu_to_fdt32 (Value);
+}
+
+/**
+  Convert UINT64 data of the FDT blob to little-endian
+
+  @param[in] ValueThe value to the blob data.
+
+  @return The value to be converted to little-endian.
+
+**/
+UINT64
+EFIAPI
+Fdt64ToCpu (
+  IN UINT64  Value
+  )
+{
+  return fdt64_to_cpu (Value);
+}
+
+/**
+  Convert UINT64 data to big-endian for aligned with the FDT blob
+
+  @param[in] ValueThe value to align with the FDT blob.
+
+  @return The value to be converted to big-endian.
+
+**/
+UINT64
+EFIAPI
+CpuToFdt64 (
+  IN UINT64  Value
+  )
+{
+  return cpu_to_fdt64 (Value);
+}
+
+/**
+  Verify the header of the Flattened Device Tree
+
+  @param[in] FdtThe pointer to FDT blob.
+
+  @return Zero for successfully, otherwise failed.
+
+**/
+INT32
+EFIAPI
+FdtCheckHeader (
+  IN CONST VOID  *Fdt
+  )
+{
+  return fdt_check_header (Fdt);
+}
+
+/**
+  Create a empty Flattened Device Tree.
+
+  @param[in] Buffer The pointer to allocate a pool for FDT blob.
+  @param[in] BufferSize The BufferSize to the pool size.
+
+  @return Zero 

[edk2-devel] [PATCH v7 3/3] .pytool: Support FDT library.

2023-05-04 Thread Chiu, Chasel
From: Benny Lin 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392
Add FDT support in EDK2 by submodule 3rd party libfdt
(https://github.com/devicetree-org/pylibfdt/tree/main/libfdt)

Add RequiredSubmodule object for CI setting.

Reviewed-by: Michael D Kinney 
Cc: Sean Brogan 
Cc: Michael Kubacki 
Cc: Michael D Kinney 
Cc: Liming Gao 
Signed-off-by: Benny Lin 
---
 .pytool/CISettings.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py
index e3f44add58..2fb99f2a17 100644
--- a/.pytool/CISettings.py
+++ b/.pytool/CISettings.py
@@ -195,6 +195,8 @@ class Settings(CiBuildSettingsManager, 
UpdateSettingsManager, SetupSettingsManag
 "RedfishPkg/Library/JsonLib/jansson", False))
 rs.append(RequiredSubmodule(
 "UnitTestFrameworkPkg/Library/SubhookLib/subhook", False))
+rs.append(RequiredSubmodule(
+"MdePkg/Library/BaseFdtLib/libfdt", False))
 return rs
 
 def GetName(self):
-- 
2.35.0.windows.1



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




[edk2-devel] [PATCH v7 0/3] Support FDT library.

2023-05-04 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392
Add FDT support in EDK2 by submodule 3rd party libfdt
(https://github.com/devicetree-org/pylibfdt/tree/main/libfdt)
and refer to LibcLib implementation by Pedro.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Sean Brogan 
Cc: Michael Kubacki 
Acked-by: Pedro Falcato 
Signed-off-by: Benny Lin 


V7:
Update FdtLib.h comments to replace SwapBytes*() with CpuToFdt*()
and Fdt*ToCpu() provided by current library.
Benny Lin (3):
  Tianocore: Support FDT library.
  MdePkg: Support FDT library.
  .pytool: Support FDT library.

 MdePkg/Library/BaseFdtLib/FdtLib.c| 404 

 MdePkg/Library/BaseFdtLib/LibFdtWrapper.c | 173 
+
 .gitmodules   |   3 +++
 .pytool/CISettings.py |   2 ++
 MdePkg/Include/Library/FdtLib.h   | 401 
+
 MdePkg/Library/BaseFdtLib/BaseFdtLib.inf  |  62 
++
 MdePkg/Library/BaseFdtLib/BaseFdtLib.uni  |  14 ++
 MdePkg/Library/BaseFdtLib/LibFdtSupport.h |  99 
+++
 MdePkg/Library/BaseFdtLib/libfdt  |   1 +
 MdePkg/Library/BaseFdtLib/limits.h|  10 ++
 MdePkg/Library/BaseFdtLib/stdbool.h   |  10 ++
 MdePkg/Library/BaseFdtLib/stddef.h|  10 ++
 MdePkg/Library/BaseFdtLib/stdint.h|  10 ++
 MdePkg/Library/BaseFdtLib/stdlib.h|  10 ++
 MdePkg/Library/BaseFdtLib/string.h|  10 ++
 MdePkg/MdePkg.ci.yaml |  15 ++-
 MdePkg/MdePkg.dec |   4 
 MdePkg/MdePkg.dsc |   1 +
 ReadMe.rst|   1 +
 19 files changed, 1239 insertions(+), 1 deletion(-)
 create mode 100644 MdePkg/Library/BaseFdtLib/FdtLib.c
 create mode 100644 MdePkg/Library/BaseFdtLib/LibFdtWrapper.c
 create mode 100644 MdePkg/Include/Library/FdtLib.h
 create mode 100644 MdePkg/Library/BaseFdtLib/BaseFdtLib.inf
 create mode 100644 MdePkg/Library/BaseFdtLib/BaseFdtLib.uni
 create mode 100644 MdePkg/Library/BaseFdtLib/LibFdtSupport.h
 create mode 16 MdePkg/Library/BaseFdtLib/libfdt
 create mode 100644 MdePkg/Library/BaseFdtLib/limits.h
 create mode 100644 MdePkg/Library/BaseFdtLib/stdbool.h
 create mode 100644 MdePkg/Library/BaseFdtLib/stddef.h
 create mode 100644 MdePkg/Library/BaseFdtLib/stdint.h
 create mode 100644 MdePkg/Library/BaseFdtLib/stdlib.h
 create mode 100644 MdePkg/Library/BaseFdtLib/string.h

-- 
2.35.0.windows.1



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




[edk2-devel] [PATCH v7 1/3] Tianocore: Support FDT library.

2023-05-04 Thread Chiu, Chasel
From: Benny Lin 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392
Add FDT support in EDK2 by submodule 3rd party libfdt
(https://github.com/devicetree-org/pylibfdt/tree/main/libfdt)

Add submodule libfdt and update ReadMe for the licence.

Reviewed-by: Leif Lindholm 
Reviewed-by: Michael D Kinney 
Cc: Andrew Fish 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
Signed-off-by: Benny Lin 
---
 .gitmodules  | 3 +++
 MdePkg/Library/BaseFdtLib/libfdt | 1 +
 ReadMe.rst   | 1 +
 3 files changed, 5 insertions(+)

diff --git a/.gitmodules b/.gitmodules
index fe8a43be93..6211c59724 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -26,3 +26,6 @@
 [submodule "UnitTestFrameworkPkg/Library/SubhookLib/subhook"]
path = UnitTestFrameworkPkg/Library/SubhookLib/subhook
url = https://github.com/Zeex/subhook.git
+[submodule "MdePkg/Library/BaseFdtLib/libfdt"]
+   path = MdePkg/Library/BaseFdtLib/libfdt
+   url = https://github.com/devicetree-org/pylibfdt.git
diff --git a/MdePkg/Library/BaseFdtLib/libfdt b/MdePkg/Library/BaseFdtLib/libfdt
new file mode 16
index 00..cfff805481
--- /dev/null
+++ b/MdePkg/Library/BaseFdtLib/libfdt
@@ -0,0 +1 @@
+Subproject commit cfff805481bdea27f900c32698171286542b8d3c
diff --git a/ReadMe.rst b/ReadMe.rst
index 91b9cf3c5e..d46c534229 100644
--- a/ReadMe.rst
+++ b/ReadMe.rst
@@ -96,6 +96,7 @@ that are covered by additional licenses.
 -  `UnitTestFrameworkPkg/Library/GoogleTestLib/googletest 
`__
 -  `UnitTestFrameworkPkg/Library/SubhookLib/subhook 
`__
 -  `RedfishPkg/Library/JsonLib/jansson 
`__
+-  `MdePkg/Library/BaseFdtLib/libfdt 
`__
 
 The EDK II Project is composed of packages. The maintainers for each package
 are listed in `Maintainers.txt `__.
-- 
2.35.0.windows.1



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




Re: [edk2-devel] [PATCH v6 2/3] MdePkg: Support FDT library.

2023-05-04 Thread Chiu, Chasel


Hi Mike,

Please see my reply below inline.

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Michael D
> Kinney
> Sent: Thursday, May 4, 2023 11:02 AM
> To: Lin, Benny ; devel@edk2.groups.io
> Cc: Gao, Liming ; Liu, Zhiguang
> ; Pedro Falcato ; Kinney,
> Michael D 
> Subject: Re: [edk2-devel] [PATCH v6 2/3] MdePkg: Support FDT library.
> 
> Hi Benny,
> 
> A couple comments below.
> 
> Mike
> 
> > -Original Message-
> > From: Lin, Benny 
> > Sent: Wednesday, May 3, 2023 10:57 PM
> > To: devel@edk2.groups.io
> > Cc: Lin, Benny ; Kinney, Michael D
> > ; Gao, Liming ;
> > Liu, Zhiguang ; Pedro Falcato
> > 
> > Subject: [PATCH v6 2/3] MdePkg: Support FDT library.
> >
> > From: Benny Lin 
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392
> > Add FDT support in EDK2 by submodule 3rd party libfdt
> > (https://github.com/devicetree-org/pylibfdt/tree/main/libfdt)
> > and refer to LibcLib implementation by Pedro.
> >
> > Cc: Michael D Kinney 
> > Cc: Liming Gao 
> > Cc: Zhiguang Liu 
> > Acked-by: Pedro Falcato 
> > Signed-off-by: Benny Lin 
> > ---
> >  MdePkg/Include/Library/FdtLib.h   | 396 +++
> >  MdePkg/Library/BaseFdtLib/BaseFdtLib.inf  |  62 +++
> > MdePkg/Library/BaseFdtLib/BaseFdtLib.uni  |  14 +
> >  MdePkg/Library/BaseFdtLib/FdtLib.c| 404 
> >  MdePkg/Library/BaseFdtLib/LibFdtSupport.h |  99 +
> > MdePkg/Library/BaseFdtLib/LibFdtWrapper.c | 173 +
> >  MdePkg/Library/BaseFdtLib/limits.h|  10 +
> >  MdePkg/Library/BaseFdtLib/stdbool.h   |  10 +
> >  MdePkg/Library/BaseFdtLib/stddef.h|  10 +
> >  MdePkg/Library/BaseFdtLib/stdint.h|  10 +
> >  MdePkg/Library/BaseFdtLib/stdlib.h|  10 +
> >  MdePkg/Library/BaseFdtLib/string.h|  10 +
> >  MdePkg/MdePkg.ci.yaml |  15 +-
> >  MdePkg/MdePkg.dec |   4 +
> >  MdePkg/MdePkg.dsc |   1 +
> >  15 files changed, 1227 insertions(+), 1 deletion(-)
> >
> > diff --git a/MdePkg/Include/Library/FdtLib.h
> > b/MdePkg/Include/Library/FdtLib.h new file mode 100644 index
> > 00..4b428eb5d1
> > --- /dev/null
> > +++ b/MdePkg/Include/Library/FdtLib.h
> > @@ -0,0 +1,396 @@
> > +/** @file
> >
> > +  Flattened Device Tree Library.
> >
> > +
> >
> > +  All structure data are in big-endian format. Need to call
> > + SwapBytes**
> >
> > +  function to convert between little-endia and big-endian.
> 
> I would remove all references to SwapBytes in this lib class header and 
> Instead
> mention that the FdtToCpu and CpuToFdt services are provided To support
> conversion between big endian FDT format and the CPUs native endian format.


We will replace SwapBytes*() in comments with CpuToFdt*()/Fdt*ToCpu()


> 
> >
> > +  For example, pushing data to FDT blob need convert to big-endian
> > + with
> > SwapByte**.
> >
> > +  For retrieving data from FDT blob need convert to little-endian
> > + with
> > SwapByte**.
> >
> > +  Refer to FDT specification:
> > + https://www.devicetree.org/specifications/
> >
> > +
> >
> > +  Copyright (c) 2023, Intel Corporation. All rights reserved.
> >
> > +  SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > +
> >
> > +**/
> >
> > +
> >
> > +#ifndef FDT_LIB_H_
> >
> > +#define FDT_LIB_H_
> >
> > +
> >
> > +/**
> >
> > +  Flattened Device Tree definition
> >
> > +
> >
> > +  The Devicetree Blob (DTB) format is a binary encoding with big-endian.
> >
> > +  When producing or consuming the blob data, must convert with
> > SwapBytesXX
> >
> > +  provided by edk2 BaseLib between big-endian and little-endian.
> >
> > +**/
> >
> > +typedef struct {
> >
> > +  UINT32Magic;   /* magic word FDT_MAGIC */
> >
> > +  UINT32TotalSize;   /* total size of DT block */
> >
> > +  UINT32OffsetDtStruct;  /* offset to structure */
> >
> > +  UINT32OffsetDtStrings; /* offset to strings */
> >
> > +  UINT32OffsetMemRsvmap; /* offset to memory reserve map */
> >
> > +  UINT32Version; /* format version */
> >
> > +  UINT32LastCompVersion; /* last compatible version */
> >
> > +
> >
> > +  /* version 2 fields below */
> >
> > +  UINT32BootCpuidPhys;   /* Which physical CPU id we're
> >
> > +booting on */
> >
> > +  /* version 3 fields below */
> >
> > +  UINT32SizeDtStrings;   /* size of the strings block */
> >
> > +
> >
> > +  /* version 17 fields below */
> >
> > +  UINT32SizeDtStruct;/* size of the structure block */
> >
> > +} FDT_HEADER;
> >
> > +
> >
> > +typedef struct {
> >
> > +  UINT64Address;
> >
> > +  UINT64Size;
> >
> > +} FDT_RESERVE_ENTRY;
> >
> > +
> >
> > +typedef struct {
> >
> > +  UINT32Tag;
> >
> > +  CHAR8 Name[];
> >
> > +} FDT_NODE_HEADER;
> >
> > +
> >
> > +typedef struct {
> >
> > +  UINT32Tag;
> >
> > +  UINT32Length;
> >
> > +  UINT32NameOffset;
> 

Re: [edk2-devel] [PATCH] Maintainers.txt: Update for IntelFsp2Pkg and IntelFsp2WrapperPkg.

2023-05-04 Thread Chiu, Chasel


Patch merged: 
https://github.com/tianocore/edk2/commit/d992a05ade3d1bebc6e7a81aaf700286e0e217c8

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Chiu, Chasel
> Sent: Monday, April 24, 2023 11:21 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Duggapu, Chinni B
> ; Ng, Ray Han Lim ;
> Chen, Gang C ; Zeng, Star ; Kuo,
> Ted ; S, Ashraf Ali ; Mohapatra,
> Susovan 
> Subject: [edk2-devel] [PATCH] Maintainers.txt: Update for IntelFsp2Pkg and
> IntelFsp2WrapperPkg.
> 
> Add more maintainers and reviewers for these 2 packages.
> 
> Cc: Nate DeSimone 
> Cc: Duggapu Chinni B 
> Cc: Ray Han Lim Ng 
> Cc: Chen Gang C 
> Cc: Star Zeng 
> Cc: Ted Kuo 
> Cc: Ashraf Ali S 
> Cc: Susovan Mohapatra 
> Signed-off-by: Chasel Chiu 
> ---
>  Maintainers.txt | 10 ++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt index 455afdbc69..09d04af27a
> 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -237,14 +237,24 @@ F: IntelFsp2Pkg/
>  W: https://github.com/tianocore/tianocore.github.io/wiki/IntelFsp2Pkg M:
> Chasel Chiu  [ChaselChiu] M: Nate DeSimone
>  [nate-desimone]+M: Duggapu Chinni B
>  [cbduggap]+M: Ray Han Lim Ng
>  [rayhanlimng] R: Star Zeng 
> [lzeng14]+R: Ted Kuo  [tedkuo1]+R: Ashraf Ali S
>  [AshrafAliS]+R: Susovan Mohapatra
>  [susovanmohapatra]  IntelFsp2WrapperPkg F:
> IntelFsp2WrapperPkg/ W:
> https://github.com/tianocore/tianocore.github.io/wiki/IntelFsp2WrapperPkg M:
> Chasel Chiu  [ChaselChiu] M: Nate DeSimone
>  [nate-desimone]+M: Duggapu Chinni B
>  [cbduggap]+M: Chen Gang C
>  [chengangc] R: Star Zeng 
> [lzeng14]+R: Ted Kuo  [tedkuo1]+R: Ashraf Ali S
>  [AshrafAliS]+R: Susovan Mohapatra
>  [susovanmohapatra]  MdeModulePkg F:
> MdeModulePkg/--
> 2.35.0.windows.1
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#103495): https://edk2.groups.io/g/devel/message/103495
> Mute This Topic: https://groups.io/mt/98477288/1777047
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [chasel.c...@intel.com]
> -=-=-=-=-=-=
> 



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




Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.

2023-05-03 Thread Chiu, Chasel

Hi Leif, Mike,

Thanks for all the feedbacks and basing on offline discussion, we will 
implement CpuToFdt*() and Fdt*ToCpu() functions to align with original libfdt 
functionality.
Will update patch series accordingly.

Thanks,
Chasel





> -Original Message-
> From: Kinney, Michael D 
> Sent: Tuesday, May 2, 2023 10:39 PM
> To: Chiu, Chasel ; devel@edk2.groups.io;
> quic_llind...@quicinc.com
> Cc: Lin, Benny ; Gao, Liming
> ; Liu, Zhiguang ; Pedro
> Falcato ; Kinney, Michael D
> 
> Subject: RE: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.
> 
> I don't think the macros that are identical to BaseLib functions help.
> 
> My preference if for caller of FdtLib to know use SwapBytesxx() as needed.
> 
> Mike
> 
> > -Original Message-
> > From: Chiu, Chasel 
> > Sent: Tuesday, May 2, 2023 7:35 PM
> > To: devel@edk2.groups.io; quic_llind...@quicinc.com; Kinney, Michael D
> > 
> > Cc: Lin, Benny ; Gao, Liming
> > ; Liu, Zhiguang ;
> > Pedro Falcato 
> > Subject: RE: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.
> >
> >
> > Thanks Leif!
> > To align with your suggestion I think we can define below MACROs in
> > FdtLib.h.
> > Library consumers can use those MACROs to convert structure data between
> > Big endian and Little endian. (better readability)
> >
> > Mike, what do you think?
> >
> > Thanks,
> > Chasel
> >
> >
> >
> > //
> > // Definitions for transferring FDT structure data between big-endian (FDT)
> > and little-endian (CPU)
> > //
> > #define CPU_TO_FDT16(x)  SwapBytes16 (x)
> > #define FDT16_TO_CPU(x)  SwapBytes16 (x)
> >
> > #define CPU_TO_FDT32(x)  SwapBytes32 (x)
> > #define FDT32_TO_CPU(x)  SwapBytes32 (x)
> >
> > #define CPU_TO_FDT64(x)  SwapBytes64 (x)
> > #define FDT64_TO_CPU(x)  SwapBytes64 (x)
> >
> >
> >
> >
> > > -Original Message-
> > > From: devel@edk2.groups.io  On Behalf Of Leif
> > > Lindholm
> > > Sent: Tuesday, May 2, 2023 4:42 AM
> > > To: devel@edk2.groups.io; Chiu, Chasel ; Kinney,
> > > Michael D 
> > > Cc: Lin, Benny ; Gao, Liming
> > > ; Liu, Zhiguang ;
> > Pedro
> > > Falcato 
> > > Subject: Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.
> > >
> > > Hi Chasel,
> > >
> > > Apologies, spent last week at Linaro Connect with little time to follow
> > > the list.
> > >
> > > If we're seeing this purely as a wrapper on libfdt, then it shouldn't
> > > need to provide additional functionality on top of what it provides.
> > > My initial impression was that this library was attempting to do more,
> > > but then I mostly skimmed it, and that appears to have been incorrect.
> > >
> > > What I *really* don't want is mixing abstractions. I.e. if we're getting
> > > the pointers through libfdt calls, we should be using the libfdt
> > > accessor functions to extract the data correctly. And expose the
> > > cpu_to_fdt*/fdt*_to_cpu accessors through the library. Presumably as
> > > Fdt*ToCpu/CpuToFdt*.
> > >
> > > Regards,
> > >
> > > Leif
> > >
> > >
> > > On 2023-05-01 17:31, Chiu, Chasel wrote:
> > > >
> > > > Hi Leif,
> > > >
> > > > Would you please share your ideas and respond Mike's question too?
> > > >
> > > > Thanks,
> > > > Chasel
> > > >
> > > >
> > > >
> > > >> -Original Message-
> > > >> From: devel@edk2.groups.io  On Behalf Of
> > Chiu,
> > > Chasel
> > > >> Sent: Tuesday, April 25, 2023 10:22 PM
> > > >> To: devel@edk2.groups.io; Kinney, Michael D
> > ;
> > > >> Leif Lindholm 
> > > >> Cc: Lin, Benny ; Leif Lindholm
> > > >> ; Gao, Liming
> > ;
> > > Liu,
> > > >> Zhiguang ; Pedro Falcato
> > > 
> > > >> Subject: Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.
> > > >>
> > > >>
> > > >> Hello,
> > > >>
> > > >> Since platform may also define other FDT structures, this EDK2 library
> > may
> > > not
> > > >> be able to convert all the FDT structures to little endian.
> > > >> We might define a generic MACRO in library like
> > > >> CONVERT_FDT_DATA_TO_LITTLE_ENDIAN which can be used fo

Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.

2023-05-02 Thread Chiu, Chasel

Thanks Leif!
To align with your suggestion I think we can define below MACROs in FdtLib.h.
Library consumers can use those MACROs to convert structure data between Big 
endian and Little endian. (better readability)

Mike, what do you think?

Thanks,
Chasel



//
// Definitions for transferring FDT structure data between big-endian (FDT) and 
little-endian (CPU)
//
#define CPU_TO_FDT16(x)  SwapBytes16 (x)
#define FDT16_TO_CPU(x)  SwapBytes16 (x)

#define CPU_TO_FDT32(x)  SwapBytes32 (x)
#define FDT32_TO_CPU(x)  SwapBytes32 (x)

#define CPU_TO_FDT64(x)  SwapBytes64 (x)
#define FDT64_TO_CPU(x)  SwapBytes64 (x)




> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Leif
> Lindholm
> Sent: Tuesday, May 2, 2023 4:42 AM
> To: devel@edk2.groups.io; Chiu, Chasel ; Kinney,
> Michael D 
> Cc: Lin, Benny ; Gao, Liming
> ; Liu, Zhiguang ; Pedro
> Falcato 
> Subject: Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.
> 
> Hi Chasel,
> 
> Apologies, spent last week at Linaro Connect with little time to follow
> the list.
> 
> If we're seeing this purely as a wrapper on libfdt, then it shouldn't
> need to provide additional functionality on top of what it provides.
> My initial impression was that this library was attempting to do more,
> but then I mostly skimmed it, and that appears to have been incorrect.
> 
> What I *really* don't want is mixing abstractions. I.e. if we're getting
> the pointers through libfdt calls, we should be using the libfdt
> accessor functions to extract the data correctly. And expose the
> cpu_to_fdt*/fdt*_to_cpu accessors through the library. Presumably as
> Fdt*ToCpu/CpuToFdt*.
> 
> Regards,
> 
> Leif
> 
> 
> On 2023-05-01 17:31, Chiu, Chasel wrote:
> >
> > Hi Leif,
> >
> > Would you please share your ideas and respond Mike's question too?
> >
> > Thanks,
> > Chasel
> >
> >
> >
> >> -Original Message-
> >> From: devel@edk2.groups.io  On Behalf Of Chiu,
> Chasel
> >> Sent: Tuesday, April 25, 2023 10:22 PM
> >> To: devel@edk2.groups.io; Kinney, Michael D ;
> >> Leif Lindholm 
> >> Cc: Lin, Benny ; Leif Lindholm
> >> ; Gao, Liming ;
> Liu,
> >> Zhiguang ; Pedro Falcato
> 
> >> Subject: Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.
> >>
> >>
> >> Hello,
> >>
> >> Since platform may also define other FDT structures, this EDK2 library may
> not
> >> be able to convert all the FDT structures to little endian.
> >> We might define a generic MACRO in library like
> >> CONVERT_FDT_DATA_TO_LITTLE_ENDIAN which can be used for all
> structure
> >> data, but it will be almost like calling SwapBytes** directly.
> >> Any other suggestion?
> >>
> >> Thanks,
> >> Chasel
> >>
> >>
> >>> -Original Message-
> >>> From: devel@edk2.groups.io  On Behalf Of Michael
> D
> >>> Kinney
> >>> Sent: Monday, April 24, 2023 10:41 AM
> >>> To: Leif Lindholm ; devel@edk2.groups.io
> >>> Cc: Lin, Benny ; Leif Lindholm
> >>> ; Gao, Liming ;
> >> Liu,
> >>> Zhiguang ; Pedro Falcato
> >> ;
> >>> Kinney, Michael D 
> >>> Subject: Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.
> >>>
> >>> Hi Leif,
> >>>
> >>> Do you have a proposal or small example on what you want to see
> >>> in the library?
> >>>
> >>> Mike
> >>>
> >>>> -Original Message-
> >>>> From: Leif Lindholm 
> >>>> Sent: Monday, April 24, 2023 10:29 AM
> >>>> To: devel@edk2.groups.io; Kinney, Michael D
> 
> >>>> Cc: Lin, Benny ; Leif Lindholm
> >>> ; Gao, Liming ;
> >> Liu,
> >>>> Zhiguang ; Pedro Falcato
> >>> 
> >>>> Subject: Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.
> >>>>
> >>>> Apologies, I was refactoring a git tree and switched off the world :)
> >>>>
> >>>> Well, being a bit late to the party ... my view is it would be
> >>>> preferable if we put the byteswapping in the library.
> >>>>
> >>>> The DT format is *defined* to be big-endian, 32-bit cells. So frankly,
> >>>> I have no problems with pushing responsibility onto individual
> >>>> platforms if they have decided to be "clever" by ignoring that -
> >>>> if that gets rid of a bunch 

Re: [edk2-devel][edk2-platforms][PATCH V1 1/1] MinPlatformPkg/Build: Add standalone MM build rules

2023-05-02 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Oram, Isaac W 
> Sent: Wednesday, March 15, 2023 6:18 AM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Gao, Liming ;
> Dong, Eric 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 1/1] MinPlatformPkg/Build:
> Add standalone MM build rules
> 
> Adds MM_STANDALONE_CORE and MM_STANDALONE FFS file construction
> rules.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Isaac Oram 
> ---
>  .../MinPlatformPkg/Include/Fdf/RuleInclude.fdf| 15 +++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Fdf/RuleInclude.fdf
> b/Platform/Intel/MinPlatformPkg/Include/Fdf/RuleInclude.fdf
> index 85e6f773df..a737465d04 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Fdf/RuleInclude.fdf
> +++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/RuleInclude.fdf
> @@ -241,3 +241,18 @@
>FILE FV_IMAGE = $(NAMED_GUID) {
>  FV_IMAGE FV  |.fv
>}
> +
> +[Rule.Common.MM_CORE_STANDALONE]
> +  FILE MM_CORE_STANDALONE = $(NAMED_GUID) {
> +PE32 PE32$(INF_OUTPUT)/$(MODULE_NAME).efi
> +UI   STRING="$(MODULE_NAME)" Optional
> +VERSION  STRING="$(INF_VERSION)" Optional
> BUILD_NUM=$(BUILD_NUMBER)
> +  }
> +
> +[Rule.Common.MM_STANDALONE]
> +  FILE MM_STANDALONE = $(NAMED_GUID) {
> +SMM_DEPEXSMM_DEPEX Optional
> $(INF_OUTPUT)/$(MODULE_NAME).depex
> +PE32 PE32$(INF_OUTPUT)/$(MODULE_NAME).efi
> +UI   STRING="$(MODULE_NAME)" Optional
> +VERSION  STRING="$(INF_VERSION)" Optional
> BUILD_NUM=$(BUILD_NUMBER)
> +  }
> --
> 2.39.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103867): https://edk2.groups.io/g/devel/message/103867
Mute This Topic: https://groups.io/mt/97627030/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 1/1] WhitleyOpenBoardPkg/DSC: Restore AdvancedFeatures

2023-05-02 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Oram, Isaac W 
> Sent: Tuesday, March 7, 2023 4:16 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/DSC: Restore AdvancedFeatures
> 
> Include for building Advanced Features was mistakenly removed in an earlier
> commit.
> 
> Cc: Nate DeSimone 
> Cc: Chasel Chiu 
> Signed-off-by: Isaac Oram 
> ---
>  Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc | 5 +
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc
> b/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc
> index c784df0144..9452867edb 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc
> @@ -59,6 +59,11 @@
>  [PcdsFixedAtBuild]
>gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugPortLibInstance|1
> 
> +#
> +# Include AdvancedFeatures
> +#
> +!include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
> +
>#
># Platform On/Off features are defined here
>#
> --
> 2.39.0.windows.1



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




Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.

2023-05-01 Thread Chiu, Chasel

Hi Leif,

Would you please share your ideas and respond Mike's question too?

Thanks,
Chasel



> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Chiu, Chasel
> Sent: Tuesday, April 25, 2023 10:22 PM
> To: devel@edk2.groups.io; Kinney, Michael D ;
> Leif Lindholm 
> Cc: Lin, Benny ; Leif Lindholm
> ; Gao, Liming ; Liu,
> Zhiguang ; Pedro Falcato 
> Subject: Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.
> 
> 
> Hello,
> 
> Since platform may also define other FDT structures, this EDK2 library may not
> be able to convert all the FDT structures to little endian.
> We might define a generic MACRO in library like
> CONVERT_FDT_DATA_TO_LITTLE_ENDIAN which can be used for all structure
> data, but it will be almost like calling SwapBytes** directly.
> Any other suggestion?
> 
> Thanks,
> Chasel
> 
> 
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of Michael D
> > Kinney
> > Sent: Monday, April 24, 2023 10:41 AM
> > To: Leif Lindholm ; devel@edk2.groups.io
> > Cc: Lin, Benny ; Leif Lindholm
> > ; Gao, Liming ;
> Liu,
> > Zhiguang ; Pedro Falcato
> ;
> > Kinney, Michael D 
> > Subject: Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.
> >
> > Hi Leif,
> >
> > Do you have a proposal or small example on what you want to see
> > in the library?
> >
> > Mike
> >
> > > -Original Message-
> > > From: Leif Lindholm 
> > > Sent: Monday, April 24, 2023 10:29 AM
> > > To: devel@edk2.groups.io; Kinney, Michael D 
> > > Cc: Lin, Benny ; Leif Lindholm
> > ; Gao, Liming ;
> Liu,
> > > Zhiguang ; Pedro Falcato
> > 
> > > Subject: Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.
> > >
> > > Apologies, I was refactoring a git tree and switched off the world :)
> > >
> > > Well, being a bit late to the party ... my view is it would be
> > > preferable if we put the byteswapping in the library.
> > >
> > > The DT format is *defined* to be big-endian, 32-bit cells. So frankly,
> > > I have no problems with pushing responsibility onto individual
> > > platforms if they have decided to be "clever" by ignoring that -
> > > if that gets rid of a bunch of boilerplate for sensibly behaving 
> > > platforms.
> > >
> > > Maybe another excuse for getting
> > > https://github.com/tianocore/edk2-
> > platforms/blob/master/Silicon/NXP/Library/IoAccessLib/IoAccessLib.c
> > > into MdePkg?
> > >
> > > /
> > > Leif
> > >
> > > On Thu, Apr 20, 2023 at 16:44:03 +, Michael D Kinney wrote:
> > > > Hi Leif,
> > > >
> > > > What is your opinion on FDT being big endian.
> > > >
> > > > Do we want the lib to help with that aspect, or leave it up to the 
> > > > consumer
> of
> > the lib to
> > > > convert as needed?  Seems like an area that could be very error prone 
> > > > if we
> > are not
> > > > careful.
> > > >
> > > > Mike
> > > >
> > > > > -Original Message-
> > > > > From: Lin, Benny 
> > > > > Sent: Wednesday, April 19, 2023 9:25 PM
> > > > > To: Kinney, Michael D ;
> > devel@edk2.groups.io
> > > > > Cc: Gao, Liming ; Liu, Zhiguang
> > ; Pedro Falcato 
> > > > > Subject: RE: [PATCH v3 2/3] MdePkg: Support FDT library.
> > > > >
> > > > >
> > > > >
> > > > > >-Original Message-
> > > > > >From: Kinney, Michael D 
> > > > > >Sent: Thursday, April 20, 2023 5:04 AM
> > > > > >To: Lin, Benny ; devel@edk2.groups.io
> > > > > >Cc: Gao, Liming ; Liu, Zhiguang
> > ; Pedro Falcato
> > > ; Kinney,
> > > > > Michael D 
> > > > > >Subject: RE: [PATCH v3 2/3] MdePkg: Support FDT library.
> > > > > >
> > > > > >Responses below
> > > > > >
> > > > > >Mike
> > > > > >
> > > > > >> -Original Message-
> > > > > >> From: Lin, Benny 
> > > > > >> Sent: Wednesday, April 19, 2023 10:12 AM
> > > > > >> To: Kinney, Michael D ;
> > > > > >> devel@edk2.groups.io
> > > > > >> Cc: Gao, Liming ; Liu, Zhiguang
> > > > > >> ; Ped

Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.

2023-04-25 Thread Chiu, Chasel

Hello,

Since platform may also define other FDT structures, this EDK2 library may not 
be able to convert all the FDT structures to little endian.
We might define a generic MACRO in library like 
CONVERT_FDT_DATA_TO_LITTLE_ENDIAN which can be used for all structure data, but 
it will be almost like calling SwapBytes** directly.
Any other suggestion?

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Michael D
> Kinney
> Sent: Monday, April 24, 2023 10:41 AM
> To: Leif Lindholm ; devel@edk2.groups.io
> Cc: Lin, Benny ; Leif Lindholm
> ; Gao, Liming ; Liu,
> Zhiguang ; Pedro Falcato ;
> Kinney, Michael D 
> Subject: Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.
> 
> Hi Leif,
> 
> Do you have a proposal or small example on what you want to see
> in the library?
> 
> Mike
> 
> > -Original Message-
> > From: Leif Lindholm 
> > Sent: Monday, April 24, 2023 10:29 AM
> > To: devel@edk2.groups.io; Kinney, Michael D 
> > Cc: Lin, Benny ; Leif Lindholm
> ; Gao, Liming ; Liu,
> > Zhiguang ; Pedro Falcato
> 
> > Subject: Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.
> >
> > Apologies, I was refactoring a git tree and switched off the world :)
> >
> > Well, being a bit late to the party ... my view is it would be
> > preferable if we put the byteswapping in the library.
> >
> > The DT format is *defined* to be big-endian, 32-bit cells. So frankly,
> > I have no problems with pushing responsibility onto individual
> > platforms if they have decided to be "clever" by ignoring that -
> > if that gets rid of a bunch of boilerplate for sensibly behaving platforms.
> >
> > Maybe another excuse for getting
> > https://github.com/tianocore/edk2-
> platforms/blob/master/Silicon/NXP/Library/IoAccessLib/IoAccessLib.c
> > into MdePkg?
> >
> > /
> > Leif
> >
> > On Thu, Apr 20, 2023 at 16:44:03 +, Michael D Kinney wrote:
> > > Hi Leif,
> > >
> > > What is your opinion on FDT being big endian.
> > >
> > > Do we want the lib to help with that aspect, or leave it up to the 
> > > consumer of
> the lib to
> > > convert as needed?  Seems like an area that could be very error prone if 
> > > we
> are not
> > > careful.
> > >
> > > Mike
> > >
> > > > -Original Message-
> > > > From: Lin, Benny 
> > > > Sent: Wednesday, April 19, 2023 9:25 PM
> > > > To: Kinney, Michael D ;
> devel@edk2.groups.io
> > > > Cc: Gao, Liming ; Liu, Zhiguang
> ; Pedro Falcato 
> > > > Subject: RE: [PATCH v3 2/3] MdePkg: Support FDT library.
> > > >
> > > >
> > > >
> > > > >-Original Message-
> > > > >From: Kinney, Michael D 
> > > > >Sent: Thursday, April 20, 2023 5:04 AM
> > > > >To: Lin, Benny ; devel@edk2.groups.io
> > > > >Cc: Gao, Liming ; Liu, Zhiguang
> ; Pedro Falcato
> > ; Kinney,
> > > > Michael D 
> > > > >Subject: RE: [PATCH v3 2/3] MdePkg: Support FDT library.
> > > > >
> > > > >Responses below
> > > > >
> > > > >Mike
> > > > >
> > > > >> -Original Message-
> > > > >> From: Lin, Benny 
> > > > >> Sent: Wednesday, April 19, 2023 10:12 AM
> > > > >> To: Kinney, Michael D ;
> > > > >> devel@edk2.groups.io
> > > > >> Cc: Gao, Liming ; Liu, Zhiguang
> > > > >> ; Pedro Falcato 
> > > > >> Subject: RE: [PATCH v3 2/3] MdePkg: Support FDT library.
> > > > >>
> > > > >> Please find my feedback below.
> > > > >> We can remove FDT_RESERVE_ENTRY but keep FDT_NODE_HEADER,
> what do you think?
> > > > >>
> > > > >> QQQ
> > > > >> Benny
> > > > >>
> > > > >> >-Original Message-
> > > > >> >From: Kinney, Michael D 
> > > > >> >Sent: Wednesday, April 19, 2023 11:54 PM
> > > > >> >To: Lin, Benny ; devel@edk2.groups.io
> > > > >> >Cc: Gao, Liming ; Liu, Zhiguang
> > > > >> >; Pedro Falcato ;
> > > > >> >Kinney,
> > > > >> Michael D 
> > > > >> >Subject: RE: [PATCH v3 2/3] MdePkg: Support FDT library.
> > > > >> >
> > > > >> >A few comments below.
> > > > >> >
> > > > >> >Mike
> > > > >> >
> > > > >> >> -Original Message-
> > > > >> >> From: Lin, Benny 
> > > > >> >> Sent: Sunday, April 16, 2023 10:35 PM
> > > > >> >> To: devel@edk2.groups.io
> > > > >> >> Cc: Lin, Benny ; Kinney, Michael D
> > > > >> >> ; Gao, Liming
> > > > >> >> ; Liu, Zhiguang
> ;
> > > > >> >> Pedro Falcato 
> > > > >> >> Subject: [PATCH v3 2/3] MdePkg: Support FDT library.
> > > > >> >>
> > > > >> >> From: Benny Lin 
> > > > >> >>
> > > > >> >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392
> > > > >> >> Add FDT support in EDK2 by submodule 3rd party libfdt
> > > > >> >> (https://github.com/devicetree-org/pylibfdt/tree/main/libfdt)
> > > > >> >> and refer to LibcLib implementation by Pedro.
> > > > >> >>
> > > > >> >> Cc: Michael D Kinney 
> > > > >> >> Cc: Liming Gao 
> > > > >> >> Cc: Zhiguang Liu 
> > > > >> >> Acked-by: Pedro Falcato 
> > > > >> >> Signed-off-by: Benny Lin 
> > > > >> >> ---
> > > > >> >>  MdePkg/Include/Library/FdtLib.h   | 314
> 
> > > > >> >>  MdePkg/Library/BaseFdtLib/BaseFdtLib.inf  |  62 
> > > > >> >> 

[edk2-devel] [PATCH] Maintainers.txt: Update for IntelFsp2Pkg and IntelFsp2WrapperPkg.

2023-04-24 Thread Chiu, Chasel
Add more maintainers and reviewers for these 2 packages.

Cc: Nate DeSimone 
Cc: Duggapu Chinni B 
Cc: Ray Han Lim Ng 
Cc: Chen Gang C 
Cc: Star Zeng 
Cc: Ted Kuo 
Cc: Ashraf Ali S 
Cc: Susovan Mohapatra 
Signed-off-by: Chasel Chiu 
---
 Maintainers.txt | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/Maintainers.txt b/Maintainers.txt
index 455afdbc69..09d04af27a 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -237,14 +237,24 @@ F: IntelFsp2Pkg/
 W: https://github.com/tianocore/tianocore.github.io/wiki/IntelFsp2Pkg
 M: Chasel Chiu  [ChaselChiu]
 M: Nate DeSimone  [nate-desimone]
+M: Duggapu Chinni B  [cbduggap]
+M: Ray Han Lim Ng  [rayhanlimng]
 R: Star Zeng  [lzeng14]
+R: Ted Kuo  [tedkuo1]
+R: Ashraf Ali S  [AshrafAliS]
+R: Susovan Mohapatra  [susovanmohapatra]
 
 IntelFsp2WrapperPkg
 F: IntelFsp2WrapperPkg/
 W: https://github.com/tianocore/tianocore.github.io/wiki/IntelFsp2WrapperPkg
 M: Chasel Chiu  [ChaselChiu]
 M: Nate DeSimone  [nate-desimone]
+M: Duggapu Chinni B  [cbduggap]
+M: Chen Gang C  [chengangc]
 R: Star Zeng  [lzeng14]
+R: Ted Kuo  [tedkuo1]
+R: Ashraf Ali S  [AshrafAliS]
+R: Susovan Mohapatra  [susovanmohapatra]
 
 MdeModulePkg
 F: MdeModulePkg/
-- 
2.35.0.windows.1



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




Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.

2023-04-20 Thread Chiu, Chasel

Hi Mike,

Thanks for bringing this good point!
We would like to document that all FDT structure data are in *big endian* 
format and remove those SwapBytes MACROs from FdtLib.h
It makes sense to handle this from library consumer side (consumer can define 
their own MACROs) because we cannot assume consumer usage always requires 
SwapBytes.

We will send V4 patch to update this.

Thanks,
Chasel



> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Michael D
> Kinney
> Sent: Thursday, April 20, 2023 9:44 AM
> To: Lin, Benny ; devel@edk2.groups.io; Leif Lindholm
> 
> Cc: Gao, Liming ; Liu, Zhiguang
> ; Pedro Falcato ; Kinney,
> Michael D 
> Subject: Re: [edk2-devel] [PATCH v3 2/3] MdePkg: Support FDT library.
> 
> Hi Leif,
> 
> What is your opinion on FDT being big endian.
> 
> Do we want the lib to help with that aspect, or leave it up to the consumer of
> the lib to
> convert as needed?  Seems like an area that could be very error prone if we 
> are
> not
> careful.
> 
> Mike
> 
> > -Original Message-
> > From: Lin, Benny 
> > Sent: Wednesday, April 19, 2023 9:25 PM
> > To: Kinney, Michael D ; devel@edk2.groups.io
> > Cc: Gao, Liming ; Liu, Zhiguang
> ; Pedro Falcato 
> > Subject: RE: [PATCH v3 2/3] MdePkg: Support FDT library.
> >
> >
> >
> > >-Original Message-
> > >From: Kinney, Michael D 
> > >Sent: Thursday, April 20, 2023 5:04 AM
> > >To: Lin, Benny ; devel@edk2.groups.io
> > >Cc: Gao, Liming ; Liu, Zhiguang
> ; Pedro Falcato ; Kinney,
> > Michael D 
> > >Subject: RE: [PATCH v3 2/3] MdePkg: Support FDT library.
> > >
> > >Responses below
> > >
> > >Mike
> > >
> > >> -Original Message-
> > >> From: Lin, Benny 
> > >> Sent: Wednesday, April 19, 2023 10:12 AM
> > >> To: Kinney, Michael D ;
> > >> devel@edk2.groups.io
> > >> Cc: Gao, Liming ; Liu, Zhiguang
> > >> ; Pedro Falcato 
> > >> Subject: RE: [PATCH v3 2/3] MdePkg: Support FDT library.
> > >>
> > >> Please find my feedback below.
> > >> We can remove FDT_RESERVE_ENTRY but keep FDT_NODE_HEADER, what
> do you think?
> > >>
> > >> QQQ
> > >> Benny
> > >>
> > >> >-Original Message-
> > >> >From: Kinney, Michael D 
> > >> >Sent: Wednesday, April 19, 2023 11:54 PM
> > >> >To: Lin, Benny ; devel@edk2.groups.io
> > >> >Cc: Gao, Liming ; Liu, Zhiguang
> > >> >; Pedro Falcato ;
> > >> >Kinney,
> > >> Michael D 
> > >> >Subject: RE: [PATCH v3 2/3] MdePkg: Support FDT library.
> > >> >
> > >> >A few comments below.
> > >> >
> > >> >Mike
> > >> >
> > >> >> -Original Message-
> > >> >> From: Lin, Benny 
> > >> >> Sent: Sunday, April 16, 2023 10:35 PM
> > >> >> To: devel@edk2.groups.io
> > >> >> Cc: Lin, Benny ; Kinney, Michael D
> > >> >> ; Gao, Liming
> > >> >> ; Liu, Zhiguang ;
> > >> >> Pedro Falcato 
> > >> >> Subject: [PATCH v3 2/3] MdePkg: Support FDT library.
> > >> >>
> > >> >> From: Benny Lin 
> > >> >>
> > >> >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392
> > >> >> Add FDT support in EDK2 by submodule 3rd party libfdt
> > >> >> (https://github.com/devicetree-org/pylibfdt/tree/main/libfdt)
> > >> >> and refer to LibcLib implementation by Pedro.
> > >> >>
> > >> >> Cc: Michael D Kinney 
> > >> >> Cc: Liming Gao 
> > >> >> Cc: Zhiguang Liu 
> > >> >> Acked-by: Pedro Falcato 
> > >> >> Signed-off-by: Benny Lin 
> > >> >> ---
> > >> >>  MdePkg/Include/Library/FdtLib.h   | 314 
> > >> >>  MdePkg/Library/BaseFdtLib/BaseFdtLib.inf  |  62 
> > >> >> MdePkg/Library/BaseFdtLib/BaseFdtLib.uni  |  14 +
> > >> >>  MdePkg/Library/BaseFdtLib/FdtLib.c| 301 +++
> > >> >>  MdePkg/Library/BaseFdtLib/LibFdtSupport.h |  99 ++
> > >> >> MdePkg/Library/BaseFdtLib/LibFdtWrapper.c | 173 +++
> > >> >>  MdePkg/Library/BaseFdtLib/limits.h|  10 +
> > >> >>  MdePkg/Library/BaseFdtLib/stdbool.h   |  10 +
> > >> >>  MdePkg/Library/BaseFdtLib/stddef.h|  10 +
> > >> >>  MdePkg/Library/BaseFdtLib/stdint.h|  10 +
> > >> >>  MdePkg/Library/BaseFdtLib/stdlib.h|  10 +
> > >> >>  MdePkg/Library/BaseFdtLib/string.h|  10 +
> > >> >>  MdePkg/MdePkg.ci.yaml |  17 +-
> > >> >>  MdePkg/MdePkg.dec |   4 +
> > >> >>  MdePkg/MdePkg.dsc |   1 +
> > >> >>  15 files changed, 1043 insertions(+), 2 deletions(-)
> > >> >>
> > >> >> diff --git a/MdePkg/Include/Library/FdtLib.h
> > >> >> b/MdePkg/Include/Library/FdtLib.h new file mode 100644 index
> > >> >> 00..d59b749c25
> > >> >> --- /dev/null
> > >> >> +++ b/MdePkg/Include/Library/FdtLib.h
> > >> >> @@ -0,0 +1,314 @@
> > >> >> +/** @file
> > >> >>
> > >> >> +  Flattened Device Tree Library.
> > >> >>
> > >> >> +
> > >> >>
> > >> >> +  Copyright (c) 2023, Intel Corporation. All rights reserved.
> > >> >>
> > >> >> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> > >> >>
> > >> >> +
> > >> >>
> > >> >> +**/
> > >> >>
> > >> >> +
> > >> >>
> > >> >> +#ifndef FDT_LIB_H_
> > >> >>
> > >> >> +#define 

Re: [edk2-devel] [PATCH v3] IntelFsp2Pkg/Tools: Enhance PathFv.py to patch Fd file directly

2023-04-18 Thread Chiu, Chasel


Patch merged:
https://github.com/tianocore/edk2/commit/b16284e2a0011489f6e16dfcc6af7623c3cbaf0b

Thanks,
Chasel


> -Original Message-
> From: Duggapu, Chinni B 
> Sent: Sunday, April 16, 2023 9:23 PM
> To: devel@edk2.groups.io
> Cc: Duggapu, Chinni B ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Zeng, Star ; Kuo, Ted
> 
> Subject: [PATCH v3] IntelFsp2Pkg/Tools: Enhance PathFv.py to patch Fd file
> directly
> 
> From: "Duggapu, Chinni B" 
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=4412
> 
> After shrinking the FSP (FV) component using FMMT, Image size in FSP info
> header is not in sync with the FV length in FV header.
> This enhancement helps to patch the FSP image size offset with correct length 
> &
> can be used to patch any offset directly on the FSP Component Fd.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Ted Kuo 
> Signed-off-by: Duggapu Chinni B 
> ---
>  IntelFsp2Pkg/Tools/PatchFv.py | 14 -
>  .../Tools/UserManuals/PatchFvUserManual.md| 20 +++
>  2 files changed, 33 insertions(+), 1 deletion(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/PatchFv.py b/IntelFsp2Pkg/Tools/PatchFv.py
> index eb130049b5..73ab877c71 100644
> --- a/IntelFsp2Pkg/Tools/PatchFv.py
> +++ b/IntelFsp2Pkg/Tools/PatchFv.py
> @@ -165,6 +165,17 @@ class Symbols:
>  if not os.path.isdir(fvDir): raise Exception ("'%s' is 
> not a valid
> directory!" % fvDir) +#+# if user provided fd name as a 
> input, skip rest of
> the flow to+# patch fd directly+#+fdFile =
> os.path.join(fvDir,fvNames + ".fd")+if os.path.exists(fdFile):+
> print("Tool identified Fd file as a input to patch '%s'" %fdFile)+
> self.fdFile =
> fdFile+self.fdSize = os.path.getsize(fdFile)+return 
> 0+ # # If
> the Guid.xref is not existing in fvDir, then raise an exception #@@ 
> -848,8
> +859,9 @@ class Symbols:
>  #  Print out the usage # def Usage():-print ("PatchFv Version 0.50")+
> print
> ("PatchFv Version 0.60") print ("Usage: \n\tPatchFv FvBuildDir
> [FvFileBaseNames:]FdFileBaseNameToPatch \"Offset, Value\"")+print
> ("\tPatchFv FdFileDir FdFileName \"Offset, Value\"")  def main(): #diff 
> --git
> a/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
> b/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
> index 5f1031e729..f28eedf625 100644
> --- a/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
> +++ b/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
> @@ -1,6 +1,7 @@
>  #Name **_PatchFv.py_** - The python script that patches the firmware
> volumes (**FV**) with in the flash device (**FD**) file post FSP build.+From
> version 0.60, script is capable of patching flash device (**FD**) directly.
> #Synopsis @@ -10,6 +11,12 @@ PatchFv FvBuildDir
> [FvFileBaseNames:]FdFileBaseNameToPatch ["Offset, Value"]+
>| ["Offset, Value, $Command"]+   | ["Offset, Value, $Command,
> @Comment"]+ ```+```+PatchFv FdFileDir FdFileName ["Offset, Value"]++  |
> ["Offset, Value, @Comment"]++  | ["Offset, Value, $Command"]++  | ["Offset,
> Value, $Command, @Comment"]++```  #Description The **_PatchFv.py_** tool
> allows the developer to fix up FD images to follow the@@ -102,6 +109,19 @@
> ModuleGuid:Offset
>< > Convert absolute address  into an image offset (expr & FSP_SIZE)
> ```+From version 0.60 tool allows to pass flash device file path as Argument 1
> and+flash device name as Argument 2 and rules for passing offset & value are
> same+as explained in the previous sections.++Example usage:+Argument
> 1+```+ YouPlatformFspBinPkg\+```+Argument 2+```+ Fsp_Rebased_T+```
> ###Special Commands: Special commands must use the **$** symbol as a
> prefix to the command itself.--
> 2.39.1.windows.1



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




Re: [edk2-devel] [PATCH v3] IntelFsp2Pkg/Tools: Enhance PathFv.py to patch Fd file directly

2023-04-16 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Duggapu, Chinni B 
> Sent: Sunday, April 16, 2023 9:23 PM
> To: devel@edk2.groups.io
> Cc: Duggapu, Chinni B ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Zeng, Star ; Kuo, Ted
> 
> Subject: [PATCH v3] IntelFsp2Pkg/Tools: Enhance PathFv.py to patch Fd file
> directly
> 
> From: "Duggapu, Chinni B" 
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=4412
> 
> After shrinking the FSP (FV) component using FMMT, Image size in FSP info
> header is not in sync with the FV length in FV header.
> This enhancement helps to patch the FSP image size offset with correct length 
> &
> can be used to patch any offset directly on the FSP Component Fd.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Ted Kuo 
> Signed-off-by: Duggapu Chinni B 
> ---
>  IntelFsp2Pkg/Tools/PatchFv.py | 14 -
>  .../Tools/UserManuals/PatchFvUserManual.md| 20 +++
>  2 files changed, 33 insertions(+), 1 deletion(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/PatchFv.py b/IntelFsp2Pkg/Tools/PatchFv.py
> index eb130049b5..73ab877c71 100644
> --- a/IntelFsp2Pkg/Tools/PatchFv.py
> +++ b/IntelFsp2Pkg/Tools/PatchFv.py
> @@ -165,6 +165,17 @@ class Symbols:
>  if not os.path.isdir(fvDir): raise Exception ("'%s' is 
> not a valid
> directory!" % fvDir) +#+# if user provided fd name as a 
> input, skip rest of
> the flow to+# patch fd directly+#+fdFile =
> os.path.join(fvDir,fvNames + ".fd")+if os.path.exists(fdFile):+
> print("Tool identified Fd file as a input to patch '%s'" %fdFile)+
> self.fdFile =
> fdFile+self.fdSize = os.path.getsize(fdFile)+return 
> 0+ # # If
> the Guid.xref is not existing in fvDir, then raise an exception #@@ 
> -848,8
> +859,9 @@ class Symbols:
>  #  Print out the usage # def Usage():-print ("PatchFv Version 0.50")+
> print
> ("PatchFv Version 0.60") print ("Usage: \n\tPatchFv FvBuildDir
> [FvFileBaseNames:]FdFileBaseNameToPatch \"Offset, Value\"")+print
> ("\tPatchFv FdFileDir FdFileName \"Offset, Value\"")  def main(): #diff 
> --git
> a/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
> b/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
> index 5f1031e729..f28eedf625 100644
> --- a/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
> +++ b/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
> @@ -1,6 +1,7 @@
>  #Name **_PatchFv.py_** - The python script that patches the firmware
> volumes (**FV**) with in the flash device (**FD**) file post FSP build.+From
> version 0.60, script is capable of patching flash device (**FD**) directly.
> #Synopsis @@ -10,6 +11,12 @@ PatchFv FvBuildDir
> [FvFileBaseNames:]FdFileBaseNameToPatch ["Offset, Value"]+
>| ["Offset, Value, $Command"]+   | ["Offset, Value, $Command,
> @Comment"]+ ```+```+PatchFv FdFileDir FdFileName ["Offset, Value"]++  |
> ["Offset, Value, @Comment"]++  | ["Offset, Value, $Command"]++  | ["Offset,
> Value, $Command, @Comment"]++```  #Description The **_PatchFv.py_** tool
> allows the developer to fix up FD images to follow the@@ -102,6 +109,19 @@
> ModuleGuid:Offset
>< > Convert absolute address  into an image offset (expr & FSP_SIZE)
> ```+From version 0.60 tool allows to pass flash device file path as Argument 1
> and+flash device name as Argument 2 and rules for passing offset & value are
> same+as explained in the previous sections.++Example usage:+Argument
> 1+```+ YouPlatformFspBinPkg\+```+Argument 2+```+ Fsp_Rebased_T+```
> ###Special Commands: Special commands must use the **$** symbol as a
> prefix to the command itself.--
> 2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103074): https://edk2.groups.io/g/devel/message/103074
Mute This Topic: https://groups.io/mt/98312628/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] MinPlatformPkg: Add Pcd for FADT REVISION and MINOR REVISION to update FADT entries from board package.

2023-04-14 Thread Chiu, Chasel


Patch merged:
https://github.com/tianocore/edk2-platforms/commit/3b7f82b61b552f5bdd415f1bf4ba2866a09ceac0

Thanks,
Chasel


> -Original Message-
> From: Chen, Aryeh 
> Sent: Wednesday, April 12, 2023 9:27 AM
> To: devel@edk2.groups.io
> Cc: Chen, Aryeh ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Oram, Isaac W ;
> Gao, Liming ; Dong, Eric 
> Subject: [PATCH v2] MinPlatformPkg: Add Pcd for FADT REVISION and MINOR
> REVISION to update FADT entries from board package.
> 
> From: Aryeh Chen 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4409
> 
> Add Pcd for FADT REVISION and MINOR REVISION to update FADT entries from
> board package.
> 
> Signed-off-by: Aryeh Chen 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Isaac Oram 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c   | 2 ++
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf | 2 ++
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec   | 2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> index 6e57b638e0..e967031a3b 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> @@ -1096,6 +1096,7 @@ PlatformUpdateTables (
>case EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE:
> FadtHeader = (EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE *) Table; +
> FadtHeader->Header.Revision   = PcdGet8 (PcdFadtMajorVersion);
> FadtHeader->PreferredPmProfile= PcdGet8
> (PcdFadtPreferredPmProfile); FadtHeader->IaPcBootArch 
>  =
> PcdGet16 (PcdFadtIaPcBootArch); FadtHeader->Flags 
> =
> PcdGet32 (PcdFadtFlags);@@ -1113,6 +1114,7 @@ PlatformUpdateTables (
>  FadtHeader->Gpe1Blk   = PcdGet16 
> (PcdAcpiGpe1BlockAddress);
> FadtHeader->Gpe1BlkLen= PcdGet8 
> (PcdAcpiGpe1BlockLength);
> FadtHeader->Gpe1Base  = PcdGet8 (PcdAcpiGpe1Base);+
> FadtHeader->MinorVersion  = PcdGet8 (PcdFadtMinorVersion);
> FadtHeader->XPm1aEvtBlk.Address   = PcdGet16
> (PcdAcpiPm1AEventBlockAddress); FadtHeader->XPm1bEvtBlk.Address
> = PcdGet16 (PcdAcpiPm1BEventBlockAddress);diff --git
> a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf
> index 451034fb8a..694492112b 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf
> @@ -67,6 +67,8 @@
>gMinPlatformPkgTokenSpaceGuid.PcdFadtFlags
> gMinPlatformPkgTokenSpaceGuid.PcdFadtDutyOffset
> gMinPlatformPkgTokenSpaceGuid.PcdFadtDutyWidth+
> gMinPlatformPkgTokenSpaceGuid.PcdFadtMajorVersion+
> gMinPlatformPkgTokenSpaceGuid.PcdFadtMinorVersion
> gPcAtChipsetPkgTokenSpaceGuid.PcdHpetBaseAddress
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddressdiff --git
> a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> index e6f714b181..784abb828e 100644
> --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> @@ -346,6 +346,8 @@
> 
> gMinPlatformPkgTokenSpaceGuid.PcdFadtPreferredPmProfile|0x02|UINT8|0x9
> 025
> gMinPlatformPkgTokenSpaceGuid.PcdFadtIaPcBootArch|0x0001|UINT16|0x900
> 00026
> gMinPlatformPkgTokenSpaceGuid.PcdFadtFlags|0x86A5|UINT32|0x9
> 027+
> gMinPlatformPkgTokenSpaceGuid.PcdFadtMajorVersion|0x06|UINT8|0x90
> 30+
> gMinPlatformPkgTokenSpaceGuid.PcdFadtMinorVersion|0x03|UINT8|0x90
> 31  [PcdsFixedAtBuild] --
> 2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103012): https://edk2.groups.io/g/devel/message/103012
Mute This Topic: https://groups.io/mt/98223011/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] IntelFsp2Pkg/Tools: Enhance PathFv.py to patch Fd file directly https://bugzilla.tianocore.org/show_bug.cgi?id=4412

2023-04-14 Thread Chiu, Chasel


Hi Chinni,

Please help to correct patch format and make sure it can pass verification by 
BaseTools/Scripts/PatchCheck.py

Thanks,
Chasel


> -Original Message-
> From: Duggapu, Chinni B 
> Sent: Friday, April 14, 2023 1:34 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Zeng, Star ; Kuo, Ted
> ; Duggapu, Chinni B 
> Subject: [PATCH v2] IntelFsp2Pkg/Tools: Enhance PathFv.py to patch Fd file
> directly https://bugzilla.tianocore.org/show_bug.cgi?id=4412
> 
> After shrinking the FSP (FV) component using FMMT, Image size in FSP info
> header is not in sync with the FV length in FV header.
> This enhancement helps to patch the FSP image size offset with correct length 
> &
> can be used to patch any offset directly on the FSP Component Fd .
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Ted Kuo 
> Signed-off-by: Duggapu Chinni B 
> ---
>  IntelFsp2Pkg/Tools/PatchFv.py | 14 -
>  .../Tools/UserManuals/PatchFvUserManual.md| 20 +++
>  2 files changed, 33 insertions(+), 1 deletion(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/PatchFv.py b/IntelFsp2Pkg/Tools/PatchFv.py
> index eb130049b5..156c937abe 100644
> --- a/IntelFsp2Pkg/Tools/PatchFv.py
> +++ b/IntelFsp2Pkg/Tools/PatchFv.py
> @@ -165,6 +165,17 @@ class Symbols:
>  if not os.path.isdir(fvDir): raise Exception ("'%s' is 
> not a valid
> directory!" % fvDir) +#+# if user provided fd name as a 
> input, skip rest of
> the flow to+# patch fd directly+# +fdFile =
> os.path.join(fvDir,fvNames + ".fd")+if os.path.exists(fdFile):+
> print("Tool identified Fd file as a input to patch '%s'" %fdFile)+
> self.fdFile =
> fdFile+self.fdSize = os.path.getsize(fdFile)+return 
> 0+ # # If
> the Guid.xref is not existing in fvDir, then raise an exception #@@ 
> -848,8
> +859,9 @@ class Symbols:
>  #  Print out the usage # def Usage():-print ("PatchFv Version 0.50")+
> print
> ("PatchFv Version 0.60") print ("Usage: \n\tPatchFv FvBuildDir
> [FvFileBaseNames:]FdFileBaseNameToPatch \"Offset, Value\"")+print
> ("\tPatchFv FdFileDir FdFileName \"Offset, Value\"")  def main(): #diff 
> --git
> a/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
> b/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
> index 5f1031e729..33bba38a3f 100644
> --- a/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
> +++ b/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
> @@ -1,6 +1,7 @@
>  #Name **_PatchFv.py_** - The python script that patches the firmware
> volumes (**FV**) with in the flash device (**FD**) file post FSP build.+From
> version 0.60, script is capable of patching flash device (**FD**) directly.
> #Synopsis @@ -10,6 +11,12 @@ PatchFv FvBuildDir
> [FvFileBaseNames:]FdFileBaseNameToPatch ["Offset, Value"]+
>| ["Offset, Value, $Command"]+   | ["Offset, Value, $Command,
> @Comment"]+ ```+```+PatchFv FdFileDir FdFileName ["Offset, Value"]++  |
> ["Offset, Value, @Comment"]++  | ["Offset, Value, $Command"]++  | ["Offset,
> Value, $Command, @Comment"]++```  #Description The **_PatchFv.py_** tool
> allows the developer to fix up FD images to follow the@@ -102,6 +109,19 @@
> ModuleGuid:Offset
>< > Convert absolute address  into an image offset (expr & FSP_SIZE)
> ```+From version 0.60 tool allows to pass flash device file path as Argument 1
> and +flash device name as Argument 2 and rules for passing offset & value are
> same+as explained in the previous sections.++Example usage:+Argument
> 1+```+ YouPlatformFspBinPkg\+```+Argument 2+```+ Fsp_Rebased_T+```
> ###Special Commands: Special commands must use the **$** symbol as a
> prefix to the command itself.--
> 2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103011): https://edk2.groups.io/g/devel/message/103011
Mute This Topic: https://groups.io/mt/98258191/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] MinPlatformPkg: Add Pcd for FADT REVISION and MINOR REVISION to update FADT entries from board package.

2023-04-12 Thread Chiu, Chasel



Reviewed-by: Chasel Chiu 

Thanks,
Chasel



> -Original Message-
> From: Chen, Aryeh 
> Sent: Wednesday, April 12, 2023 9:27 AM
> To: devel@edk2.groups.io
> Cc: Chen, Aryeh ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Oram, Isaac W ;
> Gao, Liming ; Dong, Eric 
> Subject: [PATCH v2] MinPlatformPkg: Add Pcd for FADT REVISION and MINOR
> REVISION to update FADT entries from board package.
> 
> From: Aryeh Chen 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4409
> 
> Add Pcd for FADT REVISION and MINOR REVISION to update FADT entries from
> board package.
> 
> Signed-off-by: Aryeh Chen 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Isaac Oram 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c   | 2 ++
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf | 2 ++
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec   | 2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> index 6e57b638e0..e967031a3b 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> @@ -1096,6 +1096,7 @@ PlatformUpdateTables (
>case EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE:
> FadtHeader = (EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE *) Table; +
> FadtHeader->Header.Revision   = PcdGet8 (PcdFadtMajorVersion);
> FadtHeader->PreferredPmProfile= PcdGet8
> (PcdFadtPreferredPmProfile); FadtHeader->IaPcBootArch 
>  =
> PcdGet16 (PcdFadtIaPcBootArch); FadtHeader->Flags 
> =
> PcdGet32 (PcdFadtFlags);@@ -1113,6 +1114,7 @@ PlatformUpdateTables (
>  FadtHeader->Gpe1Blk   = PcdGet16 
> (PcdAcpiGpe1BlockAddress);
> FadtHeader->Gpe1BlkLen= PcdGet8 
> (PcdAcpiGpe1BlockLength);
> FadtHeader->Gpe1Base  = PcdGet8 (PcdAcpiGpe1Base);+
> FadtHeader->MinorVersion  = PcdGet8 (PcdFadtMinorVersion);
> FadtHeader->XPm1aEvtBlk.Address   = PcdGet16
> (PcdAcpiPm1AEventBlockAddress); FadtHeader->XPm1bEvtBlk.Address
> = PcdGet16 (PcdAcpiPm1BEventBlockAddress);diff --git
> a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf
> index 451034fb8a..694492112b 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf
> @@ -67,6 +67,8 @@
>gMinPlatformPkgTokenSpaceGuid.PcdFadtFlags
> gMinPlatformPkgTokenSpaceGuid.PcdFadtDutyOffset
> gMinPlatformPkgTokenSpaceGuid.PcdFadtDutyWidth+
> gMinPlatformPkgTokenSpaceGuid.PcdFadtMajorVersion+
> gMinPlatformPkgTokenSpaceGuid.PcdFadtMinorVersion
> gPcAtChipsetPkgTokenSpaceGuid.PcdHpetBaseAddress
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddressdiff --git
> a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> index e6f714b181..784abb828e 100644
> --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> @@ -346,6 +346,8 @@
> 
> gMinPlatformPkgTokenSpaceGuid.PcdFadtPreferredPmProfile|0x02|UINT8|0x9
> 025
> gMinPlatformPkgTokenSpaceGuid.PcdFadtIaPcBootArch|0x0001|UINT16|0x900
> 00026
> gMinPlatformPkgTokenSpaceGuid.PcdFadtFlags|0x86A5|UINT32|0x9
> 027+
> gMinPlatformPkgTokenSpaceGuid.PcdFadtMajorVersion|0x06|UINT8|0x90
> 30+
> gMinPlatformPkgTokenSpaceGuid.PcdFadtMinorVersion|0x03|UINT8|0x90
> 31  [PcdsFixedAtBuild] --
> 2.26.2.windows.1



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




Re: [edk2-devel] [PATCH v1] MinPlatformPkg: Add Pcd for FADT REVISION and MINOR REVISION to update FADT entries from board package.

2023-04-12 Thread Chiu, Chasel


Hi Aryeh,

Please see below inline for comments.

Thanks,
Chasel


> -Original Message-
> From: Chen, Aryeh 
> Sent: Wednesday, April 12, 2023 4:20 AM
> To: devel@edk2.groups.io
> Cc: Chen, Aryeh ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Oram, Isaac W ;
> Gao, Liming ; Dong, Eric 
> Subject: [PATCH v1] MinPlatformPkg: Add Pcd for FADT REVISION and MINOR
> REVISION to update FADT entries from board package.
> 
> From: Aryeh Chen 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4409
> 
> Add Pcd for FADT REVISION and MINOR REVISION to update FADT entries from
> board package.
> 
> Signed-off-by: Aryeh Chen 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Isaac Oram 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c   | 2 ++
>  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf | 2 ++
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec   | 2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> index 6e57b638e0..a844d9c445 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> @@ -1096,6 +1096,7 @@ PlatformUpdateTables (
>case EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE:
> FadtHeader = (EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE *) Table; +
> FadtHeader->Header.Revision   = PcdGet8 (PcdFadtRevision);
> FadtHeader->PreferredPmProfile= PcdGet8
> (PcdFadtPreferredPmProfile); FadtHeader->IaPcBootArch 
>  =
> PcdGet16 (PcdFadtIaPcBootArch); FadtHeader->Flags 
> =
> PcdGet32 (PcdFadtFlags);@@ -1113,6 +1114,7 @@ PlatformUpdateTables (
>  FadtHeader->Gpe1Blk   = PcdGet16 
> (PcdAcpiGpe1BlockAddress);
> FadtHeader->Gpe1BlkLen= PcdGet8 
> (PcdAcpiGpe1BlockLength);
> FadtHeader->Gpe1Base  = PcdGet8 (PcdAcpiGpe1Base);+
> FadtHeader->MinorVersion  = PcdGet8 
> (PcdFadtMinorRevision);
> FadtHeader->XPm1aEvtBlk.Address   = PcdGet16
> (PcdAcpiPm1AEventBlockAddress); FadtHeader->XPm1bEvtBlk.Address
> = PcdGet16 (PcdAcpiPm1BEventBlockAddress);diff --git
> a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf
> index 451034fb8a..9d83cbf73c 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf
> @@ -67,6 +67,8 @@
>gMinPlatformPkgTokenSpaceGuid.PcdFadtFlags
> gMinPlatformPkgTokenSpaceGuid.PcdFadtDutyOffset
> gMinPlatformPkgTokenSpaceGuid.PcdFadtDutyWidth+
> gMinPlatformPkgTokenSpaceGuid.PcdFadtRevision+
> gMinPlatformPkgTokenSpaceGuid.PcdFadtMinorRevision
> gPcAtChipsetPkgTokenSpaceGuid.PcdHpetBaseAddress
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddressdiff --git
> a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> index e6f714b181..6e44287256 100644
> --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> @@ -346,6 +346,8 @@
> 
> gMinPlatformPkgTokenSpaceGuid.PcdFadtPreferredPmProfile|0x02|UINT8|0x9
> 025
> gMinPlatformPkgTokenSpaceGuid.PcdFadtIaPcBootArch|0x0001|UINT16|0x900
> 00026
> gMinPlatformPkgTokenSpaceGuid.PcdFadtFlags|0x86A5|UINT32|0x9
> 027+
> gMinPlatformPkgTokenSpaceGuid.PcdFadtRevision|0x06|UINT8|0x9030+

To be more align with specification, it looks to me better naming is 
PcdFadtMajorVersion


> gMinPlatformPkgTokenSpaceGuid.PcdFadtMinorRevision|0x03|UINT8|0x9


To be more align with specification, it looks to me better naming is 
PcdFadtMinorVersion


> 031  [PcdsFixedAtBuild] --
> 2.26.2.windows.1



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




Re: [edk2-devel] [PATCH v4] IntelFsp2Pkg: LoadMicrocodeDefault() causing unnecessary delay.

2023-04-04 Thread Chiu, Chasel


Patch merged:
https://github.com/tianocore/edk2/commit/7df447930c42addaf2cc0d32916141d95ded677e

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Chiu, Chasel
> Sent: Monday, April 3, 2023 11:34 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Zeng, Star ; Ni, Ray
> ; Kuo, Ted 
> Subject: [edk2-devel] [PATCH v4] IntelFsp2Pkg: LoadMicrocodeDefault() causing
> unnecessary delay.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4391
> 
> FSP should support the scenario that CPU microcode already loaded before
> calling LoadMicrocodeDefault(), in this case it should return directly without
> spending more time.
> Also the LoadMicrocodeDefault() should only attempt to load one version of the
> microcode for current CPU and return directly without parsing rest of the
> microcode in FV.
> 
> This patch also removed unnecessary LoadCheck code after supporting CPU
> microcode already loaded scenario.
> 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Ray Ni 
> Signed-off-by: Chasel Chiu 
> Reviewed-by: Ted Kuo 
> ---
>  IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm | 46
> --
>  IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm  | 45
> -
>  2 files changed, 48 insertions(+), 43 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
> b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
> index 2cff8b3643..900126b93b 100644
> --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
> +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
> @@ -245,6 +245,22 @@ ASM_PFX(LoadMicrocodeDefault):
> cmpesp, 0jz ParamError +   ;+   ; If microcode already loaded 
> before this
> function, exit this function with SUCCESS.+   ;+   mov   ecx,
> MSR_IA32_BIOS_SIGN_ID+   xor   eax, eax   ; Clear EAX+   xor   
> edx,
> edx   ; Clear EDX+   wrmsr; Load 0 to MSR 
> at 8Bh++   mov
> eax, 1+   cpuid+   mov   ecx, MSR_IA32_BIOS_SIGN_ID+   rdmsr  
>;
> Get current microcode signature+   xor   eax, eax+   test  edx, edx+   jnz   
> Exit2+;
> skip loading Microcode if the MicrocodeCodeSize is zero; and report error 
> if
> size is less than 2k; first check UPD header revision@@ -330,7 +346,7 @@
> CheckMainHeader:
> cmp   ebx, dword [esi + MicrocodeHdr.MicrocodeHdrProcessor]jne
> LoadMicrocodeDefault1test  edx, dword [esi +
> MicrocodeHdr.MicrocodeHdrFlags ]-   jnz   LoadCheck  ; Jif signature and
> platform ID match+   jnz   LoadMicrocode  ; Jif signature and platform ID 
> match
> LoadMicrocodeDefault1:; Check if extended header exists@@ -363,7 +379,7
> @@ CheckExtSig:
> cmp   dword [edi + ExtSig.ExtSigProcessor], ebxjne
> LoadMicrocodeDefault2test  dword [edi + ExtSig.ExtSigFlags], edx-   jnz
> LoadCheck  ; Jif signature and platform ID match+   jnz   LoadMicrocode   
>; Jif
> signature and platform ID match LoadMicrocodeDefault2:; Check if any more
> extended signatures existadd   edi, ExtSig.size@@ -435,23 +451,7 @@
> LoadMicrocodeDefault4:
> ; Is valid Microcode start point ?cmp   dword [esi +
> MicrocodeHdr.MicrocodeHdrVersion], 0hjzDone--LoadCheck:-   ; 
> Get
> the revision of the current microcode update loaded-   mov   ecx,
> MSR_IA32_BIOS_SIGN_ID-   xor   eax, eax   ; Clear EAX-   xor   
> edx,
> edx   ; Clear EDX-   wrmsr; Load 0 to MSR 
> at 8Bh--   mov   eax,
> 1-   cpuid-   mov   ecx, MSR_IA32_BIOS_SIGN_ID-   rdmsr   
>  ; Get
> current microcode signature--   ; Verify this microcode update is not already
> loaded-   cmp   dword [esi + MicrocodeHdr.MicrocodeHdrRevision], edx-   je
> Continue-+   jmp   CheckMainHeader LoadMicrocode:; EAX contains the linear
> address of the start of the Update Data; EDX contains zero@@ -465,10
> +465,12 @@ LoadMicrocode:
> mov   eax, 1cpuid -Continue:-   jmp   NextMicrocode- Done:+   mov   
> ecx,
> MSR_IA32_BIOS_SIGN_ID+   xor   eax, eax   ; Clear EAX+   xor   
> edx,
> edx   ; Clear EDX+   wrmsr; Load 0 to MSR 
> at 8Bh+mov
> eax, 1cpuidmov   ecx, MSR_IA32_BIOS_SIGN_IDdiff --git
> a/IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm
> b/IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm
> index b32fa32a89..698bb063a7 100644
> --- a/IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm
> +++ b/IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm
> @@ -141,6 +141,22 @@ ASM_PFX(LoadMicrocodeDefault):
> jz ParamErrormovrsp, rcx +   ;+

Re: [edk2-devel] [PATCH] IntelFsp2Pkg: TempRamInit API should preserve EBX/RBX register.

2023-04-04 Thread Chiu, Chasel


Patch merged:
https://github.com/tianocore/edk2/commit/af98f1fb0311d8e3cc52ab9fc544a8c8ff8f7546

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Chiu, Chasel
> Sent: Friday, March 31, 2023 4:16 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Zeng, Star 
> Subject: [edk2-devel] [PATCH] IntelFsp2Pkg: TempRamInit API should preserve
> EBX/RBX register.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4395
> 
> FSP specification defines the TempRamInit API preserved register list which
> including EBX/RBX, however current implementation unexpectedly overriding
> EBX/RBX register that should be fixed.
> 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Signed-off-by: Chasel Chiu 
> ---
>  IntelFsp2Pkg/FspSecCore/Ia32/SaveRestoreSseNasm.inc |  7 +++
>  IntelFsp2Pkg/Include/SaveRestoreSseAvxNasm.inc  | 21
> -
>  2 files changed, 27 insertions(+), 1 deletion(-)
> 
> diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/SaveRestoreSseNasm.inc
> b/IntelFsp2Pkg/FspSecCore/Ia32/SaveRestoreSseNasm.inc
> index a222f2e376..016f943b43 100644
> --- a/IntelFsp2Pkg/FspSecCore/Ia32/SaveRestoreSseNasm.inc
> +++ b/IntelFsp2Pkg/FspSecCore/Ia32/SaveRestoreSseNasm.inc
> @@ -157,6 +157,9 @@ NextAddress:
>  ; Use CpuId instruction (CPUID.01H:EDX.SSE[bit 25] = 1) to test  
>;
> whether the processor supports SSE instruction. ;+; 
> Save EBX to
> MM2+;+movdmm2, ebx mov eax, 1 
> cpuid
> bt  edx, 25@@ -169,6 +172,10 @@ NextAddress:
>  bt  ecx, 19 jnc SseError %endif+
> ;+; Restore EBX
> from MM2+;+movdebx, mm2  ;
>  ; Set OSFXSR bit (bit
> #9) & OSXMMEXCPT bit (bit #10)diff --git
> a/IntelFsp2Pkg/Include/SaveRestoreSseAvxNasm.inc
> b/IntelFsp2Pkg/Include/SaveRestoreSseAvxNasm.inc
> index 38c807a311..002a5a1412 100644
> --- a/IntelFsp2Pkg/Include/SaveRestoreSseAvxNasm.inc
> +++ b/IntelFsp2Pkg/Include/SaveRestoreSseAvxNasm.inc
> @@ -255,6 +255,10 @@ NextAddress:
>  ; Use CpuId instruction (CPUID.01H:EDX.SSE[bit 25] = 1) to test  
>;
> whether the processor supports SSE instruction. ;+; 
> Save RBX to
> R11+; Save RCX to R10+;+mov r11, rbx  
>mov r10,
> rcx mov rax, 1 cpuid@@ -266,7 +270,12 @@ 
> NextAddress:
>  ; bt  ecx, 19 jnc SseError-  
>   mov rcx,
> r10+;+; Restore RBX from R11+; Restore 
> RCX from
> R10+;+mov rbx, r11+mov rcx, r10   
>; ; Set
> OSFXSR bit (bit #9) & OSXMMEXCPT bit (bit #10)@@ -284,6 +293,11 @@
> NextAddress:
>  %endmacro  %macro ENABLE_AVX   0+;+; 
> Save RBX to
> R11+; Save RCX to R10+;+mov r11, rbx  
>mov r10,
> rcx mov eax, 1 cpuid@@ -307,6 +321,11 @@ 
> EnableAvx:
>  xgetbv ; result in edx:eax or  
> eax, 0006h ; Set XCR0
> bit #1 and bit #2 to enable SSE state and AVX state xsetbv+   
>  ;+;
> Restore RBX from R11+; Restore RCX from R10+;+
> mov rbx,
> r11 mov rcx, r10 %endmacro --
> 2.35.0.windows.1
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#102337): https://edk2.groups.io/g/devel/message/102337
> Mute This Topic: https://groups.io/mt/97984838/1777047
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [chasel.c...@intel.com] -=-
> =-=-=-=-=
> 



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




  1   2   3   4   5   6   7   8   9   10   >