Releases: microsoft/mu_basecore
release-v2025020000.0.2
What's Changed
-
[Cherry-Pick] StandaloneMmPkg/Core: pass HOB list in MMRAM to library constructor [Rebase \& FF] @apop5 (#1365)
Change Details
## Description
The commit changes the code to initializes new HOB list in MMRAM before the ProcessLibraryConstructorList() and pass the MMRAM HOB list to lib constructor.
Previously, the HOB list in non-MMRAM range is passed to the lib constructor. Then code in the library constructor would consume unverified HOB list in non-MMRAM buffer. With this commit, the HOB validation and memory allocation HOB migration are doned before the library constructor.
Cherry-Picked from edk2
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Server platform was failing to boot prior to these cherry-picks
Integration Instructions
No Integration Necessary.
-
Revert "Add X509CompareDateTime Function (#1355)" @Flickdm (#1366)
Change Details
This reverts commit 05c7a52.
Description
This change was brought in before the crypto side was prepared to make this change.
In order to unblock MU_BASECORE - this commit will be reverted and will be brought in in order.This is not considered a breaking change because this is not in the release.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
reverted this commit on a platform and confirmed that this resolved the issue.
Integration Instructions
N/A
-
MdePkg: Add MockSynchronizationLib and MockSmmSxDispatch2 [Merge \& FF] @apop5 (#1361)
Change Details
## Description Cherry-Pick PR that was completed into the 202405 after 202502 became available.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
CI.
Integration Instructions
No integration necessary.
-
Add X509CompareDateTime Function @liqiqiii (#1355)
Change Details
## Description
Add X509CompareDateTime function.
This function was missed before because it has a return type of INT32 which is not included in current generate_cryptodriver.py.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Tested with X64 STANDARD/TINY_SHA, build successfully.
Integration Instructions
When integrating this, consume the latest MU_CRYPTO_RELEASE PR too.
-
Minor Plugin Tweaks @apop5 (#1353)
Change Details
## Description
Minor Plugin Tweaks
Set of minor plugin changes made in Project Mu such as adjusting
output messages, etc.Signed-off-by: Michael Kubacki [email protected]
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Local CI runs to verify that nothing is broken.
Integration Instructions
No integration necessary.
-
[Cherry-Pick] [202502] MdeModulePkg: Fixes for Null pointer and failed spi access. [Rebase \& FF] @apop5 (#1352)
Change Details
## Description
CherryPick two commits from edk2.
https://github.com/tianocore/edk2/pull/10945/files
https://github.com/tianocore/edk2/pull/10924/files- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
On platform using these modules, observed failures prior to changes. (failure to access SPI, null pointer dereference)
After integrating changes, verified that platforms functions as expected
Integration Instructions
No Integration Necessary
🔐 Security Impacting
-
[REBASE \& FF] Integrate edk2 Memory Protection Fixes and Fix the Ensuing Chaos @os-d (#1362)
Change Details
## Description
This PR reverts a Mu commit that was upstreamed to edk2 as well as cherry-picking some new edk2 functionality. Changing the behavior in edk2 exposed a number of Mu bugs in memory protections that are now fixed.
Revert "MdeModulePkg: Update Memory Logging"
This reverts commit 7006e33 as it has been upstreamed to edk2 in commits d6101acb083eb0b79e3ca35c18ea87003850e3c4, 5ccb5fff02a66b21898bd57f48bbd7c3cd6f4e8d, and 6c6d6f42db3f5c3dc2b8d86ce32e1ce2c7fd85d1.
Four edk2 Cherry-Picks
These cherry-picks cover the commit that was reverted and better align image memory protections with the GCD, to keep it in sync, enabling a use case to apply CPU_CRYPTO to all memory near the end of boot.
[SQUASH ON REBASE]MdeModulePkg: Don't Set EFI_MEMORY_RP in the GCD
EFI_MEMORY_RP is set on free memory when the corresponding bit in the memory protection HOB is enabled. It is directly set in the page table using the CPU arch protocol because it cannot go through the GCD; it is not feasible with the current locking structure for the paging code to unset it in the GCD, as that may require new pages to be allocated, etc.
This commit fixes the memory protection code to not apply RP in the GCD on accident when trying to apply NX protections. This
causes issues as RP is never cleared and if a driver tries to get attributes from the GCD and update a caching attribute, say, it can end up marking the page RP and then fault trying to acces it.This also prevents UefiCpuPkg's CpuDxe from applying RP to the GCD when refreshing the GCD from paging, for the same reason.
This should be squashed with ea5dd58 on rebase.
[SQUASH ON REBASE] MdeModulePkg: Page Align Access Attr Removal
Currently, when the image loading code decides not to protect an image, it will attempt to remove any protection attributes from the image region to remove NX. However, it does not take into account that the primary reason we do not protect images is if they are not page aligned. This causes asserts when trying to unset these attributes through the GCD.
This patch aligns the access attribute removal to page boundaries.
It should be squashed on rebase with b95a42d.
[SQUASH ON REBASE] MdeModulePkg: Remove Image Access Attributes Correctly
We support loading non-page aligned images, however, in order to do so, we must remove any protection attributes set on them, for example NX protections applied early in DXE Core.
However, when we encounter non-page aligned images, we attempt to take their image base (which is not page aligned) and set attributes on it, which causes an assert to be hit that page attributes are only set on page aligned memory.
This commit removes the protection attributes for the entire page(s) containing the non-aligned image.
It should be squashed with e7e74b9 on rebase.
[SQUASH ON REBASE] MdeModulePkg: Don't Unset Memory Attrs to Unprotected Images
Currently, UnprotectUefiImage will attempt to unset memory attributes on any image record it finds for the given image, protected or unprotected. However, this is both a waste of time for unprotected images and can cause asserts when the image is unprotected because it does not have page aligned sections.
This patch fixes that behavior and does not attempt to unset the memory protections that were never applied.
It should be squashed with b95a42d on rebase.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Tested on an Intel server with aligned and unaligned images booting to shell.
Integration Instructions
N/A.
</blockquote> <hr> </details>
dev-v2025020000.0.2
What's Changed
-
[Cherry-Pick] StandaloneMmPkg/Core: pass HOB list in MMRAM to library constructor [Rebase \& FF] @apop5 (#1365)
Change Details
## Description
The commit changes the code to initializes new HOB list in MMRAM before the ProcessLibraryConstructorList() and pass the MMRAM HOB list to lib constructor.
Previously, the HOB list in non-MMRAM range is passed to the lib constructor. Then code in the library constructor would consume unverified HOB list in non-MMRAM buffer. With this commit, the HOB validation and memory allocation HOB migration are doned before the library constructor.
Cherry-Picked from edk2
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Server platform was failing to boot prior to these cherry-picks
Integration Instructions
No Integration Necessary.
-
Revert "Add X509CompareDateTime Function (#1355)" @Flickdm (#1366)
Change Details
This reverts commit 05c7a52.
Description
This change was brought in before the crypto side was prepared to make this change.
In order to unblock MU_BASECORE - this commit will be reverted and will be brought in in order.This is not considered a breaking change because this is not in the release.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
reverted this commit on a platform and confirmed that this resolved the issue.
Integration Instructions
N/A
-
MdePkg: Add MockSynchronizationLib and MockSmmSxDispatch2 [Merge \& FF] @apop5 (#1361)
Change Details
## Description Cherry-Pick PR that was completed into the 202405 after 202502 became available.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
CI.
Integration Instructions
No integration necessary.
-
Add X509CompareDateTime Function @liqiqiii (#1355)
Change Details
## Description
Add X509CompareDateTime function.
This function was missed before because it has a return type of INT32 which is not included in current generate_cryptodriver.py.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Tested with X64 STANDARD/TINY_SHA, build successfully.
Integration Instructions
When integrating this, consume the latest MU_CRYPTO_RELEASE PR too.
-
Minor Plugin Tweaks @apop5 (#1353)
Change Details
## Description
Minor Plugin Tweaks
Set of minor plugin changes made in Project Mu such as adjusting
output messages, etc.Signed-off-by: Michael Kubacki [email protected]
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Local CI runs to verify that nothing is broken.
Integration Instructions
No integration necessary.
-
[Cherry-Pick] [202502] MdeModulePkg: Fixes for Null pointer and failed spi access. [Rebase \& FF] @apop5 (#1352)
Change Details
## Description
CherryPick two commits from edk2.
https://github.com/tianocore/edk2/pull/10945/files
https://github.com/tianocore/edk2/pull/10924/files- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
On platform using these modules, observed failures prior to changes. (failure to access SPI, null pointer dereference)
After integrating changes, verified that platforms functions as expected
Integration Instructions
No Integration Necessary
🔐 Security Impacting
-
[REBASE \& FF] Integrate edk2 Memory Protection Fixes and Fix the Ensuing Chaos @os-d (#1362)
Change Details
## Description
This PR reverts a Mu commit that was upstreamed to edk2 as well as cherry-picking some new edk2 functionality. Changing the behavior in edk2 exposed a number of Mu bugs in memory protections that are now fixed.
Revert "MdeModulePkg: Update Memory Logging"
This reverts commit 7006e33 as it has been upstreamed to edk2 in commits d6101acb083eb0b79e3ca35c18ea87003850e3c4, 5ccb5fff02a66b21898bd57f48bbd7c3cd6f4e8d, and 6c6d6f42db3f5c3dc2b8d86ce32e1ce2c7fd85d1.
Four edk2 Cherry-Picks
These cherry-picks cover the commit that was reverted and better align image memory protections with the GCD, to keep it in sync, enabling a use case to apply CPU_CRYPTO to all memory near the end of boot.
[SQUASH ON REBASE]MdeModulePkg: Don't Set EFI_MEMORY_RP in the GCD
EFI_MEMORY_RP is set on free memory when the corresponding bit in the memory protection HOB is enabled. It is directly set in the page table using the CPU arch protocol because it cannot go through the GCD; it is not feasible with the current locking structure for the paging code to unset it in the GCD, as that may require new pages to be allocated, etc.
This commit fixes the memory protection code to not apply RP in the GCD on accident when trying to apply NX protections. This
causes issues as RP is never cleared and if a driver tries to get attributes from the GCD and update a caching attribute, say, it can end up marking the page RP and then fault trying to acces it.This also prevents UefiCpuPkg's CpuDxe from applying RP to the GCD when refreshing the GCD from paging, for the same reason.
This should be squashed with ea5dd58 on rebase.
[SQUASH ON REBASE] MdeModulePkg: Page Align Access Attr Removal
Currently, when the image loading code decides not to protect an image, it will attempt to remove any protection attributes from the image region to remove NX. However, it does not take into account that the primary reason we do not protect images is if they are not page aligned. This causes asserts when trying to unset these attributes through the GCD.
This patch aligns the access attribute removal to page boundaries.
It should be squashed on rebase with b95a42d.
[SQUASH ON REBASE] MdeModulePkg: Remove Image Access Attributes Correctly
We support loading non-page aligned images, however, in order to do so, we must remove any protection attributes set on them, for example NX protections applied early in DXE Core.
However, when we encounter non-page aligned images, we attempt to take their image base (which is not page aligned) and set attributes on it, which causes an assert to be hit that page attributes are only set on page aligned memory.
This commit removes the protection attributes for the entire page(s) containing the non-aligned image.
It should be squashed with e7e74b9 on rebase.
[SQUASH ON REBASE] MdeModulePkg: Don't Unset Memory Attrs to Unprotected Images
Currently, UnprotectUefiImage will attempt to unset memory attributes on any image record it finds for the given image, protected or unprotected. However, this is both a waste of time for unprotected images and can cause asserts when the image is unprotected because it does not have page aligned sections.
This patch fixes that behavior and does not attempt to unset the memory protections that were never applied.
It should be squashed with b95a42d on rebase.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Tested on an Intel server with aligned and unaligned images booting to shell.
Integration Instructions
N/A.
</blockquote> <hr> </details>
Full Changelog: dev-v2025020000.0.1...dev-v2025020000.0.2
release-v2025020000.0.1
What's Changed
-
Add Missed Mock Functions @apop5 (#1349)
Change Details
## Description Add mock functions under MockUefiLib and Create Mock for CapsuleLib, PerformanceLib, MockUefiBootManagerLib and GenericMemoryTestProtocol
Add mock functions under MockUefiLib and Create Mock for CapsuleLib, PerformanceLib and GenericMemoryTestProtocol
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Unit tests component can call these mock functions success
Integration Instructions
N/A
</blockquote> <hr> </details>
dev-v2025020000.0.1
What's Changed
-
Add Missed Mock Functions @apop5 (#1349)
Change Details
## Description Add mock functions under MockUefiLib and Create Mock for CapsuleLib, PerformanceLib, MockUefiBootManagerLib and GenericMemoryTestProtocol
Add mock functions under MockUefiLib and Create Mock for CapsuleLib, PerformanceLib and GenericMemoryTestProtocol
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Unit tests component can call these mock functions success
Integration Instructions
N/A
</blockquote> <hr> </details>
Full Changelog: dev-v2025020000.0.0...dev-v2025020000.0.1
release-v2025020000.0.0
Initial Release notes of 202502 contain a full list of mu changes on top of edk2-stable202405
PRs associated with the commits can be found at the bottom of the information pane reached by clicking on the commit hash
What's Changed## 🚀 Features & ✨ Enhancements
-
Repo File Sync: synced file(s) with microsoft/mu_devops (#1347)
-
[Squash on Rebase] Update release-basetools to use newer ubuntu. (#1343)
-
Add BuildReportEvaluation post build plugin (#1297)
-
Remove component that no longer exists.
-
Revert "Implement MmServicesTableLib for MM Core (#730)"
-
MdeModulePkg: PiSmmIpl: Fix physical address dereferencing
-
BaseTools: Change arm align value from 32 to 64
-
BaseTools: Update tools_def for aarch64
-
[Cherry-Pick]StandaloneMmPkg: MmCommunicationDxe: Add EFI_MM_COMMUNICATION3_PROTOCOL
-
[Cherry-Pick]StandaloneMmPkg: StandaloneMmIplPei: Add EFI_PEI_MM_COMMUNICATION3_PPI
-
[Cherry-Pick]MdeModulePkg: PiSmmIpl: Update MessageLength calculation for MmCommunicate
-
[Cherry-Pick] StandaloneMmPkg: StandaloneMmCore: Parsing new MM communicate header
-
MdeModulePkg/Core/PiSmmCore: Decouple MM core mailbox data
-
[Cherry-Pick] MdeModulePkg: PiSmmCore: Added parser of new MM communicate header
-
Revert "MdeModulePkg/Core/PiSmmCore: Decouple MM core mailbox data"
-
[Cherry-Pick] MdePkg: MmCommunication: Introduce EFI_PEI_MM_COMMUNICATION3_PPI to MdePkg
-
[Cherry-Pick]MdePkg: MmCommunication: Introduce EFI_MM_COMMUNICATION3_PROTOCOL to MdePkg
-
[Cherry-Pick] MdePkg: MmCommunication: Introduce EFI_MM_COMMUNICATE_HEADER_V3 to MdePkg
-
[Cherry-Pick] UefiCpuPkg: Add StmmCore for IntelMmSaveStateLib,SmmCpuPlatformHookLibNull.
-
BaseTools/UefiVarPatcher: Add plugin (#1326)
-
Squash on Rebase: Clean up Edk2 CI files.
-
Move STATIC_ASSERT abstraction to common file for BaseTools usage
-
Add CPU_INFORMATION_HEADER struct to STM_HEADER
-
BaseTools: Add GenStm
-
[CHERRY-PICK] StandaloneMmCorePerformanceLib.inf: Add gEfiEventExitBootServicesGuid
-
[CHERRY-PICK] MdeModulePkg/DxeCorePerformanceLib: Fix incorrect size calculation
-
[CHERRY-PICK] MdeModulePkg: Add Standalone MM perf library support
-
[CHERRY-PICK] MdeModulePkg: Add Standalone MM Core performance support
-
[CHERRY-PICK] MdeModulePkg/DxeCorePerformanceLib: Use EFI_MM_COMMUNICATE_HEADER
-
GitHub Action: Bump robinraju/release-downloader from 1.11 to 1.12 (#1318)
-
pip: bump edk2-pytool-library to 0.23.2, edk2-pytool-extensions to 0.29.2
-
RustToolChain: Bump RustToolChain from 1.80 to 1.84.
- Repo File Sync: synced file(s) with microsoft...
dev-v2025020000.0.0
Initial Release notes of 202502 contain a full list of mu changes on top of edk2-stable202405
PRs associated with the commits can be found at the bottom of the information pane reached by clicking on the commit hash
What's Changed## 🚀 Features & ✨ Enhancements
-
Repo File Sync: synced file(s) with microsoft/mu_devops (#1347)
-
[Squash on Rebase] Update release-basetools to use newer ubuntu. (#1343)
-
Add BuildReportEvaluation post build plugin (#1297)
-
Remove component that no longer exists.
-
Revert "Implement MmServicesTableLib for MM Core (#730)"
-
MdeModulePkg: PiSmmIpl: Fix physical address dereferencing
-
BaseTools: Change arm align value from 32 to 64
-
BaseTools: Update tools_def for aarch64
-
[Cherry-Pick]StandaloneMmPkg: MmCommunicationDxe: Add EFI_MM_COMMUNICATION3_PROTOCOL
-
[Cherry-Pick]StandaloneMmPkg: StandaloneMmIplPei: Add EFI_PEI_MM_COMMUNICATION3_PPI
-
[Cherry-Pick]MdeModulePkg: PiSmmIpl: Update MessageLength calculation for MmCommunicate
-
[Cherry-Pick] StandaloneMmPkg: StandaloneMmCore: Parsing new MM communicate header
-
MdeModulePkg/Core/PiSmmCore: Decouple MM core mailbox data
-
[Cherry-Pick] MdeModulePkg: PiSmmCore: Added parser of new MM communicate header
-
Revert "MdeModulePkg/Core/PiSmmCore: Decouple MM core mailbox data"
-
[Cherry-Pick] MdePkg: MmCommunication: Introduce EFI_PEI_MM_COMMUNICATION3_PPI to MdePkg
-
[Cherry-Pick]MdePkg: MmCommunication: Introduce EFI_MM_COMMUNICATION3_PROTOCOL to MdePkg
-
[Cherry-Pick] MdePkg: MmCommunication: Introduce EFI_MM_COMMUNICATE_HEADER_V3 to MdePkg
-
[Cherry-Pick] UefiCpuPkg: Add StmmCore for IntelMmSaveStateLib,SmmCpuPlatformHookLibNull.
-
BaseTools/UefiVarPatcher: Add plugin (#1326)
-
Squash on Rebase: Clean up Edk2 CI files.
-
Move STATIC_ASSERT abstraction to common file for BaseTools usage
-
Add CPU_INFORMATION_HEADER struct to STM_HEADER
-
BaseTools: Add GenStm
-
[CHERRY-PICK] StandaloneMmCorePerformanceLib.inf: Add gEfiEventExitBootServicesGuid
-
[CHERRY-PICK] MdeModulePkg/DxeCorePerformanceLib: Fix incorrect size calculation
-
[CHERRY-PICK] MdeModulePkg: Add Standalone MM perf library support
-
[CHERRY-PICK] MdeModulePkg: Add Standalone MM Core performance support
-
[CHERRY-PICK] MdeModulePkg/DxeCorePerformanceLib: Use EFI_MM_COMMUNICATE_HEADER
-
GitHub Action: Bump robinraju/release-downloader from 1.11 to 1.12 (#1318)
-
pip: bump edk2-pytool-library to 0.23.2, edk2-pytool-extensions to 0.29.2
-
RustToolChain: Bump RustToolChain from 1.80 to 1.84.
- Repo File Sync: synced file(s) with microsoft...
release-v2024050004.0.2
Initial Release notes of 202502 contain a full list of mu changes on top of edk2-stable202405
PRs associated with the commits can be found at the bottom of the information pane reached by clicking on the commit hash
What's Changed
-
Add CPU\_INFORMATION\_HEADER struct to STM\_HEADER @kenlautner (#1317)
Change Details
## Description
Created a new struct called CPU_INFORMATION_HEADER that is now being included in the STM_HEADER. It siphons space from the MSEG_HEADER which has a significant amount of padding. Currently CPU_INFORMATION_HEADER only contains a UINT32 representing the number of CPUs on the system but extra space is reserved for future fields.
Note that this reduces the MSEG_HEADER size to 1KB and the CPU_INFORMATION_HEADER to 1KB. This is to maintain the 4KB size requirement for the STM_HEADER.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Tested on Intel physical system that uses an STM. The system is able to operate with no issues with the change.
Integration Instructions
N/A
📖 Documentation Updates
-
BaseTools/UefiVarPatcher: Add plugin @makubacki (#1326)
Change Details
## Description
Adds a build plugin that runs in post-build to modify the UEFI variable store in the ROM image based on variable data in an XML if the plugin is enabled.
Details are in UefiVarPatcher/ReadMe.md.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
- edk2-pytool-extensions unit tests
- Run plugin locally in mu_tiano_platforms
- Tested on a physical platform build
Integration Instructions
- See
BaseTools/Plugin/UefiVarPatcher/ReadMe.md
for details
dev-v2024050004.0.1
What's Changed
-
Complete MockBootServicesTableLib.cpp @VivianNK (#1304)
Change Details
## Description
Completed the MockUefiBootServicesTableLib.cpp with missing functions. Also created a EFI_SYSTEM_TABLE instance with MockSimpleTextIn and MockSimpleTextOut
For details on how to complete these options and their meaning refer to CONTRIBUTING.md.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Local CI ran
Integration Instructions
N/A
-
StandaloneMmPkg: Add Google Mock Library for StandaloneMmMemLib @SeolforHsieh (#1287)
Change Details
## Description
Added StandaloneMmMemLib to be used by Googletests
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Added StandaloneMmMemLib to GoogleTests and able to successfully include its functions
Integration Instructions
N/A
</blockquote> <hr> </details>
-
MdePkg: Add all mock functions in the MockMmServicesTableLib @SeolforHsieh (#1279)
Change Details
## Description
Add all mock functions in the MockMmServicesTableLib
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Fill all functions in the MockMmServicesTableLib and able to successfully
include its functionsIntegration Instructions
N/A
</blockquote> <hr> </details>
-
MdePkg: Add Google Mock Protocol for MmCommunication2 @SeolforHsieh (#1288)
Change Details
## Description
Added MockMmCommunication2 to be used by Googletests
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Added MockMmCommunication2 to GoogleTests and able to successfully include its functions
Integration Instructions
N/A
</blockquote> <hr> </details>
-
[CHERRY-PICK] VS22 linker changes from edk2 [Rebase \& FF] @makubacki (#1284)
Change Details
## Description
Cherry picks a commit upstreamed (reworked from Mu original) and a similar commit made upstream to eliminate Mu delta.
[NEW] MdeModulePkg/HiiDatabaseDxe: Avoid struct assignment
Struct assignments are not permitted in EDK2, as they may be converted
by the compiler into calls to the 'memcpy' intrinsic, which is not
guaranteed to be available in EDK2.So replace the assignment with a call to CopyMem (), and -while at it-
replace the loop with a single CopyMem () call, as the loop operates on
items that are contiguous in memory.
[NON-FUNCTIONAL REFACTOR] MdeModulePkg/HiiDatabaseDxe: Prevent linker error
Prevent an issue where
memcpy()
instrinsic is being used after
recent MSVC linker update in windows-2022 VM image from 14.31.31103
to 14.32.31326.
[DROP MU_CHANGE TAGS] MdePkg/BaseMemoryLib: Prevent potential VS2022 linker failure
After updating between various VS2022 versions such as 17.4 to
17.5, , linker failures began to appear in several modules because
memset
is an unresolved symbol.The following functions in BaseMemoryLib/MemLibGeneric.c have their
loop pattern replaced with thememset
intrinsic function:InternalMemSetMem16()
InternalMemSetMem32()
InternalMemSetMem64()
An example of an error related to
InternalMemSetMem64()
in
VariableSmmRuntimeDxe is shown below:INFO - BaseMemoryLib.lib(MemLibGeneric.obj) : error LNK2001: unresolved external symbol memset INFO - <...>\VariableSmmRuntimeDxe.dll : fatal error LNK1120: 1 unresolved externals
This was reproduced in several environments including:
-
Public VM image:
https://github.com/actions/runner-images/blob/win22/20230226.1/images/win/Windows2022-Readme.md -
Locally when updating from 17.4.4 to 17.5.1
Note: This image (with 17.4) does not have this issue
https://github.com/actions/runner-images/blob/win22/20230219.1/images/win/Windows2022-Readme.mdThis change updates the type cast for the destination buffer to be
a pointer tovolatile
data to prevent this optimization with a
relatively minimum delta to prior implementation.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
- VS22 build and CI.
- QEMU boot.
Integration Instructions
- N/A
🐛 Bug Fixes
-
[CHERRY-PICK] DebugMacroCheck: Do not show progress bar with zero items @makubacki (#1296)
Change Details
## Description
In the case that the total provided to the
_show_progress()
function is zero, do not show a progress bar to prevent abortsZeroDivisionError
when calculating the progress percentage.- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
- Test progress bar with zero and non-zero total
Integration Instructions
- N/A
-
MdeModulePkg/SmmCorePerformanceLib: Remove offset from comm buffer dest space @makubacki (#1285)
Change Details
## Description
A check validates that if perf records are being written to the comm buffer (not a buffer pointed to from the comm buffer) that enough space is available after the
SMM_BOOT_RECORD_COMMUNICATE
header in the comm buffer for the boot record size requested. That check currently removes the offset from the boot record size but that is not needed since the offset is applied to the source buffer and the record size is what is copied into the destination (comm buffer).- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
- Send multiple rounds of perf data across the comm buffer using offsets across the calls.
Integration Instructions
- N/A
-
ShellPkg: Removed EmptyParamList and SfoParamList from MockShellLib.cpp @v-bhavanisu (#1280)
Change Details
## Description
Removed EmptyParamList and SfoParamList from MockShellLib.cpp, since these are already defined as externs under ShellLib.h.
Please refer to edk2 PR, where they suggested to remove EmptyParamList and SfoParamList, since it was giving GCC build Error.
tianocore/edk2#10582- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Added MockShellLib to GoogleTests and able to successfully include its functions
Integration Instructions
N/A
Full Changelog: dev-v2024050004.0.0...dev-v2024050004.0.1
release-v2024050004.0.1
What's Changed
-
Complete MockBootServicesTableLib.cpp @VivianNK (#1304)
Change Details
## Description
Completed the MockUefiBootServicesTableLib.cpp with missing functions. Also created a EFI_SYSTEM_TABLE instance with MockSimpleTextIn and MockSimpleTextOut
For details on how to complete these options and their meaning refer to CONTRIBUTING.md.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Local CI ran
Integration Instructions
N/A
-
StandaloneMmPkg: Add Google Mock Library for StandaloneMmMemLib @SeolforHsieh (#1287)
Change Details
## Description
Added StandaloneMmMemLib to be used by Googletests
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Added StandaloneMmMemLib to GoogleTests and able to successfully include its functions
Integration Instructions
N/A
</blockquote> <hr> </details>
-
MdePkg: Add all mock functions in the MockMmServicesTableLib @SeolforHsieh (#1279)
Change Details
## Description
Add all mock functions in the MockMmServicesTableLib
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Fill all functions in the MockMmServicesTableLib and able to successfully
include its functionsIntegration Instructions
N/A
</blockquote> <hr> </details>
-
MdePkg: Add Google Mock Protocol for MmCommunication2 @SeolforHsieh (#1288)
Change Details
## Description
Added MockMmCommunication2 to be used by Googletests
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Added MockMmCommunication2 to GoogleTests and able to successfully include its functions
Integration Instructions
N/A
</blockquote> <hr> </details>
-
[CHERRY-PICK] VS22 linker changes from edk2 [Rebase \& FF] @makubacki (#1284)
Change Details
## Description
Cherry picks a commit upstreamed (reworked from Mu original) and a similar commit made upstream to eliminate Mu delta.
[NEW] MdeModulePkg/HiiDatabaseDxe: Avoid struct assignment
Struct assignments are not permitted in EDK2, as they may be converted
by the compiler into calls to the 'memcpy' intrinsic, which is not
guaranteed to be available in EDK2.So replace the assignment with a call to CopyMem (), and -while at it-
replace the loop with a single CopyMem () call, as the loop operates on
items that are contiguous in memory.
[NON-FUNCTIONAL REFACTOR] MdeModulePkg/HiiDatabaseDxe: Prevent linker error
Prevent an issue where
memcpy()
instrinsic is being used after
recent MSVC linker update in windows-2022 VM image from 14.31.31103
to 14.32.31326.
[DROP MU_CHANGE TAGS] MdePkg/BaseMemoryLib: Prevent potential VS2022 linker failure
After updating between various VS2022 versions such as 17.4 to
17.5, , linker failures began to appear in several modules because
memset
is an unresolved symbol.The following functions in BaseMemoryLib/MemLibGeneric.c have their
loop pattern replaced with thememset
intrinsic function:InternalMemSetMem16()
InternalMemSetMem32()
InternalMemSetMem64()
An example of an error related to
InternalMemSetMem64()
in
VariableSmmRuntimeDxe is shown below:INFO - BaseMemoryLib.lib(MemLibGeneric.obj) : error LNK2001: unresolved external symbol memset INFO - <...>\VariableSmmRuntimeDxe.dll : fatal error LNK1120: 1 unresolved externals
This was reproduced in several environments including:
-
Public VM image:
https://github.com/actions/runner-images/blob/win22/20230226.1/images/win/Windows2022-Readme.md -
Locally when updating from 17.4.4 to 17.5.1
Note: This image (with 17.4) does not have this issue
https://github.com/actions/runner-images/blob/win22/20230219.1/images/win/Windows2022-Readme.mdThis change updates the type cast for the destination buffer to be
a pointer tovolatile
data to prevent this optimization with a
relatively minimum delta to prior implementation.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
- VS22 build and CI.
- QEMU boot.
Integration Instructions
- N/A
🐛 Bug Fixes
-
[CHERRY-PICK] DebugMacroCheck: Do not show progress bar with zero items @makubacki (#1296)
Change Details
## Description
In the case that the total provided to the
_show_progress()
function is zero, do not show a progress bar to prevent abortsZeroDivisionError
when calculating the progress percentage.- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
- Test progress bar with zero and non-zero total
Integration Instructions
- N/A
-
ShellPkg: Removed EmptyParamList and SfoParamList from MockShellLib.cpp @v-bhavanisu (#1280)
Change Details
## Description
Removed EmptyParamList and SfoParamList from MockShellLib.cpp, since these are already defined as externs under ShellLib.h.
Please refer to edk2 PR, where they suggested to remove EmptyParamList and SfoParamList, since it was giving GCC build Error.
tianocore/edk2#10582- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Added MockShellLib to GoogleTests and able to successfully include its functions
Integration Instructions
N/A
release-v2024050003.1.0
What's Changed
-
MdePkg: Add Google Mock Library for SmmMemLib @SeolforHsieh (#1265)
Change Details
## Description
Added MockSmmMemLib to be used by Googletests
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Added MockSmmMemLib to GoogleTests and able to successfully include its functions
Integration Instructions
N/A
</blockquote> <hr> </details>
-
BaseTools/ClangPdbToolChain: Improve CLANG\_BIN guidance @makubacki (#1278)
Change Details
## Description
Explain whether the default path or a user provided path was used. If the default path is used and not present, then indicate so and give the shell variable name to set to a custom installation bin directory.
Before
After
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
- Test with clang path set to a valid and invalid path.
Integration Instructions
- N/A
-
[CHERRY-PICK] MdePkg/IndustryStandard: Adds SPMI macros @slo2024 (#1275)
Change Details
## Description
Adds macro which defines SPMI table revision
and interface type as per the specification.Cc: Michael D Kinney [email protected]
Cc: Liming Gao [email protected]
Cc: Zhiguang Liu [email protected]
Cc: Sami Mujawar [email protected]
Cc: Pierre Gondois [email protected]
Signed-off-by: Abdul Lateef Attar [email protected]
(cherry picked from commit 0958b76)- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Built successfully
Integration Instructions
N/A
-
[CHERRY-PICK] Fix lcov 2.0 in HostBasedUnitTestRunner [Rebase \& FF] @makubacki (#1274)
Change Details
## Description
Fixes issues encountered with lcov 2.0 after moving to the new Ubuntu 24.04 image. Already encountered in the edk2 Fedora container. Commits made there after the 2411 stable tag are cherry-picked here.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
- Container build with code coverage enabled in Ubuntu 24.04
Integration Instructions
- N/A
-
Added MockShellCommandLib @v-bhavanisu (#1264)
Change Details
## Description
Added MockShellCommandLib to be used by Googletests
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Added MockShellCommandLib to GoogleTests and able to successfully include its functions
Integration Instructions
N/A
-
[REBASE \& FF] MpDxe: Produce MpServices protocol as a standalone Mp dxe driver @vineelko (#1253)
Change Details
## Description
This PR creates a fork of MP services functionality into a standalone Dxe driver. It is necessary to bring up platforms which do not rely on UEFI C based CpuDxe code. Existing Cpu Dxe and its MP services code remains the same.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Q35 Qemu boots.
Integration Instructions
No changes needed.
</blockquote> <hr> </details>
-
[Cherry-Pick] MdePkg: Add rest mock functions for Mock UefiRuntimeServicesTableLib @v-frankchou (#1256)
Change Details
## Description Add rest mock functions for Mock UefiRuntimeServicesTableLib for google test.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Tested in module integrated with this MockUefiRuntimeServicesTableLib and the result is passed.
Integration Instructions
Include the MockUefiRuntimeServicesTableLib.inf in the LibraryClasses section of a dsc file.
</blockquote> <hr> </details>
-
[CHERRY-PICK] Move UFS spec headers into MdePkg/IndustryStandard files and update to UFS 4.0 @zurcher (#1254)
Change Details
# Description
(Cherry-pick from edk2. Commits should be applied as-is and not merged into a single commit.)
The spec-based header definitions for UFS drivers are currently in two identical private header files. This change set moves the definitions into the IndustryStandard folder with two separate files tracking relevant UFS spec documents. This will allow for future spec updates to be made in a single location, and allows for other drivers to access these definitions.
Additionally, this set updates Ufs.h to the UFS 4.0 spec.- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
Added UfsBlockIoPei and UfsPassThruDxe to OvmfPkg, and built successfully.
Integration Instructions
Drivers can now include
<IndustryStandard/Ufs.h>
to interact with UFS interfaces such as<Protocol/UfsDeviceConfig.h>
.
🚀 Features & ✨ Enhancements
-
MdeModulePkg/UefiBootManagerLib: Register var policy on notify @makubacki (#1276)
Change Details
## Description
Variable policy is currently set in the constructor. In some system designs, variable policy might not be running when the constructor of this library is executed. To make the policy registration process more robust, move registration to a protocol notify.
- Impacts functionality?
- Impacts security?
- Breaking change?
- Includes tests?
- Includes documentation?
- Backport to release branch?
How This Was Tested
- Verify notify is called on variable policy protocol installation and register policy successfully.
- Verify subsequent calls to the protocol gracefully exit by recognizing
EFI_ALREADY_STARTED
is returned fromRegisterBasicVariablePolicy()
.
Integration Instructions
N/A