AdvLoggerPkg: Drop buffer migration#868
AdvLoggerPkg: Drop buffer migration#868makubacki wants to merge 1 commit intomicrosoft:release/202511from
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release/202511 #868 +/- ##
================================================
Coverage ? 3.08%
================================================
Files ? 36
Lines ? 4246
Branches ? 73
================================================
Hits ? 131
Misses ? 4109
Partials ? 6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b97e867 to
f923ebd
Compare
✅ QEMU Validation PassedSource Dependencies
Results
Workflow run: https://github.com/microsoft/mu_plus/actions/runs/24160924905 This comment was automatically generated by the Mu QEMU PR Validation workflow. |
Effectively reverts commits af0f64c and 9fc8521 preserving structure compatibility and general cleanup. The advanced logger buffer starts accumulating messages in the first phase advanced logger is active, and the buffer continues to be used throughout remaining phases. Each phase has to account for either allocating or using an existing logger buffer. Due to the persistent nature of the buffer throughout boot, it is allocated as a runtime memory type early in boot to support its preservation and access at OS runtime. However, S4 resume relies upon a stable memory map across suspend and resume. Since the advanced logger buffer is allocated as a runtime memory type prior to DXE, it is in a buffer outside the DXE memory bins. This leads to an increased likelihood of the buffer being at a different address across suspend and resume affecting hibernate resume. Advanced logger buffer migration was a mechanism to address this but doing so complicates MM treatment of the buffer. Because a single advanced logger buffer is used across all phases, including a shared buffer between PEI and MM and DXE and MM, the buffer must be unlocked for MM access to accommodate a PEI MM IPL. This creates a problem where both requirements cannot simultaneously be met without additional complexity in MM access code. In addition, MM environments are inconsistent in their support for memory unlocking. In the end, hibernation has always been a best effort scenario with this flow and other MM solutions already require runtime allocations outside of DXE memory bins so this change removes the functional logic for migration. The memory bin scenario will be addressed in the future when the bins are allocated in a pre-DXE phase (e.g. PEI) and picked up by DXE. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
f923ebd to
4afb60c
Compare
| EFI_TIME Time; // Uefi Time Field | ||
| UINT32 HwPrintLevel; // Logging level to be printed at hw port | ||
| UINT32 Reserved3; // | ||
| EFI_PHYSICAL_ADDRESS NewLoggerInfoAddress; // If non-zero, this field holds the address of new logger info that should be used |
There was a problem hiding this comment.
Should we mark NewLoggerInfoAddress reserved/deprecated?
There was a problem hiding this comment.
I think we should, as long as we say that Reserved fields cannot be used in the future.
cfernald
left a comment
There was a problem hiding this comment.
re-approving since github seems to have glitched and didn't count it before.
Description
Effectively reverts commits af0f64c and 9fc8521 preserving structure compatibility and general cleanup.
The advanced logger buffer starts accumulating messages in the first phase advanced logger is active, and the buffer continues to be used throughout remaining phases. Each phase has to account for either allocating or using an existing logger buffer. Due to the persistent nature of the buffer throughout boot, it is allocated as a runtime memory type early in boot to support its preservation and access at OS runtime.
However, S4 resume relies upon a stable memory map across suspend and resume. Since the advanced logger buffer is allocated as a runtime memory type prior to DXE, it is in a buffer outside the DXE memory bins. This leads to an increased likelihood of the buffer being at a different address across suspend and resume affecting hibernate resume. Advanced logger buffer migration was a mechanism to address this but doing so complicates MM treatment of the buffer.
Because a single advanced logger buffer is used across all phases, including a shared buffer between PEI and MM and DXE and MM, the buffer must be unlocked for MM access to accommodate a PEI MM IPL. This creates a problem where both requirements cannot simultaneously be met without additional complexity in MM access code. In addition, MM environments are inconsistent in their support for memory unlocking.
In the end, hibernation has always been a best effort scenario with this flow and other MM solutions already require runtime allocations outside of DXE memory bins, so this change removes the functional logic for migration.
The memory bin scenario will be addressed in the future when the bins are allocated in a pre-DXE phase (e.g. PEI) and picked up by DXE.
How This Was Tested
Integration Instructions