microsoft / microsoft/mu_plus

[Task]: Create Scratchpad Space for PeiCore AdvancedLoggerLib and Drop PEI_CORE_INSTANCE Hack

Open
#910 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:feature-request urgency:medium
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.