Skip to content

Conversation

apop5
Copy link
Collaborator

@apop5 apop5 commented Apr 8, 2025

Description

Pull in the commits from 202405 Branch to 202502 Branch.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?
  • Backport to release branch?

How This Was Tested

CI Passes with changes pulled.

Integration Instructions

No integration required.

makubacki and others added 22 commits April 8, 2025 16:43
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.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
(cherry picked from commit 29f02d0)
…ailure

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 the `memset` 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.md

This change updates the type cast for the destination buffer to be
a pointer to `volatile` data to prevent this optimization with a
relatively minimum delta to prior implementation.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
(cherry picked from commit c46bc0e)
In the case that the total provided to the `_show_progress()`
function is zero, do not show a progress bar to prevent aborts
`ZeroDivisionError` when calculating the progress percentage.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
(cherry picked from commit 67df979)
…icrosoft#1295)

Bumps
[robinraju/release-downloader](https://github.com/robinraju/release-downloader)
from 1.11 to 1.12.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron <aaronpop@microsoft.com>
This commit completes the MockUefiBootServicesTableLib by adding the
missing functions and data structures.

This includes MockSimpleTextIn and MockSimpleTextOut protocols for the
EFI_SYSTEM_TABLE.
Bumps [pygount](https://github.com/roskakori/pygount) from 1.8.0 to
2.0.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
synced local file(s) with
[microsoft/mu_devops](https://github.com/microsoft/mu_devops).

🤖: View the [Repo File Sync Configuration
File](https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml)
to see how files are synced.



---

This PR was created automatically by the
[repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action)
workflow run
[#14031159574](https://github.com/microsoft/mu_devops/actions/runs/14031159574)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
…icrosoft#1318)

Bumps
[robinraju/release-downloader](https://github.com/robinraju/release-downloader)
from 1.11 to 1.12.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ATE_HEADER

Refactor the file to use the new type name EFI_MM_COMMUNICATE_HEADER.

This is the same type but follows the new name and is more clear
with upcoming Standalone MM support being added.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
(cherry picked from commit 874c24b)
Adds a new library instance to support MM core functionality for
performance in Standalone MM.

- Add StandaloneMmCorePerformanceLib instance
- Move common MM logic to a new file `MmCorePerformanceLib.c`
- Define interfaces with implementation specific to MM environment
  type in `SmmCorePerformanceLibInternal.h` and implement those
  functions in the Standalone MM and Traditional MM specific C files

Note: StandaloneMmCorePerformanceLib supports both
      `MM_CORE_STANDALONE` and `MM_STANDALONE` as some Standalone MM
	  environments have privilege separation and need to link this
	  functionality in a ring 3 Standalone MM driver that is outside
	  the ring 0 Standalone MM core driver.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
(cherry picked from commit 11b44c5)
Adds a new library instance to support logging performance data in
Standalone MM.

- Add StandaloneMmPerformanceLib instance
- Move common MM logic to a new file `SmmPerformanceLibInternal.c`
- Since the library largely defers most logic to the performance
  measurement protocol a large degree of code can be shared between
  Standalone MM and Traditional MM.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
(cherry picked from commit 1c51a26)
…calculation

The values of BootRecordDataPayloadSize and CommSize are incorrect.
BootRecordDataPayloadSize should equal to
  SmmBootRecordDataSize - SmmBootRecordDataRetrieved
CommSize should equal to
  OFFSET_OF (EFI_MM_COMMUNICATE_HEADER,Data) \
  + (UINTN)MmCommBufferHeader->MessageLength
SmmCommData->BootRecordSize should be set to BootRecordDataPayloadSize,
instead of the total size of entire Smm boot record data.

Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
(cherry picked from commiit 95bf74f)
…otServicesGuid

Adds `gEfiEventExitBootServicesGuid` to the `[Guids]` section and
removes `gEdkiiSmmExitBootServicesProtocolGuid` from the
`[Protocols]` section for the current implementation.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
(cherry picked from commit 30f3fa0)
Adds GenStm as a C tool.

Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Squash with Enable CI on next rebase.
@github-actions github-actions bot added language:python Pull requests that update Python code impact:non-functional Does not have a functional impact labels Apr 8, 2025
@codecov-commenter
Copy link

codecov-commenter commented Apr 9, 2025

Codecov Report

Attention: Patch coverage is 0% with 138 lines in your changes missing coverage. Please review.

Please upload report for BASE (dev/202502@cf9c7ce). Learn more about missing BASE report.

Files with missing lines Patch % Lines
MdeModulePkg/Universal/HiiDatabaseDxe/Image.c 0.00% 61 Missing ⚠️
...rary/SmmPerformanceLib/SmmPerformanceLibInternal.c 0.00% 55 Missing ⚠️
...rary/DxeCorePerformanceLib/DxeCorePerformanceLib.c 0.00% 12 Missing ⚠️
...brary/SmmCorePerformanceLib/MmCorePerformanceLib.c 0.00% 4 Missing ⚠️
...rary/SmmCorePerformanceLib/SmmCorePerformanceLib.c 0.00% 3 Missing ⚠️
...orePerformanceLib/StandaloneMmCorePerformanceLib.c 0.00% 2 Missing ⚠️
...ary/SmmPerformanceLib/StandaloneMmPerformanceLib.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev/202502    #1327   +/-   ##
=============================================
  Coverage              ?    1.59%           
=============================================
  Files                 ?     1408           
  Lines                 ?   364652           
  Branches              ?     4570           
=============================================
  Hits                  ?     5799           
  Misses                ?   358780           
  Partials              ?       73           
Flag Coverage Δ
MdeModulePkg 0.64% <0.00%> (?)
MdePkg 5.54% <ø> (?)
NetworkPkg 0.55% <ø> (?)
PolicyServicePkg 30.42% <ø> (?)
UefiCpuPkg 4.86% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@makubacki
Copy link
Member

@apop5, it just went in, but could you please include this change?
#1326

## 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?
- [x] Includes documentation?
- [x] 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

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
@apop5 apop5 merged commit c7881cf into microsoft:dev/202502 Apr 9, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:non-functional Does not have a functional impact language:python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants