Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cherry-Pick] Add call to HdwPortInitialize() when instantiating logger in DXE (#411) #422

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

kuqin12
Copy link
Contributor

@kuqin12 kuqin12 commented Jan 25, 2024

Description

This change adds a call to AdvancedLoggerHdwPortInitialize() when the advanced logger is created in the DxeCoreAdvancedLoggerLibConstructor(). Previously, hardware port was only initalized in AdvancedLoggerGetInfo() if the logging info structure was present at a fixed location or in a HOB; this would cause writes to the hardware port to potentially fail in the path where the logger is not initialized until the Constructor is called.

  • Impacts functionality?
  • AdvancedLoggerHdwPortInitialize() is now called in the DxeCoreAdvancedLoggerLibConstructor if the logger is instantiated there.
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

Verified on a platform where this was not working due to missing HdwPort initialization; verified after this patch that it works as expected.

Integration Instructions

N/A

@kuqin12 kuqin12 requested a review from apop5 January 25, 2024 19:51
…rosoft#411)

## Description

This change adds a call to AdvancedLoggerHdwPortInitialize() when the
advanced logger is created in the DxeCoreAdvancedLoggerLibConstructor().
Previously, hardware port was only initalized in AdvancedLoggerGetInfo()
if the logging info structure was present at a fixed location or in a
HOB; this would cause writes to the hardware port to potentially fail in
the path where the logger is not initialized until the Constructor is
called.

- [x] Impacts functionality?
- AdvancedLoggerHdwPortInitialize() is now called in the
DxeCoreAdvancedLoggerLibConstructor if the logger is instantiated there.
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

Verified on a platform where this was not working due to missing HdwPort
initialization; verified after this patch that it works as expected.

## Integration Instructions

N/A

---------

Co-authored-by: kuqin12 <[email protected]>
(cherry picked from commit 6d5e0c5)
@kuqin12 kuqin12 enabled auto-merge (rebase) January 25, 2024 19:54
@kuqin12 kuqin12 merged commit 833db39 into microsoft:release/202302 Jan 25, 2024
29 checks passed
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.

5 participants