Skip to content

[REBASE & FF] AdvLoggerPkg: PeiCore Instance: Use Local PeiMain.h#909

Merged
os-d merged 2 commits into
microsoft:release/202511from
os-d:hack_it_further
Jun 26, 2026
Merged

[REBASE & FF] AdvLoggerPkg: PeiCore Instance: Use Local PeiMain.h#909
os-d merged 2 commits into
microsoft:release/202511from
os-d:hack_it_further

Conversation

@os-d

@os-d os-d commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Description

The PEI Core AdvLoggerLib instance relies on PeiMain.h which defines the PEI_CORE_INSTANCE structure. A special PlatformBlob is added there to use stack space for the adv logger info pointer. This avoids a HOB lookup for every log.

However, edk2's PeiMain.h has been updated to use a private header in PeiMain.h. This is pulled into mu_basecore, which then breaks building this library because it doesn't have access to the private header.

Using PEI_CORE_INSTANCE to host the advanced logger pointer has always been a hack; it will be separately addressed and removed, but in the meantime, this library needs to continue to work.

This copies PeiMain.h, removes the use of the private header, and consumes it in the PeiCore instance of AdvLoggerLib.

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

How This Was Tested

Booting patina-qemu to shell with the PEI memory bin changes cherry-picked.

Integration Instructions

N/A.

@os-d os-d requested review from apop5, cfernald, kuqin12 and makubacki June 25, 2026 17:51
@mu-automation

mu-automation Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

⏩ QEMU Validation Skipped

The PR was merged before validation completed.

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

@mu-automation mu-automation Bot added the impact:non-functional Does not have a functional impact label Jun 25, 2026
@makubacki

Copy link
Copy Markdown
Member

@os-d, since this hinges on following up with dropping the hack, can you go ahead and create a tracking issue for it?

Comment thread AdvLoggerPkg/Library/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.inf Outdated
@os-d

os-d commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

@os-d, since this hinges on following up with dropping the hack, can you go ahead and create a tracking issue for it?

Created #910

@codecov-commenter

codecov-commenter commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release/202511@38867aa). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...rary/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.c 0.00% 2 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##             release/202511    #909   +/-   ##
================================================
  Coverage                  ?   3.03%           
================================================
  Files                     ?      37           
  Lines                     ?    4312           
  Branches                  ?      73           
================================================
  Hits                      ?     131           
  Misses                    ?    4175           
  Partials                  ?       6           
Flag Coverage Δ
AdvLoggerPkg 3.03% <0.00%> (?)

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

☔ View full report in Codecov by Harness.
📢 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.

@os-d os-d force-pushed the hack_it_further branch 2 times, most recently from b69f00d to 17d290e Compare June 25, 2026 19:13
@os-d os-d force-pushed the hack_it_further branch 3 times, most recently from 1ac875d to df6d04e Compare June 25, 2026 22:03
@os-d os-d changed the title AdvLoggerPkg: PeiCore Instance: Force Include Private Header AdvLoggerPkg: PeiCore Instance: Copy PeiMain.h Jun 25, 2026
This is a direct copy of PeiMain.h to be amended in
a future commit.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
@os-d os-d force-pushed the hack_it_further branch from df6d04e to 0b6a081 Compare June 25, 2026 22:07
@os-d os-d changed the title AdvLoggerPkg: PeiCore Instance: Copy PeiMain.h [REBASE & FF] AdvLoggerPkg: PeiCore Instance: Use Local PeiMain.h Jun 25, 2026
Update the local PeiMain.h to not use the private
header and instead use a VOID * for the type that
was pulled from the private header.

Consume this in the PeiCore instance of
AdvLoggerLib.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
@os-d os-d force-pushed the hack_it_further branch from 0b6a081 to ba01606 Compare June 26, 2026 13:39

@makubacki makubacki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, with the understanding that this is a necessary temporary workaround while the GitHub issue is resolved.

@os-d os-d merged commit e565ad2 into microsoft:release/202511 Jun 26, 2026
42 checks passed
@os-d os-d deleted the hack_it_further branch June 26, 2026 14:15
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants