Skip to content

AdvLoggerPkg/AdvancedLoggerLib: Print to HW if logger info is not available#876

Draft
makubacki wants to merge 1 commit intomicrosoft:release/202511from
makubacki:print_to_hdw_if_logger_info_not_avail
Draft

AdvLoggerPkg/AdvancedLoggerLib: Print to HW if logger info is not available#876
makubacki wants to merge 1 commit intomicrosoft:release/202511from
makubacki:print_to_hdw_if_logger_info_not_avail

Conversation

@makubacki
Copy link
Copy Markdown
Member

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:

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.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

  • Test MM entry with and without gAdvancedLoggerHobGuid in the HOB list.

Integration Instructions

  • N/A

…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>
@makubacki makubacki self-assigned this Apr 17, 2026
@mu-automation
Copy link
Copy Markdown
Contributor

mu-automation bot commented Apr 17, 2026

✅ QEMU Validation Passed

Source Dependencies

Repository Commit
mu_plus d388772
mu_tiano_platforms c7453e8

Results

Platform Target Build Boot Overall Boot Time Build Logs Boot Logs
Q35 DEBUG ✅ success ✅ success 0m 18s Build Logs Boot Logs
SBSA DEBUG ✅ success ✅ success 0m 27s Build Logs Boot Logs

Workflow run: https://github.com/microsoft/mu_plus/actions/runs/24589992236

This comment was automatically generated by the Mu QEMU PR Validation workflow.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release/202511@87ab47e). Learn more about missing BASE report.

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           
Flag Coverage Δ
AdvLoggerPkg 2.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants