AdvLoggerPkg/AdvancedLoggerLib: Print to HW if logger info is not available#876
Draft
makubacki wants to merge 1 commit intomicrosoft:release/202511from
Draft
Conversation
…ilable
In the course of testing advanced logger changes with edk2 Standalone
MM on OVMF, there was a change needed in MmPlatformHobProducerLibOvmf
in OvmfPkg to account for gAdvancedLoggerHobGuid in the HOBs that are
passed to the MM environment.
Prior to this change, the system appeared to hang entering that
environment:
```
INFO - Loading PEIM at 0x00005B95000 EntryPoint=0x00005B95340 StandaloneMmIplPei.efi
INFO - StandaloneMM IPL loading MM Core at MMRAM address 7FF0000
INFO - MmCoreImageBase - 0x0000000007FF0000
INFO - MmCoreImageSize - 0x0000000000010000
INFO - StandaloneMM IPL calling Standalone MM Core at MMRAM address - 0x0000000007FF1000
```
After the change, the issue is clearly printed to serial output:
("MmCore AdvancedLoggerGetLoggerInfo: Advanced Logger Hob not found")
```
INFO - Loading PEIM at 0x00005B94000 EntryPoint=0x00005B94340 StandaloneMmIplPei.efi
INFO - StandaloneMM IPL loading MM Core at MMRAM address 7FF0000
INFO - MmCoreImageBase - 0x0000000007FF0000
INFO - MmCoreImageSize - 0x0000000000010000
INFO - StandaloneMM IPL calling Standalone MM Core at MMRAM address - 0x0000000007FF1000
INFO - MmCore AdvancedLoggerGetLoggerInfo: Advanced Logger Hob not found
INFO - MmMain - 0x5B11000
INFO - MmramRangeCount - 0x4
INFO - MmramRanges[0]: 0x0000000006000000 - 0x1000
INFO - MmramRanges[1]: 0x0000000006001000 - 0xE000
INFO - MmramRanges[2]: 0x000000000600F000 - 0x1FE1000
INFO - MmramRanges[3]: 0x0000000007FF0000 - 0x10000
INFO - MmInitializeMemoryServices
INFO - MmAddMemoryRegion 2 : 0x000000000600F000 - 0x0000000001FE1000
INFO - HobSize - 0x538
INFO - MmHobStart - 0x7FEE810
INFO - MmInstallConfigurationTable For HobList
INFO - ASSERT [StandaloneMmCore] AdvancedLoggerLib.c(164): mLoggerInfo != ((void *) 0)
```
This change allows writes to proceed to hardware output if enabled
even if the logger info is not available, to make information such as
this available for debugging purposes.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Contributor
✅ QEMU Validation PassedSource Dependencies
Results
Workflow run: https://github.com/microsoft/mu_plus/actions/runs/24589992236 This comment was automatically generated by the Mu QEMU PR Validation workflow. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/202511 #876 +/- ##
================================================
Coverage ? 2.86%
================================================
Files ? 36
Lines ? 4579
Branches ? 73
================================================
Hits ? 131
Misses ? 4442
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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In the course of testing advanced logger changes with edk2 Standalone MM on OVMF, there was a change needed in MmPlatformHobProducerLibOvmf in OvmfPkg to account for gAdvancedLoggerHobGuid in the HOBs that are passed to the MM environment.
Prior to this change, the system appeared to hang entering that environment:
After the change, the issue is clearly printed to serial output: ("MmCore AdvancedLoggerGetLoggerInfo: Advanced Logger Hob not found")
This change allows writes to proceed to hardware output if enabled even if the logger info is not available, to make information such as this available for debugging purposes.
How This Was Tested
gAdvancedLoggerHobGuidin the HOB list.Integration Instructions