Re: [edk2-devel] [PATCH v1 07/17] Platform/Loongson/LoongArchQemuPkg: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Chao Li

Acked-by: Chao Li 


Thanks,
Chao
On 2023/12/1 08:34, Taylor Beebe wrote:

ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

Signed-off-by: Taylor Beebe
Cc: Bibo Mao
Cc: Xianglai li
Cc: Chao Li
---
  Platform/Loongson/LoongArchQemuPkg/Loongson.dsc | 1 +
  1 file changed, 1 insertion(+)

diff --git a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc 
b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
index 00b28cfa500f..d547d86824b7 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
+++ b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
@@ -155,6 +155,7 @@
PciHostBridgeUtilityLib  | 
OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf
MmuLib   | 
Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/MmuBaseLib.inf
FileExplorerLib  | 
MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
+  ImagePropertiesRecordLib | 
MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
  
  !if $(HTTP_BOOT_ENABLE) == TRUE

HttpLib  | 
MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf



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




Re: [edk2-devel] [PATCH] UefiCpuPkg/ResetVector: Option for 1G Page Table Size increase

2023-11-30 Thread Ashraf Ali S
Hi., Ray

Yes, I agree. But if any device which needs to map above 512GB in Pre Memory 
(Early PreMem). 

if any device mapped any device below 512GB. And if the DRAM has 512GB then it 
would create a conflict.

So we are not changing the default page table size, keeping 512GB only. So that 
it will give room to decide the reset vector size based on the platform needs.

Sizes mentioned below:
512GB - 16KB
1TB  - 20KB
2TB  - 28KB

Thanks.,
S, Ashraf Ali

-Original Message-
From: Ni, Ray  
Sent: Friday, December 1, 2023 10:58 AM
To: S, Ashraf Ali ; devel@edk2.groups.io
Cc: Kumar, Rahul R ; West, Catharine 
; V, Sangeetha 
Subject: RE: [PATCH] UefiCpuPkg/ResetVector: Option for 1G Page Table Size 
increase

Ashraf,
When we implement the reset vector, we assume that 512GB page table occupies 
minimal flash size and also sufficient for XIP code.
Any code that wants more page table coverage should create a new page table, 
either in the temporary ram (when physical mem is not ready) or in physical ram.

Why does this patch increase the default 512 GB coverage?

Thanks,
Ray
> -Original Message-
> From: S, Ashraf Ali 
> Sent: Friday, December 1, 2023 1:35 AM
> To: devel@edk2.groups.io
> Cc: S, Ashraf Ali ; Kumar, Rahul R 
> ; Ni, Ray ; West, Catharine 
> ; V, Sangeetha 
> Subject: [PATCH] UefiCpuPkg/ResetVector: Option for 1G Page Table Size 
> increase
> 
> Currently 1G Page table is restricted 512GB. this patch can help to 
> increase the page table size based on the input. default will be 512GB 
> build option PAGE_TABLE_1G_SIZE is used to increase the page table 
> size
> 
> Cc: Rahul Kumar 
> Cc: Ray Ni 
> Cc: Catharine West 
> Cc: V Sangeetha 
> Signed-off-by: Ashraf Ali S 
> ---
>  UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt |  4 ++--
>  UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf   |  2 ++
>  UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm | 13 +++--
>  3 files changed, 15 insertions(+), 4 deletions(-)
> 
> diff --git a/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt
> b/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt
> index 4fcb15c3b1..4d153fc1a7 100644
> --- a/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt
> +++ b/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt
> @@ -1,10 +1,10 @@
> 
>  === HOW TO USE VTF0 ===
>  Add this line to your DSC [Components.IA32] or [Components.X64] section:
> -  UefiCpuPkg/ResetVector/Vtf0/ResetVector.inf
> +  UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> 
>  Add this line to your FDF FV section:
> -  INF  RuleOverride=RESET_VECTOR
> UefiCpuPkg/ResetVector/Vtf0/ResetVector.inf
> +  INF  RuleOverride=RESET_VECTOR UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> 
>  In your FDF FFS file rules sections add:
>[Rule.Common.SEC.RESET_VECTOR]
> diff --git a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> index 6b406163db..96106a4b11 100644
> --- a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> +++ b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> @@ -53,5 +53,7 @@
>  #   -DARCH_X64, -DARCH_IA32
>  #   * for using 1G page table:
>  #   -DPAGE_TABLE_1G
> +#   * for incresing the 1G page table size (Size in GBs):
> +#   -DPAGE_TABLE_1G_SIZE=1024
>  #   * for different debug channels:
>  #   -DDEBUG_SERIAL, -DDEBUG_PORT80, or not specify any debug channel
> diff --git a/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm
> b/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm
> index 7960b141be..b080dc5296 100644
> --- a/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm
> +++ b/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm
> @@ -1,7 +1,7 @@
>  
> ;-
> -
>  ; @file
>  ; Emits Page Tables for 1:1 mapping.
> -; If using 1G page table, map addresses 0 - 0x80 (512GB),
> +; If using 1G page table, map addresses 0 - 0x80 (512GB, Size 
> +can
> be increse via PAGE_TABLE_1G_SIZE),
>  ; else, map addresses 0 - 0x1 (4GB)  ;  ; Copyright (c) 2021 
> - 2023, Intel Corporation. All rights reserved.
> @@ -39,6 +39,15 @@ BITS64
>  %define PAGE_PDPTE_1GB(x) ((x << 30) + PAGE_BLE_ATTR)  %define 
> PAGE_PDE_2MB(x) ((x << 21) + PAGE_BLE_ATTR)
> 
> +%ifdef PAGE_TABLE_1G_SIZE
> +  %define PAGE_PDPTE_1GB_SIZE PAGE_TABLE_1G_SIZE %else
> +  ;
> +  ; Default 512GB of 1G Page Table
> +  ;
> +  %define PAGE_PDPTE_1GB_SIZE 512
> +%endif
> +
>  ALIGN 16
> 
>  %ifdef PAGE_TABLE_1G
> @@ -47,7 +56,7 @@ Pdp:
>  ; Page-directory pointer table (512 * 1GB entries => 512GB)
>  ;
>  %assign i 0
> -%rep  512
> +%rep  PAGE_PDPTE_1GB_SIZE
>  DQPAGE_PDPTE_1GB(i)
>  %assign i i+1
>  %endrep
> --
> 2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111971): https://edk2.groups.io/g/devel/message/111971
Mute This Topic: https://groups.io/mt/102898657/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/PatchFv: Fix syntax issue in markdown manual

2023-11-30 Thread Ashraf Ali S
Reviewed-by: S, Ashraf Ali 

Thanks.,
S, Ashraf Ali

-Original Message-
From: Desimone, Nathaniel L  
Sent: Friday, December 1, 2023 7:26 AM
To: devel@edk2.groups.io
Cc: Ni, Ray ; Chiu, Chasel ; Duggapu, 
Chinni B ; Ng, Ray Han Lim 
; Zeng, Star ; Kuo, Ted 
; S, Ashraf Ali ; Mohapatra, Susovan 

Subject: [PATCH] IntelFsp2Pkg/PatchFv: Fix syntax issue in markdown manual

From: Ray Ni 

According to the markdown language syntax, headings should be after number 
signs (#). The number of number signs correspond to the heading level.
But current PatchFvUserManual.md doesn't insert a space between the number 
signs and the heading title, resulting the markdown file is not rendered well 
in markdown viewers.

The patch doesn't change any content but only adds spaces to ensure the 
headings are correctly recognized.

Signed-off-by: Ray Ni 
Cc: Chasel Chiu 
Reviewed-by: Nate DeSimone 
Cc: Duggapu Chinni B 
Cc: Ray Han Lim Ng 
Cc: Star Zeng 
Cc: Ted Kuo 
Reviewed-by: Ashraf Ali S 
Cc: Susovan Mohapatra 
---
 .../Tools/UserManuals/PatchFvUserManual.md| 38 +--
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md 
b/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
index f28eedf625..205ad57773 100644
--- a/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
+++ b/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
@@ -1,9 +1,9 @@
-#Name
+# 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
+# Synopsis
 
 ```
 PatchFv FvBuildDir [FvFileBaseNames:]FdFileBaseNameToPatch ["Offset, Value"]+ 
@@ -18,32 +18,32 @@ PatchFv FdFileDir FdFileName ["Offset, Value"]+
   | ["Offset, Value, $Command, @Comment"]+  ```
 
-#Description
+# Description
 The **_PatchFv.py_** tool allows the developer to fix up FD images to follow 
the  Intel FSP Architecture specification.  It also makes the FD image 
relocatable.
 The tool is written in Python and uses Python 2.7 or later to run.
 Consider using the tool in a build script.
 
-#FvBuildDir (Argument 1)
+# FvBuildDir (Argument 1)
 This is the first argument that **_PatchFv.py_** requires.  It is the build  
directory for all firmware volumes created during the FSP build. The path must  
be either an absolute path or a relevant path, relevant to the top level of the 
 FSP tree.
 
-Example usage:
+ Example usage:
 ```
  Build\YouPlatformFspPkg\%BD_TARGET%_%VS_VERSION%%VS_X86%\FV
 ```
 
 The example used contains Windows batch script %VARIABLES%.
 
-#FvFileBaseNames (Argument 2: Optional Part 1)
+# FvFileBaseNames (Argument 2: Optional Part 1)
 The firmware volume file base names (**_FvFileBaseNames_**) are the 
independent -Fv?s that are to be patched within the FD. (0 or more in the form
-**FVFILEBASENAME:**) The colon **:** is used for delimiting the single
+FVs that are to be patched within the FD. (0 or more in the form
+**FvFileBaseNames:**) The colon **:** is used for delimiting the single
 argument and must be appended to the end of each (**_FvFileBaseNames_**).
 
-Example usage:
+ Example usage:
 ```
 STAGE1:STAGE2:MANIFEST:YOURPLATFORM
 ```
@@ -55,14 +55,14 @@ In the example **STAGE1** is **STAGE1.Fv** in 
**YOURPLATFORM.fd**.
 Firmware device file name to patch (**_FdFileNameToPatch_**) is the base name 
of  the FD file that is to be patched. (1 only, in the form **YOURPLATFORM**)
 
-Example usage:
+ Example usage:
 ```
 STAGE1:STAGE2:MANIFEST:YOURPLATFORM
 ```
 
 In the example **YOURPLATFORM** is from **_YOURPLATFORM.fd_**
 
-#"Offset, Value[, Command][, Comment]" (Argument 3)
+# "Offset, Value[, Command][, Comment]" (Argument 3)
 The **_Offset_** can be a positive or negative number and represents where the
 **_Value_** to be patched is located within the FD. The **_Value_** is what  
will be written at the given **_Offset_** in the FD. Constants may be used for 
@@ -79,10 +79,10 @@ The entire argument includes the quote marks like in the 
example argument below:
 0xFFC0, SomeCore:__EntryPoint - [0x00F0],@SomeCore Entry  ```
 
-###Constants:
+### Constants:
  Hexadecimal (use **0x** as prefix) | Decimal
 
-Examples:
+ Examples:
 
 | **Positive Hex** | **Negative Hex** | **Positive Decimal** | **Negative 
Decimal** |  | ---: | ---: | ---: | 
---: | @@ -93,7 +93,7 @@ ModuleName:FunctionName | 
ModuleName:GlobalVariableName  ModuleGuid:Offset  ```
 
-###Operators:
+### Operators:
 
 ```
 
@@ -113,7 +113,7 @@ 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:
+ Example usage:
 Argument 1
 ```
  YouPlatformFspBinPkg\
@@ -123,21 +123,21 @@ Argum

Re: [edk2-devel] [PATCH v1 2/2] StandaloneMmPkg: Fix HOB space and heap space conflicted issue

2023-11-30 Thread Ni, Ray
Yes please!

Thanks,
Ray
> -Original Message-
> From: Nhi Pham 
> Sent: Thursday, November 30, 2023 9:59 PM
> To: Oliver Smith-Denny ; devel@edk2.groups.io;
> a...@kernel.org
> Cc: Ni, Ray ; huangm...@linux.alibaba.com; Sami Mujawar
> ; Ard Biesheuvel ;
> Yao, Jiewen ; Supreeth Venkatesh
> ; ming.hua...@outlook.com
> Subject: Re: [edk2-devel] [PATCH v1 2/2] StandaloneMmPkg: Fix HOB space
> and heap space conflicted issue
> 
> On 9/7/2023 10:38 PM, Nhi Pham wrote:
> > On 9/6/2023 11:22 PM, Oliver Smith-Denny wrote:
> >> On 9/6/2023 1:50 AM, Ard Biesheuvel wrote:
> >>> On Wed, 6 Sept 2023 at 09:56, Nhi Pham
> >>>  wrote:
> 
>  On 9/6/2023 1:33 PM, Ni, Ray wrote:
> > [EXTERNAL EMAIL NOTICE: This email originated from an external
> sender.
> > Please be mindful of safe email handling and proprietary information
> > protection practices.]
> >
> > I am a bit confused.
> >
> > The HOB list in standalone MM is read-only. Why could any module call
> > BuildGuidHob() to modify the HOB.
> >
> > I saw Oliver mentioned something about StMM. I don't know what that
> > is.
> > But it seems that's ARM specific. Then, I don't think it's proper to
> > modify code here for a specific arch ARM.
> 
>  The HOB creation is available in the
> 
> StandaloneMmPkg/Library/StandaloneMmHobLib/StandaloneMmHobLib.inf.
> If
>  other architectures also use that instance, I think the issue is not
>  specific to ARM.
> 
> >>>
> >>> The question here is whether the implementation follows the PI spec,
> >>> and whether HOB creation should be supported to begin with.
> >>>
> >>
> >> My reading of the PI spec is that this implementation does not follow
> >> it. However, the PI spec is not very explicit about Standalone MM in
> >> general, but particularly in relation to HOBs.
> >>
> >> However, in the generic HOB section of PI spec v1.7, Vol. 3, section 4
> >> (entitled HOB Design Discussion) it explicitly lays out that there are
> >> HOB producer phases and HOB consumer phases. It uses PEI as a HOB
> >> producer phase and DXE as a HOB consumer phase and explicitly says
> >> that the HOB consumer phase must treat HOBs as read-only memory, per
> >> Ray's comment.
> >>
> >> In vol. 4, section 2.2, in discussing the Standalone MM entry point,
> >> the document talks about the HOB list being passed to Standalone MM
> >> to consume, which per the reading of the above section would classify
> >> Standalone MM as a HOB consumer phase, where HOBs should then be
> >> read-only.
> >>
> >> So, I believe that we should not support HOB creation in Standalone MM
> >> and instead rely on other mechanisms to pass information within the
> >> phase. Per Nhi's other email in this thread, we should have the
> >> discussion on how to solve that specific problem and that may well
> >> lead to a discussion on whether HOBs are in fact the right mechanism
> >> here, but I tend to lean towards leaving something as architectural as
> >> HOBs to what the PI spec defines and using different mechanisms to
> >> accomplish in-phase communication.
> > Thanks Oliver so much for that. I agree. We should focus on my specific
> > problem with UEFI Variable Flash Info in StandaloneMM in another thread.
> >>
> >> Does this reading of the spec align with others' expectations? As I
> >> mentioned to Ray in another thread, Standalone MM feels like it could
> >> have extra clarification in a few areas in the PI spec.
> >
> > Thanks again. The HOB library should be updated to remove the HOB
> > creation once we have the clarification.
> 
> I found that we can hook a platform NULL library class to the
> StandaloneMmCore to create UEFI Variable Flash Info HOB. This way is
> compliant to the spec as the HOB is created in MM_CORE_STANDALONE
> phase.
> 
> Should I write a patch to remove the HOB creation in StandaloneMmHobLib?
> 
> Regards,
> Nhi



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




Re: [edk2-devel] [PATCH] UefiCpuPkg/ResetVector: Option for 1G Page Table Size increase

2023-11-30 Thread Ni, Ray
Ashraf,
When we implement the reset vector, we assume that 512GB page table occupies
minimal flash size and also sufficient for XIP code.
Any code that wants more page table coverage should create a new page table,
either in the temporary ram (when physical mem is not ready) or in physical ram.

Why does this patch increase the default 512 GB coverage?

Thanks,
Ray
> -Original Message-
> From: S, Ashraf Ali 
> Sent: Friday, December 1, 2023 1:35 AM
> To: devel@edk2.groups.io
> Cc: S, Ashraf Ali ; Kumar, Rahul R
> ; Ni, Ray ; West, Catharine
> ; V, Sangeetha 
> Subject: [PATCH] UefiCpuPkg/ResetVector: Option for 1G Page Table Size
> increase
> 
> Currently 1G Page table is restricted 512GB. this patch can help to
> increase the page table size based on the input. default will be 512GB
> build option PAGE_TABLE_1G_SIZE is used to increase the page table size
> 
> Cc: Rahul Kumar 
> Cc: Ray Ni 
> Cc: Catharine West 
> Cc: V Sangeetha 
> Signed-off-by: Ashraf Ali S 
> ---
>  UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt |  4 ++--
>  UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf   |  2 ++
>  UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm | 13 +++--
>  3 files changed, 15 insertions(+), 4 deletions(-)
> 
> diff --git a/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt
> b/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt
> index 4fcb15c3b1..4d153fc1a7 100644
> --- a/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt
> +++ b/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt
> @@ -1,10 +1,10 @@
> 
>  === HOW TO USE VTF0 ===
>  Add this line to your DSC [Components.IA32] or [Components.X64] section:
> -  UefiCpuPkg/ResetVector/Vtf0/ResetVector.inf
> +  UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> 
>  Add this line to your FDF FV section:
> -  INF  RuleOverride=RESET_VECTOR
> UefiCpuPkg/ResetVector/Vtf0/ResetVector.inf
> +  INF  RuleOverride=RESET_VECTOR UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> 
>  In your FDF FFS file rules sections add:
>[Rule.Common.SEC.RESET_VECTOR]
> diff --git a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> index 6b406163db..96106a4b11 100644
> --- a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> +++ b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> @@ -53,5 +53,7 @@
>  #   -DARCH_X64, -DARCH_IA32
>  #   * for using 1G page table:
>  #   -DPAGE_TABLE_1G
> +#   * for incresing the 1G page table size (Size in GBs):
> +#   -DPAGE_TABLE_1G_SIZE=1024
>  #   * for different debug channels:
>  #   -DDEBUG_SERIAL, -DDEBUG_PORT80, or not specify any debug channel
> diff --git a/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm
> b/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm
> index 7960b141be..b080dc5296 100644
> --- a/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm
> +++ b/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm
> @@ -1,7 +1,7 @@
>  
> ;--
>  ; @file
>  ; Emits Page Tables for 1:1 mapping.
> -; If using 1G page table, map addresses 0 - 0x80 (512GB),
> +; If using 1G page table, map addresses 0 - 0x80 (512GB, Size can
> be increse via PAGE_TABLE_1G_SIZE),
>  ; else, map addresses 0 - 0x1 (4GB)
>  ;
>  ; Copyright (c) 2021 - 2023, Intel Corporation. All rights reserved.
> @@ -39,6 +39,15 @@ BITS64
>  %define PAGE_PDPTE_1GB(x) ((x << 30) + PAGE_BLE_ATTR)
>  %define PAGE_PDE_2MB(x) ((x << 21) + PAGE_BLE_ATTR)
> 
> +%ifdef PAGE_TABLE_1G_SIZE
> +  %define PAGE_PDPTE_1GB_SIZE PAGE_TABLE_1G_SIZE
> +%else
> +  ;
> +  ; Default 512GB of 1G Page Table
> +  ;
> +  %define PAGE_PDPTE_1GB_SIZE 512
> +%endif
> +
>  ALIGN 16
> 
>  %ifdef PAGE_TABLE_1G
> @@ -47,7 +56,7 @@ Pdp:
>  ; Page-directory pointer table (512 * 1GB entries => 512GB)
>  ;
>  %assign i 0
> -%rep  512
> +%rep  PAGE_PDPTE_1GB_SIZE
>  DQPAGE_PDPTE_1GB(i)
>  %assign i i+1
>  %endrep
> --
> 2.39.1.windows.1



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




Re: [edk2-devel] [PATCH v1] PcAtChipsetPkg: Fix AcpiTimerLib incompatibility with XhciDxe

2023-11-30 Thread Ni, Ray
Mike,
Thanks!

Thanks,
Ray
> -Original Message-
> From: Kinney, Michael D 
> Sent: Friday, December 1, 2023 12:39 PM
> To: Ni, Ray ; Desimone, Nathaniel L
> ; devel@edk2.groups.io
> Cc: Kinney, Michael D 
> Subject: RE: [PATCH v1] PcAtChipsetPkg: Fix AcpiTimerLib incompatibility with
> XhciDxe
> 
> Hi Ray,
> 
> 'static' is allowed and actually preferred for module globals
> that start with 'm' that are scoped to a single C file.
> 
> Globals that start with 'g' that need to be access by multiple
> C files can not be static.
> 
> Since 'm' globals could be changed to 'g' globals due to
> maintenance, we want to avoid symbol collisions between
> 'g' globals.  Prefixing all globals with a module name helps
> prevent symbol collisions.
> 
> Summary
> 
> * Use lower case 'static'
> * Use 'static' for 'm' globals
> * Do not use 'static' for 'g' globals
> * Add module/lib specific prefix to 'm' and 'g' global
> 
> Mike
> 
> > -Original Message-
> > From: Ni, Ray 
> > Sent: Thursday, November 30, 2023 7:13 PM
> > To: Desimone, Nathaniel L ;
> > devel@edk2.groups.io
> > Cc: Kinney, Michael D 
> > Subject: RE: [PATCH v1] PcAtChipsetPkg: Fix AcpiTimerLib incompatibility
> > with XhciDxe
> >
> > Mike,
> > Does today's EDK2 C coding style spec allow using "STATIC" for global
> > variables?
> > Or lower case "static"?
> > Or changing the variable to a name with lib name prefix, e.g.: "
> > mTimerLibPerformanceCounterFrequency"?
> >
> >
> > Thanks,
> > Ray
> > > -Original Message-
> > > From: Desimone, Nathaniel L 
> > > Sent: Friday, December 1, 2023 9:56 AM
> > > To: devel@edk2.groups.io
> > > Cc: Ni, Ray ; Kinney, Michael D
> > > 
> > > Subject: [PATCH v1] PcAtChipsetPkg: Fix AcpiTimerLib incompatibility with
> > > XhciDxe
> > >
> > > The DXE & MM standalone variant of AcpiTimerLib defines a global
> > > named mPerformanceCounterFrequency. A global with an identical
> > > name is also present in MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
> > >
> > > Since XhciDxe has a dependency on TimerLib, this can cause link
> > > errors due to the same symbol being defined twice if the platform
> > > DSC chooses to use AcpiTimerLib as the TimerLib implementation for
> > > any given platform.
> > >
> > > To resolve this, I have changed made the definition of
> > > mPerformanceCounterFrequency to STATIC. Since this variable is not
> > > used outside of the DxeStandaloneMmAcpiTimerLib.c compilation unit,
> > > there is no reason to have it exported as a global.
> > >
> > > Cc: Ray Ni 
> > > Cc: Michael D Kinney 
> > > Signed-off-by: Nate DeSimone 
> > > ---
> > >  .../Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c| 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git
> > > a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c
> > > b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c
> > > index 16ac48938f..41d2af7d55 100644
> > > ---
> a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c
> > > +++
> > > b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c
> > > @@ -1,7 +1,7 @@
> > >  /** @file
> > >ACPI Timer implements one instance of Timer Library.
> > >
> > > -  Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
> > > +  Copyright (c) 2013 - 2023, Intel Corporation. All rights reserved.
> > >SPDX-License-Identifier: BSD-2-Clause-Patent
> > >
> > >  **/
> > > @@ -51,7 +51,7 @@ InternalCalculateTscFrequency (
> > >  //
> > >  // Cached performance counter frequency
> > >  //
> > > -UINT64  mPerformanceCounterFrequency = 0;
> > > +STATIC UINT64 mPerformanceCounterFrequency = 0;
> > >
> > >  /**
> > >Internal function to retrieves the 64-bit frequency in Hz.
> > > --
> > > 2.39.2.windows.1



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




Re: [edk2-devel] [PATCH v1] PcAtChipsetPkg: Fix AcpiTimerLib incompatibility with XhciDxe

2023-11-30 Thread Michael D Kinney
Hi Ray,

'static' is allowed and actually preferred for module globals 
that start with 'm' that are scoped to a single C file.

Globals that start with 'g' that need to be access by multiple
C files can not be static.

Since 'm' globals could be changed to 'g' globals due to
maintenance, we want to avoid symbol collisions between
'g' globals.  Prefixing all globals with a module name helps
prevent symbol collisions.

Summary

* Use lower case 'static'
* Use 'static' for 'm' globals
* Do not use 'static' for 'g' globals
* Add module/lib specific prefix to 'm' and 'g' global

Mike

> -Original Message-
> From: Ni, Ray 
> Sent: Thursday, November 30, 2023 7:13 PM
> To: Desimone, Nathaniel L ;
> devel@edk2.groups.io
> Cc: Kinney, Michael D 
> Subject: RE: [PATCH v1] PcAtChipsetPkg: Fix AcpiTimerLib incompatibility
> with XhciDxe
> 
> Mike,
> Does today's EDK2 C coding style spec allow using "STATIC" for global
> variables?
> Or lower case "static"?
> Or changing the variable to a name with lib name prefix, e.g.: "
> mTimerLibPerformanceCounterFrequency"?
> 
> 
> Thanks,
> Ray
> > -Original Message-
> > From: Desimone, Nathaniel L 
> > Sent: Friday, December 1, 2023 9:56 AM
> > To: devel@edk2.groups.io
> > Cc: Ni, Ray ; Kinney, Michael D
> > 
> > Subject: [PATCH v1] PcAtChipsetPkg: Fix AcpiTimerLib incompatibility with
> > XhciDxe
> >
> > The DXE & MM standalone variant of AcpiTimerLib defines a global
> > named mPerformanceCounterFrequency. A global with an identical
> > name is also present in MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
> >
> > Since XhciDxe has a dependency on TimerLib, this can cause link
> > errors due to the same symbol being defined twice if the platform
> > DSC chooses to use AcpiTimerLib as the TimerLib implementation for
> > any given platform.
> >
> > To resolve this, I have changed made the definition of
> > mPerformanceCounterFrequency to STATIC. Since this variable is not
> > used outside of the DxeStandaloneMmAcpiTimerLib.c compilation unit,
> > there is no reason to have it exported as a global.
> >
> > Cc: Ray Ni 
> > Cc: Michael D Kinney 
> > Signed-off-by: Nate DeSimone 
> > ---
> >  .../Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c| 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git
> > a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c
> > b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c
> > index 16ac48938f..41d2af7d55 100644
> > --- a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c
> > +++
> > b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c
> > @@ -1,7 +1,7 @@
> >  /** @file
> >ACPI Timer implements one instance of Timer Library.
> >
> > -  Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
> > +  Copyright (c) 2013 - 2023, Intel Corporation. All rights reserved.
> >SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> >  **/
> > @@ -51,7 +51,7 @@ InternalCalculateTscFrequency (
> >  //
> >  // Cached performance counter frequency
> >  //
> > -UINT64  mPerformanceCounterFrequency = 0;
> > +STATIC UINT64 mPerformanceCounterFrequency = 0;
> >
> >  /**
> >Internal function to retrieves the 64-bit frequency in Hz.
> > --
> > 2.39.2.windows.1



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




Re: [edk2-devel] [PATCH v1] PcAtChipsetPkg: Fix AcpiTimerLib incompatibility with XhciDxe

2023-11-30 Thread Ni, Ray
Mike,
Does today's EDK2 C coding style spec allow using "STATIC" for global variables?
Or lower case "static"?
Or changing the variable to a name with lib name prefix, e.g.: " 
mTimerLibPerformanceCounterFrequency"?


Thanks,
Ray
> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Friday, December 1, 2023 9:56 AM
> To: devel@edk2.groups.io
> Cc: Ni, Ray ; Kinney, Michael D
> 
> Subject: [PATCH v1] PcAtChipsetPkg: Fix AcpiTimerLib incompatibility with
> XhciDxe
> 
> The DXE & MM standalone variant of AcpiTimerLib defines a global
> named mPerformanceCounterFrequency. A global with an identical
> name is also present in MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
> 
> Since XhciDxe has a dependency on TimerLib, this can cause link
> errors due to the same symbol being defined twice if the platform
> DSC chooses to use AcpiTimerLib as the TimerLib implementation for
> any given platform.
> 
> To resolve this, I have changed made the definition of
> mPerformanceCounterFrequency to STATIC. Since this variable is not
> used outside of the DxeStandaloneMmAcpiTimerLib.c compilation unit,
> there is no reason to have it exported as a global.
> 
> Cc: Ray Ni 
> Cc: Michael D Kinney 
> Signed-off-by: Nate DeSimone 
> ---
>  .../Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c| 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git
> a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c
> b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c
> index 16ac48938f..41d2af7d55 100644
> --- a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c
> +++
> b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c
> @@ -1,7 +1,7 @@
>  /** @file
>ACPI Timer implements one instance of Timer Library.
> 
> -  Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
> +  Copyright (c) 2013 - 2023, Intel Corporation. All rights reserved.
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -51,7 +51,7 @@ InternalCalculateTscFrequency (
>  //
>  // Cached performance counter frequency
>  //
> -UINT64  mPerformanceCounterFrequency = 0;
> +STATIC UINT64 mPerformanceCounterFrequency = 0;
> 
>  /**
>Internal function to retrieves the 64-bit frequency in Hz.
> --
> 2.39.2.windows.1



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




Re: [edk2-devel] [PATCH V2 1/1] MdeModulePkg: Support customized FV Migration Information

2023-11-30 Thread Ni, Ray
When PcdMigrateTemporaryRamFirmwareVolumes is TRUE, FV in flash (cached in code 
cache) is copied to physical memory and all C global pointers (PPIs, GUIDs) are 
fixed up.
But TCG needs to measure the original FV contents, so the original FV is saved 
into MigratedFvInfo HOB when the FV migration is done.

Now we are going to add a new ToMigrate HOB to tell something.

Initially without reading the patch, I thought the HOB is to tell which FV 
needs to be migrated.
But what the patch does is: migration is always done when PCD is true. The only 
thing that's skipped is not to save the original FV contents, then the 
MigratedFvInfo HOB is not produced as well.
More strangely, if a FV is listed in "ToMigrate" HOB with flag 0, it's the same 
as the "ToMigrate" HOB does not exist.

It's a bit confusing, in my opinion.

There are several approaches:
1. Do not add "ToMigrate" HOB. Instead, avoid saving the whole original FV 
content, only save the delta that TCG driver uses the new FV content and the 
delta to calculate the HASH. The save of delta should not impact the 
performance very much.

2. Abandon the PCD, and update today's logic to follow the new "ToMigrate" HOB 
to perform migration. A new flag tells whether the original FV content needs to 
be saved.

3. Keep the PCD. If "ToMigrate" HOB does not exist, follow PCD. If "ToMigrate" 
HOB exists, follow the HOB and ignores the PCD. HOB takes higher priority. It's 
still backward compatible and allows edk2 to gradually retire that PCD. (Having 
multiple interfaces controlling one behavior is always confusing.)
3.1 The flag name in the patch is "*SKIP*". I prefer we reverse the meaning of 
the flag, meaning when the flag is set, FV original content is saved. The flag 
name can be "FLAGS_BUILD_MIGRATED_FV_INFO" which directly maps to the behavior 
the flag controls. I agree "MigratedFvInfo" name is confusing but at least we 
avoid adding another confusing "SKIP_FV_RAW_DATA_COPY" flag.



Thanks,
Ray
> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of gaoliming
> via groups.io
> Sent: Friday, December 1, 2023 9:01 AM
> To: devel@edk2.groups.io; Wang, Fan ; Kinney, Michael
> D 
> Cc: Jiang, Guomin ; Bi, Dandan
> 
> Subject: 回复: [edk2-devel] [PATCH V2 1/1] MdeModulePkg: Support
> customized FV Migration Information
> 
> Fan:
>   I add my comment below.
> 
> > -邮件原件-
> > 发件人: devel@edk2.groups.io  代表 Wang Fan
> > 发送时间: 2023年10月27日 16:24
> > 收件人: Kinney, Michael D ;
> > devel@edk2.groups.io
> > 抄送: Gao, Liming ; Jiang, Guomin
> > ; Bi, Dandan 
> > 主题: Re: [edk2-devel] [PATCH V2 1/1] MdeModulePkg: Support
> customized
> > FV Migration Information
> >
> > Hi Mike
> >
> > Thank you for your feedback.
> >
> > I have updated the patch to v3:
> > https://edk2.groups.io/g/devel/message/110197
> >
> > Pull Request: https://github.com/tianocore/edk2/pull/4970
> >
> > Based on V2, this update includes changes:
> > - Add more descriptions for "gEdkiiToMigrateFvInfoGuid" PPI usages and
> > background, but still keep the name.
> > - Update "FvOrgBase" to "FvTemporaryRamBase" in
> > EDKII_TO_MIGRATE_FV_INFO.
> > - Remove flag "FLAGS_SKIP_FV_MIGRATION", since it's not needed.
> > - Add more descriptions to flag "FLAGS_SKIP_FV_RAW_DATA_COPY".
> [Liming] RAW_DATA_COPY is for measure boot to make sure PCR0 have the
> same
> value on the different boot.
> If RAW_DATA_COPY is not set, it will impact the measure boot. So, I don't
> think we can skip raw data copy.
> 
> > - Remove the variable MigrateAllFvs to simplify logic.
> > - Correct "allocate pool" to "allocate pages" to align with descriptions.
> >
> > For other two questions you are mentioning:
> >
> > 1. For "Should FvOrgBase be a UINT64 or support temp RAM above 4GB?":
> > I think UINT32 should be enough, all pre-mem FVs are below 4G as far as I
> > know, even we enabled X64 in pre-mem phase. This setting is also aligning
> > with "FvOrgBase" defined in "EDKII_MIGRATED_FV_INFO".
> > 2. For "The call to RemoveFvHobsInTemporaryMemory (Private) was
> > removed":
> > Since this function will remove all FV hobs for physical addresses, it
> should be
> > called only when all pre-mem FVs are migrated. In EvacuateTempRam(),
> when
> > one FV is migrated, ConvertFvHob() will be called for this FV and all its'
> child
> > FVs, this is enough to ensure already migrated FV hobs are all pointing to
> > addresses on permanent address.
> >
> [Liming] So, RemoveFvHobsInTemporaryMemory () does nothing now. Right?
> If yes, it is safe to remove it.
> 
> Thanks
> Liming
> > What do you think?
> >
> > Best Regards
> > Fan
> >
> > -Original Message-
> > From: Kinney, Michael D 
> > Sent: Tuesday, October 17, 2023 5:00 AM
> > To: Wang, Fan ; devel@edk2.groups.io
> > Cc: Gao, Liming ; Jiang, Guomin
> > ; Bi, Dandan ; Kinney,
> > Michael D 
> > Subject: RE: [PATCH V2 1/1] MdeModulePkg: Support customized FV
> > Migration Information
> >
> > Hi Fan,
> >
> > The logic looks functional, but there are some names and d

Re: [edk2-devel] [PATCH v1 16/17] Silicon/Ampere/AmpereAltraPkg: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Nhi Pham via groups.io

Thanks for update.

Reviewed-by: Nhi Pham 

On 12/1/2023 7:34 AM, Taylor Beebe wrote:

ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

Signed-off-by: Taylor Beebe 
Cc: Nhi Pham 
Cc: Chuong Tran 
Cc: Leif Lindholm 
Cc: Rebecca Cran 
---
  Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc | 1 +
  1 file changed, 1 insertion(+)

diff --git a/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc 
b/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc
index 8cb2a3fe6422..eb6caf37a3c5 100644
--- a/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc
+++ b/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc
@@ -46,6 +46,7 @@
HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf

UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
  
#

# Allow dynamic PCDs



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




[edk2-devel] [PATCH v1] MdeModulePkg/Bus: Fix XhciDxe Linker Issues

2023-11-30 Thread Nate DeSimone
The DXE & MM standalone variant of AcpiTimerLib defines a global
named mPerformanceCounterFrequency. A global with an identical
name is also present in MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c

Since XhciDxe has a dependency on TimerLib, this can cause link
errors due to the same symbol being defined twice if the platform
DSC chooses to use AcpiTimerLib as the TimerLib implementation for
any given platform.

To resolve this, I noted that some of the globals in Xhci.c are not
used outside of the Xhci.c compilation unit:

- mPerformanceCounterStartValue
- mPerformanceCounterEndValue
- mPerformanceCounterFrequency
- mPerformanceCounterValuesCached

I have changed the definition for all of these to STATIC. Since they
are not used outside of the Xhci.c compilation unit, there is no
reason to have them exported as globals.

Cc: Ray Ni 
Cc: Michael D Kinney 
Signed-off-by: Nate DeSimone 
---
 MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c 
b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
index 7a2e32a9dd..cc8332500b 100644
--- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
+++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
@@ -2,7 +2,7 @@
   The XHCI controller driver.
 
 (C) Copyright 2023 Hewlett Packard Enterprise Development LP
-Copyright (c) 2011 - 2022, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2023, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -86,10 +86,10 @@ EFI_USB2_HC_PROTOCOL  gXhciUsb2HcTemplate = {
   0x0
 };
 
-UINT64   mPerformanceCounterStartValue;
-UINT64   mPerformanceCounterEndValue;
-UINT64   mPerformanceCounterFrequency;
-BOOLEAN  mPerformanceCounterValuesCached = FALSE;
+STATIC UINT64   mPerformanceCounterStartValue;
+STATIC UINT64   mPerformanceCounterEndValue;
+STATIC UINT64   mPerformanceCounterFrequency;
+STATIC BOOLEAN  mPerformanceCounterValuesCached = FALSE;
 
 /**
   Retrieves the capability of root hub ports.
-- 
2.39.2.windows.1



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




[edk2-devel] [PATCH] IntelFsp2Pkg/PatchFv: Fix syntax issue in markdown manual

2023-11-30 Thread Nate DeSimone
From: Ray Ni 

According to the markdown language syntax, headings should be after
number signs (#). The number of number signs correspond to the heading
level.
But current PatchFvUserManual.md doesn't insert a space between the
number signs and the heading title, resulting the markdown file is not
rendered well in markdown viewers.

The patch doesn't change any content but only adds spaces to ensure
the headings are correctly recognized.

Signed-off-by: Ray Ni 
Cc: Chasel Chiu 
Reviewed-by: Nate DeSimone 
Cc: Duggapu Chinni B 
Cc: Ray Han Lim Ng 
Cc: Star Zeng 
Cc: Ted Kuo 
Reviewed-by: Ashraf Ali S 
Cc: Susovan Mohapatra 
---
 .../Tools/UserManuals/PatchFvUserManual.md| 38 +--
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md 
b/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
index f28eedf625..205ad57773 100644
--- a/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
+++ b/IntelFsp2Pkg/Tools/UserManuals/PatchFvUserManual.md
@@ -1,9 +1,9 @@
-#Name
+# 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
+# Synopsis
 
 ```
 PatchFv FvBuildDir [FvFileBaseNames:]FdFileBaseNameToPatch ["Offset, Value"]+
@@ -18,32 +18,32 @@ PatchFv FdFileDir FdFileName ["Offset, Value"]+
   | ["Offset, Value, $Command, @Comment"]+
 ```
 
-#Description
+# Description
 The **_PatchFv.py_** tool allows the developer to fix up FD images to follow 
the
 Intel FSP Architecture specification.  It also makes the FD image relocatable.
 The tool is written in Python and uses Python 2.7 or later to run.
 Consider using the tool in a build script.
 
-#FvBuildDir (Argument 1)
+# FvBuildDir (Argument 1)
 This is the first argument that **_PatchFv.py_** requires.  It is the build
 directory for all firmware volumes created during the FSP build. The path must
 be either an absolute path or a relevant path, relevant to the top level of the
 FSP tree.
 
-Example usage:
+ Example usage:
 ```
  Build\YouPlatformFspPkg\%BD_TARGET%_%VS_VERSION%%VS_X86%\FV
 ```
 
 The example used contains Windows batch script %VARIABLES%.
 
-#FvFileBaseNames (Argument 2: Optional Part 1)
+# FvFileBaseNames (Argument 2: Optional Part 1)
 The firmware volume file base names (**_FvFileBaseNames_**) are the independent
-Fv?s that are to be patched within the FD. (0 or more in the form
-**FVFILEBASENAME:**) The colon **:** is used for delimiting the single
+FVs that are to be patched within the FD. (0 or more in the form
+**FvFileBaseNames:**) The colon **:** is used for delimiting the single
 argument and must be appended to the end of each (**_FvFileBaseNames_**).
 
-Example usage:
+ Example usage:
 ```
 STAGE1:STAGE2:MANIFEST:YOURPLATFORM
 ```
@@ -55,14 +55,14 @@ In the example **STAGE1** is **STAGE1.Fv** in 
**YOURPLATFORM.fd**.
 Firmware device file name to patch (**_FdFileNameToPatch_**) is the base name 
of
 the FD file that is to be patched. (1 only, in the form **YOURPLATFORM**)
 
-Example usage:
+ Example usage:
 ```
 STAGE1:STAGE2:MANIFEST:YOURPLATFORM
 ```
 
 In the example **YOURPLATFORM** is from **_YOURPLATFORM.fd_**
 
-#"Offset, Value[, Command][, Comment]" (Argument 3)
+# "Offset, Value[, Command][, Comment]" (Argument 3)
 The **_Offset_** can be a positive or negative number and represents where the
 **_Value_** to be patched is located within the FD. The **_Value_** is what
 will be written at the given **_Offset_** in the FD. Constants may be used for
@@ -79,10 +79,10 @@ The entire argument includes the quote marks like in the 
example argument below:
 0xFFC0, SomeCore:__EntryPoint - [0x00F0],@SomeCore Entry
 ```
 
-###Constants:
+### Constants:
  Hexadecimal (use **0x** as prefix) | Decimal
 
-Examples:
+ Examples:
 
 | **Positive Hex** | **Negative Hex** | **Positive Decimal** | **Negative 
Decimal** |
 | ---: | ---: | ---: | 
---: |
@@ -93,7 +93,7 @@ ModuleName:FunctionName | ModuleName:GlobalVariableName
 ModuleGuid:Offset
 ```
 
-###Operators:
+### Operators:
 
 ```
 
@@ -113,7 +113,7 @@ 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:
+ Example usage:
 Argument 1
 ```
  YouPlatformFspBinPkg\
@@ -123,21 +123,21 @@ Argument 2
  Fsp_Rebased_T
 ```
 
-###Special Commands:
+### Special Commands:
 Special commands must use the **$** symbol as a prefix to the command itself.
 There is only one command available at this time.
 
 ```
-$COPY ? Copy a binary block from source to destination.
+$COPY   Copy a binary block from source to destination.
 ```
 
-Example:
+ Example:
 
 ```
 0x94, [PlatformInit:__gPcd_

[edk2-devel] [PATCH v1] PcAtChipsetPkg: Fix AcpiTimerLib incompatibility with XhciDxe

2023-11-30 Thread Nate DeSimone
The DXE & MM standalone variant of AcpiTimerLib defines a global
named mPerformanceCounterFrequency. A global with an identical
name is also present in MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c

Since XhciDxe has a dependency on TimerLib, this can cause link
errors due to the same symbol being defined twice if the platform
DSC chooses to use AcpiTimerLib as the TimerLib implementation for
any given platform.

To resolve this, I have changed made the definition of
mPerformanceCounterFrequency to STATIC. Since this variable is not
used outside of the DxeStandaloneMmAcpiTimerLib.c compilation unit,
there is no reason to have it exported as a global.

Cc: Ray Ni 
Cc: Michael D Kinney 
Signed-off-by: Nate DeSimone 
---
 .../Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c| 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c 
b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c
index 16ac48938f..41d2af7d55 100644
--- a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c
+++ b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c
@@ -1,7 +1,7 @@
 /** @file
   ACPI Timer implements one instance of Timer Library.
 
-  Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
+  Copyright (c) 2013 - 2023, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -51,7 +51,7 @@ InternalCalculateTscFrequency (
 //
 // Cached performance counter frequency
 //
-UINT64  mPerformanceCounterFrequency = 0;
+STATIC UINT64 mPerformanceCounterFrequency = 0;
 
 /**
   Internal function to retrieves the 64-bit frequency in Hz.
-- 
2.39.2.windows.1



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




Re: [edk2-devel] [PATCH] UefiCpuPkg/ResetVector: Option for 1G Page Table Size increase

2023-11-30 Thread Zhiguang Liu
Hi Ashraf

For 1G page table, page table topology is like below
Each Pml4 contains at most 512 Pdp.
Each Pdp contains at most 512 Pdp entries.

Now, we only have one Pml4, one Pdp and 512 Pdp entries.
If increasing Ppd entries to more than 512, we need additional pdq, also need 
to change Pml4 to include the new added pdq.
Also, we need to make sure all tables are 4K aligned.

Thanks
Zhiguang

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Ashraf Ali
> S
> Sent: Friday, December 1, 2023 1:35 AM
> To: devel@edk2.groups.io
> Cc: S, Ashraf Ali ; Kumar, Rahul R
> ; Ni, Ray ; West, Catharine
> ; V, Sangeetha 
> Subject: [edk2-devel] [PATCH] UefiCpuPkg/ResetVector: Option for 1G Page
> Table Size increase
> 
> Currently 1G Page table is restricted 512GB. this patch can help to increase 
> the
> page table size based on the input. default will be 512GB build option
> PAGE_TABLE_1G_SIZE is used to increase the page table size
> 
> Cc: Rahul Kumar 
> Cc: Ray Ni 
> Cc: Catharine West 
> Cc: V Sangeetha 
> Signed-off-by: Ashraf Ali S 
> ---
>  UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt |  4 ++--
>  UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf   |  2 ++
>  UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm | 13 +++--
>  3 files changed, 15 insertions(+), 4 deletions(-)
> 
> diff --git a/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt
> b/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt
> index 4fcb15c3b1..4d153fc1a7 100644
> --- a/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt
> +++ b/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt
> @@ -1,10 +1,10 @@
> 
>  === HOW TO USE VTF0 ===
>  Add this line to your DSC [Components.IA32] or [Components.X64] section:
> -  UefiCpuPkg/ResetVector/Vtf0/ResetVector.inf
> +  UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> 
>  Add this line to your FDF FV section:
> -  INF  RuleOverride=RESET_VECTOR
> UefiCpuPkg/ResetVector/Vtf0/ResetVector.inf
> +  INF  RuleOverride=RESET_VECTOR UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> 
>  In your FDF FFS file rules sections add:
>[Rule.Common.SEC.RESET_VECTOR]
> diff --git a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> index 6b406163db..96106a4b11 100644
> --- a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> +++ b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
> @@ -53,5 +53,7 @@
>  #   -DARCH_X64, -DARCH_IA32
>  #   * for using 1G page table:
>  #   -DPAGE_TABLE_1G
> +#   * for incresing the 1G page table size (Size in GBs):
> +#   -DPAGE_TABLE_1G_SIZE=1024
>  #   * for different debug channels:
>  #   -DDEBUG_SERIAL, -DDEBUG_PORT80, or not specify any debug channel
> diff --git a/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm
> b/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm
> index 7960b141be..b080dc5296 100644
> --- a/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm
> +++ b/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm
> @@ -1,7 +1,7 @@
>  
> ;--
>  ; @file
>  ; Emits Page Tables for 1:1 mapping.
> -; If using 1G page table, map addresses 0 - 0x80 (512GB),
> +; If using 1G page table, map addresses 0 - 0x80 (512GB, Size
> +can be increse via PAGE_TABLE_1G_SIZE),
>  ; else, map addresses 0 - 0x1 (4GB)  ;  ; Copyright (c) 2021 - 2023,
> Intel Corporation. All rights reserved.
> @@ -39,6 +39,15 @@ BITS64
>  %define PAGE_PDPTE_1GB(x) ((x << 30) + PAGE_BLE_ATTR)  %define
> PAGE_PDE_2MB(x) ((x << 21) + PAGE_BLE_ATTR)
> 
> +%ifdef PAGE_TABLE_1G_SIZE
> +  %define PAGE_PDPTE_1GB_SIZE PAGE_TABLE_1G_SIZE %else
> +  ;
> +  ; Default 512GB of 1G Page Table
> +  ;
> +  %define PAGE_PDPTE_1GB_SIZE 512
> +%endif
> +
>  ALIGN 16
> 
>  %ifdef PAGE_TABLE_1G
> @@ -47,7 +56,7 @@ Pdp:
>  ; Page-directory pointer table (512 * 1GB entries => 512GB)
>  ;
>  %assign i 0
> -%rep  512
> +%rep  PAGE_PDPTE_1GB_SIZE
>  DQPAGE_PDPTE_1GB(i)
>  %assign i i+1
>  %endrep
> --
> 2.39.1.windows.1
> 
> 
> 
> 
> 



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

2023-11-30 Thread Nate DeSimone
Pushed as 10beadf

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Nate DeSimone
Sent: Thursday, November 30, 2023 4:18 PM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Ni, Ray ; Chaganty, 
Rangasai V ; Gao, Liming 
; Kinney, Michael D ; 
Sun, Zailiang ; Qian, Yi ; Taylor 
Beebe ; Kubacki, Michael 

Subject: [edk2-devel] [edk2-platforms][PATCH v1] Vlv2TbltDevicePkg: 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 Vlv2TbltDevicePkg and resolves 
the build failure.

Cc: Chasel Chiu 
Cc: Ray Ni 
Cc: Sai Chaganty 
Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Taylor Beebe 
Cc: Michael Kubacki 
Signed-off-by: Nate DeSimone 
---
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 1 +  
Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index 4adbaa6966..0c66705377 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -209,6 +209,7 @@
   
PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
   DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
 !endif
+  
+ ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib
+ /ImagePropertiesRecordLib.inf
 
   #
   # CryptLib
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index c7d9733dad..0689f275f1 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -211,6 +211,7 @@
   
PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
   DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
 !endif
+  
+ ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib
+ /ImagePropertiesRecordLib.inf
 
   #
   # CryptLib
--
2.39.2.windows.1








-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111958): https://edk2.groups.io/g/devel/message/111958
Mute This Topic: https://groups.io/mt/102907285/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 01/17] Platform/AMD/OverdriveBoard: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

Reviewed-by: Abner Chang 

I am good with this change if Ard and Leif has no additional comments on this.
Abner

> -Original Message-
> From: Taylor Beebe 
> Sent: Friday, December 1, 2023 8:34 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner ; Attar, AbdulLateef (Abdul
> Lateef) ; Ard Biesheuvel
> ; Leif Lindholm 
> Subject: [PATCH v1 01/17] Platform/AMD/OverdriveBoard: Add
> ImagePropertiesRecordLib Instance
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
> needs to be added to most platforms.
>
> Signed-off-by: Taylor Beebe 
> Cc: Abner Chang 
> Cc: Abdul Lateef Attar 
> Cc: Ard Biesheuvel 
> Cc: Leif Lindholm 
> ---
>  Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> index 27ae2a86b82d..5a1ecfa43857 100644
> --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> @@ -52,6 +52,7 @@ DEFINE X64EMU_ENABLE  = FALSE
>PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
>
> UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDeco
> mpressLib.inf
>CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
> +
> ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLi
> b/ImagePropertiesRecordLib.inf
>
>UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
>UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
> --
> 2.43.0.windows.1



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

2023-11-30 Thread Nate DeSimone
Pushed as 91e4065

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Nate DeSimone
Sent: Thursday, November 30, 2023 4:18 PM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Ni, Ray ; Chaganty, 
Rangasai V ; Gao, Liming 
; Kinney, Michael D ; 
Kelly Steele ; Taylor Beebe ; 
Kubacki, Michael 
Subject: [edk2-devel] [edk2-platforms][PATCH v1] QuarkPlatformPkg: 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 QuarkPlatformPkg and resolves 
the build failure.

Cc: Chasel Chiu 
Cc: Ray Ni 
Cc: Sai Chaganty 
Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Kelly Steele 
Cc: Taylor Beebe 
Cc: Michael Kubacki 
Signed-off-by: Nate DeSimone 
---
 Platform/Intel/QuarkPlatformPkg/Quark.dsc| 1 +
 Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Platform/Intel/QuarkPlatformPkg/Quark.dsc 
b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
index 7cc548058a..40d9768336 100644
--- a/Platform/Intel/QuarkPlatformPkg/Quark.dsc
+++ b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
@@ -196,6 +196,7 @@
 !endif
 
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
+  
+ ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib
+ /ImagePropertiesRecordLib.inf
 
   #
   # CPU
diff --git a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc 
b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
index 59577eda4f..67472930c9 100644
--- a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
+++ b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
@@ -167,6 +167,7 @@
 !endif
 
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
+  
+ ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib
+ /ImagePropertiesRecordLib.inf
 
   #
   # CPU
--
2.39.2.windows.1








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




回复: [edk2-devel] [PATCH V2 1/1] MdeModulePkg: Support customized FV Migration Information

2023-11-30 Thread gaoliming via groups.io
Fan:
  I add my comment below. 

> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Wang Fan
> 发送时间: 2023年10月27日 16:24
> 收件人: Kinney, Michael D ;
> devel@edk2.groups.io
> 抄送: Gao, Liming ; Jiang, Guomin
> ; Bi, Dandan 
> 主题: Re: [edk2-devel] [PATCH V2 1/1] MdeModulePkg: Support customized
> FV Migration Information
> 
> Hi Mike
> 
> Thank you for your feedback.
> 
> I have updated the patch to v3:
> https://edk2.groups.io/g/devel/message/110197
> 
> Pull Request: https://github.com/tianocore/edk2/pull/4970
> 
> Based on V2, this update includes changes:
> - Add more descriptions for "gEdkiiToMigrateFvInfoGuid" PPI usages and
> background, but still keep the name.
> - Update "FvOrgBase" to "FvTemporaryRamBase" in
> EDKII_TO_MIGRATE_FV_INFO.
> - Remove flag "FLAGS_SKIP_FV_MIGRATION", since it's not needed.
> - Add more descriptions to flag "FLAGS_SKIP_FV_RAW_DATA_COPY".
[Liming] RAW_DATA_COPY is for measure boot to make sure PCR0 have the same
value on the different boot. 
If RAW_DATA_COPY is not set, it will impact the measure boot. So, I don't
think we can skip raw data copy. 

> - Remove the variable MigrateAllFvs to simplify logic.
> - Correct "allocate pool" to "allocate pages" to align with descriptions.
> 
> For other two questions you are mentioning:
> 
> 1. For "Should FvOrgBase be a UINT64 or support temp RAM above 4GB?":
> I think UINT32 should be enough, all pre-mem FVs are below 4G as far as I
> know, even we enabled X64 in pre-mem phase. This setting is also aligning
> with "FvOrgBase" defined in "EDKII_MIGRATED_FV_INFO".
> 2. For "The call to RemoveFvHobsInTemporaryMemory (Private) was
> removed":
> Since this function will remove all FV hobs for physical addresses, it
should be
> called only when all pre-mem FVs are migrated. In EvacuateTempRam(), when
> one FV is migrated, ConvertFvHob() will be called for this FV and all its'
child
> FVs, this is enough to ensure already migrated FV hobs are all pointing to
> addresses on permanent address.
> 
[Liming] So, RemoveFvHobsInTemporaryMemory () does nothing now. Right? 
If yes, it is safe to remove it. 

Thanks
Liming
> What do you think?
> 
> Best Regards
> Fan
> 
> -Original Message-
> From: Kinney, Michael D 
> Sent: Tuesday, October 17, 2023 5:00 AM
> To: Wang, Fan ; devel@edk2.groups.io
> Cc: Gao, Liming ; Jiang, Guomin
> ; Bi, Dandan ; Kinney,
> Michael D 
> Subject: RE: [PATCH V2 1/1] MdeModulePkg: Support customized FV
> Migration Information
> 
> Hi Fan,
> 
> The logic looks functional, but there are some names and descriptions that
> could be added to help describe this feature and some code changes to make
> the code easier to understand.
> 
> 1) The GUID gEdkiiToMigrateFvInfoGuid is hard to understand what
>information it conveys from the name of the GUID variable.
>I know that the intent is that it is a GUID with data that
>tells the PEI core which FVs in temporary RAM should be
>migrated to permanent RAM.  And that the use of this information
>is only a performance optimization to not migrate FVs that
>are not needed after the PEI Core migrates temp RAM to
>permanent RAM.  The name and description in comments do not
>express all these details.
> 
> 2) The structure name EDKII_TO_MIGRATE_FV_INFO has the same
>issue as (1).
>a) Should FvOrgBase be a UINT64 or support temp RAM above 4GB?
>b) Since only temp RAM to perm RAM migrations are supported
>   the field name "FvOrgBase" should be "FvTemporaryRamBase".
> 
> 
> 3) The #define for FLAGS_SKIP_FV_MIGRATION should have a comment
>block that describes the meaning of this bit.  What is the
>meaning when the bit is set and what is the meaning when the
>bit is clear.
> 
> 4) The #define for FLAGS_SKIP_FV_RAW_DATA_COPY should have a comment
>block that describes the meaning of this bit.  What is the
>meaning when the bit is set and what is the meaning when the
>bit is clear.
> 
> 5) Why are there 2 bits?  If an FV is skipped, then that means
>do not copy.  If an FV is not skipped, then that means do
>copy.
> 
> 6) I think the variable MigrateAllFvs can be removed, and the HOB
>list check can be made for gEdkiiToMigrateFvInfoGuid can be made
>on each FV found in temporary RAM.  This looks like a performance
>optimization that makes the logic harder to understand and it
>is not clear that the performance optimization has any benefit.
> 
> 7) The call to RemoveFvHobsInTemporaryMemory (Private) was removed.
> Why?
> 
> 8) The comment where memory is allocated for the migrated FV says
>"allocate pool" when PeiServicesAllocatePages() is used.  Please
>update the comment.
> 
> Mike
> 
> 
> 
> > -Original Message-
> > From: Wang, Fan 
> > Sent: Monday, September 11, 2023 2:52 AM
> > To: devel@edk2.groups.io
> > Cc: Wang, Fan ; Kinney, Michael D
> > ; Gao, Liming ;
> > Jiang, Guomin ; Bi, Dandan
> > 
> > Subject: [PATCH V2 1/1] MdeModulePkg: Support customized FV Migration
> > Info

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

2023-11-30 Thread Michael D Kinney
Reviewed-by: Michael D Kinney 

> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Thursday, November 30, 2023 4:18 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Ni, Ray ;
> Chaganty, Rangasai V ; Gao, Liming
> ; Kinney, Michael D ;
> Kelly Steele ; Taylor Beebe
> ; Kubacki, Michael
> 
> Subject: [edk2-platforms][PATCH v1] QuarkPlatformPkg: 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 QuarkPlatformPkg
> and resolves the build failure.
> 
> Cc: Chasel Chiu 
> Cc: Ray Ni 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> Cc: Michael D Kinney 
> Cc: Kelly Steele 
> Cc: Taylor Beebe 
> Cc: Michael Kubacki 
> Signed-off-by: Nate DeSimone 
> ---
>  Platform/Intel/QuarkPlatformPkg/Quark.dsc| 1 +
>  Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/Platform/Intel/QuarkPlatformPkg/Quark.dsc
> b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
> index 7cc548058a..40d9768336 100644
> --- a/Platform/Intel/QuarkPlatformPkg/Quark.dsc
> +++ b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
> @@ -196,6 +196,7 @@
>  !endif
> 
>FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
> +
> ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/Imag
> ePropertiesRecordLib.inf
> 
>#
># CPU
> diff --git a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
> b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
> index 59577eda4f..67472930c9 100644
> --- a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
> +++ b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
> @@ -167,6 +167,7 @@
>  !endif
> 
>CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
> +
> ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/Imag
> ePropertiesRecordLib.inf
> 
>#
># CPU
> --
> 2.39.2.windows.1



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




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

2023-11-30 Thread Michael D Kinney
Reviewed-by: Michael D Kinney 

> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Thursday, November 30, 2023 4:18 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Ni, Ray ;
> Chaganty, Rangasai V ; Gao, Liming
> ; Kinney, Michael D ;
> Sun, Zailiang ; Qian, Yi ;
> Taylor Beebe ; Kubacki, Michael
> 
> Subject: [edk2-platforms][PATCH v1] Vlv2TbltDevicePkg: 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 Vlv2TbltDevicePkg
> and resolves the build failure.
> 
> Cc: Chasel Chiu 
> Cc: Ray Ni 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> Cc: Michael D Kinney 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Taylor Beebe 
> Cc: Michael Kubacki 
> Signed-off-by: Nate DeSimone 
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 1 +
>  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc  | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> index 4adbaa6966..0c66705377 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> @@ -209,6 +209,7 @@
> 
> PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoff
> ExtraActionLibNull.inf
> 
> DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
>  !endif
> +
> ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/Imag
> ePropertiesRecordLib.inf
> 
>#
># CryptLib
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> index c7d9733dad..0689f275f1 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> @@ -211,6 +211,7 @@
> 
> PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoff
> ExtraActionLibNull.inf
> 
> DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
>  !endif
> +
> ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/Imag
> ePropertiesRecordLib.inf
> 
>#
># CryptLib
> --
> 2.39.2.windows.1



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




[edk2-devel] [PATCH v1 15/17] Platform/Sophgo/SG2042_EVB_Board: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

Signed-off-by: Taylor Beebe 
Cc: Sunil V L 
Cc: dahogn 
Cc: meng-cz 
Cc: caiyuqing379 
Cc: USER0FISH 
---
 Platform/Sophgo/SG2042_EVB_Board/SG2042.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/Sophgo/SG2042_EVB_Board/SG2042.dsc 
b/Platform/Sophgo/SG2042_EVB_Board/SG2042.dsc
index ae6e7261221e..3bbaeca16970 100644
--- a/Platform/Sophgo/SG2042_EVB_Board/SG2042.dsc
+++ b/Platform/Sophgo/SG2042_EVB_Board/SG2042.dsc
@@ -102,6 +102,7 @@
   FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
   
VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf
   
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
 !ifdef $(SOURCE_DEBUG_ENABLE)
   
PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 17/17] Silicon/Phytium/PhytiumCommonPkg: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

Signed-off-by: Taylor Beebe 
Cc: Leif Lindholm 
Cc: Peng Xie 
Cc: Ling Jia 
Cc: Yiqi Shu 
---
 Silicon/Phytium/PhytiumCommonPkg/PhytiumCommonPkg.dsc.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Silicon/Phytium/PhytiumCommonPkg/PhytiumCommonPkg.dsc.inc 
b/Silicon/Phytium/PhytiumCommonPkg/PhytiumCommonPkg.dsc.inc
index 7166212875ec..1ca2bc1b8d46 100644
--- a/Silicon/Phytium/PhytiumCommonPkg/PhytiumCommonPkg.dsc.inc
+++ b/Silicon/Phytium/PhytiumCommonPkg/PhytiumCommonPkg.dsc.inc
@@ -59,6 +59,7 @@
 
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
 
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 16/17] Silicon/Ampere/AmpereAltraPkg: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

Signed-off-by: Taylor Beebe 
Cc: Nhi Pham 
Cc: Chuong Tran 
Cc: Leif Lindholm 
Cc: Rebecca Cran 
---
 Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc 
b/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc
index 8cb2a3fe6422..eb6caf37a3c5 100644
--- a/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc
+++ b/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc
@@ -46,6 +46,7 @@
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
   
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   #
   # Allow dynamic PCDs
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 13/17] Silicon/Hisilicon: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

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

diff --git a/Silicon/Hisilicon/Hisilicon.dsc.inc 
b/Silicon/Hisilicon/Hisilicon.dsc.inc
index 85dca9ab8d0d..609c006648a3 100644
--- a/Silicon/Hisilicon/Hisilicon.dsc.inc
+++ b/Silicon/Hisilicon/Hisilicon.dsc.inc
@@ -26,6 +26,7 @@
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 14/17] Silicon/Marvell/Armada7k8k: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

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

diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc 
b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
index 9711a8d6a707..ab719f360eda 100644
--- a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
+++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
@@ -71,6 +71,7 @@
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   
VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf
   
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
 
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 11/17] Platform/SoftIron/Overdrive1000Board: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

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

diff --git a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc 
b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
index 37ce04f6a9e3..1f63997df963 100644
--- a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
+++ b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
@@ -71,6 +71,7 @@ DEFINE NUM_CORES= 4
   
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
   
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
 
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 12/17] Silicon/NXP: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

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

diff --git a/Silicon/NXP/NxpQoriqLs.dsc.inc b/Silicon/NXP/NxpQoriqLs.dsc.inc
index 80b26fc643c4..920d2f6c4ddf 100644
--- a/Silicon/NXP/NxpQoriqLs.dsc.inc
+++ b/Silicon/NXP/NxpQoriqLs.dsc.inc
@@ -98,6 +98,7 @@
   
NonDiscoverableDeviceRegistrationLib|MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.inf
   
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   I2cLib|Silicon/NXP/Library/I2cLib/I2cLib.inf
   
ResetSystemLib|ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.inf
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 09/17] Platform/SiFive/U5SeriesPkg: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

Signed-off-by: Taylor Beebe 
Cc: Daniel Schaefer 
---
 Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc   | 1 +
 Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc 
b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc
index 4dc243867f40..0479d8f3b0ae 100644
--- a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc
+++ b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc
@@ -103,6 +103,7 @@
   FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
   
VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf
   
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
 # RISC-V Platform Library
   TimeBaseLib|EmbeddedPkg//Library/TimeBaseLib/TimeBaseLib.inf
diff --git 
a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc 
b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
index 9dff112d0016..a297702952a0 100644
--- a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
+++ b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
@@ -103,6 +103,7 @@
   FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
   
VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf
   
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
 # RISC-V Platform Library
   TimeBaseLib|EmbeddedPkg//Library/TimeBaseLib/TimeBaseLib.inf
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 10/17] Platform/Socionext: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

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

diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc 
b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc
index 048226050c38..650c83d0e196 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc
@@ -83,6 +83,7 @@
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   # BDS Libraries
   
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
diff --git a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc 
b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
index 237288086c2f..81c1210ee690 100644
--- a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
+++ b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
@@ -104,6 +104,7 @@
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   # BDS Libraries
   
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 08/17] Platform/Qemu/SbsaQemu: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

Signed-off-by: Taylor Beebe 
Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Graeme Gregory 
Cc: Marcin Juszkiewicz 
---
 Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc 
b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
index fa85bd8dab89..de43bfb6528d 100644
--- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
+++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
@@ -78,6 +78,7 @@ DEFINE NETWORK_HTTP_BOOT_ENABLE   = FALSE
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 06/17] Platform/RaspberryPi: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

Signed-off-by: Taylor Beebe 
Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Jeremy Linton 
---
 Platform/RaspberryPi/RPi3/RPi3.dsc | 1 +
 Platform/RaspberryPi/RPi4/RPi4.dsc | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc 
b/Platform/RaspberryPi/RPi3/RPi3.dsc
index 4e7377a00036..86a8b8101cfa 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.dsc
+++ b/Platform/RaspberryPi/RPi3/RPi3.dsc
@@ -90,6 +90,7 @@
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
   
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
   
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc 
b/Platform/RaspberryPi/RPi4/RPi4.dsc
index e04c76443d5b..9ebe90e5974a 100644
--- a/Platform/RaspberryPi/RPi4/RPi4.dsc
+++ b/Platform/RaspberryPi/RPi4/RPi4.dsc
@@ -88,6 +88,7 @@
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
   
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
   
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 07/17] Platform/Loongson/LoongArchQemuPkg: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

Signed-off-by: Taylor Beebe 
Cc: Bibo Mao 
Cc: Xianglai li 
Cc: Chao Li 
---
 Platform/Loongson/LoongArchQemuPkg/Loongson.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc 
b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
index 00b28cfa500f..d547d86824b7 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
+++ b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
@@ -155,6 +155,7 @@
   PciHostBridgeUtilityLib  | 
OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf
   MmuLib   | 
Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/MmuBaseLib.inf
   FileExplorerLib  | 
MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
+  ImagePropertiesRecordLib | 
MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
 !if $(HTTP_BOOT_ENABLE) == TRUE
   HttpLib  | 
MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 04/17] Platform/Intel/Vlv2TbltDevicePkg: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

Signed-off-by: Taylor Beebe 
Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Nate DeSimone 
Cc: Sai Chaganty 
---
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 1 +
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index 4adbaa69666f..938795d6c982 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -154,6 +154,7 @@
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
   IoApicLib|PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf
   
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   #
   # CPU
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index c7d9733dad76..384394e31c51 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -156,6 +156,7 @@
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
   IoApicLib|PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf
   
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   #
   # CPU
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 05/17] Platform/LeMaker/CelloBoard: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

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

diff --git a/Platform/LeMaker/CelloBoard/CelloBoard.dsc 
b/Platform/LeMaker/CelloBoard/CelloBoard.dsc
index b46295a1648a..bf1f2bab52bc 100644
--- a/Platform/LeMaker/CelloBoard/CelloBoard.dsc
+++ b/Platform/LeMaker/CelloBoard/CelloBoard.dsc
@@ -70,6 +70,7 @@ DEFINE NUM_CORES= 4
   
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
   
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
 
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 01/17] Platform/AMD/OverdriveBoard: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

Signed-off-by: Taylor Beebe 
Cc: Abner Chang 
Cc: Abdul Lateef Attar 
Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
---
 Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc 
b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
index 27ae2a86b82d..5a1ecfa43857 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
@@ -52,6 +52,7 @@ DEFINE X64EMU_ENABLE  = FALSE
   PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 02/17] Platform/ARM/Morello: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

Signed-off-by: Taylor Beebe 
Cc: Ard Biesheuvel 
Cc: Thomas Abraham 
Cc: Sami Mujawar 
---
 Platform/ARM/Morello/MorelloPlatform.dsc.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/ARM/Morello/MorelloPlatform.dsc.inc 
b/Platform/ARM/Morello/MorelloPlatform.dsc.inc
index b8210c87ad18..e7f4b6d0dde8 100644
--- a/Platform/ARM/Morello/MorelloPlatform.dsc.inc
+++ b/Platform/ARM/Morello/MorelloPlatform.dsc.inc
@@ -13,6 +13,7 @@
   BasePathLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
   TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   # Ramdisk Support
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 03/17] Platform/BeagleBoard/BeagleBoardPkg: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

Signed-off-by: Taylor Beebe 
Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
---
 Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc 
b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
index 0834770a6292..a114c9b633d0 100644
--- a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
+++ b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
@@ -93,6 +93,7 @@
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
   
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
   
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
-- 
2.43.0.windows.1



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




[edk2-devel] [PATCH v1 00/17] Add ImagePropertiesRecordLib Instances

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it
needs to be added to most platforms.

Taylor Beebe (17):
  Platform/AMD/OverdriveBoard: Add ImagePropertiesRecordLib Instance
  Platform/ARM/Morello: Add ImagePropertiesRecordLib Instance
  Platform/BeagleBoard/BeagleBoardPkg: Add ImagePropertiesRecordLib
Instance
  Platform/Intel/Vlv2TbltDevicePkg: Add ImagePropertiesRecordLib
Instance
  Platform/LeMaker/CelloBoard: Add ImagePropertiesRecordLib Instance
  Platform/RaspberryPi: Add ImagePropertiesRecordLib Instance
  Platform/Loongson/LoongArchQemuPkg: Add ImagePropertiesRecordLib
Instance
  Platform/Qemu/SbsaQemu: Add ImagePropertiesRecordLib Instance
  Platform/SiFive/U5SeriesPkg: Add ImagePropertiesRecordLib Instance
  Platform/Socionext: Add ImagePropertiesRecordLib Instance
  Platform/SoftIron/Overdrive1000Board: Add ImagePropertiesRecordLib
Instance
  Silicon/NXP: Add ImagePropertiesRecordLib Instance
  Silicon/Hisilicon: Add ImagePropertiesRecordLib Instance
  Silicon/Marvell/Armada7k8k: Add ImagePropertiesRecordLib Instance
  Platform/Sophgo/SG2042_EVB_Board: Add ImagePropertiesRecordLib
Instance
  Silicon/Ampere/AmpereAltraPkg: Add ImagePropertiesRecordLib Instance
  Silicon/Phytium/PhytiumCommonPkg: Add ImagePropertiesRecordLib
Instance

 Platform/AMD/OverdriveBoard/OverdriveBoard.dsc   | 1 +
 Platform/ARM/Morello/MorelloPlatform.dsc.inc | 1 +
 Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc   | 1 +
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 1 +
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc  | 1 +
 Platform/LeMaker/CelloBoard/CelloBoard.dsc   | 1 +
 Platform/Loongson/LoongArchQemuPkg/Loongson.dsc  | 1 +
 Platform/Qemu/SbsaQemu/SbsaQemu.dsc  | 1 +
 Platform/RaspberryPi/RPi3/RPi3.dsc   | 1 +
 Platform/RaspberryPi/RPi4/RPi4.dsc   | 1 +
 Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc   | 1 +
 Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc | 1 +
 Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc | 1 +
 Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc | 1 +
 Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc  | 1 +
 Platform/Sophgo/SG2042_EVB_Board/SG2042.dsc  | 1 +
 Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc | 1 +
 Silicon/Hisilicon/Hisilicon.dsc.inc  | 1 +
 Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc| 1 +
 Silicon/NXP/NxpQoriqLs.dsc.inc   | 1 +
 Silicon/Phytium/PhytiumCommonPkg/PhytiumCommonPkg.dsc.inc| 1 +
 21 files changed, 21 insertions(+)

-- 
2.43.0.windows.1



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

2023-11-30 Thread Michael Kubacki

Reviewed-by: Michael Kubacki 

On 11/30/2023 7:18 PM, Nate DeSimone wrote:

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 Vlv2TbltDevicePkg
and resolves the build failure.

Cc: Chasel Chiu 
Cc: Ray Ni 
Cc: Sai Chaganty 
Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Taylor Beebe 
Cc: Michael Kubacki 
Signed-off-by: Nate DeSimone 
---
  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 1 +
  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc  | 1 +
  2 files changed, 2 insertions(+)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index 4adbaa6966..0c66705377 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -209,6 +209,7 @@

PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
  !endif
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
  
#

# CryptLib
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index c7d9733dad..0689f275f1 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -211,6 +211,7 @@

PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
  !endif
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
  
#

# CryptLib



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




回复: [edk2-devel] [PATCH v3 09/39] MdePkg: Add a new library named PeiServicesTablePointerLibReg

2023-11-30 Thread gaoliming via groups.io
Chao:

 I agree with Laszlo. I want to highlight that current design has meet with 
your requirement. So, I don’t think we need to add new APIs in 
PeiServicesTablePointerLib header file. Loong Arch can implement its 
PeiServicesTablePointerLib library instance base on its specific register. 

 

Thanks

Liming

发件人: Chao Li  
发送时间: 2023年11月27日 11:28
收件人: Laszlo Ersek ; devel@edk2.groups.io
抄送: Michael D Kinney ; Liming Gao 
; Zhiguang Liu ; Leif 
Lindholm ; Ard Biesheuvel 
; Sami Mujawar ; Sunil V L 

主题: Re: [edk2-devel] [PATCH v3 09/39] MdePkg: Add a new library named 
PeiServicesTablePointerLibReg

 

Hi Mike and Liming,

You opinion is very important, it will decide the direction. I will send the V4 
this week, so can you please review the new patch of MdePkg for this series?

 

Thanks,
Chao

On 2023/11/24 19:35, Laszlo Ersek wrote:

On 11/22/23 02:47, Chao Li wrote:

Hi Laszlo,
 
 
Thanks,
Chao
On 2023/11/21 22:37, Laszlo Ersek wrote:

On 11/17/23 10:59, Chao Li wrote:

Since some ARCH or platform not require execute code on memory during
PEI phase, some values may transferred via CPU registers.
 
Adding PeiServcieTablePointerLibReg to allow set and get the PEI service
table pointer depend by a CPU register, this library can accommodate lot
of platforms who not require execte code on memory during PEI phase.
 
Adding PeiServiceTablePointerLibReg to allows setting and getting the
PEI service table pointer via CPU registers, and the library can
accommodate many platforms that do not need to execute code on memory
during the PEI phase.
 
The idea of this library is derived from
ArmPkg/Library/PeiServicesTablePointerLib/
 
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584
 
Cc: Michael D Kinney   

Cc: Liming Gao   
Cc: Zhiguang Liu   
Cc: Leif Lindholm   

Cc: Ard Biesheuvel   

Cc: Sami Mujawar   
Cc: Laszlo Ersek   
Cc: Sunil V L   
Signed-off-by: Chao Li   
---
 .../Library/PeiServicesTablePointerLib.h  | 37 +++-
 .../PeiServicesTablePointer.c | 86 +++
 .../PeiServicesTablePointerLib.uni| 20 +
 .../PeiServicesTablePointerLibReg.inf | 40 +
 MdePkg/MdePkg.dsc |  1 +
 5 files changed, 180 insertions(+), 4 deletions(-)
 create mode 100644 
MdePkg/Library/PeiServicesTablePointerLibReg/PeiServicesTablePointer.c
 create mode 100644 
MdePkg/Library/PeiServicesTablePointerLibReg/PeiServicesTablePointerLib.uni
 create mode 100644 
MdePkg/Library/PeiServicesTablePointerLibReg/PeiServicesTablePointerLibReg.inf

In my opinion, the PeiServicesTablePointerLib class header should not be
extended with new interfaces. I understand that the generality is
attractive, but it is not put to use; only the loongarch architecture
applies the new interfaces (in the subsequent patch), and for example
the ARM code (ArmPkg/Library/PeiServicesTablePointerLib) is not reworked
in terms of these new interfaces.

 
This libarary have ability of accommodate more ARCH why not? I checked
the PI SPEC, all ARCH except IA32 and X64 using the register mechanism,
if this library can be approved, all of them can moved into this
libraryso that code con be reused more, I think this library is fine.

 
The library may be fine from a design point of view, but without
actually putting the extra generality to use, it's a waste. It's a
maintenance burden. There's a name for this anti-pattern: it is called
"speculative generality". "It might be useful down the road."
 
The new generality is only useful if it carries its own weight; namely,
if other platform code (aarch64, x64) is converted to it immediately, in
the same series. (I'm not asking for this series to be longer. You could
even split it up into multiple "waves" of series.) Just saying that
"could prove useful later" is a prime way to generate technical debt.
 

 

What's more, the new library interfaces, even though they are exposed in
the lib class header, are not implemented for other architectures, so
they aren't even callable on those arches.

The patch 10 in this series has added LoongArch instance of this
library, please check.

 
Yes, I'm aware. That's not the point.
 
When you extend a library *class* with a new API, that means all
*clients* of the library class can stat calling that API. Which in turn
means that *all* existent instances of the library class must implement
the API as well.
 
Your series extends the lib class with a new API, but (IIUC) only
implements the new API in one (new) lib instance, and not in the other
(existent) instances. This has the potential to cause linkage errors,
dependent on the actual library instance that a platform DSC chooses.
 
 

I'm commenting on this patch and t

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

2023-11-30 Thread Michael Kubacki

Reviewed-by: Michael Kubacki 

On 11/30/2023 7:18 PM, Nate DeSimone wrote:

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 QuarkPlatformPkg
and resolves the build failure.

Cc: Chasel Chiu 
Cc: Ray Ni 
Cc: Sai Chaganty 
Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Kelly Steele 
Cc: Taylor Beebe 
Cc: Michael Kubacki 
Signed-off-by: Nate DeSimone 
---
  Platform/Intel/QuarkPlatformPkg/Quark.dsc| 1 +
  Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc | 1 +
  2 files changed, 2 insertions(+)

diff --git a/Platform/Intel/QuarkPlatformPkg/Quark.dsc 
b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
index 7cc548058a..40d9768336 100644
--- a/Platform/Intel/QuarkPlatformPkg/Quark.dsc
+++ b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
@@ -196,6 +196,7 @@
  !endif
  
FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf

+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
  
#

# CPU
diff --git a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc 
b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
index 59577eda4f..67472930c9 100644
--- a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
+++ b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
@@ -167,6 +167,7 @@
  !endif
  
CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf

+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
  
#

# CPU



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

2023-11-30 Thread Nate DeSimone
Hey Taylor,

I think I gotten everything in Platform/Intel, it should also fix 
QemuOpenBoardPkg and AmdMinBoardPkg. I saw that Levi also fixed ARM\VExpressPkg 
in https://edk2.groups.io/g/devel/message/111905. Everything else I'm not sure.

Thanks for being proactive on fixing it!

Best Regards,
Nate

-Original Message-
From: Taylor Beebe  
Sent: Thursday, November 30, 2023 4:22 PM
To: Desimone, Nathaniel L ; devel@edk2.groups.io
Cc: Chiu, Chasel ; Ni, Ray ; Chaganty, 
Rangasai V ; Gao, Liming 
; Kinney, Michael D ; 
Kelly Steele ; Kubacki, Michael 

Subject: Re: [edk2-platforms][PATCH v1] QuarkPlatformPkg: Fix DxeCore Build 
Failures

Hey Nate,

I'm about to send out a series to add the library across the repo -- just 
having some smtp authentication issues :D

Are you updating all the packages or just a subset?

-Taylor

On 11/30/2023 4:18 PM, Nate DeSimone wrote:
> 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 QuarkPlatformPkg and 
> resolves the build failure.
>
> Cc: Chasel Chiu 
> Cc: Ray Ni 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> Cc: Michael D Kinney 
> Cc: Kelly Steele 
> Cc: Taylor Beebe 
> Cc: Michael Kubacki 
> Signed-off-by: Nate DeSimone 
> ---
>   Platform/Intel/QuarkPlatformPkg/Quark.dsc| 1 +
>   Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc | 1 +
>   2 files changed, 2 insertions(+)
>
> diff --git a/Platform/Intel/QuarkPlatformPkg/Quark.dsc 
> b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
> index 7cc548058a..40d9768336 100644
> --- a/Platform/Intel/QuarkPlatformPkg/Quark.dsc
> +++ b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
> @@ -196,6 +196,7 @@
>   !endif
>   
> 
> FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.i
> nf
> +  
> + ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordL
> + ib/ImagePropertiesRecordLib.inf
>   
> #
> # CPU
> diff --git a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc 
> b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
> index 59577eda4f..67472930c9 100644
> --- a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
> +++ b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
> @@ -167,6 +167,7 @@
>   !endif
>   
> 
> CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.in
> f
> +  
> + ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordL
> + ib/ImagePropertiesRecordLib.inf
>   
> #
> # CPU


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

2023-11-30 Thread Nate DeSimone
Pushed as 2e880c0

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Nate DeSimone
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-devel] [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/BaseVariableFlashInfoLib.inf
   
VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
   
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.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 (#111930): https://edk2.groups.io/g/devel/message/111930
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] [edk2-platforms][PATCH v1] QuarkPlatformPkg: Fix DxeCore Build Failures

2023-11-30 Thread Taylor Beebe

Hey Nate,

I'm about to send out a series to add the library across the repo -- 
just having some smtp authentication issues :D


Are you updating all the packages or just a subset?

-Taylor

On 11/30/2023 4:18 PM, Nate DeSimone wrote:

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 QuarkPlatformPkg
and resolves the build failure.

Cc: Chasel Chiu 
Cc: Ray Ni 
Cc: Sai Chaganty 
Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Kelly Steele 
Cc: Taylor Beebe 
Cc: Michael Kubacki 
Signed-off-by: Nate DeSimone 
---
  Platform/Intel/QuarkPlatformPkg/Quark.dsc| 1 +
  Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc | 1 +
  2 files changed, 2 insertions(+)

diff --git a/Platform/Intel/QuarkPlatformPkg/Quark.dsc 
b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
index 7cc548058a..40d9768336 100644
--- a/Platform/Intel/QuarkPlatformPkg/Quark.dsc
+++ b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
@@ -196,6 +196,7 @@
  !endif
  
FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf

+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
  
#

# CPU
diff --git a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc 
b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
index 59577eda4f..67472930c9 100644
--- a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
+++ b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
@@ -167,6 +167,7 @@
  !endif
  
CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf

+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
  
#

# CPU



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




[edk2-devel] [edk2-platforms][PATCH v1] QuarkPlatformPkg: Fix DxeCore Build Failures

2023-11-30 Thread Nate DeSimone
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 QuarkPlatformPkg
and resolves the build failure.

Cc: Chasel Chiu 
Cc: Ray Ni 
Cc: Sai Chaganty 
Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Kelly Steele 
Cc: Taylor Beebe 
Cc: Michael Kubacki 
Signed-off-by: Nate DeSimone 
---
 Platform/Intel/QuarkPlatformPkg/Quark.dsc| 1 +
 Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Platform/Intel/QuarkPlatformPkg/Quark.dsc 
b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
index 7cc548058a..40d9768336 100644
--- a/Platform/Intel/QuarkPlatformPkg/Quark.dsc
+++ b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
@@ -196,6 +196,7 @@
 !endif
 
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   #
   # CPU
diff --git a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc 
b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
index 59577eda4f..67472930c9 100644
--- a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
+++ b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
@@ -167,6 +167,7 @@
 !endif
 
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   #
   # CPU
-- 
2.39.2.windows.1



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




[edk2-devel] [edk2-platforms][PATCH v1] Vlv2TbltDevicePkg: Fix DxeCore Build Failures

2023-11-30 Thread Nate DeSimone
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 Vlv2TbltDevicePkg
and resolves the build failure.

Cc: Chasel Chiu 
Cc: Ray Ni 
Cc: Sai Chaganty 
Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Taylor Beebe 
Cc: Michael Kubacki 
Signed-off-by: Nate DeSimone 
---
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 1 +
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index 4adbaa6966..0c66705377 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -209,6 +209,7 @@
   
PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
   DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
 !endif
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   #
   # CryptLib
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index c7d9733dad..0689f275f1 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -211,6 +211,7 @@
   
PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
   DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
 !endif
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   #
   # CryptLib
-- 
2.39.2.windows.1



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




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

2023-11-30 Thread Nate DeSimone
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/BaseVariableFlashInfoLib.inf
   
VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
   
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.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 (#111925): https://edk2.groups.io/g/devel/message/111925
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]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH 3/3] RedfishClientPkg: warn user about reboot if allowed.

2023-11-30 Thread Mike Maslenkin
Warn user about system reboot only if it has not been rejected by
callbacks executed as result of EdkiiRedfishPhaseBeforeReboot notification

Signed-off-by: Mike Maslenkin 
Cc: Abner Chang 
Cc: Nickle Wang 
Cc: Igor Kulchytskyy 
---
 .../RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c  | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c 
b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
index 51d0387ce867..f3188ddfde2c 100644
--- a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
+++ b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
@@ -296,9 +296,6 @@ RedfishFeatureDriverStartup (
   // If system configuration is changed, reboot system.
   //
   if (PcdGetBool (PcdRedfishSystemRebootRequired)) {
-Print (L"System configuration is changed from RESTful interface. Reboot 
system in %d seconds...\n", RebootTimeout);
-gBS->Stall (RebootTimeout * 100U);
-
 //
 // Call override protocol to notify platform that Redfish is processed
 // and about to reboot system.
@@ -312,9 +309,14 @@ RedfishFeatureDriverStartup (
   Status = RedfishOverride->NotifyPhase (RedfishOverride, 
EdkiiRedfishPhaseBeforeReboot);
   if (EFI_ERROR (Status)) {
 DEBUG ((DEBUG_ERROR, "%a: abort the reboot because NotifyPhase() 
returns failure: %r\n", __func__, Status));
-return;
+PcdSetBoolS (PcdRedfishSystemRebootRequired, FALSE);
   }
 }
+  }
+
+  if (PcdGetBool (PcdRedfishSystemRebootRequired)) {
+Print (L"System configuration is changed from RESTful interface. Reboot 
system in %d seconds...\n", RebootTimeout);
+gBS->Stall (RebootTimeout * 100U);
 
 gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL);
 CpuDeadLoop ();
-- 
2.32.0 (Apple Git-132)



[edk2-devel] [edk2-redfish-client][PATCH 0/3] RedfishClientPkg: fix traces

2023-11-30 Thread Mike Maslenkin
This set contains a fix of misleading texts, format specifier
and refines interaction with user about system reset.

Here is link to PR:
https://github.com/tianocore/edk2-redfish-client/pull/62

Signed-off-by: Mike Maslenkin 
Cc: Abner Chang 
Cc: Nickle Wang 
Cc: Igor Kulchytskyy 



[edk2-devel] [PATCH 2/3] RedfishClientPkg: fix format specifier in DEBUG macro

2023-11-30 Thread Mike Maslenkin
Signed-off-by: Mike Maslenkin 
Cc: Abner Chang 
Cc: Nickle Wang 
Cc: Igor Kulchytskyy 
---
 .../Features/MemoryCollectionDxe/MemoryCollectionDxe.c  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c 
b/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c
index dc1ee5ca4143..bebc605dce34 100644
--- a/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c
+++ b/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c
@@ -45,7 +45,7 @@ HandleResource (
   // Check and see if this is target resource that we want to handle.
   // Some resource is handled by other provider so we have to make sure this 
first.
   //
-  DEBUG ((REDFISH_DEBUG_TRACE, "%s Identify for %s\n", __func__, Uri));
+  DEBUG ((REDFISH_DEBUG_TRACE, "%a Identify for %s\n", __func__, Uri));
   ConfigLang = RedfishGetConfigLanguage (Uri);
   if (ConfigLang == NULL) {
 Status = EdkIIRedfishResourceConfigIdentify (&SchemaInfo, Uri, 
Private->InformationExchange);
-- 
2.32.0 (Apple Git-132)



[edk2-devel] [PATCH 1/3] RedfishClientPkg: fix misleading texts in debug traces.

2023-11-30 Thread Mike Maslenkin
Update debug traces with the correct function names.

Signed-off-by: Mike Maslenkin 
Cc: Abner Chang 
Cc: Nickle Wang 
Cc: Igor Kulchytskyy 
---
 RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c | 4 ++--
 .../ComputerSystem/v1_5_0/Common/ComputerSystemCommon.c   | 4 ++--
 RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c 
b/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
index ea2740184160..a26a1083cd74 100644
--- a/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
+++ b/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
@@ -553,7 +553,7 @@ RedfishCheckResourceCommon (
 
   Status = RedfishPlatformConfigGetConfigureLang (RESOURCE_SCHEMA, 
RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigureLangList, &Count);
   if (EFI_ERROR (Status)) {
-DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex failed: 
%r\n", __func__, Status));
+DEBUG ((DEBUG_ERROR, "%a, RedfishPlatformConfigGetConfigureLang failed: 
%r\n", __func__, Status));
 return Status;
   }
 
@@ -720,7 +720,7 @@ RedfishIdentifyResourceCommon (
   if (Supported) {
 Status = RedfishFeatureGetUnifiedArrayTypeConfigureLang (RESOURCE_SCHEMA, 
RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigLangList);
 if (EFI_ERROR (Status)) {
-  DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex 
failed: %r\n", __func__, Status));
+  DEBUG ((DEBUG_ERROR, "%a, RedfishFeatureGetUnifiedArrayTypeConfigureLang 
failed: %r\n", __func__, Status));
   return Status;
 }
 
diff --git 
a/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Common/ComputerSystemCommon.c 
b/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Common/ComputerSystemCommon.c
index 78beb5cb32b3..979d49f79234 100644
--- 
a/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Common/ComputerSystemCommon.c
+++ 
b/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Common/ComputerSystemCommon.c
@@ -1457,7 +1457,7 @@ RedfishCheckResourceCommon (
 
   Status = RedfishPlatformConfigGetConfigureLang (RESOURCE_SCHEMA, 
RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigureLangList, &Count);
   if (EFI_ERROR (Status)) {
-DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex failed: 
%r\n", __func__, Status));
+DEBUG ((DEBUG_ERROR, "%a, RedfishPlatformConfigGetConfigureLang failed: 
%r\n", __func__, Status));
 return Status;
   }
 
@@ -1591,7 +1591,7 @@ RedfishIdentifyResourceCommon (
   if (Supported) {
 Status = RedfishFeatureGetUnifiedArrayTypeConfigureLang (RESOURCE_SCHEMA, 
RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigLangList);
 if (EFI_ERROR (Status)) {
-  DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex 
failed: %r\n", __func__, Status));
+  DEBUG ((DEBUG_ERROR, "%a, RedfishFeatureGetUnifiedArrayTypeConfigureLang 
failed: %r\n", __func__, Status));
   return Status;
 }
 
diff --git a/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c 
b/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c
index 44325ddb21c4..14c263011c2a 100644
--- a/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c
+++ b/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c
@@ -2373,7 +2373,7 @@ RedfishCheckResourceCommon (
 
   Status = RedfishPlatformConfigGetConfigureLang (RESOURCE_SCHEMA, 
RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigureLangList, &Count);
   if (EFI_ERROR (Status)) {
-DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex failed: 
%r\n", __func__, Status));
+DEBUG ((DEBUG_ERROR, "%a, RedfishPlatformConfigGetConfigureLang failed: 
%r\n", __func__, Status));
 return Status;
   }
 
@@ -2507,7 +2507,7 @@ RedfishIdentifyResourceCommon (
   if (Supported) {
 Status = RedfishFeatureGetUnifiedArrayTypeConfigureLang (RESOURCE_SCHEMA, 
RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigLangList);
 if (EFI_ERROR (Status)) {
-  DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex 
failed: %r\n", __func__, Status));
+  DEBUG ((DEBUG_ERROR, "%a, RedfishFeatureGetUnifiedArrayTypeConfigureLang 
failed: %r\n", __func__, Status));
   return Status;
 }
 
-- 
2.32.0 (Apple Git-132)



Re: [edk2-devel] [PATCH v2 edk2-platforms 1/1] UserAuthFeaturePkg/UserAuthenticationSmm: Support Standalone MM.

2023-11-30 Thread Nate DeSimone
Pushed as bd1c9ed

-Original Message-
From: Xu, Wei6  
Sent: Thursday, November 30, 2023 7:07 AM
To: devel@edk2.groups.io
Cc: Xu, Wei6 ; Bi, Dandan ; Desimone, 
Nathaniel L ; Gao, Liming 

Subject: [PATCH v2 edk2-platforms 1/1] 
UserAuthFeaturePkg/UserAuthenticationSmm: Support Standalone MM.

Refactor UserAuthenticationSmm to support Standalone MM.
- Factor out variable lock code logic that references boot services.
- UserAuthenticationStandaloneMmDxe is added to lock the variables.
  It is only used for UserAuthenticationStandaloneMm.
- UserAuthenticationStandaloneMm doesn't lock the variables, needs to
  rely on UserAuthenticationStandaloneMmDxe to do the lock.
- UserAuthenticationSmm still locks the variables by itself, no need
  to include UserAuthenticationStandaloneMmDxe.
- Register gEfiEventExitBootServicesGuid notify which is used by the
  StandaloneMmCore.

Since gEdkiiVariableLockProtocolGuid is a deprecated interface, use 
gEdkiiVariablePolicyProtocolGuid to lock password variables instead.

Cc: Dandan Bi 
Cc: Nate DeSimone 
Cc: Liming Gao 
Signed-off-by: Wei6 Xu 
---
 .../Include/UserAuthFeature.dsc   |  4 +-
 .../UserAuthenticationSmm.c   | 40 -
 .../UserAuthenticationSmm.h   | 28 ---
 .../UserAuthenticationSmm.inf | 13 +--
 .../UserAuthenticationStandaloneMm.c  | 43 ++
 .../UserAuthenticationStandaloneMm.inf| 58 +
 .../UserAuthenticationStandaloneMmDxe.c   | 31 +++
 .../UserAuthenticationStandaloneMmDxe.inf | 42 ++
 .../UserAuthenticationTraditionalMm.c | 28 +++
 .../UserAuthenticationVariable.h  | 36 
 .../UserAuthenticationVariableLock.c  | 84 +++
 11 files changed, 363 insertions(+), 44 deletions(-)  create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMm.c
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMm.inf
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMmDxe.c
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMmDxe.inf
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationTraditionalMm.c
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationVariable.h
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationVariableLock.c

diff --git 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc 
b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc
index 2f39a5580caf..1541dc3f80f3 100644
--- 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc
+++ b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFe
+++ ature.dsc
@@ -6,7 +6,7 @@
 # INF files to generate AutoGen.c and AutoGen.h files  # for the build 
infrastructure.
 #
-# Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.
+# Copyright (c) 2020 - 2023, Intel Corporation. All rights 
+reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -75,3 +75,5 @@
   UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.inf
   UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthentication2Dxe.inf
   UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.inf
+  
+ UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandalo
+ neMm.inf  
+ UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandalo
+ neMmDxe.inf
diff --git 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.c
 
b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.c
index 16e3405a82ef..98f40c1812c1 100644
--- 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.c
+++ b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthentication
+++ DxeSmm/UserAuthenticationSmm.c
@@ -1,6 +1,6 @@
 /** @file
 
-  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
 
 **/
@@ -642,7 +642,7 @@ UaExitBootServices (  {
   DEBUG ((DEBUG_INFO, "Unregister User Authentication Smi\n"));
 
-  gSmst->SmiHandlerUnRegister(mSmmHandle);
+  gMmst->MmiHandlerUnRegister(mSmmHandle);
 
   return EFI_SUCCESS;
 }
@@ -657,54 +657,44 @@ UaExitBootServices (
 
 **/
 EFI_STATUS
-EFIAPI
 PasswordSmmInit (
-  IN EFI_HANDLE ImageHandle,
-  IN EFI_SYSTEM_TABLE   *SystemTable
+  VOID
   )
 {
   EFI_STATUS   

Re: [edk2-devel] [PATCH v2 edk2-platforms 1/1] UserAuthFeaturePkg/UserAuthenticationSmm: Support Standalone MM.

2023-11-30 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: Xu, Wei6  
Sent: Thursday, November 30, 2023 7:07 AM
To: devel@edk2.groups.io
Cc: Xu, Wei6 ; Bi, Dandan ; Desimone, 
Nathaniel L ; Gao, Liming 

Subject: [PATCH v2 edk2-platforms 1/1] 
UserAuthFeaturePkg/UserAuthenticationSmm: Support Standalone MM.

Refactor UserAuthenticationSmm to support Standalone MM.
- Factor out variable lock code logic that references boot services.
- UserAuthenticationStandaloneMmDxe is added to lock the variables.
  It is only used for UserAuthenticationStandaloneMm.
- UserAuthenticationStandaloneMm doesn't lock the variables, needs to
  rely on UserAuthenticationStandaloneMmDxe to do the lock.
- UserAuthenticationSmm still locks the variables by itself, no need
  to include UserAuthenticationStandaloneMmDxe.
- Register gEfiEventExitBootServicesGuid notify which is used by the
  StandaloneMmCore.

Since gEdkiiVariableLockProtocolGuid is a deprecated interface, use 
gEdkiiVariablePolicyProtocolGuid to lock password variables instead.

Cc: Dandan Bi 
Cc: Nate DeSimone 
Cc: Liming Gao 
Signed-off-by: Wei6 Xu 
---
 .../Include/UserAuthFeature.dsc   |  4 +-
 .../UserAuthenticationSmm.c   | 40 -
 .../UserAuthenticationSmm.h   | 28 ---
 .../UserAuthenticationSmm.inf | 13 +--
 .../UserAuthenticationStandaloneMm.c  | 43 ++
 .../UserAuthenticationStandaloneMm.inf| 58 +
 .../UserAuthenticationStandaloneMmDxe.c   | 31 +++
 .../UserAuthenticationStandaloneMmDxe.inf | 42 ++
 .../UserAuthenticationTraditionalMm.c | 28 +++
 .../UserAuthenticationVariable.h  | 36 
 .../UserAuthenticationVariableLock.c  | 84 +++
 11 files changed, 363 insertions(+), 44 deletions(-)  create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMm.c
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMm.inf
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMmDxe.c
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMmDxe.inf
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationTraditionalMm.c
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationVariable.h
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationVariableLock.c

diff --git 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc 
b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc
index 2f39a5580caf..1541dc3f80f3 100644
--- 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc
+++ b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFe
+++ ature.dsc
@@ -6,7 +6,7 @@
 # INF files to generate AutoGen.c and AutoGen.h files  # for the build 
infrastructure.
 #
-# Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.
+# Copyright (c) 2020 - 2023, Intel Corporation. All rights 
+reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -75,3 +75,5 @@
   UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.inf
   UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthentication2Dxe.inf
   UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.inf
+  
+ UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandalo
+ neMm.inf  
+ UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandalo
+ neMmDxe.inf
diff --git 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.c
 
b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.c
index 16e3405a82ef..98f40c1812c1 100644
--- 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.c
+++ b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthentication
+++ DxeSmm/UserAuthenticationSmm.c
@@ -1,6 +1,6 @@
 /** @file
 
-  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
 
 **/
@@ -642,7 +642,7 @@ UaExitBootServices (  {
   DEBUG ((DEBUG_INFO, "Unregister User Authentication Smi\n"));
 
-  gSmst->SmiHandlerUnRegister(mSmmHandle);
+  gMmst->MmiHandlerUnRegister(mSmmHandle);
 
   return EFI_SUCCESS;
 }
@@ -657,54 +657,44 @@ UaExitBootServices (
 
 **/
 EFI_STATUS
-EFIAPI
 PasswordSmmInit (
-  IN EFI_HANDLE ImageHandle,
-  IN EFI_SYSTEM_TABLE   *SystemTable
+  VOID
   )
 {
   EFI_STATUS 

Re: [edk2-devel] [PATCH 2/2] MdePkg/Test: Add google tests for BaseLib

2023-11-30 Thread Pedro Falcato
On Thu, Nov 30, 2023 at 9:31 PM Kinney, Michael D
 wrote:
>
> Hi Pedro,
>
> I agree that silent failures are terrible.
>
> The issue is documented with the requirement to use #include here:
>
> https://github.com/tianocore/edk2/tree/master/UnitTestFrameworkPkg#googletest-configuration
>
> Unit tests are built with their own DSC configuration extensions.  Does adding
> --whole-archive to the GCC SLINK settings of the following file resolve the 
> issue?
>
> https://github.com/tianocore/edk2/blob/master/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc

Thanks for the guidance!
I got it to work by changing DLINK and DLINK2. Sent out a patch set
addressing that. When that goes through (hopefully), we'll be able to
respin these tests without the #include hack.

-- 
Pedro


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




[edk2-devel] [PATCH 2/2] UnitTestFrameworkPkg/Readme.md: Remove the mention of the gtest main() limitation

2023-11-30 Thread Pedro Falcato
As of the previous commit, this limitation is no longer a thing.
You can now write gtest unit tests with multiple files and no need for
any hack such as #include.

Signed-off-by: Pedro Falcato 
Cc: Michael D Kinney 
Cc: Michael Kubacki 
Cc: Sean Brogan 
---
 UnitTestFrameworkPkg/ReadMe.md | 16 
 1 file changed, 16 deletions(-)

diff --git a/UnitTestFrameworkPkg/ReadMe.md b/UnitTestFrameworkPkg/ReadMe.md
index 7da6a320a7f1..d6a3e0c15a2b 100644
--- a/UnitTestFrameworkPkg/ReadMe.md
+++ b/UnitTestFrameworkPkg/ReadMe.md
@@ -1096,22 +1096,6 @@ int main(int argc, char* argv[]) {
 }
 ```
 
-However, while GoogleTest does not require test suites or test cases to be
-registered, there is still one rule within EDK II that currently needs to be
-followed. This rule is that all tests for a given GoogleTest application must
-be contained within the same source file that contains the `main()` function
-shown above. These tests can be written directly in the file or a `#include`
-can be used to add them into the file indirectly.
-
-The reason for this is due to EDK II taking the host application INF file and
-first compiling all of its source files into a static library. This static
-library is then linked into the final host application. The problem with this
-method is that only the tests in the object file containing the `main()`
-function are linked into the final host application. This is because the other
-tests are contained in their own object files within the static library and
-they have no symbols in them that the final host application depends on, so
-those object files are not linked into the final host application.
-
 ### GoogleTest - A Simple Test Case
 
 Below is a sample test case from `SampleGoogleTestHost`.
-- 
2.43.0



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




[edk2-devel] [PATCH 0/2] UnitTestFrameworkPkg: Fix Google Test components with multiple files

2023-11-30 Thread Pedro Falcato
Google Test hides test registration in global constructors on global
objects. Global constructors are traditionally implemented by placing
references to the global constructor's symbol in special sections
(traditionally named .ctors or .init_array). These sections are not
explicitly referenced by the linker, and libc only looks at special
start and end symbols (and calls them).

This works fine if you're linking a program manually using

gcc a.o b.o c.o -o test_suite

but fails miserably when using static libraries (such as what EDK2
does), because traditional static archive symbol resolution rules don't
allow for object files to be pulled in to the link if there isn't an
undefined symbol reference to that .o elsewhere.

Fix it by passing --whole-archive (GCC) and /WHOLEARCHIVE (MSVC). These
options force the linker to pull in the entire static library, thus
including previously-unreferenced constructors and making sure
multi-file gtest EDK2 components work.

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4610
Cc: Michael D Kinney 
Cc: Michael Kubacki 
Cc: Sean Brogan 

Pedro Falcato (2):
  UnitTestFrameworkPkg: Fix Google Test components with multiple files
  UnitTestFrameworkPkg/Readme.md: Remove the mention of the gtest main()
limitation

 UnitTestFrameworkPkg/ReadMe.md   | 16 
 .../UnitTestFrameworkPkgHost.dsc.inc |  9 +++--
 2 files changed, 7 insertions(+), 18 deletions(-)

-- 
2.43.0



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




[edk2-devel] [PATCH 1/2] UnitTestFrameworkPkg: Fix Google Test components with multiple files

2023-11-30 Thread Pedro Falcato
Google Test hides test registration in global constructors on global
objects. Global constructors are traditionally implemented by placing
references to the global constructor's symbol in special sections
(traditionally named .ctors or .init_array). These sections are not
explicitly referenced by the linker, and libc only looks at special
start and end symbols (and calls them).

This works fine if you're linking a program manually using

gcc a.o b.o c.o -o test_suite

but fails miserably when using static libraries (such as what EDK2
does), because traditional static archive symbol resolution rules don't
allow for object files to be pulled in to the link if there isn't an
undefined symbol reference to that .o elsewhere.

Fix it by passing --whole-archive (GCC) and /WHOLEARCHIVE (MSVC). These
options force the linker to pull in the entire static library, thus
including previously-unreferenced constructors and making sure
multi-file gtest EDK2 components work.

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4610
Signed-off-by: Pedro Falcato 
Cc: Michael D Kinney 
Cc: Michael Kubacki 
Cc: Sean Brogan 
---
 Note: /WHOLEARCHIVE should work for VS2015 and newer. I haven't been able to
   test it, so if someone could test on msft it would be much appreciated.
 Testing is as simple as taking this patch set
 (https://openfw.io/edk2-devel/20231130024611.67135-1-pedro.falc...@gmail.com/)
 and removing the #include "TestCheckSum.cpp" in TestBaseLibMain.cpp. If 
everything worked correctly,
 you should have 4 tests and not 0.

 UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc 
b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
index 5217de31e491..0f11706e7324 100644
--- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
+++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
@@ -37,7 +37,7 @@
   # MSFT
   #
   MSFT:*_*_*_CC_FLAGS   = /EHsc
-  MSFT:*_*_*_DLINK_FLAGS== 
/out:"$(BIN_DIR)\$(MODULE_NAME_GUID).exe" 
/pdb:"$(BIN_DIR)\$(MODULE_NAME_GUID).pdb" /IGNORE:4001 /NOLOGO 
/SUBSYSTEM:CONSOLE /DEBUG /STACK:0x4,0x4 /NODEFAULTLIB:libcmt.lib 
libcmtd.lib
+  MSFT:*_*_*_DLINK_FLAGS== 
/out:"$(BIN_DIR)\$(MODULE_NAME_GUID).exe" 
/pdb:"$(BIN_DIR)\$(MODULE_NAME_GUID).pdb" /IGNORE:4001 /NOLOGO 
/SUBSYSTEM:CONSOLE /DEBUG /STACK:0x4,0x4 /NODEFAULTLIB:libcmt.lib 
libcmtd.lib /WHOLEARCHIVE
   MSFT:*_*_IA32_DLINK_FLAGS = /MACHINE:I386
   MSFT:*_*_X64_DLINK_FLAGS  = /MACHINE:AMD64
 
@@ -56,7 +56,12 @@
   #
   GCC:*_*_IA32_DLINK_FLAGS == -o $(BIN_DIR)/$(MODULE_NAME_GUID) -m32 -no-pie
   GCC:*_*_X64_DLINK_FLAGS  == -o $(BIN_DIR)/$(MODULE_NAME_GUID) -m64 -no-pie
-  GCC:*_*_*_DLINK2_FLAGS   == -lgcov -lpthread -lstdc++ -lm
+  #
+  # Surround our static libraries with whole-archive, so constructor-based 
test registration works properly.
+  # Note that we need to --no-whole-archive before linking system libraries.
+  #
+  GCC:*_*_*_DLINK_FLAGS= -Wl,--whole-archive
+  GCC:*_*_*_DLINK2_FLAGS   == -Wl,--no-whole-archive -lgcov -lpthread -lstdc++ 
-lm
 
   #
   # Need to do this link via gcc and not ld as the pathing to libraries 
changes from OS version to OS version
-- 
2.43.0



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




Re: [edk2-devel] [PATCH 2/2] MdePkg/Test: Add google tests for BaseLib

2023-11-30 Thread Michael D Kinney
Hi Pedro,

I agree that silent failures are terrible.

The issue is documented with the requirement to use #include here:

https://github.com/tianocore/edk2/tree/master/UnitTestFrameworkPkg#googletest-configuration

Unit tests are built with their own DSC configuration extensions.  Does adding
--whole-archive to the GCC SLINK settings of the following file resolve the 
issue?

https://github.com/tianocore/edk2/blob/master/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc

Mike

> -Original Message-
> From: Pedro Falcato 
> Sent: Thursday, November 30, 2023 12:16 PM
> To: devel@edk2.groups.io; Kinney, Michael D 
> Cc: Savva Mitrofanov ; Gao, Liming
> ; Liu, Zhiguang 
> Subject: Re: [edk2-devel] [PATCH 2/2] MdePkg/Test: Add google tests for
> BaseLib
> 
> On Thu, Nov 30, 2023 at 7:32 PM Michael D Kinney
>  wrote:
> >
> > With one comment below addressed
> >
> > Reviewed-by: Michael D Kinney 
> >
> > > -Original Message-
> > > From: Pedro Falcato 
> > > Sent: Wednesday, November 29, 2023 6:46 PM
> > > To: devel@edk2.groups.io
> > > Cc: Savva Mitrofanov ; Pedro Falcato
> > > ; Gao, Liming ;
> Kinney,
> > > Michael D ; Liu, Zhiguang
> > > 
> > > Subject: [PATCH 2/2] MdePkg/Test: Add google tests for BaseLib
> > >
> > > Add GoogleTestBaseLib, which contains gtest unit tests for BaseLib.
> > > For now, only add checksum tests for CRC32C and CRC16; these tests
> check
> > > for correctness on various inputs using precomputed hashes.
> > >
> > > Signed-off-by: Pedro Falcato 
> > > Cc: Liming Gao 
> > > Cc: Michael D Kinney 
> > > Cc: Zhiguang Liu 
> > > ---
> > >  .../Library/BaseLib/GoogleTestBaseLib.inf | 31 +
> > >  .../Library/BaseLib/TestBaseLibMain.cpp   | 23 +++
> > >  .../Library/BaseLib/TestCheckSum.cpp  | 64 +++
> > >  .../SafeIntLibUintnIntnUnitTests64.cpp|  4 +-
> > >  MdePkg/Test/MdePkgHostTest.dsc|  5 ++
> > >  5 files changed, 125 insertions(+), 2 deletions(-)
> > >  create mode 100644
> > > MdePkg/Test/GoogleTest/Library/BaseLib/GoogleTestBaseLib.inf
> > >  create mode 100644
> > > MdePkg/Test/GoogleTest/Library/BaseLib/TestBaseLibMain.cpp
> > >  create mode 100644
> > > MdePkg/Test/GoogleTest/Library/BaseLib/TestCheckSum.cpp
> > >
> > > diff --git
> a/MdePkg/Test/GoogleTest/Library/BaseLib/GoogleTestBaseLib.inf
> > > b/MdePkg/Test/GoogleTest/Library/BaseLib/GoogleTestBaseLib.inf
> > > new file mode 100644
> > > index ..c859e5f86b9e
> > > --- /dev/null
> > > +++ b/MdePkg/Test/GoogleTest/Library/BaseLib/GoogleTestBaseLib.inf
> > > @@ -0,0 +1,31 @@
> > > +## @file
> > > +# Host OS based Application that unit tests BaseLib using Google Test
> > > +#
> > > +# Copyright (c) 2023, Pedro Falcato. All rights reserved.
> > > +# SPDX-License-Identifier: BSD-2-Clause-Patent
> > > +##
> > > +
> > > +[Defines]
> > > +  INF_VERSION = 0x00010005
> > > +  BASE_NAME   = GoogleTestBaseLib
> > > +  FILE_GUID   = 34D8CBBA-2442-455F-8454-5B06B12A8B62
> > > +  MODULE_TYPE = HOST_APPLICATION
> > > +  VERSION_STRING  = 1.0
> > > +
> > > +#
> > > +# The following information is for reference only and not required by
> the
> > > build tools.
> > > +#
> > > +#  VALID_ARCHITECTURES   = IA32 X64
> > > +#
> > > +
> > > +[Sources]
> > > +  TestCheckSum.cpp
> > > +  TestBaseLibMain.cpp
> > > +
> > > +[Packages]
> > > +  MdePkg/MdePkg.dec
> > > +  UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
> > > +
> > > +[LibraryClasses]
> > > +  GoogleTestLib
> > > +  BaseLib
> > > diff --git a/MdePkg/Test/GoogleTest/Library/BaseLib/TestBaseLibMain.cpp
> > > b/MdePkg/Test/GoogleTest/Library/BaseLib/TestBaseLibMain.cpp
> > > new file mode 100644
> > > index ..1a9941492be6
> > > --- /dev/null
> > > +++ b/MdePkg/Test/GoogleTest/Library/BaseLib/TestBaseLibMain.cpp
> > > @@ -0,0 +1,23 @@
> > > +/** @file
> > > +  Main routine for BaseLib google tests.
> > > +
> > > +  Copyright (c) 2023 Pedro Falcato. All rights reserved
> > > +  SPDX-License-Identifier: BSD-2-Clause-Patent
> > > +**/
> > > +
> > > +#include 
> > > +
> > > +// Note: Until we can --whole-archive libs, we're forced to include
> > > secondary files from the main one.
> > > +// Yuck.
> >
> > Though I agree with this comment, it does not need to be in the source
> > code.
> >
> > Not sure I understand how --whole-archive can help, so please start
> > a new discussion or enter a BZ with the details.
> 
> That's alright, I can give you a quick rundown (a whole separate
> discussion is a bit too hardcore):
> 
> The EDK2 build system builds all these modules into .lib/static libraries.
> When linkers (I can only speak for UNIX linkers, but AFAIK Windows has
> a similar behavior) use static libraries they use them to resolve
> outstanding[1] undefined symbols. They do this by opening an ar
> file[2], which is essentially a collection of .o in a single file,
> looking at the archive's symbol table and only processing object files
> they actually need.
> 
> Thi

Re: [edk2-devel] [PATCH 2/2] MdePkg/Test: Add google tests for BaseLib

2023-11-30 Thread Pedro Falcato
On Thu, Nov 30, 2023 at 7:32 PM Michael D Kinney
 wrote:
>
> With one comment below addressed
>
> Reviewed-by: Michael D Kinney 
>
> > -Original Message-
> > From: Pedro Falcato 
> > Sent: Wednesday, November 29, 2023 6:46 PM
> > To: devel@edk2.groups.io
> > Cc: Savva Mitrofanov ; Pedro Falcato
> > ; Gao, Liming ; Kinney,
> > Michael D ; Liu, Zhiguang
> > 
> > Subject: [PATCH 2/2] MdePkg/Test: Add google tests for BaseLib
> >
> > Add GoogleTestBaseLib, which contains gtest unit tests for BaseLib.
> > For now, only add checksum tests for CRC32C and CRC16; these tests check
> > for correctness on various inputs using precomputed hashes.
> >
> > Signed-off-by: Pedro Falcato 
> > Cc: Liming Gao 
> > Cc: Michael D Kinney 
> > Cc: Zhiguang Liu 
> > ---
> >  .../Library/BaseLib/GoogleTestBaseLib.inf | 31 +
> >  .../Library/BaseLib/TestBaseLibMain.cpp   | 23 +++
> >  .../Library/BaseLib/TestCheckSum.cpp  | 64 +++
> >  .../SafeIntLibUintnIntnUnitTests64.cpp|  4 +-
> >  MdePkg/Test/MdePkgHostTest.dsc|  5 ++
> >  5 files changed, 125 insertions(+), 2 deletions(-)
> >  create mode 100644
> > MdePkg/Test/GoogleTest/Library/BaseLib/GoogleTestBaseLib.inf
> >  create mode 100644
> > MdePkg/Test/GoogleTest/Library/BaseLib/TestBaseLibMain.cpp
> >  create mode 100644
> > MdePkg/Test/GoogleTest/Library/BaseLib/TestCheckSum.cpp
> >
> > diff --git a/MdePkg/Test/GoogleTest/Library/BaseLib/GoogleTestBaseLib.inf
> > b/MdePkg/Test/GoogleTest/Library/BaseLib/GoogleTestBaseLib.inf
> > new file mode 100644
> > index ..c859e5f86b9e
> > --- /dev/null
> > +++ b/MdePkg/Test/GoogleTest/Library/BaseLib/GoogleTestBaseLib.inf
> > @@ -0,0 +1,31 @@
> > +## @file
> > +# Host OS based Application that unit tests BaseLib using Google Test
> > +#
> > +# Copyright (c) 2023, Pedro Falcato. All rights reserved.
> > +# SPDX-License-Identifier: BSD-2-Clause-Patent
> > +##
> > +
> > +[Defines]
> > +  INF_VERSION = 0x00010005
> > +  BASE_NAME   = GoogleTestBaseLib
> > +  FILE_GUID   = 34D8CBBA-2442-455F-8454-5B06B12A8B62
> > +  MODULE_TYPE = HOST_APPLICATION
> > +  VERSION_STRING  = 1.0
> > +
> > +#
> > +# The following information is for reference only and not required by the
> > build tools.
> > +#
> > +#  VALID_ARCHITECTURES   = IA32 X64
> > +#
> > +
> > +[Sources]
> > +  TestCheckSum.cpp
> > +  TestBaseLibMain.cpp
> > +
> > +[Packages]
> > +  MdePkg/MdePkg.dec
> > +  UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
> > +
> > +[LibraryClasses]
> > +  GoogleTestLib
> > +  BaseLib
> > diff --git a/MdePkg/Test/GoogleTest/Library/BaseLib/TestBaseLibMain.cpp
> > b/MdePkg/Test/GoogleTest/Library/BaseLib/TestBaseLibMain.cpp
> > new file mode 100644
> > index ..1a9941492be6
> > --- /dev/null
> > +++ b/MdePkg/Test/GoogleTest/Library/BaseLib/TestBaseLibMain.cpp
> > @@ -0,0 +1,23 @@
> > +/** @file
> > +  Main routine for BaseLib google tests.
> > +
> > +  Copyright (c) 2023 Pedro Falcato. All rights reserved
> > +  SPDX-License-Identifier: BSD-2-Clause-Patent
> > +**/
> > +
> > +#include 
> > +
> > +// Note: Until we can --whole-archive libs, we're forced to include
> > secondary files from the main one.
> > +// Yuck.
>
> Though I agree with this comment, it does not need to be in the source
> code.
>
> Not sure I understand how --whole-archive can help, so please start
> a new discussion or enter a BZ with the details.

That's alright, I can give you a quick rundown (a whole separate
discussion is a bit too hardcore):

The EDK2 build system builds all these modules into .lib/static libraries.
When linkers (I can only speak for UNIX linkers, but AFAIK Windows has
a similar behavior) use static libraries they use them to resolve
outstanding[1] undefined symbols. They do this by opening an ar
file[2], which is essentially a collection of .o in a single file,
looking at the archive's symbol table and only processing object files
they actually need.

This actually works fine for most usage of static libraries, where you
manually pull symbols you need, or in EFI where the linker pulls in
EfiMain(), which pulls the rest of the object files in. The problem is
that Google Test, in all of its C++ glory, has the test registration
done in global constructors for global objects (that are created in
the TEST(Blah, TestSomething) macro invocation). These constructors
are not referenced elsewhere, so the linker doesn't pull those object
files; this is bad, it means none of those objects will ever be seen
by the linker, so you just drop tests.

This whole problem can be fixed by doing /WHOLEARCHIVE or
--Wl,--whole-archive on the static libraries; in that case, the linker
forcibly includes all of the static library's object files (even
unreferenced ones!) in the link. This fixes our case as then
constructors are referenced, so the tests are properly registered and
run. This is a "hardcore" switch that we don't want to force on most
components, so it should idea

Re: [edk2-devel] [PATCH 1/2] MdePkg/BaseLib: Fix CRC16-ANSI calculation

2023-11-30 Thread Michael D Kinney
Reviewed-by: Michael D Kinney 

> -Original Message-
> From: Pedro Falcato 
> Sent: Wednesday, November 29, 2023 6:46 PM
> To: devel@edk2.groups.io
> Cc: Savva Mitrofanov ; Pedro Falcato
> ; Gao, Liming ; Kinney,
> Michael D ; Liu, Zhiguang
> 
> Subject: [PATCH 1/2] MdePkg/BaseLib: Fix CRC16-ANSI calculation
> 
> The current CalculateCrc16Ansi implementation does the following:
> 1) Invert the passed checksum
> 2) Calculate the new checksum by going through data and using the
>lookup table
> 3) Invert it back again
> 
> This emulated my design for CalculateCrc32c, where 0 is
> passed as the initial checksum, and it inverts in the end.
> However, CRC16 does not invert the checksum on input and output.
> So this is incorrect.
> 
> Fix the problem by not inverting input checksums nor output checksums.
> Callers should now pass CRC16ANSI_INIT as the initial value instead of
> "0". This is a breaking change.
> 
> This problem was found out-of-list when older ext4 filesystems
> (that use crc16 checksums) failed to mount with "corruption".
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4609
> Signed-off-by: Pedro Falcato 
> Cc: Liming Gao 
> Cc: Michael D Kinney 
> Cc: Zhiguang Liu 
> ---
>  MdePkg/Include/Library/BaseLib.h  | 5 +
>  MdePkg/Library/BaseLib/CheckSum.c | 4 ++--
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/MdePkg/Include/Library/BaseLib.h
> b/MdePkg/Include/Library/BaseLib.h
> index 5d7067ee854e..728e89d2bf44 100644
> --- a/MdePkg/Include/Library/BaseLib.h
> +++ b/MdePkg/Include/Library/BaseLib.h
> @@ -4599,6 +4599,11 @@ CalculateCrc16Ansi (
>IN  UINT16  InitialValue
>);
> 
> +//
> +// Initial value for the CRC16-ANSI algorithm, when no prior checksum has
> been calculated.
> +//
> +#define CRC16ANSI_INIT  0x
> +
>  /**
> Calculates the CRC32c checksum of the given buffer.
> 
> diff --git a/MdePkg/Library/BaseLib/CheckSum.c
> b/MdePkg/Library/BaseLib/CheckSum.c
> index b6a076573191..57d324c82b22 100644
> --- a/MdePkg/Library/BaseLib/CheckSum.c
> +++ b/MdePkg/Library/BaseLib/CheckSum.c
> @@ -678,13 +678,13 @@ CalculateCrc16Ansi (
> 
>Buf = Buffer;
> 
> -  Crc = ~InitialValue;
> +  Crc = InitialValue;
> 
>while (Length-- != 0) {
>  Crc = mCrc16LookupTable[(Crc & 0xFF) ^ *(Buf++)] ^ (Crc >> 8);
>}
> 
> -  return ~Crc;
> +  return Crc;
>  }
> 
>  GLOBAL_REMOVE_IF_UNREFERENCED STATIC CONST UINT32  mCrc32cLookupTable[256]
> = {
> --
> 2.43.0



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




Re: [edk2-devel] [PATCH 2/2] MdePkg/Test: Add google tests for BaseLib

2023-11-30 Thread Michael D Kinney
With one comment below addressed

Reviewed-by: Michael D Kinney 

> -Original Message-
> From: Pedro Falcato 
> Sent: Wednesday, November 29, 2023 6:46 PM
> To: devel@edk2.groups.io
> Cc: Savva Mitrofanov ; Pedro Falcato
> ; Gao, Liming ; Kinney,
> Michael D ; Liu, Zhiguang
> 
> Subject: [PATCH 2/2] MdePkg/Test: Add google tests for BaseLib
> 
> Add GoogleTestBaseLib, which contains gtest unit tests for BaseLib.
> For now, only add checksum tests for CRC32C and CRC16; these tests check
> for correctness on various inputs using precomputed hashes.
> 
> Signed-off-by: Pedro Falcato 
> Cc: Liming Gao 
> Cc: Michael D Kinney 
> Cc: Zhiguang Liu 
> ---
>  .../Library/BaseLib/GoogleTestBaseLib.inf | 31 +
>  .../Library/BaseLib/TestBaseLibMain.cpp   | 23 +++
>  .../Library/BaseLib/TestCheckSum.cpp  | 64 +++
>  .../SafeIntLibUintnIntnUnitTests64.cpp|  4 +-
>  MdePkg/Test/MdePkgHostTest.dsc|  5 ++
>  5 files changed, 125 insertions(+), 2 deletions(-)
>  create mode 100644
> MdePkg/Test/GoogleTest/Library/BaseLib/GoogleTestBaseLib.inf
>  create mode 100644
> MdePkg/Test/GoogleTest/Library/BaseLib/TestBaseLibMain.cpp
>  create mode 100644
> MdePkg/Test/GoogleTest/Library/BaseLib/TestCheckSum.cpp
> 
> diff --git a/MdePkg/Test/GoogleTest/Library/BaseLib/GoogleTestBaseLib.inf
> b/MdePkg/Test/GoogleTest/Library/BaseLib/GoogleTestBaseLib.inf
> new file mode 100644
> index ..c859e5f86b9e
> --- /dev/null
> +++ b/MdePkg/Test/GoogleTest/Library/BaseLib/GoogleTestBaseLib.inf
> @@ -0,0 +1,31 @@
> +## @file
> +# Host OS based Application that unit tests BaseLib using Google Test
> +#
> +# Copyright (c) 2023, Pedro Falcato. All rights reserved.
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +##
> +
> +[Defines]
> +  INF_VERSION = 0x00010005
> +  BASE_NAME   = GoogleTestBaseLib
> +  FILE_GUID   = 34D8CBBA-2442-455F-8454-5B06B12A8B62
> +  MODULE_TYPE = HOST_APPLICATION
> +  VERSION_STRING  = 1.0
> +
> +#
> +# The following information is for reference only and not required by the
> build tools.
> +#
> +#  VALID_ARCHITECTURES   = IA32 X64
> +#
> +
> +[Sources]
> +  TestCheckSum.cpp
> +  TestBaseLibMain.cpp
> +
> +[Packages]
> +  MdePkg/MdePkg.dec
> +  UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
> +
> +[LibraryClasses]
> +  GoogleTestLib
> +  BaseLib
> diff --git a/MdePkg/Test/GoogleTest/Library/BaseLib/TestBaseLibMain.cpp
> b/MdePkg/Test/GoogleTest/Library/BaseLib/TestBaseLibMain.cpp
> new file mode 100644
> index ..1a9941492be6
> --- /dev/null
> +++ b/MdePkg/Test/GoogleTest/Library/BaseLib/TestBaseLibMain.cpp
> @@ -0,0 +1,23 @@
> +/** @file
> +  Main routine for BaseLib google tests.
> +
> +  Copyright (c) 2023 Pedro Falcato. All rights reserved
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +**/
> +
> +#include 
> +
> +// Note: Until we can --whole-archive libs, we're forced to include
> secondary files from the main one.
> +// Yuck.

Though I agree with this comment, it does not need to be in the source
code.

Not sure I understand how --whole-archive can help, so please start 
a new discussion or enter a BZ with the details.

> +
> +#include "TestCheckSum.cpp"
> +
> +int
> +main (
> +  int   argc,
> +  char  *argv[]
> +  )
> +{
> +  testing::InitGoogleTest (&argc, argv);
> +  return RUN_ALL_TESTS ();
> +}
> diff --git a/MdePkg/Test/GoogleTest/Library/BaseLib/TestCheckSum.cpp
> b/MdePkg/Test/GoogleTest/Library/BaseLib/TestCheckSum.cpp
> new file mode 100644
> index ..fa97f11dfa9c
> --- /dev/null
> +++ b/MdePkg/Test/GoogleTest/Library/BaseLib/TestCheckSum.cpp
> @@ -0,0 +1,64 @@
> +/** @file
> +  Unit tests for BaseLib's checksum capabilities.
> +
> +  Copyright (c) 2023 Pedro Falcato. All rights reserved
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +**/
> +
> +#include 
> +extern "C" {
> +#include 
> +#include 
> +}
> +
> +// Precomputed crc32c and crc16-ansi for "hello" (without the null byte)
> +constexpr STATIC UINT32  mHelloCrc32c = 0x9A71BB4C;
> +constexpr STATIC UINT16  mHelloCrc16  = 0x34F6;
> +
> +TEST (Crc32c, BasicCheck) {
> +  // Note: The magic numbers below are precomputed checksums
> +  // Check for basic operation on even and odd numbers of bytes
> +  EXPECT_EQ (CalculateCrc32c ("hello", 5, 0), mHelloCrc32c);
> +  EXPECT_EQ (
> +CalculateCrc32c ("longlonglonglonglong", sizeof
> ("longlonglonglonglong") - 1, 0),
> +0xC50F869D
> +);
> +  EXPECT_EQ (CalculateCrc32c ("h", 1, 0), 0xB96298FC);
> +
> +  // Check if a checksum with no bytes correctly yields 0
> +  EXPECT_EQ (CalculateCrc32c ("", 0, 0), 0U);
> +}
> +
> +TEST (Crc32c, MultipartCheck) {
> +  // Test multi-part crc32c calculation. So that given a string of bytes
> +  // s[N], crc32c(s, N, 0) == crc32c(s[N - 1], 1, crc32c(s, N - 1, 0))
> +  // and all other sorts of combinations one might imagine.
> +  UINT32  val;
> +
> +  val = CalculateCrc32c ("hel", 3, 0);
> +  EXPECT_EQ (CalculateCrc32c (&"hel

[edk2-devel] [PATCH] UefiCpuPkg/ResetVector: Option for 1G Page Table Size increase

2023-11-30 Thread Ashraf Ali S
Currently 1G Page table is restricted 512GB. this patch can help to
increase the page table size based on the input. default will be 512GB
build option PAGE_TABLE_1G_SIZE is used to increase the page table size

Cc: Rahul Kumar 
Cc: Ray Ni 
Cc: Catharine West 
Cc: V Sangeetha 
Signed-off-by: Ashraf Ali S 
---
 UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt |  4 ++--
 UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf   |  2 ++
 UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm | 13 +++--
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt 
b/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt
index 4fcb15c3b1..4d153fc1a7 100644
--- a/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt
+++ b/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt
@@ -1,10 +1,10 @@
 
 === HOW TO USE VTF0 ===
 Add this line to your DSC [Components.IA32] or [Components.X64] section:
-  UefiCpuPkg/ResetVector/Vtf0/ResetVector.inf
+  UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
 
 Add this line to your FDF FV section:
-  INF  RuleOverride=RESET_VECTOR UefiCpuPkg/ResetVector/Vtf0/ResetVector.inf
+  INF  RuleOverride=RESET_VECTOR UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
 
 In your FDF FFS file rules sections add:
   [Rule.Common.SEC.RESET_VECTOR]
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf 
b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
index 6b406163db..96106a4b11 100644
--- a/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
+++ b/UefiCpuPkg/ResetVector/Vtf0/Vtf0.inf
@@ -53,5 +53,7 @@
 #   -DARCH_X64, -DARCH_IA32
 #   * for using 1G page table:
 #   -DPAGE_TABLE_1G
+#   * for incresing the 1G page table size (Size in GBs):
+#   -DPAGE_TABLE_1G_SIZE=1024
 #   * for different debug channels:
 #   -DDEBUG_SERIAL, -DDEBUG_PORT80, or not specify any debug channel
diff --git a/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm 
b/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm
index 7960b141be..b080dc5296 100644
--- a/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm
+++ b/UefiCpuPkg/ResetVector/Vtf0/X64/PageTables.asm
@@ -1,7 +1,7 @@
 ;--
 ; @file
 ; Emits Page Tables for 1:1 mapping.
-; If using 1G page table, map addresses 0 - 0x80 (512GB),
+; If using 1G page table, map addresses 0 - 0x80 (512GB, Size can be 
increse via PAGE_TABLE_1G_SIZE),
 ; else, map addresses 0 - 0x1 (4GB)
 ;
 ; Copyright (c) 2021 - 2023, Intel Corporation. All rights reserved.
@@ -39,6 +39,15 @@ BITS64
 %define PAGE_PDPTE_1GB(x) ((x << 30) + PAGE_BLE_ATTR)
 %define PAGE_PDE_2MB(x) ((x << 21) + PAGE_BLE_ATTR)
 
+%ifdef PAGE_TABLE_1G_SIZE
+  %define PAGE_PDPTE_1GB_SIZE PAGE_TABLE_1G_SIZE
+%else
+  ;
+  ; Default 512GB of 1G Page Table
+  ;
+  %define PAGE_PDPTE_1GB_SIZE 512
+%endif
+
 ALIGN 16
 
 %ifdef PAGE_TABLE_1G
@@ -47,7 +56,7 @@ Pdp:
 ; Page-directory pointer table (512 * 1GB entries => 512GB)
 ;
 %assign i 0
-%rep  512
+%rep  PAGE_PDPTE_1GB_SIZE
 DQPAGE_PDPTE_1GB(i)
 %assign i i+1
 %endrep
-- 
2.39.1.windows.1



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




Re: [edk2-devel] [PATCH edk2-platforms v2 1/1] Platform/ARM: Fix the build failure DxeCore

2023-11-30 Thread Thomas Abraham
On Thu, Nov 30, 2023 at 7:59 PM levi.yun  wrote:
> 
> The edk2 commit 7284c44951cffd52f1a08367d91b5c63c7bb9c16
> introduces a new library ImagePropertiesRecordLib to
> consolidate the logic for manipulating the image properties
> used to track runtime images and to remove duplicate code.
> This library is further linked with DxeCore.
> 
> Therefore, add an instance of ImagePropertiesRecordLib to
> the ArmVExpress.dsc.inc file so that it is included for Arm
> platforms.
> 
> Signed-off-by: Levi Yun 
> ---
> 
> Notes:
> Patch v2:
> - fix the line ending issue.
> - add missing edk2 mailing list.
> 
>  Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> index
> 5e6886b30c8e507939a73b97366e2247a1430cef..9c9e1f79c8869639c01a0f257
> 633dd8a8a686c3b 100644
> --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> @@ -164,6 +164,7 @@ [LibraryClasses.common]
> 
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/Customiz
> edDisplayLib.inf
> 
> 
> ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRep
> ortStatusCodeLib.inf
> +
> ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/I
> magePropertiesRecordLib.inf
> 
>  [LibraryClasses.common.SEC]
> 
> DebugAgentLib|ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymb
> olsBaseLib.inf
> --
> Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")

Reviewed-by: Thomas Abraham 


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




[edk2-devel] [PATCH v2 edk2-platforms 1/1] UserAuthFeaturePkg/UserAuthenticationSmm: Support Standalone MM.

2023-11-30 Thread Xu, Wei6
Refactor UserAuthenticationSmm to support Standalone MM.
- Factor out variable lock code logic that references boot services.
- UserAuthenticationStandaloneMmDxe is added to lock the variables.
  It is only used for UserAuthenticationStandaloneMm.
- UserAuthenticationStandaloneMm doesn't lock the variables, needs to
  rely on UserAuthenticationStandaloneMmDxe to do the lock.
- UserAuthenticationSmm still locks the variables by itself, no need
  to include UserAuthenticationStandaloneMmDxe.
- Register gEfiEventExitBootServicesGuid notify which is used by the
  StandaloneMmCore.

Since gEdkiiVariableLockProtocolGuid is a deprecated interface, use
gEdkiiVariablePolicyProtocolGuid to lock password variables instead.

Cc: Dandan Bi 
Cc: Nate DeSimone 
Cc: Liming Gao 
Signed-off-by: Wei6 Xu 
---
 .../Include/UserAuthFeature.dsc   |  4 +-
 .../UserAuthenticationSmm.c   | 40 -
 .../UserAuthenticationSmm.h   | 28 ---
 .../UserAuthenticationSmm.inf | 13 +--
 .../UserAuthenticationStandaloneMm.c  | 43 ++
 .../UserAuthenticationStandaloneMm.inf| 58 +
 .../UserAuthenticationStandaloneMmDxe.c   | 31 +++
 .../UserAuthenticationStandaloneMmDxe.inf | 42 ++
 .../UserAuthenticationTraditionalMm.c | 28 +++
 .../UserAuthenticationVariable.h  | 36 
 .../UserAuthenticationVariableLock.c  | 84 +++
 11 files changed, 363 insertions(+), 44 deletions(-)
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMm.c
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMm.inf
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMmDxe.c
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMmDxe.inf
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationTraditionalMm.c
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationVariable.h
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationVariableLock.c

diff --git 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc 
b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc
index 2f39a5580caf..1541dc3f80f3 100644
--- 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc
+++ 
b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc
@@ -6,7 +6,7 @@
 # INF files to generate AutoGen.c and AutoGen.h files
 # for the build infrastructure.
 #
-# Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.
+# Copyright (c) 2020 - 2023, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -75,3 +75,5 @@
   UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.inf
   UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthentication2Dxe.inf
   UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.inf
+  
UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMm.inf
+  
UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMmDxe.inf
diff --git 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.c
 
b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.c
index 16e3405a82ef..98f40c1812c1 100644
--- 
a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.c
+++ 
b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.c
@@ -1,6 +1,6 @@
 /** @file
 
-  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
 
 **/
@@ -642,7 +642,7 @@ UaExitBootServices (
 {
   DEBUG ((DEBUG_INFO, "Unregister User Authentication Smi\n"));
 
-  gSmst->SmiHandlerUnRegister(mSmmHandle);
+  gMmst->MmiHandlerUnRegister(mSmmHandle);
 
   return EFI_SUCCESS;
 }
@@ -657,54 +657,44 @@ UaExitBootServices (
 
 **/
 EFI_STATUS
-EFIAPI
 PasswordSmmInit (
-  IN EFI_HANDLE ImageHandle,
-  IN EFI_SYSTEM_TABLE   *SystemTable
+  VOID
   )
 {
   EFI_STATUSStatus;
-  EDKII_VARIABLE_LOCK_PROTOCOL  *VariableLock;
-  CHAR16
PasswordHistoryName[sizeof(USER_AUTHENTICATION_VAR_NAME)/sizeof(CHAR16) + 5];
-  UINTN Index;
   EFI_EVENT ExitBootServicesEvent;
   EFI_EVENT 

[edk2-devel] [PATCH v2 edk2-platforms 0/1] UserAuthFeaturePkg/UserAuthenticationSmm: Support Standalone MM.

2023-11-30 Thread Xu, Wei6
v1:
The this patch is to refator UserAuthenticationSmm to support MM_STANDALONE.
PR: https://github.com/tianocore/edk2-platforms/pull/110

v2:
Update copyright year on modified files.
Rename UserAuthenticationVariableLockDxe to UserAuthenticationStandaloneMmDxe 
so that it is clear that this driver is only used for the standalone MM case.
PR: https://github.com/tianocore/edk2-platforms/pull/115

Cc: Dandan Bi 
Cc: Nate DeSimone 
Cc: Liming Gao 

Wei6 Xu (1):
  UserAuthFeaturePkg/UserAuthenticationSmm: Support Standalone MM.

 .../Include/UserAuthFeature.dsc   |  4 +-
 .../UserAuthenticationSmm.c   | 40 -
 .../UserAuthenticationSmm.h   | 28 ---
 .../UserAuthenticationSmm.inf | 13 +--
 .../UserAuthenticationStandaloneMm.c  | 43 ++
 .../UserAuthenticationStandaloneMm.inf| 58 +
 .../UserAuthenticationStandaloneMmDxe.c   | 31 +++
 .../UserAuthenticationStandaloneMmDxe.inf | 42 ++
 .../UserAuthenticationTraditionalMm.c | 28 +++
 .../UserAuthenticationVariable.h  | 36 
 .../UserAuthenticationVariableLock.c  | 84 +++
 11 files changed, 363 insertions(+), 44 deletions(-)
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMm.c
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMm.inf
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMmDxe.c
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationStandaloneMmDxe.inf
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationTraditionalMm.c
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationVariable.h
 create mode 100644 
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationVariableLock.c

-- 
2.29.2.windows.2



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




[edk2-devel] [PATCH edk2-platforms v2 1/1] Platform/ARM: Fix the build failure DxeCore

2023-11-30 Thread levi.yun


The edk2 commit 7284c44951cffd52f1a08367d91b5c63c7bb9c16
introduces a new library ImagePropertiesRecordLib to
consolidate the logic for manipulating the image properties
used to track runtime images and to remove duplicate code.
This library is further linked with DxeCore.

Therefore, add an instance of ImagePropertiesRecordLib to
the ArmVExpress.dsc.inc file so that it is included for Arm
platforms.

Signed-off-by: Levi Yun 
---

Notes:
Patch v2:
- fix the line ending issue.
- add missing edk2 mailing list.

 Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc 
b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
index 
5e6886b30c8e507939a73b97366e2247a1430cef..9c9e1f79c8869639c01a0f257633dd8a8a686c3b
 100644
--- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
+++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
@@ -164,6 +164,7 @@ [LibraryClasses.common]
   
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf

   
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf

 [LibraryClasses.common.SEC]
   
DebugAgentLib|ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.inf
--
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.


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




Re: [edk2-devel] [edk2-platform] [PATCH] Platform/ARM: Fix build failure for FVP and Juno.

2023-11-30 Thread Sami Mujawar

Forwarding this discussion as it unfortunately missed the mailing list.

Regards,

Sami Mujawar

On 29/11/2023 12:33 pm, Yeo Reum Yun wrote:

Thanks Pierre :)

+add Taylor Beebe

@Taylor Beebe

Hi Taylor! Thanks for your recent patch related to ImagePropertiesRecordLib!

But, after applying your patches, some platform might experience build failure 
for the new library.

Many thanks.


From: Pierre Gondois 
Sent: 29 November 2023 12:24
To: Yeo Reum Yun; ardb+tianoc...@kernel.org; Thomas Abraham; Sami Mujawar
Cc: leif.lindh...@linaro.org; Matteo Carlini; nd; Arvind Chauhan
Subject: Re: [edk2-platform] [PATCH] Platform/ARM: Fix build failure for FVP 
and Juno.

Hello Levi,

Tested-by: Pierre Gondois 

Also it seems the following platforms (I assume this might affect others
aswell) have the same issue:
- Platform/Ampere/JadePkg/Jade.dsc
- Platform/RaspberryPi/RPi4/RPi4.dsc
- Platform/Qemu/SbsaQemu/SbsaQemu.dsc

Maybe it should be worth pinging the author of the commit at:
https://edk2.groups.io/g/devel/message/111744

On 11/29/23 12:44, levi.yun wrote:

The edk2 commit 7284c44951cffd52f1a08367d91b5c63c7bb9c16
introduces a new library ImagePropertiesRecordLib to
consolidate the logic for manipulating the image properties
used to track runtime images and to remove duplicate code.
This library is further linked with DxeCore.

Therefore, add an instance of ImagePropertiesRecordLib to
the ArmVExpress.dsc.inc file so that it is included for Arm
platforms.

Signed-off-by: Levi Yun 
---
   Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 1 +
   1 file changed, 1 insertion(+)

diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc 
b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
index 
5e6886b30c8e507939a73b97366e2247a1430cef..9c9e1f79c8869639c01a0f257633dd8a8a686c3b
 100644
--- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
+++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
@@ -164,6 +164,7 @@ [LibraryClasses.common]
 
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf

 
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf

   [LibraryClasses.common.SEC]
 
DebugAgentLib|ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.inf
--
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111904): https://edk2.groups.io/g/devel/message/111904
Mute This Topic: https://groups.io/mt/102893425/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 2/2] StandaloneMmPkg: Fix HOB space and heap space conflicted issue

2023-11-30 Thread Nhi Pham via groups.io
On 9/7/2023 10:38 PM, Nhi Pham wrote:
> On 9/6/2023 11:22 PM, Oliver Smith-Denny wrote:
>> On 9/6/2023 1:50 AM, Ard Biesheuvel wrote:
>>> On Wed, 6 Sept 2023 at 09:56, Nhi Pham
>>>  wrote:

 On 9/6/2023 1:33 PM, Ni, Ray wrote:
> [EXTERNAL EMAIL NOTICE: This email originated from an external sender.
> Please be mindful of safe email handling and proprietary information
> protection practices.]
>
> I am a bit confused.
>
> The HOB list in standalone MM is read-only. Why could any module call
> BuildGuidHob() to modify the HOB.
>
> I saw Oliver mentioned something about StMM. I don't know what that
> is.
> But it seems that's ARM specific. Then, I don't think it's proper to
> modify code here for a specific arch ARM.

 The HOB creation is available in the
 StandaloneMmPkg/Library/StandaloneMmHobLib/StandaloneMmHobLib.inf. If
 other architectures also use that instance, I think the issue is not
 specific to ARM.

>>>
>>> The question here is whether the implementation follows the PI spec,
>>> and whether HOB creation should be supported to begin with.
>>>
>>
>> My reading of the PI spec is that this implementation does not follow
>> it. However, the PI spec is not very explicit about Standalone MM in
>> general, but particularly in relation to HOBs.
>>
>> However, in the generic HOB section of PI spec v1.7, Vol. 3, section 4
>> (entitled HOB Design Discussion) it explicitly lays out that there are
>> HOB producer phases and HOB consumer phases. It uses PEI as a HOB
>> producer phase and DXE as a HOB consumer phase and explicitly says
>> that the HOB consumer phase must treat HOBs as read-only memory, per
>> Ray's comment.
>>
>> In vol. 4, section 2.2, in discussing the Standalone MM entry point,
>> the document talks about the HOB list being passed to Standalone MM
>> to consume, which per the reading of the above section would classify
>> Standalone MM as a HOB consumer phase, where HOBs should then be
>> read-only.
>>
>> So, I believe that we should not support HOB creation in Standalone MM
>> and instead rely on other mechanisms to pass information within the
>> phase. Per Nhi's other email in this thread, we should have the
>> discussion on how to solve that specific problem and that may well
>> lead to a discussion on whether HOBs are in fact the right mechanism
>> here, but I tend to lean towards leaving something as architectural as
>> HOBs to what the PI spec defines and using different mechanisms to
>> accomplish in-phase communication.
> Thanks Oliver so much for that. I agree. We should focus on my specific
> problem with UEFI Variable Flash Info in StandaloneMM in another thread.
>>
>> Does this reading of the spec align with others' expectations? As I
>> mentioned to Ray in another thread, Standalone MM feels like it could
>> have extra clarification in a few areas in the PI spec.
> 
> Thanks again. The HOB library should be updated to remove the HOB
> creation once we have the clarification.

I found that we can hook a platform NULL library class to the
StandaloneMmCore to create UEFI Variable Flash Info HOB. This way is
compliant to the spec as the HOB is created in MM_CORE_STANDALONE phase.

Should I write a patch to remove the HOB creation in StandaloneMmHobLib?

Regards,
Nhi



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




Re: [edk2-devel] [edk2-platform] [PATCH] Platform/ARM: Fix build failure for FVP and Juno.

2023-11-30 Thread Sami Mujawar
Hi Levi,

Apparently, you have not posted the patch to the edk2 mailing list.
Can you post a v2 series with the line ending issue fixed to the mailing list, 
please?

Regards,

Sami Mujawar

On 30/11/2023, 10:30, "Sami Mujawar" mailto:sami.muja...@arm.com>> wrote:


Hi Thomas,


Before I go ahead and merge this patch, can you confirm that the Sgi/RD, N1sdp 
and Morello platforms builds work with this patch, please?


Regards,


Sami Mujawar


On 30/11/2023, 10:24, "Sami Mujawar" mailto:sami.muja...@arm.com> >> wrote:




Hi Levi,




Thank you for this patch.




There appears to be a line ending issue with your patch which I will fix 
locally before merging.




However, can you check your git/editor configuration and also try 
running patchcheck.py in the future, please?




Reviewed-by: Sami Mujawar mailto:sami.muja...@arm.com> 
>>




Regards,




Sami Mujawar




On 29/11/2023 11:44 am, levi.yun wrote:
> The edk2 commit 7284c44951cffd52f1a08367d91b5c63c7bb9c16
> introduces a new library ImagePropertiesRecordLib to
> consolidate the logic for manipulating the image properties
> used to track runtime images and to remove duplicate code.
> This library is further linked with DxeCore.
>
> Therefore, add an instance of ImagePropertiesRecordLib to
> the ArmVExpress.dsc.inc file so that it is included for Arm
> platforms.
>
> Signed-off-by: Levi Yun mailto:yeoreum@arm.com> 
> >>
> ---
> Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc 
> b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> index 
> 5e6886b30c8e507939a73b97366e2247a1430cef..9c9e1f79c8869639c01a0f257633dd8a8a686c3b
>  100644
> --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> @@ -164,6 +164,7 @@ [LibraryClasses.common]
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
>
> 
>
> ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
>
> + 
> ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
>
> 
>
> [LibraryClasses.common.SEC]
>
> DebugAgentLib|ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.inf
>
> --
> Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")











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




[edk2-devel] [PATCH 1/1] MdePkg/IndustryStandard: Add _PSD/_CPC/Coord types definitions

2023-11-30 Thread PierreGondois
Add definitions for:
- _PSD version: added in ACPI 3.0
- C-state Coordination Types: added in ACPI 3.0
- _CPC version: added in ACPI 5.0

Signed-off-by: Pierre Gondois 
---
 MdePkg/Include/IndustryStandard/Acpi30.h | 14 ++
 MdePkg/Include/IndustryStandard/Acpi40.h |  5 +
 MdePkg/Include/IndustryStandard/Acpi50.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi51.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi60.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi61.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi62.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi63.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi64.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi65.h | 10 ++
 10 files changed, 99 insertions(+)

diff --git a/MdePkg/Include/IndustryStandard/Acpi30.h 
b/MdePkg/Include/IndustryStandard/Acpi30.h
index 29f0d5535593..cb50b1d8f71a 100644
--- a/MdePkg/Include/IndustryStandard/Acpi30.h
+++ b/MdePkg/Include/IndustryStandard/Acpi30.h
@@ -17,6 +17,20 @@
 
 #define ACPI_EXTENDED_ADDRESS_SPACE_DESCRIPTOR  0x8B
 
+///
+/// C-state Coordination Types
+/// See s8.4.2.2 _CSD (C-State Dependency)
+///
+#define ACPI_AML_COORD_TYPE_SW_ALL  0xFC
+#define ACPI_AML_COORD_TYPE_SW_ANY  0xFD
+#define ACPI_AML_COORD_TYPE_HW_ALL  0xFE
+
+///
+/// _PSD Revision for ACPI 3.0
+// See s8.4.4.5 _PSD (P-State Dependency)
+///
+#define EFI_ACPI_3_0_AML_PSD_REVISION  0
+
 //
 // Ensure proper structure formats
 //
diff --git a/MdePkg/Include/IndustryStandard/Acpi40.h 
b/MdePkg/Include/IndustryStandard/Acpi40.h
index a2da09346f1c..0e30f4f8417d 100644
--- a/MdePkg/Include/IndustryStandard/Acpi40.h
+++ b/MdePkg/Include/IndustryStandard/Acpi40.h
@@ -10,6 +10,11 @@
 
 #include 
 
+///
+/// _PSD Revision for ACPI 4.0
+///
+#define EFI_ACPI_4_0_AML_PSD_REVISION  0
+
 //
 // Ensure proper structure formats
 //
diff --git a/MdePkg/Include/IndustryStandard/Acpi50.h 
b/MdePkg/Include/IndustryStandard/Acpi50.h
index 76706aa640f8..a00b8259b8f7 100644
--- a/MdePkg/Include/IndustryStandard/Acpi50.h
+++ b/MdePkg/Include/IndustryStandard/Acpi50.h
@@ -23,6 +23,16 @@
 #define ACPI_GPIO_CONNECTION_DESCRIPTOR0x8C
 #define ACPI_GENERIC_SERIAL_BUS_CONNECTION_DESCRIPTOR  0x8E
 
+///
+/// _PSD Revision for ACPI 5.0
+///
+#define EFI_ACPI_5_0_AML_PSD_REVISION  0
+
+///
+/// _CPC Revision for ACPI 5.0
+///
+#define EFI_ACPI_5_0_AML_CPC_REVISION  1
+
 #pragma pack(1)
 
 ///
diff --git a/MdePkg/Include/IndustryStandard/Acpi51.h 
b/MdePkg/Include/IndustryStandard/Acpi51.h
index 01ef544c3a29..19dd7b4f864c 100644
--- a/MdePkg/Include/IndustryStandard/Acpi51.h
+++ b/MdePkg/Include/IndustryStandard/Acpi51.h
@@ -13,6 +13,16 @@
 
 #include 
 
+///
+/// _PSD Revision for ACPI 5.1
+///
+#define EFI_ACPI_5_1_AML_PSD_REVISION  0
+
+///
+/// _CPC Revision for ACPI 5.1
+///
+#define EFI_ACPI_5_1_AML_CPC_REVISION  1
+
 //
 // Ensure proper structure formats
 //
diff --git a/MdePkg/Include/IndustryStandard/Acpi60.h 
b/MdePkg/Include/IndustryStandard/Acpi60.h
index 5ac3be6ad71c..3757d3f82792 100644
--- a/MdePkg/Include/IndustryStandard/Acpi60.h
+++ b/MdePkg/Include/IndustryStandard/Acpi60.h
@@ -12,6 +12,16 @@
 
 #include 
 
+///
+/// _PSD Revision for ACPI 6.0
+///
+#define EFI_ACPI_6_0_AML_PSD_REVISION  0
+
+///
+/// _CPC Revision for ACPI 6.0
+///
+#define EFI_ACPI_6_0_AML_CPC_REVISION  2
+
 //
 // Ensure proper structure formats
 //
diff --git a/MdePkg/Include/IndustryStandard/Acpi61.h 
b/MdePkg/Include/IndustryStandard/Acpi61.h
index 7af67d832bb2..c3facc6e376e 100644
--- a/MdePkg/Include/IndustryStandard/Acpi61.h
+++ b/MdePkg/Include/IndustryStandard/Acpi61.h
@@ -12,6 +12,16 @@
 
 #include 
 
+///
+/// _PSD Revision for ACPI 6.1
+///
+#define EFI_ACPI_6_1_AML_PSD_REVISION  0
+
+///
+/// _CPC Revision for ACPI 6.1
+///
+#define EFI_ACPI_6_1_AML_CPC_REVISION  2
+
 //
 // Ensure proper structure formats
 //
diff --git a/MdePkg/Include/IndustryStandard/Acpi62.h 
b/MdePkg/Include/IndustryStandard/Acpi62.h
index e27775a85ade..4dd3e21c2325 100644
--- a/MdePkg/Include/IndustryStandard/Acpi62.h
+++ b/MdePkg/Include/IndustryStandard/Acpi62.h
@@ -29,6 +29,16 @@
 #define ACPI_PIN_GROUP_FUNCTION_DESCRIPTOR   0x91
 #define ACPI_PIN_GROUP_CONFIGURATION_DESCRIPTOR  0x92
 
+///
+/// _PSD Revision for ACPI 6.2
+///
+#define EFI_ACPI_6_2_AML_PSD_REVISION  0
+
+///
+/// _CPC Revision for ACPI 6.2
+///
+#define EFI_ACPI_6_2_AML_CPC_REVISION  3
+
 #pragma pack(1)
 
 ///
diff --git a/MdePkg/Include/IndustryStandard/Acpi63.h 
b/MdePkg/Include/IndustryStandard/Acpi63.h
index 10bdf5fe5a57..7582dccf649b 100644
--- a/MdePkg/Include/IndustryStandard/Acpi63.h
+++ b/MdePkg/Include/IndustryStandard/Acpi63.h
@@ -12,6 +12,16 @@
 
 #include 
 
+///
+/// _PSD Revision for ACPI 6.3
+///
+#define EFI_ACPI_6_3_AML_PSD_REVISION  0
+
+///
+/// _CPC Revision for ACPI 6.3
+///
+#define EFI_ACPI_6_3_AML_CPC_REVISION  3
+
 //
 // Ensure proper structure formats
 //
diff --git a/MdePkg/Include/IndustryStandard/Acpi64.h 
b/Mde

[edk2-devel] [PATCH 0/1] MdePkg/IndustryStandard: Add _PSD/_CPC/Coord types definitions

2023-11-30 Thread PierreGondois
The patch-set at [1] aims to generate _CPC/_PSD information
by querying the SCP through the SCMI protocol. Some _CPC/_PSD
information is missing in the IndustryStandard folder.

Extract the patch [2] from the patch-serie to avoid potentially
re-submitting the whole patch-set and in case a new versions of
this patch is required.

[1] https://edk2.groups.io/g/devel/message/111567
[2] https://edk2.groups.io/g/devel/message/111570

Pierre Gondois (1):
  MdePkg/IndustryStandard: Add _PSD/_CPC/Coord types definitions

 MdePkg/Include/IndustryStandard/Acpi30.h | 14 ++
 MdePkg/Include/IndustryStandard/Acpi40.h |  5 +
 MdePkg/Include/IndustryStandard/Acpi50.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi51.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi60.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi61.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi62.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi63.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi64.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi65.h | 10 ++
 10 files changed, 99 insertions(+)

-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111900): https://edk2.groups.io/g/devel/message/111900
Mute This Topic: https://groups.io/mt/102891568/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/3] DynamicTablesPkg: Updated word I/O

2023-11-30 Thread PierreGondois

Hello Abdul,
Thanks for the patches,
Reviewed-by: Pierre Gondois 

Regards,
Pierre

On 11/29/23 17:05, Abdul Lateef Attar wrote:

From: Abdul Lateef Attar 

Code changes to
Add API to generate word I/O ranges.
Correct the parameter to generate word bus number.
Corrects the function pointer typedef

PR: https://github.com/tianocore/edk2/pull/5090

Cc: Pierre Gondois 
Cc: Sami Mujawar 

Abdul Lateef Attar (3):
   DynamicTablesPkg: AML Code generation for word I/O ranges
   DynamicTablesPkg: Corrects AmlCodeGenRdWordBusNumber parameters
   DynamicTablesPkg: Corrects function pointer typedef of
 AML_PARSE_FUNCTION

  .../Include/Library/AmlLib/AmlLib.h   | 75 +-
  .../AmlLib/CodeGen/AmlResourceDataCodeGen.c   | 98 ++-
  .../Library/Common/AmlLib/Parser/AmlParser.c  |  3 +-
  3 files changed, 164 insertions(+), 12 deletions(-)




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