Date   

Re: [PATCH edk2-platforms v2 0/3] JunoPkg: Fix AcpiSsdtRootPci.asl to use spaces and reserve ECAM area

Rebecca Cran
 

Could someone review these, and if they look good push them please?


Thanks.

Rebecca Cran

On 3/19/22 14:13, Rebecca Cran wrote:
I noticed Linux reports a firmware bug with the current Juno ACPI
tables. These patches fix it by reserving the ECAM area with a RES0
device, while also converting AcpiSsdtRootPci.asl from tabs to spaces
and using the standard Pcd from MdePkg for the ECAM base address.

Changes between v1 and v2:

- Removed the namespace prefix from the Pcd call in 2/3.
- Updated the commit message in 3/3 to link to discussion about the new
warning message.


Rebecca Cran (3):
Platform/ARM/JunoPkg: Convert AcpiSsdtRootPci.asl from tabs to spaces
Platform/ARM/JunoPkg: Use MdePkg PcdPciExpressBaseAddress for ECAM
addr
Platform/ARM/JunoPkg: Reserve the ECAM area in ACPI with RES0 device

Platform/ARM/JunoPkg/ArmJuno.dec | 4 +-
Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf | 4 +
Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf | 2 +-
Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf | 2 +-
Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJunoLib.inf | 2 +-
Platform/ARM/JunoPkg/Library/JunoPciHostBridgeLib/JunoPciHostBridgeLib.inf | 2 +-
Platform/ARM/JunoPkg/Library/JunoPciHostBridgeLib/XPressRich3.h | 2 +-
Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c | 2 +-
Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/AcpiTables.c | 2 +-
Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJunoMem.c | 4 +-
Platform/ARM/JunoPkg/AcpiTables/AcpiSsdtRootPci.asl | 301 ++++++++++----------
11 files changed, 172 insertions(+), 155 deletions(-)


Re: [edk2-platforms][PATCH v1 1/1] MinPlatformPkg: Add missing libraries to [Components] in DSC

Michael Kubacki
 

Thanks for the review.

Can you please merge this soon if there are no concerns?

On 3/23/2022 2:15 AM, Chiu, Chasel wrote:
Reviewed-by: Chasel Chiu <chasel.chiu@...>

-----Original Message-----
From: mikuback@... <mikuback@...>
Sent: Wednesday, March 23, 2022 9:28 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@...>; Desimone, Nathaniel L
<nathaniel.l.desimone@...>; Gao, Liming
<gaoliming@...>; Dong, Eric <eric.dong@...>
Subject: [edk2-platforms][PATCH v1 1/1] MinPlatformPkg: Add missing
libraries to [Components] in DSC

From: Michael Kubacki <michael.kubacki@...>

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

Adds libraries implemented in MinPlatformPkg to the [Components]
section in MinPlatformPkg.dsc so they are included in the package build.

Cc: Chasel Chiu <chasel.chiu@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Cc: Liming Gao <gaoliming@...>
Cc: Eric Dong <eric.dong@...>
Signed-off-by: Michael Kubacki <michael.kubacki@...>
---
Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
index 0f47182c2647..a8373a4ecb37 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
@@ -211,6 +211,13 @@ [Components]

MinPlatformPkg/Library/BaseVariableReadLibNull/BaseVariableReadLibNull.
inf

MinPlatformPkg/Library/SmmVariableReadLib/StandaloneMmVariableRead
Lib.inf

MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVariableWri
teLib.inf
+ MinPlatformPkg/Library/PeiVariableReadLib/PeiVariableReadLib.inf
+
+
MinPlatformPkg/Library/DxeRuntimeVariableReadLib/DxeRuntimeVariableR
ea
+ dLib.inf
+
MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRuntimeVariable
Wr
+ iteLib.inf
+
MinPlatformPkg/Library/SmmVariableReadLib/TraditionalMmVariableRead
Lib
+ .inf
+
MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVariableWrit
eL
+ ib.inf
+
MinPlatformPkg/Library/BaseLargeVariableLib/BaseLargeVariableReadLib.i
+ nf
+ MinPlatformPkg/Library/BaseLargeVariableLib/BaseLargeVariableWriteLib.
+ inf

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
2.28.0.windows.1


Re: [edk2-platforms][PATCH v1 1/1] MinPlatformPkg/TestPointCheckLib: Fix mis-parsed HSTI structures

Michael Kubacki
 

Thanks for the review.

Can you please merge this soon if there are no concerns?

On 3/23/2022 2:14 AM, Chiu, Chasel wrote:
Reviewed-by: Chasel Chiu <chasel.chiu@...>

-----Original Message-----
From: mikuback@... <mikuback@...>
Sent: Wednesday, March 23, 2022 9:11 AM
To: devel@edk2.groups.io
Cc: Bret Barkelew <bret@...>; Chiu, Chasel
<chasel.chiu@...>; Desimone, Nathaniel L
<nathaniel.l.desimone@...>; Gao, Liming
<gaoliming@...>; Dong, Eric <eric.dong@...>
Subject: [edk2-platforms][PATCH v1 1/1]
MinPlatformPkg/TestPointCheckLib: Fix mis-parsed HSTI structures

From: Michael Kubacki <michael.kubacki@...>

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

Printing corruption can occur if the DumpHsti helper function encounters a
structure from the IHV (i.e. one that contains the 'Required' field).

Co-authored-by: Bret Barkelew <bret@...>
Cc: Chasel Chiu <chasel.chiu@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Cc: Liming Gao <gaoliming@...>
Cc: Eric Dong <eric.dong@...>
Signed-off-by: Michael Kubacki <michael.kubacki@...>
---

Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckH
sti.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git
a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeChec
kHsti.c
b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeChec
kHsti.c
index 7756369ae17b..f2f3fa83a57c 100644
---
a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeChec
kHsti.c
+++
b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCh
+++ eckHsti.c
@@ -40,6 +40,16 @@ DumpHsti (
DEBUG ((DEBUG_INFO, " SecurityFeaturesSize - 0x%08x\n", Hsti-
SecurityFeaturesSize));
SecurityFeatures = (UINT8 *) (Hsti + 1);
+
+ if (Hsti->Role == PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE) {
+ DEBUG ((DEBUG_INFO, " SecurityFeaturesRequired - "));
+ for (Index = 0; Index < Hsti->SecurityFeaturesSize; Index++) {
+ DEBUG ((DEBUG_INFO, "%02x ", SecurityFeatures[Index]));
+ }
+ DEBUG ((DEBUG_INFO, "\n"));
+ SecurityFeatures = (UINT8 *) (SecurityFeatures +
+ Hsti->SecurityFeaturesSize); }
+
DEBUG ((DEBUG_INFO, " SecurityFeaturesImplemented - "));
for (Index = 0; Index < Hsti->SecurityFeaturesSize; Index++) {
DEBUG ((DEBUG_INFO, "%02x ", SecurityFeatures[Index])); @@ -81,7
+91,7 @@ TestPointCheckHsti (
EFI_STATUS Status;
UINTN Index;
BOOLEAN Result;
-
+
Result = TRUE;
DEBUG ((DEBUG_INFO, "==== TestPointCheckHsti - Enter\n"));
for (Index = 0; Index < sizeof(mRole)/sizeof(mRole[0]); Index++) {
--
2.28.0.windows.1


Re: [PATCH v1 00/41] Add PrmPkg

Michael Kubacki
 

Since this is a new package, I am waiting for a steward to approve.

Please let me know if you have any questions.

Thanks,
Michael

On 3/22/2022 12:19 PM, Michael Kubacki wrote:
From: Michael Kubacki <michael.kubacki@...>
This patch series adds a new package called PrmPkg. An RFC was sent
to the edk2 mailing list on January 28, 2022 detailing the proposal,
see https://edk2.groups.io/g/devel/message/86181.
Platform Runtime Mechanism (PRM) is a new firmware solution that has
been developed in edk2-staging/PlatformRuntimeMechanism.
This patch series has been organized to greatly condense the history
from the edk2-staging branch but to preserve important decisions and
changes in history that help establish context of changes and will
serve as valuable references for future development.
Interest in PRM has increased across various vendors and we believe
it is beneficial to make the source code more widely available for
the following reasons:
1. PRM specification adoption
2. Feature completeness
3. Overall validation coverage
4. Interest from the community and future collaboration
The technical details of PRM are covered in the PRM Specification
in addition to the Readme.md file located in the root of PrmPkg
in this patch series.
1. PRM specification adoption
Intel and Microsoft have worked together to standardize PRM in the
ACPI Specification and the PRM Specification hosted on uefi.org.
* ACPI 6.4 Specification:
https://uefi.org/node/4149
* PRM Specification:
https://uefi.org/sites/default/files/resources/Platform%20Runtime%20Mechanism%20-%20with%20legal%20notice.pdf
2. Feature completeness
PrmPkg implements the full firmware functionality described in the
PRM Specification and there are no significant changes to
functionality planned at this time.
Though we are very much interested in evolving PRM based on
feedback.
3. Overall validation coverage
PrmPkg has been integrated and tested on client and server systems
in addition to virtual platforms (OvmfPkg/QEMU).
Platform integration is simple and a demonstration of this
integration for OvmfPkg is available in the following branch:
https://github.com/makubacki/edk2/tree/ovmf_prmpkg_integration
The code has been built with:
* MSFT VS2015, VS2017, and VS2019
* GCC5 (see https://bugzilla.tianocore.org/show_bug.cgi?id=3802)
* iASL compiler (20200528 - https://acpica.org/node/181)
The Linux kernel currently includes the following PRM support:
* _OSC PRM bit - allows FW to know determine the OS is
PRM-capable and can redirect _DSM method from alternate
triggers (such as SMI) to PRM.
* PRM invocation via _DSM, includes PRM module and handler parsing
from ACPI PRMT table, and also the PRM operation region handler
for runtime PRM service invocation.
* An OS configuration for PRM enabling, PRM support can be
disabled during OS image build.
Note that upstream Linux does not currently support the following:
* Ability for the OS driver to call a PRM handler directly,
it has to be via ACPI _DSM.
* Run time update PRM module and handler via PE/COFF PRM image.
This commit provides additional context of the changes in Linux:
https://github.com/torvalds/linux/commit/cefc7ca46235f01d5233e3abd4b79452af01d9e9
Windows 11 (https://www.microsoft.com/software-download/windows11)
and Windows Server 2022 (https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk)
include the PRM functionality noted above in addition to PRM direct
call and PRM runtime updates.
PRM has been tested on IA32, X64, and AARCH64 targets.
4. Interest from the community and future collaboration
PRM has been presented at several industry conferences:
* OSFC 2020 - "PRM: SMM Goes on a Diet"
https://cfp.osfc.io/osfc2020/talk/MCJASB/
* OCP Summit 2019 - "Case Study Alternatives for SMM Usage in
Intel Platforms"
https://www.youtube.com/watch?v=mu3DRLM1dPA
In addition, Microsoft plans to publish the Windows PRM driver
interface and a WDF sample driver that uses the interface to the
Windows Driver Samples GitHub repository
(https://github.com/microsoft/Windows-driver-samples).
We believe a PrmPkg in edk2 can increase accessibility to PRM and
ease collaboration.
PrmPkg
------
PrmPkg contains the common functionality needed to enable PRM on
any system. It does not contain platform-specific code such as PRM
modules (and by extension PRM handlers). Other than sample modules,
PrmPkg will only contain code needed to provide PRM feature
functionality as defined in the PRM Specification.
PrmPkg is scoped to continue to only contain platform-agnostic
functionality in the future.
The proposed maintainers of PrmPkg are:
* Michael Kubacki <mikuback@...>
* Nate DeSimone <nathaniel.l.desimone@...>
The proposed reviewers of PrmPkg are:
* Ankit Sinha <ankit.sinha@...>
Cc: Andrew Fish <afish@...>
Cc: Kang Gao <kang.gao@...>
Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Michael Kubacki <michael.kubacki@...>
Cc: Leif Lindholm <leif@...>
Cc: Benjamin You <benjamin.you@...>
Cc: Liu Yun <yun.y.liu@...>
Cc: Ankit Sinha <ankit.sinha@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Signed-off-by: Michael Kubacki <michael.kubacki@...>
Liu (2):
PrmPkg: Publish PRM operation region to support PRM ACPI _DSM
invocation
PrmPkg: Export major/minor version in PRM module PE COFF header
Liu Yun Y (1):
PrmPkg: Update PRM OpRegion
Michael Kubacki (38):
PrmPkg: Add package and include headers
PrmPkg: Add PrmConfig protocol interface
PrmPkg/PrmContextBufferLib: Add initial library instance
PrmPkg/PrmConfigDxe: Add initial driver
PrmPkg: Add initial PrmSamplePrintModule
PrmPkg: Add initial PrmSampleMemoryAllocationModule
PrmPkg: Add initial PrmSampleHardwareAccessModule
PrmPkg: Add initial PrmSampleContextBufferModule
PrmPkg: Add initial package DSC file
Readme.md: Add initial content
PrmPkg: Add ALLOCATE_CONTEXT_BUFFER_IN_FW build option
PrmPkg: Enable variable growth for the PRM_MODULE_EXPORT macro
PrmPkg: Add initial PrmSsdtInstallDxe module
PrmPkg: Remove PRM Module Update Lock
PrmPkg: Remove ALLOCATE_CONTEXT_BUFFER_IN_FW build flag
PrmPkg/PrmContextBuffer.h: Add ACPI parameter support structures
PrmPkg/PrmLoaderDxe: Add ACPI parameter buffer support
PrmPkg/PrmSampleContextBufferModule: Remove OS debug print requirement
PrmPkg/PrmSampleHardwareAccessModule: Add non-print PRM handlers
PrmPkg/SampleAcpiParameterBufferModule: Add initial module
PrmPkg/HardwareAccessModuleConfigLib: Add initial library
PrmPkg/Samples/Readme.md: Add initial file
PrmPkg: Refactor some PrmLoaderDxe functionality into libraries
PrmPkg/Application/PrmInfo: Add initial application
PrmPkg: Enforce stricter types
PrmPkg/Test/PrmPkgHostTest.dsc: Add initial file
PrmPkg/Test/UnitTest/Library: Add initial UEFI Boot Services test lib
PrmPkg/Library/DxePrmContextBufferLib: Add host-based unit tests
PrmPkg/DxePrmModuleDiscoveryLib: Add initial host-based unit tests
PrmPkg: Add PlatformGuid
Readme.md: Add iASL note and QEMU sample link
PrmPkg: Replace PcdPrmPlatformGuid with EDKII_DSC_PLATFORM_GUID
PrmPkg/Samples: Remove PrmSampleMemoryAllocationModule
PrmPkg/Samples: Remove PrmSamplePrintModule
PrmPkg: Remove the concept of OS services
Readme.md: Add a link to PRM Specification
PrmPkg: Changes for edk2 repo transition
PrmPkg: Apply uncrustify changes
PrmPkg/Application/PrmInfo/PrmInfo.c | 732 +++++++++
PrmPkg/Library/DxePrmContextBufferLib/DxePrmContextBufferLib.c | 199 +++
PrmPkg/Library/DxePrmContextBufferLib/UnitTest/DxePrmContextBufferLibUnitTest.c | 649 ++++++++
PrmPkg/Library/DxePrmModuleDiscoveryLib/DxePrmModuleDiscoveryLib.c | 386 +++++
PrmPkg/Library/DxePrmModuleDiscoveryLib/UnitTest/DxePrmModuleDiscoveryLibUnitTest.c | 210 +++
PrmPkg/Library/DxePrmPeCoffLib/DxePrmPeCoffLib.c | 417 +++++
PrmPkg/PrmConfigDxe/PrmConfigDxe.c | 512 ++++++
PrmPkg/PrmLoaderDxe/PrmLoaderDxe.c | 377 +++++
PrmPkg/PrmSsdtInstallDxe/PrmSsdtInstallDxe.c | 110 ++
PrmPkg/Samples/PrmSampleAcpiParameterBufferModule/Library/DxeAcpiParameterBufferModuleConfigLib/DxeAcpiParameterBufferModuleConfigLib.c | 127 ++
PrmPkg/Samples/PrmSampleAcpiParameterBufferModule/PrmSampleAcpiParameterBufferModule.c | 78 +
PrmPkg/Samples/PrmSampleContextBufferModule/Library/DxeContextBufferModuleConfigLib/DxeContextBufferModuleConfigLib.c | 218 +++
PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.c | 84 +
PrmPkg/Samples/PrmSampleHardwareAccessModule/Library/DxeHardwareAccessModuleConfigLib/DxeHardwareAccessModuleConfigLib.c | 108 ++
PrmPkg/Samples/PrmSampleHardwareAccessModule/PrmSampleHardwareAccessModule.c | 335 ++++
PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTest.c | 119 ++
PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestEventTimer.c | 180 +++
PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestImage.c | 163 ++
PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestMemory.c | 145 ++
PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestMisc.c | 198 +++
PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestProtocol.c | 1650 ++++++++++++++++++++
PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestTpl.c | 43 +
.azurepipelines/templates/pr-gate-build-job.yml | 2 +-
.pytool/CISettings.py | 1 +
Maintainers.txt | 8 +
PrmPkg/Application/PrmInfo/PrmInfo.h | 49 +
PrmPkg/Application/PrmInfo/PrmInfo.inf | 66 +
PrmPkg/Application/PrmInfo/PrmInfo.uni | 11 +
PrmPkg/Application/PrmInfo/PrmInfoExtra.uni | 12 +
PrmPkg/Application/PrmInfo/PrmInfoStrings.uni | 132 ++
PrmPkg/Include/Library/PrmContextBufferLib.h | 99 ++
PrmPkg/Include/Library/PrmModuleDiscoveryLib.h | 60 +
PrmPkg/Include/Library/PrmPeCoffLib.h | 111 ++
PrmPkg/Include/Prm.h | 46 +
PrmPkg/Include/PrmContextBuffer.h | 171 ++
PrmPkg/Include/PrmDataBuffer.h | 50 +
PrmPkg/Include/PrmExportDescriptor.h | 109 ++
PrmPkg/Include/PrmMmio.h | 45 +
PrmPkg/Include/PrmModule.h | 47 +
PrmPkg/Include/PrmModuleImageContext.h | 28 +
PrmPkg/Include/Protocol/PrmConfig.h | 31 +
PrmPkg/Library/DxePrmContextBufferLib/DxePrmContextBufferLib.inf | 35 +
PrmPkg/Library/DxePrmContextBufferLib/UnitTest/DxePrmContextBufferLibUnitTestHost.inf | 46 +
PrmPkg/Library/DxePrmModuleDiscoveryLib/DxePrmModuleDiscoveryLib.inf | 41 +
PrmPkg/Library/DxePrmModuleDiscoveryLib/PrmModuleDiscovery.h | 39 +
PrmPkg/Library/DxePrmModuleDiscoveryLib/UnitTest/DxePrmModuleDiscoveryLibUnitTestHost.inf | 39 +
PrmPkg/Library/DxePrmPeCoffLib/DxePrmPeCoffLib.inf | 32 +
PrmPkg/PrmConfigDxe/PrmConfigDxe.inf | 48 +
PrmPkg/PrmLoaderDxe/PrmAcpiTable.h | 96 ++
PrmPkg/PrmLoaderDxe/PrmLoaderDxe.inf | 61 +
PrmPkg/PrmPkg.ci.yaml | 110 ++
PrmPkg/PrmPkg.dec | 67 +
PrmPkg/PrmPkg.dsc | 142 ++
PrmPkg/PrmPkg.uni | 10 +
PrmPkg/PrmSsdtInstallDxe/Prm.asl | 115 ++
PrmPkg/PrmSsdtInstallDxe/PrmSsdtInstallDxe.inf | 52 +
PrmPkg/Readme.md | 264 ++++
PrmPkg/Samples/PrmSampleAcpiParameterBufferModule/Library/DxeAcpiParameterBufferModuleConfigLib/DxeAcpiParameterBufferModuleConfigLib.inf | 39 +
PrmPkg/Samples/PrmSampleAcpiParameterBufferModule/PrmSampleAcpiParameterBufferModule.inf | 41 +
PrmPkg/Samples/PrmSampleContextBufferModule/Include/StaticData.h | 24 +
PrmPkg/Samples/PrmSampleContextBufferModule/Library/DxeContextBufferModuleConfigLib/DxeContextBufferModuleConfigLib.inf | 39 +
PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf | 44 +
PrmPkg/Samples/PrmSampleHardwareAccessModule/Hpet.h | 108 ++
PrmPkg/Samples/PrmSampleHardwareAccessModule/Library/DxeHardwareAccessModuleConfigLib/DxeHardwareAccessModuleConfigLib.inf | 39 +
PrmPkg/Samples/PrmSampleHardwareAccessModule/PrmSampleHardwareAccessModule.inf | 43 +
PrmPkg/Samples/Readme.md | 146 ++
PrmPkg/Test/PrmPkgHostTest.dsc | 39 +
PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibTest.uni | 12 +
PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTest.h | 1042 ++++++++++++
PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTest.inf | 46 +
PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestProtocol.h | 120 ++
71 files changed, 11096 insertions(+), 1 deletion(-)
create mode 100644 PrmPkg/Application/PrmInfo/PrmInfo.c
create mode 100644 PrmPkg/Library/DxePrmContextBufferLib/DxePrmContextBufferLib.c
create mode 100644 PrmPkg/Library/DxePrmContextBufferLib/UnitTest/DxePrmContextBufferLibUnitTest.c
create mode 100644 PrmPkg/Library/DxePrmModuleDiscoveryLib/DxePrmModuleDiscoveryLib.c
create mode 100644 PrmPkg/Library/DxePrmModuleDiscoveryLib/UnitTest/DxePrmModuleDiscoveryLibUnitTest.c
create mode 100644 PrmPkg/Library/DxePrmPeCoffLib/DxePrmPeCoffLib.c
create mode 100644 PrmPkg/PrmConfigDxe/PrmConfigDxe.c
create mode 100644 PrmPkg/PrmLoaderDxe/PrmLoaderDxe.c
create mode 100644 PrmPkg/PrmSsdtInstallDxe/PrmSsdtInstallDxe.c
create mode 100644 PrmPkg/Samples/PrmSampleAcpiParameterBufferModule/Library/DxeAcpiParameterBufferModuleConfigLib/DxeAcpiParameterBufferModuleConfigLib.c
create mode 100644 PrmPkg/Samples/PrmSampleAcpiParameterBufferModule/PrmSampleAcpiParameterBufferModule.c
create mode 100644 PrmPkg/Samples/PrmSampleContextBufferModule/Library/DxeContextBufferModuleConfigLib/DxeContextBufferModuleConfigLib.c
create mode 100644 PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.c
create mode 100644 PrmPkg/Samples/PrmSampleHardwareAccessModule/Library/DxeHardwareAccessModuleConfigLib/DxeHardwareAccessModuleConfigLib.c
create mode 100644 PrmPkg/Samples/PrmSampleHardwareAccessModule/PrmSampleHardwareAccessModule.c
create mode 100644 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTest.c
create mode 100644 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestEventTimer.c
create mode 100644 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestImage.c
create mode 100644 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestMemory.c
create mode 100644 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestMisc.c
create mode 100644 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestProtocol.c
create mode 100644 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestTpl.c
create mode 100644 PrmPkg/Application/PrmInfo/PrmInfo.h
create mode 100644 PrmPkg/Application/PrmInfo/PrmInfo.inf
create mode 100644 PrmPkg/Application/PrmInfo/PrmInfo.uni
create mode 100644 PrmPkg/Application/PrmInfo/PrmInfoExtra.uni
create mode 100644 PrmPkg/Application/PrmInfo/PrmInfoStrings.uni
create mode 100644 PrmPkg/Include/Library/PrmContextBufferLib.h
create mode 100644 PrmPkg/Include/Library/PrmModuleDiscoveryLib.h
create mode 100644 PrmPkg/Include/Library/PrmPeCoffLib.h
create mode 100644 PrmPkg/Include/Prm.h
create mode 100644 PrmPkg/Include/PrmContextBuffer.h
create mode 100644 PrmPkg/Include/PrmDataBuffer.h
create mode 100644 PrmPkg/Include/PrmExportDescriptor.h
create mode 100644 PrmPkg/Include/PrmMmio.h
create mode 100644 PrmPkg/Include/PrmModule.h
create mode 100644 PrmPkg/Include/PrmModuleImageContext.h
create mode 100644 PrmPkg/Include/Protocol/PrmConfig.h
create mode 100644 PrmPkg/Library/DxePrmContextBufferLib/DxePrmContextBufferLib.inf
create mode 100644 PrmPkg/Library/DxePrmContextBufferLib/UnitTest/DxePrmContextBufferLibUnitTestHost.inf
create mode 100644 PrmPkg/Library/DxePrmModuleDiscoveryLib/DxePrmModuleDiscoveryLib.inf
create mode 100644 PrmPkg/Library/DxePrmModuleDiscoveryLib/PrmModuleDiscovery.h
create mode 100644 PrmPkg/Library/DxePrmModuleDiscoveryLib/UnitTest/DxePrmModuleDiscoveryLibUnitTestHost.inf
create mode 100644 PrmPkg/Library/DxePrmPeCoffLib/DxePrmPeCoffLib.inf
create mode 100644 PrmPkg/PrmConfigDxe/PrmConfigDxe.inf
create mode 100644 PrmPkg/PrmLoaderDxe/PrmAcpiTable.h
create mode 100644 PrmPkg/PrmLoaderDxe/PrmLoaderDxe.inf
create mode 100644 PrmPkg/PrmPkg.ci.yaml
create mode 100644 PrmPkg/PrmPkg.dec
create mode 100644 PrmPkg/PrmPkg.dsc
create mode 100644 PrmPkg/PrmPkg.uni
create mode 100644 PrmPkg/PrmSsdtInstallDxe/Prm.asl
create mode 100644 PrmPkg/PrmSsdtInstallDxe/PrmSsdtInstallDxe.inf
create mode 100644 PrmPkg/Readme.md
create mode 100644 PrmPkg/Samples/PrmSampleAcpiParameterBufferModule/Library/DxeAcpiParameterBufferModuleConfigLib/DxeAcpiParameterBufferModuleConfigLib.inf
create mode 100644 PrmPkg/Samples/PrmSampleAcpiParameterBufferModule/PrmSampleAcpiParameterBufferModule.inf
create mode 100644 PrmPkg/Samples/PrmSampleContextBufferModule/Include/StaticData.h
create mode 100644 PrmPkg/Samples/PrmSampleContextBufferModule/Library/DxeContextBufferModuleConfigLib/DxeContextBufferModuleConfigLib.inf
create mode 100644 PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf
create mode 100644 PrmPkg/Samples/PrmSampleHardwareAccessModule/Hpet.h
create mode 100644 PrmPkg/Samples/PrmSampleHardwareAccessModule/Library/DxeHardwareAccessModuleConfigLib/DxeHardwareAccessModuleConfigLib.inf
create mode 100644 PrmPkg/Samples/PrmSampleHardwareAccessModule/PrmSampleHardwareAccessModule.inf
create mode 100644 PrmPkg/Samples/Readme.md
create mode 100644 PrmPkg/Test/PrmPkgHostTest.dsc
create mode 100644 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibTest.uni
create mode 100644 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTest.h
create mode 100644 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTest.inf
create mode 100644 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestProtocol.h


[PATCH v1 6/6] UefiPayloadPkg: Add CpuLib to module INFs that depend on UefiCpuLib.

Yu Pu <yu.pu@...>
 

Step 1 to merge UefiCpuLib to CpuLib.

Cc: Guo Dong <guo.dong@...>
Cc: Ray Ni <ray.ni@...>
Cc: Maurice Ma <maurice.ma@...>
Cc: Benjamin You <benjamin.you@...>
Cc: Sean Rhodes <sean@...>
Signed-off-by: Yu Pu <yu.pu@...>
---
UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h | 1 +
UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf | 1 +
UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf | 1 +
3 files changed, 3 insertions(+)

diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h b/UefiPaylo=
adPkg/UefiPayloadEntry/UefiPayloadEntry.h
index 56e0a4c639a0..d1c7425b28f2 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
+++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
@@ -23,6 +23,7 @@
#include <Library/PeCoffLib.h>=0D
#include <Library/BlParseLib.h>=0D
#include <Library/PlatformSupportLib.h>=0D
+#include <Library/CpuLib.h>=0D
#include <Library/UefiCpuLib.h>=0D
#include <IndustryStandard/Acpi.h>=0D
#include <IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h>=0D
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf b/UefiPay=
loadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
index c4e4339ede4b..95446dd99729 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
+++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
@@ -54,6 +54,7 @@
HobLib=0D
PeCoffLib=0D
PlatformSupportLib=0D
+ CpuLib=0D
UefiCpuLib=0D
=0D
[Guids]=0D
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf b/Ue=
fiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
index 80af5afe0a3f..3b4836042a06 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
+++ b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
@@ -52,6 +52,7 @@
IoLib=0D
HobLib=0D
PeCoffLib=0D
+ CpuLib=0D
UefiCpuLib=0D
=0D
[Guids]=0D
--=20
2.30.0.windows.2


[PATCH v1 5/6] UefiCpuPkg: Add CpuLib to module INFs that depend on UefiCpuLib.

Yu Pu <yu.pu@...>
 

Step 1 to merge UefiCpuLib to CpuLib.

Cc: Eric Dong <eric.dong@...>
Cc: Ray Ni <ray.ni@...>
Cc: Rahul Kumar <rahul1.kumar@...>
Signed-off-by: Yu Pu <yu.pu@...>
---
UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 1 +
UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c | 1 +
UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf | 1 +
UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf | 1 +
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 1 +
UefiCpuPkg/SecCore/SecCore.inf | 1 +
UefiCpuPkg/SecCore/SecCoreNative.inf | 1 +
UefiCpuPkg/SecCore/SecMain.h | 1 +
8 files changed, 8 insertions(+)

diff --git a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c b/UefiCpuPkg/Li=
brary/BaseXApicLib/BaseXApicLib.c
index f9e06b2fca45..a944c3d01cf7 100644
--- a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
+++ b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
@@ -21,6 +21,7 @@
#include <Library/IoLib.h>=0D
#include <Library/TimerLib.h>=0D
#include <Library/PcdLib.h>=0D
+#include <Library/CpuLib.h>=0D
#include <Library/UefiCpuLib.h>=0D
=0D
//=0D
diff --git a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c b/U=
efiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
index aaa42ff8450b..8b3630d7a302 100644
--- a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
+++ b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
@@ -22,6 +22,7 @@
#include <Library/IoLib.h>=0D
#include <Library/TimerLib.h>=0D
#include <Library/PcdLib.h>=0D
+#include <Library/CpuLib.h>=0D
#include <Library/UefiCpuLib.h>=0D
=0D
//=0D
diff --git a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf b/UefiCpuPkg/=
Library/BaseXApicLib/BaseXApicLib.inf
index 561baa44b0e6..a85b69e0a11c 100644
--- a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
+++ b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
@@ -38,6 +38,7 @@
TimerLib=0D
IoLib=0D
PcdLib=0D
+ CpuLib=0D
UefiCpuLib=0D
=0D
[Pcd]=0D
diff --git a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf b=
/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
index 1e2a4f8b790f..31ebdd39c616 100644
--- a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
+++ b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
@@ -38,6 +38,7 @@
TimerLib=0D
IoLib=0D
PcdLib=0D
+ CpuLib=0D
UefiCpuLib=0D
=0D
[Pcd]=0D
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h b/UefiCpuPkg/PiSmmC=
puDxeSmm/PiSmmCpuDxeSmm.h
index aed872836c99..dfeceec2aadc 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
@@ -43,6 +43,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Library/UefiLib.h>=0D
#include <Library/HobLib.h>=0D
#include <Library/LocalApicLib.h>=0D
+#include <Library/CpuLib.h>=0D
#include <Library/UefiCpuLib.h>=0D
#include <Library/CpuExceptionHandlerLib.h>=0D
#include <Library/ReportStatusCodeLib.h>=0D
diff --git a/UefiCpuPkg/SecCore/SecCore.inf b/UefiCpuPkg/SecCore/SecCore.inf
index ded83beb5272..f021997f271c 100644
--- a/UefiCpuPkg/SecCore/SecCore.inf
+++ b/UefiCpuPkg/SecCore/SecCore.inf
@@ -47,6 +47,7 @@
PlatformSecLib=0D
PcdLib=0D
DebugAgentLib=0D
+ CpuLib=0D
UefiCpuLib=0D
PeCoffGetEntryPointLib=0D
PeCoffExtraActionLib=0D
diff --git a/UefiCpuPkg/SecCore/SecCoreNative.inf b/UefiCpuPkg/SecCore/SecC=
oreNative.inf
index b528c5987947..e0a1b44a7e23 100644
--- a/UefiCpuPkg/SecCore/SecCoreNative.inf
+++ b/UefiCpuPkg/SecCore/SecCoreNative.inf
@@ -44,6 +44,7 @@
PlatformSecLib=0D
PcdLib=0D
DebugAgentLib=0D
+ CpuLib=0D
UefiCpuLib=0D
PeCoffGetEntryPointLib=0D
PeCoffExtraActionLib=0D
diff --git a/UefiCpuPkg/SecCore/SecMain.h b/UefiCpuPkg/SecCore/SecMain.h
index 029bee3e7e40..189fcf932625 100644
--- a/UefiCpuPkg/SecCore/SecMain.h
+++ b/UefiCpuPkg/SecCore/SecMain.h
@@ -23,6 +23,7 @@
#include <Library/PcdLib.h>=0D
#include <Library/BaseMemoryLib.h>=0D
#include <Library/PlatformSecLib.h>=0D
+#include <Library/CpuLib.h>=0D
#include <Library/UefiCpuLib.h>=0D
#include <Library/PeCoffGetEntryPointLib.h>=0D
#include <Library/PeCoffExtraActionLib.h>=0D
--=20
2.30.0.windows.2


[PATCH v1 4/6] OvmfPkg: Add CpuLib to module INFs that depend on UefiCpuLib.

Yu Pu <yu.pu@...>
 

Step 1 to merge UefiCpuLib to CpuLib.

Cc: Ard Biesheuvel <ardb+tianocore@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jordan Justen <jordan.l.justen@...>
Cc: Gerd Hoffmann <kraxel@...>
Signed-off-by: Yu Pu <yu.pu@...>
---
OvmfPkg/Sec/SecMain.c | 1 +
OvmfPkg/Sec/SecMain.inf | 1 +
2 files changed, 2 insertions(+)

diff --git a/OvmfPkg/Sec/SecMain.c b/OvmfPkg/Sec/SecMain.c
index 2c5561661ef3..2c9e439800c7 100644
--- a/OvmfPkg/Sec/SecMain.c
+++ b/OvmfPkg/Sec/SecMain.c
@@ -17,6 +17,7 @@
#include <Library/BaseMemoryLib.h>=0D
#include <Library/PeiServicesLib.h>=0D
#include <Library/PcdLib.h>=0D
+#include <Library/CpuLib.h>=0D
#include <Library/UefiCpuLib.h>=0D
#include <Library/DebugAgentLib.h>=0D
#include <Library/IoLib.h>=0D
diff --git a/OvmfPkg/Sec/SecMain.inf b/OvmfPkg/Sec/SecMain.inf
index 95cf0025e100..6ad366a89333 100644
--- a/OvmfPkg/Sec/SecMain.inf
+++ b/OvmfPkg/Sec/SecMain.inf
@@ -44,6 +44,7 @@
BaseMemoryLib=0D
PeiServicesLib=0D
PcdLib=0D
+ CpuLib=0D
UefiCpuLib=0D
DebugAgentLib=0D
IoLib=0D
--=20
2.30.0.windows.2


[PATCH v1 3/6] MdePkg: Add CpuLib to module INFs that depend on UefiCpuLib.

Yu Pu <yu.pu@...>
 

Step 1 to merge UefiCpuLib to CpuLib.

Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Liming Gao <gaoliming@...>
Cc: Zhiguang Liu <zhiguang.liu@...>
Signed-off-by: Yu Pu <yu.pu@...>
---
MdePkg/MdeLibs.dsc.inc | 1 +
1 file changed, 1 insertion(+)

diff --git a/MdePkg/MdeLibs.dsc.inc b/MdePkg/MdeLibs.dsc.inc
index 3c70daf87a0c..322575090239 100644
--- a/MdePkg/MdeLibs.dsc.inc
+++ b/MdePkg/MdeLibs.dsc.inc
@@ -13,3 +13,4 @@
=0D
[LibraryClasses]=0D
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLib=
Null.inf=0D
+ CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf=0D
--=20
2.30.0.windows.2


[PATCH v1 2/6] IntelFsp2WrapperPkg: Add CpuLib to module INFs that depend on UefiCpuLib.

Yu Pu <yu.pu@...>
 

Step 1 to merge UefiCpuLib to CpuLib.

Cc: Chasel Chiu <chasel.chiu@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Cc: Star Zeng <star.zeng@...>
Signed-off-by: Yu Pu <yu.pu@...>
---
IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf | 1 +
IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf | 1 +
2 files changed, 2 insertions(+)

diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf b/Inte=
lFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
index 5d0e0214015f..e2262d693c55 100644
--- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
+++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
@@ -37,6 +37,7 @@
HobLib=0D
FspWrapperPlatformLib=0D
FspWrapperHobProcessLib=0D
+ CpuLib=0D
UefiCpuLib=0D
PeCoffGetEntryPointLib=0D
PeCoffExtraActionLib=0D
diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf b/Inte=
lFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
index da0049a65435..0598f85ab3ac 100644
--- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
+++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
@@ -38,6 +38,7 @@
MemoryAllocationLib=0D
FspWrapperPlatformLib=0D
FspWrapperHobProcessLib=0D
+ CpuLib=0D
UefiCpuLib=0D
PeCoffGetEntryPointLib=0D
PeCoffExtraActionLib=0D
--=20
2.30.0.windows.2


[PATCH v1 1/6] IntelFsp2Pkg: Add CpuLib to module INFs that depend on UefiCpuLib

Yu Pu <yu.pu@...>
 

Step 1 to merge UefiCpuLib to CpuLib.

Cc: Chasel Chiu <chasel.chiu@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Cc: Star Zeng <star.zeng@...>
Signed-off-by: Yu Pu <yu.pu@...>
---
IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf | 1 +
IntelFsp2Pkg/FspSecCore/SecMain.h | 1 +
2 files changed, 2 insertions(+)

diff --git a/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf b/IntelFsp2Pkg/FspSecC=
ore/FspSecCoreM.inf
index 7b05cae64130..830471adcf2f 100644
--- a/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
+++ b/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
@@ -51,6 +51,7 @@
FspSwitchStackLib=0D
FspCommonLib=0D
FspSecPlatformLib=0D
+ CpuLib=0D
UefiCpuLib=0D
=0D
[Pcd]=0D
diff --git a/IntelFsp2Pkg/FspSecCore/SecMain.h b/IntelFsp2Pkg/FspSecCore/Se=
cMain.h
index 7794255af13d..edb7447d9eff 100644
--- a/IntelFsp2Pkg/FspSecCore/SecMain.h
+++ b/IntelFsp2Pkg/FspSecCore/SecMain.h
@@ -20,6 +20,7 @@
#include <Library/SerialPortLib.h>=0D
#include <Library/FspSwitchStackLib.h>=0D
#include <Library/FspCommonLib.h>=0D
+#include <Library/CpuLib.h>=0D
#include <Library/UefiCpuLib.h>=0D
#include <FspEas.h>=0D
=0D
--=20
2.30.0.windows.2


[PATCH v1 0/6] Merge UefiCpuLib to CpuLib

Yu Pu <yu.pu@...>
 

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3394=0D
Today lots of duplicated code call CPUID and calculates the address mask. =
=0D
Adding an API named GetPhysicalAddressBits in UefiCpuLib can solve this =0D
problem, but at the same time cause MdeModulePkg depend on UefiCpuPkg =0D
which does not meet the design spec. So merge UefiCpuLib to CpuLib is a =0D
good way to sovle these problems. To minimize the impact,this operation =0D
is divided into four steps. This patch sets contain the first step: add=0D
CpuLib to module INFs that depend on UefiCpuLib.

Yu Pu (6):
IntelFsp2Pkg: Add CpuLib to module INFs that depend on UefiCpuLib
IntelFsp2WrapperPkg: Add CpuLib to module INFs that depend on
UefiCpuLib.
MdePkg: Add CpuLib to module INFs that depend on UefiCpuLib.
OvmfPkg: Add CpuLib to module INFs that depend on UefiCpuLib.
UefiCpuPkg: Add CpuLib to module INFs that depend on UefiCpuLib.
UefiPayloadPkg: Add CpuLib to module INFs that depend on UefiCpuLib.

OvmfPkg/Sec/SecMain.c | 1 +
UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 1 +
UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c | 1 +
IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf | 1 +
IntelFsp2Pkg/FspSecCore/SecMain.h | 1 +
IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf | 1 +
IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf | 1 +
MdePkg/MdeLibs.dsc.inc | 1 +
OvmfPkg/Sec/SecMain.inf | 1 +
UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf | 1 +
UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf | 1 +
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 1 +
UefiCpuPkg/SecCore/SecCore.inf | 1 +
UefiCpuPkg/SecCore/SecCoreNative.inf | 1 +
UefiCpuPkg/SecCore/SecMain.h | 1 +
UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h | 1 +
UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf | 1 +
UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf | 1 +
18 files changed, 18 insertions(+)

--=20
2.30.0.windows.2


Re: [PATCH v1 00/15] Merge UefiCpuLib to CpuLib

Abner Chang
 

RISC-V port will follow this implementation.

Acked-by: Abner Chang <abner.chang@...>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yu Pu
Sent: Tuesday, March 29, 2022 2:37 PM
To: devel@edk2.groups.io
Cc: Yu Pu <yu.pu@...>
Subject: [edk2-devel] [PATCH v1 00/15] Merge UefiCpuLib to CpuLib

REF:INVALID URI REMOVED.
cgi?id=3394__;!!NpxR!xX2rZhlg2fzyUFxuyOaXIdXyQT_5yKUpj_ImUmTUQvQ
cy3zCD4VRcBtL-uHKGxM$

Today lots of duplicated code call CPUID and calculates the address
mask. Adding an API named GetPhysicalAddressBits in UefiCpuLib can
solve this problem, but at the same time cause MdeModulePkg depend
on UefiCpuPkg which does not meet the design spec. So merge UefiCpuLib
to CpuLib is a good way to sovle these problems. To minimize the impact,
this operation is divided into four steps.

Yu Pu (15):
IntelFsp2Pkg: Add CpuLib to module INFs that depend on UefiCpuLib
IntelFsp2WrapperPkg: Add CpuLib to module INFs that depend on
UefiCpuLib.
MdePkg: Add CpuLib to module INFs that depend on UefiCpuLib.
OvmfPkg: Add CpuLib to module INFs that depend on UefiCpuLib.
UefiCpuPkg: Add CpuLib to module INFs that depend on UefiCpuLib.
UefiPayloadPkg: Add CpuLib to module INFs that depend on UefiCpuLib.
MdePkg: Move API and implementation from UefiCpuLib to CpuLib
UefiCpuPkg: Move API and implementation from UefiCpuLib to CpuLib
IntelFsp2Pkg: Remove UefiCpuLib from module INFs.
OvmfPkg: Remove UefiCpuLib from module INFs.
PcAtChipsetPkg: Remove UefiCpuLib from module INFs.
SourceLevelDebugPkg: Remove UefiCpuLib from module INFs.
UefiCpuPkg: Remove UefiCpuLib from module INFs.
UefiPayloadPkg: Remove UefiCpuLib from module INFs.
UefiCpuLib: Remove UefiCpuLib.

MdePkg/Library/BaseCpuLib/X86BaseCpuLib.c | 122
++++++++++++++++++++
OvmfPkg/Sec/SecMain.c | 2 +-
UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c |
81 -------------
UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 2
+-
UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
| 2 +-
IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf | 2 +-
IntelFsp2Pkg/FspSecCore/SecMain.h | 2 +-
IntelFsp2Pkg/IntelFsp2Pkg.dsc | 1 -
IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc | 1 -
IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
| 2 +-
IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
| 2 +-
IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc | 1 -
MdePkg/Include/Library/CpuLib.h | 65
+++++++++++
MdePkg/Library/BaseCpuLib/BaseCpuLib.inf | 6 +
{UefiCpuPkg/Library/BaseUefiCpuLib =>
MdePkg/Library/BaseCpuLib}/Ia32/InitializeFpu.nasm | 0
{UefiCpuPkg/Library/BaseUefiCpuLib =>
MdePkg/Library/BaseCpuLib}/X64/InitializeFpu.nasm | 0
MdePkg/MdeLibs.dsc.inc | 1 +
OvmfPkg/AmdSev/AmdSevX64.dsc | 1 -
OvmfPkg/Bhyve/BhyveX64.dsc | 1 -
OvmfPkg/CloudHv/CloudHvX64.dsc | 1 -
OvmfPkg/Microvm/MicrovmX64.dsc | 1 -
OvmfPkg/OvmfPkgIa32.dsc | 1 -
OvmfPkg/OvmfPkgIa32X64.dsc | 1 -
OvmfPkg/OvmfPkgX64.dsc | 1 -
OvmfPkg/OvmfXen.dsc | 1 -
OvmfPkg/Sec/SecMain.inf | 2 +-
PcAtChipsetPkg/PcAtChipsetPkg.dsc | 1 -
SourceLevelDebugPkg/SourceLevelDebugPkg.dsc | 1
-
UefiCpuPkg/CpuDxe/CpuDxe.h | 1 -
UefiCpuPkg/CpuDxe/CpuDxe.inf | 1 -
UefiCpuPkg/Include/Library/UefiCpuLib.h | 65 ------
-----
UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf |
41 -------
UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.uni |
16 ---
UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf | 2
+-
UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
| 2 +-
UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf | 1 -
UefiCpuPkg/Library/MpInitLib/MpLib.h | 1 -
UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf | 1 -
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
| 2 +-
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
| 1 -
UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h
| 1 -
UefiCpuPkg/SecCore/SecCore.inf | 2 +-
UefiCpuPkg/SecCore/SecCoreNative.inf | 2 +-
UefiCpuPkg/SecCore/SecMain.h | 2 +-
UefiCpuPkg/UefiCpuPkg.dec | 5 -
UefiCpuPkg/UefiCpuPkg.dsc | 2 -
UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h |
2 +-
UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf |
2 +-
UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
| 2 +-
UefiPayloadPkg/UefiPayloadPkg.dsc | 1 -
50 files changed, 211 insertions(+), 248 deletions(-)
create mode 100644 MdePkg/Library/BaseCpuLib/X86BaseCpuLib.c
delete mode 100644 UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c
rename {UefiCpuPkg/Library/BaseUefiCpuLib =>
MdePkg/Library/BaseCpuLib}/Ia32/InitializeFpu.nasm (100%)
rename {UefiCpuPkg/Library/BaseUefiCpuLib =>
MdePkg/Library/BaseCpuLib}/X64/InitializeFpu.nasm (100%)
delete mode 100644 UefiCpuPkg/Include/Library/UefiCpuLib.h
delete mode 100644
UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
delete mode 100644
UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.uni

--
2.30.0.windows.2





Re: [PATCH] UefiPayloadPkg: Change some configuration of the payload

Sheng Lean Tan
 

Reviewed-by: Lean Sheng Tan <sheng.tan@...>


Re: [PATCH] UefiPayloadPkg: Change some configuration of the payload

Ni, Ray
 

Thanks for the explanation.
Reviewed-by: Ray Ni <ray.ni@...>

-----Original Message-----
From: Xie, Yuanhao <yuanhao.xie@...>
Sent: Friday, April 1, 2022 5:56 PM
To: Ni, Ray <ray.ni@...>; devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@...>; Ma, Maurice <maurice.ma@...>; You, Benjamin <benjamin.you@...>;
Rhodes, Sean <sean@...>; Liu, Zhiguang <zhiguang.liu@...>
Subject: RE: [PATCH] UefiPayloadPkg: Change some configuration of the payload

Hi Ray,

The reason why we use PeiDxeDebugLibReportStatusCode instead of BaseDebugLibSerialPort is that
Base Debug library is based on Serial Port library, and it can only send debug messages to serial port device, while SerialPort
supports to print debug msg in other places.

Thanks
Yuanhao

-----Original Message-----
From: Ni, Ray <ray.ni@...>
Sent: Friday, April 1, 2022 10:05 AM
To: Xie, Yuanhao <yuanhao.xie@...>; devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@...>; Ma, Maurice <maurice.ma@...>; You, Benjamin <benjamin.you@...>;
Rhodes, Sean <sean@...>; Liu, Zhiguang <zhiguang.liu@...>
Subject: RE: [PATCH] UefiPayloadPkg: Change some configuration of the payload


[LibraryClasses.common.DXE_CORE]
- DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
+ DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
If DxeCore uses the ReportStatusCode instance, some debug messages may disappear comparing to the case using SerialPort
instance.
Because the ReportStatusCode driver runs a bit later. Is it for saving the payload binary size?


Re: [PATCH v1 1/1] OvmfPkg: Add dependency of VariableSmm driver to make it work normally.

Yao, Jiewen
 

Reviewed-by: Jiewen Yao <Jiewen.yao@...>

Is this a standalone patch? Or one of a series patch?
I think it should be later. But, please enlighten me.

-----Original Message-----
From: Li, Zhihao <zhihao.li@...>
Sent: Tuesday, March 29, 2022 2:38 PM
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb+tianocore@...>; Yao, Jiewen
<jiewen.yao@...>; Justen, Jordan L <jordan.l.justen@...>; Gerd
Hoffmann <kraxel@...>; Boeuf, Sebastien <sebastien.boeuf@...>
Subject: [PATCH v1 1/1] OvmfPkg: Add dependency of VariableSmm driver to
make it work normally.

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

UefiCpuPkg define a new Protocol with the new services
SmmWaitForAllProcessor(), which can be used by SMI handler
to optionally wait for other APs to complete SMM rendezvous in
relaxed AP mode.

VariableSmm driver need use SmmCpuRendezvousLib, So add
SmmCpuRendezvousLib in OvmfPkg.

Cc: Ard Biesheuvel <ardb+tianocore@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jordan Justen <jordan.l.justen@...>
Cc: Gerd Hoffmann <kraxel@...>
Cc: Sebastien Boeuf <sebastien.boeuf@...>

Signed-off-by: Zhihao Li <zhihao.li@...>
---
OvmfPkg/CloudHv/CloudHvX64.dsc | 1 +
OvmfPkg/OvmfPkgIa32.dsc | 3 ++-
OvmfPkg/OvmfPkgIa32X64.dsc | 3 ++-
OvmfPkg/OvmfPkgX64.dsc | 3 ++-
4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/OvmfPkg/CloudHv/CloudHvX64.dsc
b/OvmfPkg/CloudHv/CloudHvX64.dsc
index 8ac9227c5f50..c5f8314a37b6 100644
--- a/OvmfPkg/CloudHv/CloudHvX64.dsc
+++ b/OvmfPkg/CloudHv/CloudHvX64.dsc
@@ -429,6 +429,7 @@
!endif

BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf

PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf

+
SmmCpuRendezvousLib|UefiCpuPkg/Library/SmmCpuRendezvousLib/SmmCpuR
endezvousLib.inf



[LibraryClasses.common.SMM_CORE]

PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf

diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index 29eea82571c5..e6122118e07e 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -1,7 +1,7 @@
## @file

# EFI/Framework Open Virtual Machine Firmware (OVMF) platform

#

-# Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>

+# Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.<BR>

# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>

# Copyright (c) Microsoft Corporation.

#

@@ -427,6 +427,7 @@
!endif

BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf

PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf

+
SmmCpuRendezvousLib|UefiCpuPkg/Library/SmmCpuRendezvousLib/SmmCpuR
endezvousLib.inf



[LibraryClasses.common.SMM_CORE]

PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf

diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index 56d3c49ab21a..05c16aa3fd3e 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -1,7 +1,7 @@
## @file

# EFI/Framework Open Virtual Machine Firmware (OVMF) platform

#

-# Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>

+# Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.<BR>

# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>

# Copyright (c) Microsoft Corporation.

#

@@ -431,6 +431,7 @@
!endif

BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf

PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf

+
SmmCpuRendezvousLib|UefiCpuPkg/Library/SmmCpuRendezvousLib/SmmCpuR
endezvousLib.inf



[LibraryClasses.common.SMM_CORE]

PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf

diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index f0924c0f9d0a..ea42bee22cb5 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -1,7 +1,7 @@
## @file

# EFI/Framework Open Virtual Machine Firmware (OVMF) platform

#

-# Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>

+# Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.<BR>

# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>

# Copyright (c) Microsoft Corporation.

#

@@ -432,6 +432,7 @@
!endif

BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf

PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf

+
SmmCpuRendezvousLib|UefiCpuPkg/Library/SmmCpuRendezvousLib/SmmCpuR
endezvousLib.inf



[LibraryClasses.common.SMM_CORE]

PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf

--
2.26.2.windows.1


Re: [PATCH] UefiPayloadPkg: Change some configuration of the payload

Yuanhao Xie
 

Hi Ray,

The reason why we use PeiDxeDebugLibReportStatusCode instead of BaseDebugLibSerialPort is that
Base Debug library is based on Serial Port library, and it can only send debug messages to serial port device, while SerialPort supports to print debug msg in other places.

Thanks
Yuanhao

-----Original Message-----
From: Ni, Ray <ray.ni@...>
Sent: Friday, April 1, 2022 10:05 AM
To: Xie, Yuanhao <yuanhao.xie@...>; devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@...>; Ma, Maurice <maurice.ma@...>; You, Benjamin <benjamin.you@...>; Rhodes, Sean <sean@...>; Liu, Zhiguang <zhiguang.liu@...>
Subject: RE: [PATCH] UefiPayloadPkg: Change some configuration of the payload


[LibraryClasses.common.DXE_CORE]
- DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
+ DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
If DxeCore uses the ReportStatusCode instance, some debug messages may disappear comparing to the case using SerialPort instance.
Because the ReportStatusCode driver runs a bit later. Is it for saving the payload binary size?


[PATCH] MdeModulePkg/FaultTolerantWriteDxe: Don't check for address alignment

Sean Rhodes
 

WorkSpaceAddress and SpareAreaAddress point into MMIO, which isn't
always aligned. Remove the check for block alignment to avoid
false assertions.

Cc: Jian J Wang <jian.j.wang@...>
Cc: Hao A Wu <hao.a.wu@...>
Cc: Liming Gao <gaoliming@...>
Signed-off-by: Sean Rhodes <sean@...>
Change-Id: Ia1c1f44b6a0e7f32cac0d7806e74d729e5d83a6d
---
.../Universal/FaultTolerantWriteDxe/FtwMisc.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c b/MdeMo=
dulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
index 661e148767..3b9ff1c828 100644
--- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
+++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
@@ -1121,12 +1121,10 @@ FindFvbForFtw (
FtwDevice->NumberOfWorkSpaceBlock =3D FTW_BLOCKS (FtwDevice->Ftw=
WorkSpaceBase + FtwDevice->FtwWorkSpaceSize, FtwDevice->WorkBlockSize);=0D
if (FtwDevice->FtwWorkSpaceSize >=3D FtwDevice->WorkBlockSize) {=
=0D
//=0D
- // Check the alignment of work space address and length, they =
should be block size aligned when work space size is larger than one block =
size.=0D
+ // Check the alignment of work space length, it should be bloc=
k size aligned when work space size is larger than one block size.=0D
//=0D
- if (((FtwDevice->WorkSpaceAddress & (FtwDevice->WorkBlockSize =
- 1)) !=3D 0) ||=0D
- ((FtwDevice->WorkSpaceLength & (FtwDevice->WorkBlockSize -=
1)) !=3D 0))=0D
- {=0D
- DEBUG ((DEBUG_ERROR, "Ftw: Work space address or length is n=
ot block size aligned when work space size is larger than one block size\n"=
));=0D
+ if ((FtwDevice->WorkSpaceLength & (FtwDevice->WorkBlockSize - =
1)) !=3D 0) {=0D
+ DEBUG ((EFI_D_ERROR, "Ftw: Work space length is not block si=
ze aligned when work space size is larger than one block size\n"));=0D
FreePool (HandleBuffer);=0D
ASSERT (FALSE);=0D
return EFI_ABORTED;=0D
@@ -1171,12 +1169,10 @@ FindFvbForFtw (
}=0D
=0D
//=0D
- // Check the alignment of spare area address and length, they sh=
ould be block size aligned=0D
+ // Check the alignment of spare area length, it should be block =
size aligned=0D
//=0D
- if (((FtwDevice->SpareAreaAddress & (FtwDevice->SpareBlockSize -=
1)) !=3D 0) ||=0D
- ((FtwDevice->SpareAreaLength & (FtwDevice->SpareBlockSize - =
1)) !=3D 0))=0D
- {=0D
- DEBUG ((DEBUG_ERROR, "Ftw: Spare area address or length is not=
block size aligned\n"));=0D
+ if ((FtwDevice->SpareAreaLength & (FtwDevice->SpareBlockSize - 1=
)) !=3D 0) {=0D
+ DEBUG ((EFI_D_ERROR, "Ftw: Spare area address or length is not=
block size aligned\n"));=0D
FreePool (HandleBuffer);=0D
//=0D
// Report Status Code EFI_SW_EC_ABORTED.=0D
--=20
2.32.0


[PATCH-V2] Fix Setup numeric default value incorrect issue

Chen Lin Z
 

When default/manufacturing flag get removed from numeric varid, it can't
get default value from StructurePcd in 'UpdateDefaultSettingInFormPackage'
function since there is no EFI_IFR_DEFAULT_OP opcode in IFR file. Add a
chance to get numeric default value from StructurePcd in the case that
numeric minimum value will be used as default value.

Signed-off-by: Chen Lin Z <lin.z.chen@...>
Signed-off-by: Dandan Bi <dandan.bi@...>
---
.../Universal/HiiDatabaseDxe/ConfigRouting.c | 22 ++++++++++++++++++
.../Universal/HiiDatabaseDxe/HiiDatabase.h | 23 +++++++++++++++++++
2 files changed, 45 insertions(+)

diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeMod=
ulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
index 2f792d2965..1c6af853b3 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
@@ -2171,6 +2171,7 @@ ParseIfrData (
UINTN PackageOffset;=0D
EFI_IFR_VARSTORE *IfrVarStore;=0D
EFI_IFR_VARSTORE_EFI *IfrEfiVarStore;=0D
+ EFI_IFR_VARSTORE_EFI *IfrEfiVarStoreTmp;=0D
EFI_IFR_OP_HEADER *IfrOpHdr;=0D
EFI_IFR_ONE_OF *IfrOneOf;=0D
EFI_IFR_REF4 *IfrRef;=0D
@@ -2187,6 +2188,7 @@ ParseIfrData (
IFR_BLOCK_DATA *BlockData;=0D
CHAR16 *VarStoreName;=0D
UINTN NameSize;=0D
+ UINTN NvDefaultStoreSize;=0D
UINT16 VarWidth;=0D
UINT16 VarDefaultId;=0D
BOOLEAN FirstOneOfOption;=0D
@@ -2212,6 +2214,7 @@ ParseIfrData (
SmallestDefaultId =3D 0xFFFF;=0D
FromOtherDefaultOpcode =3D FALSE;=0D
QuestionReferBitField =3D FALSE;=0D
+ IfrEfiVarStoreTmp =3D NULL;=0D
=0D
//=0D
// Go through the form package to parse OpCode one by one.=0D
@@ -2303,6 +2306,17 @@ ParseIfrData (
}=0D
=0D
AsciiStrToUnicodeStrS ((CHAR8 *)IfrEfiVarStore->Name, VarStoreName=
, NameSize);=0D
+ if (IfrEfiVarStoreTmp !=3D NULL) {=0D
+ FreePool (IfrEfiVarStoreTmp);=0D
+ }=0D
+ IfrEfiVarStoreTmp =3D AllocatePool (IfrEfiVarStore->Header.Length =
+ AsciiStrSize ((CHAR8 *)IfrEfiVarStore->Name));=0D
+ if (IfrEfiVarStoreTmp =3D=3D NULL) {=0D
+ Status =3D EFI_OUT_OF_RESOURCES;=0D
+ goto Done;=0D
+ }=0D
+=0D
+ CopyMem (IfrEfiVarStoreTmp, IfrEfiVarStore, IfrEfiVarStore->Header=
.Length);=0D
+ AsciiStrToUnicodeStrS ((CHAR8 *)IfrEfiVarStore->Name, (CHAR16 *)&(=
IfrEfiVarStoreTmp->Name[0]), AsciiStrSize ((CHAR8 *)IfrEfiVarStore->Name) *=
sizeof (CHAR16));=0D
=0D
if (IsThisVarstore (&IfrEfiVarStore->Guid, VarStoreName, ConfigHdr=
)) {=0D
//=0D
@@ -2502,9 +2516,13 @@ ParseIfrData (
//=0D
// Set default value base on the DefaultId list get from IFR dat=
a.=0D
//=0D
+ NvDefaultStoreSize =3D PcdGetSize (PcdNvStoreDefaultValueBuffer)=
;=0D
for (LinkData =3D DefaultIdArray->Entry.ForwardLink; LinkData !=
=3D &DefaultIdArray->Entry; LinkData =3D LinkData->ForwardLink) {=0D
DefaultDataPtr =3D BASE_CR (LinkData, IFR_DEFAULT_DATA,=
Entry);=0D
DefaultData.DefaultId =3D DefaultDataPtr->DefaultId;=0D
+ if (NvDefaultStoreSize > sizeof (PCD_NV_STORE_DEFAULT_BUFFER_H=
EADER)) {=0D
+ FindQuestionDefaultSetting (DefaultData.DefaultId, IfrEfiVar=
StoreTmp, &(IfrOneOf->Question), &DefaultData.Value, VarWidth, QuestionRefe=
rBitField);=0D
+ }=0D
InsertDefaultValue (BlockData, &DefaultData);=0D
}=0D
}=0D
@@ -3192,6 +3210,10 @@ Done:
}=0D
}=0D
=0D
+ if (IfrEfiVarStoreTmp !=3D NULL) {=0D
+ FreePool (IfrEfiVarStoreTmp);=0D
+ }=0D
+=0D
return Status;=0D
}=0D
=0D
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h b/MdeModul=
ePkg/Universal/HiiDatabaseDxe/HiiDatabase.h
index c4ca6ad6ee..421c293cfc 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h
@@ -2308,6 +2308,29 @@ HiiGetConfigRespInfo (
IN CONST EFI_HII_DATABASE_PROTOCOL *This=0D
);=0D
=0D
+/**=0D
+ Find question default value from PcdNvStoreDefaultValueBuffer=0D
+=0D
+ @param DefaultId Default store ID=0D
+ @param EfiVarStore Point to EFI VarStore header=0D
+ @param IfrQuestionHdr Point to Question header=0D
+ @param ValueBuffer Point to Buffer includes the found default set=
ting=0D
+ @param Width Width of the default value=0D
+ @param BitFieldQuestion Whether the Question is stored in Bit field.=0D
+=0D
+ @retval EFI_SUCCESS Question default value is found.=0D
+ @retval EFI_NOT_FOUND Question default value is not found.=0D
+**/=0D
+EFI_STATUS=0D
+FindQuestionDefaultSetting (=0D
+ IN UINT16 DefaultId,=0D
+ IN EFI_IFR_VARSTORE_EFI *EfiVarStore,=0D
+ IN EFI_IFR_QUESTION_HEADER *IfrQuestionHdr,=0D
+ OUT VOID *ValueBuffer,=0D
+ IN UINTN Width,=0D
+ IN BOOLEAN BitFieldQuestion=0D
+ );=0D
+=0D
//=0D
// Global variables=0D
//=0D
--=20
2.25.1


Re: EDK2 CI Broken

Michael D Kinney
 

Thank you raising this issue.

 

We will investigate.

 

Mike

 

From: Xu, Min M <min.m.xu@...>
Sent: Thursday, March 31, 2022 6:43 PM
To: Kinney, Michael D <michael.d.kinney@...>; devel@edk2.groups.io; sean.brogan@...
Cc: Yao, Jiewen <jiewen.yao@...>
Subject: RE: EDK2 CI Broken

 

Hi, Sean

Do you have some suggestion for this CI failure?

 

From: Xu, Min M <min.m.xu@...>
Sent: Friday, April 1, 2022 9:14 AM
To: Kinney, Michael D <michael.d.kinney@...>; devel@edk2.groups.io
Cc: Yao, Jiewen <jiewen.yao@...>; Xu, Min M <min.m.xu@...>
Subject: EDK2 CI Broken

 

Hi,

The EDK2 CI seems broken from yesterday. PR failed with the errors at “Update” and “Copy base tools build log”.

 

/opt/hostedtoolcache/Python/3.9.12/x64/bin/stuart_update -c ArmVirtPkg/PlatformCI/PlatformBuild.py TOOL_CHAIN_TAG=GCC5 -t DEBUG -a AARCH64

(node:2764) Warning: Use Cipheriv for counter mode of aes-256-ctr

(node:2764) Warning: Use Cipheriv for counter mode of aes-256-ctr

(node:2764) Warning: Use Cipheriv for counter mode of aes-256-ctr

(node:2764) Warning: Use Cipheriv for counter mode of aes-256-ctr

(node:2764) Warning: Use Cipheriv for counter mode of aes-256-ctr

(node:2764) Warning: Use Cipheriv for counter mode of aes-256-ctr

(node:2764) Warning: Use Cipheriv for counter mode of aes-256-ctr

SECTION - Init SDE

SECTION - Loading Plugins

SECTION - Start Invocable Tool

SECTION - Initial update of environment

Updating... Done

Traceback (most recent call last):

File "/opt/hostedtoolcache/Python/3.9.12/x64/bin/stuart_update", line 8, in <module>

  sys.exit(main())

File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/edk2toolext/invocables/edk2_update.py", line 101, in main

  Edk2Update().Invoke()

File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/edk2toolext/base_abstract_invocable.py", line 146, in Invoke

  retcode = self.Go()

File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/edk2toolext/invocables/edk2_update.py", line 71, in Go

  (build_env_old, shell_env_old, _) = self.PerformUpdate()

File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/edk2toolext/invocables/edk2_update.py", line 41, in PerformUpdate

  (success, failure) = self_describing_environment.UpdateDependencies(ws_root, scopes, skipped_dirs)

File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/edk2toolext/environment/self_describing_environment.py", line 364, in UpdateDependencies

  return build_env.update_extdeps(shell_env)

File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/edk2toolext/environment/self_describing_environment.py", line 277, in update_extdeps

  results = pool_handle.get()

 


[Patch V2] NetworkPkg: Add PCDs for HTTP DNS RetryCount and RetryInterval

Heng Luo
 

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

Currently the HTTP DNS Retry Interval is 2 second and no retry attempt.
If DNS response can't arrive in 2 second, the DNS request is failed,
and then HTTP boot is failed.
In order to resolve this issue, Add PCDs to support RetryCount
and RetryInterval configurated in Platform.

Cc: Maciej Rabeda <maciej.rabeda@...>
Cc: Fu Siyuan <siyuan.fu@...>
Cc: Wu Jiaxin <jiaxin.wu@...>
Signed-off-by: Heng Luo <heng.luo@...>
---
NetworkPkg/HttpDxe/HttpDns.c | 4 ++++
NetworkPkg/HttpDxe/HttpDxe.inf | 2 ++
NetworkPkg/NetworkPkg.dec | 9 +++++++++
NetworkPkg/NetworkPkg.uni | 11 +++++++++++
4 files changed, 26 insertions(+)

diff --git a/NetworkPkg/HttpDxe/HttpDns.c b/NetworkPkg/HttpDxe/HttpDns.c
index 59a2784e6a..e609aba519 100644
--- a/NetworkPkg/HttpDxe/HttpDns.c
+++ b/NetworkPkg/HttpDxe/HttpDns.c
@@ -108,6 +108,8 @@ HttpDns4 (
Dns4CfgData.DnsServerListCount = DnsServerListCount;
Dns4CfgData.DnsServerList = DnsServerList;
Dns4CfgData.UseDefaultSetting = HttpInstance->IPv4Node.UseDefaultAddress;
+ Dns4CfgData.RetryInterval = PcdGet32 (PcdHttpDnsRetryInterval);
+ Dns4CfgData.RetryCount = PcdGet32 (PcdHttpDnsRetryCount);
if (!Dns4CfgData.UseDefaultSetting) {
IP4_COPY_ADDRESS (&Dns4CfgData.StationIp, &HttpInstance->IPv4Node.LocalAddress);
IP4_COPY_ADDRESS (&Dns4CfgData.SubnetMask, &HttpInstance->IPv4Node.LocalSubnet);
@@ -316,6 +318,8 @@ HttpDns6 (
Dns6ConfigData.EnableDnsCache = TRUE;
Dns6ConfigData.Protocol = EFI_IP_PROTO_UDP;
IP6_COPY_ADDRESS (&Dns6ConfigData.StationIp, &HttpInstance->Ipv6Node.LocalAddress);
+ Dns6ConfigData.RetryInterval = PcdGet32 (PcdHttpDnsRetryInterval);
+ Dns6ConfigData.RetryCount = PcdGet32 (PcdHttpDnsRetryCount);
Status = Dns6->Configure (
Dns6,
&Dns6ConfigData
diff --git a/NetworkPkg/HttpDxe/HttpDxe.inf b/NetworkPkg/HttpDxe/HttpDxe.inf
index af681c0184..c9502d0bb6 100644
--- a/NetworkPkg/HttpDxe/HttpDxe.inf
+++ b/NetworkPkg/HttpDxe/HttpDxe.inf
@@ -75,6 +75,8 @@
[Pcd]
gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections ## CONSUMES
gEfiNetworkPkgTokenSpaceGuid.PcdHttpIoTimeout ## CONSUMES
+ gEfiNetworkPkgTokenSpaceGuid.PcdHttpDnsRetryInterval ## CONSUMES
+ gEfiNetworkPkgTokenSpaceGuid.PcdHttpDnsRetryCount ## CONSUMES

[UserExtensions.TianoCore."ExtraFiles"]
HttpDxeExtra.uni
diff --git a/NetworkPkg/NetworkPkg.dec b/NetworkPkg/NetworkPkg.dec
index 928e84fec4..5e43ebf8c5 100644
--- a/NetworkPkg/NetworkPkg.dec
+++ b/NetworkPkg/NetworkPkg.dec
@@ -163,5 +163,14 @@
# @Prompt The Timeout value of HTTP Io. Default value is 5000.
gEfiNetworkPkgTokenSpaceGuid.PcdHttpIoTimeout|5000|UINT32|0x0000000F

+ ## The Retry Interval of HTTP DNS in seconds. If the Retry Interval is less than
+ # DNS_DEFAULT_TIMEOUT, then use the DNS_DEFAULT_TIMEOUT.
+ # @Prompt The value of Retry Interval. Default value is 0
+ gEfiNetworkPkgTokenSpaceGuid.PcdHttpDnsRetryInterval|0|UINT32|0x00000010
+
+ ## The Retry Count of HTTP DNS if no DNS response received after Retry Interval.
+ # @Prompt The value of Retry Count, Default value is 0.
+ gEfiNetworkPkgTokenSpaceGuid.PcdHttpDnsRetryCount|0|UINT32|0x00000011
+
[UserExtensions.TianoCore."ExtraFiles"]
NetworkPkgExtra.uni
diff --git a/NetworkPkg/NetworkPkg.uni b/NetworkPkg/NetworkPkg.uni
index 6d0fa67c6f..c0bbbd3ee1 100644
--- a/NetworkPkg/NetworkPkg.uni
+++ b/NetworkPkg/NetworkPkg.uni
@@ -111,3 +111,14 @@
#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdHttpIoTimeout_HELP #language en-US "This value is used to configure the request and response timeout when getting "
"the recovery image from the remote source during an HTTP recovery boot."
"The default value set is 5 seconds."
+
+#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdHttpDnsRetryInterval_PROMPT #language en-US "Retry Interval of HTTP DNS"
+
+#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdHttpDnsRetryInterval_HELP #language en-US "This value is used to configure the retry Interval of HTTP DNS."
+ "The default value set is 0 second. If the value is less than"
+ "DNS_DEFAULT_TIMEOUT, then use the DNS_DEFAULT_TIMEOUT."
+
+#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdHttpDnsRetryCount_PROMPT #language en-US "Retry Count of HTTP DNS"
+
+#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdHttpDnsRetryCount_HELP #language en-US "This value is used to configure the Retry Count of HTTP DNS if "
+ "no DNS response received after Retry Interval. The default value set is 0."
--
2.31.1.windows.1

4181 - 4200 of 92426