[Task]: Create Scratchpad Space for PeiCore AdvancedLoggerLib and Drop PEI_CORE_INSTANCE Hack
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 265
- Forks
- 131
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 6
Description
Feature Overview
Currently, the PEI Core instance of AdvancedLoggerLib relies on hacking the PEI_CORE_INSTANCE to have a stack based pointer to the advanced logger buffer. This avoids a HOB lookup on every log message. The lib instance uses PeiMain.h to have the definition of the structure.
However, mu_basecore has been updated to include an edk2 change that added a private header to PeiMain.h (which is private but not enforced so by the build system), which breaks the builds. In response, a temporary workaround was added to force include this private header.
Solution Overview
The hack of using PEI_CORE_INSTANCE can be dropped entirely and a separate scratchpad space can be used to avoid the HOB lookup.
Alternatives Considered
No response
Urgency
Medium
Are you going to implement the feature request?
I will implement the feature
Do you need maintainer feedback?
No maintainer feedback needed
Anything else?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the PEI Core AdvancedLoggerLib instance and its use of PeiMain.h, PEI_CORE_INSTANCE, and the advanced logger buffer. Trace how the current stack-based pointer avoids repeated HOB lookup, then identify the scratchpad space and update the affected build workaround. Done means the PEI Core logger no longer depends on the PEI_CORE_INSTANCE hack or forced private-header inclusion and the relevant builds pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100