-
Notifications
You must be signed in to change notification settings - Fork 41
patina_dxe_core: Clean up HOB init flow #1120
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
Merged
makubacki
merged 1 commit into
OpenDevicePartnership:main
from
makubacki:add_c_hob_list_opt_to_core
Nov 26, 2025
Merged
patina_dxe_core: Clean up HOB init flow #1120
makubacki
merged 1 commit into
OpenDevicePartnership:main
from
makubacki:add_c_hob_list_opt_to_core
Nov 26, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
5 tasks
joschock
approved these changes
Nov 25, 2025
Javagedes
reviewed
Nov 25, 2025
d5d79a6 to
0c39568
Compare
0c39568 to
9258040
Compare
joschock
reviewed
Nov 26, 2025
9258040 to
2dd858a
Compare
Javagedes
approved these changes
Nov 26, 2025
2dd858a to
7d52820
Compare
Collaborator
Author
|
Fyi: The most recent update just pushes some unit tests for |
The HOB list is relocated to DXE allocated memory shortly into DXE core entry. The Rust allocated HOB list is not binary compatible with the C HOB list. The Rust HOB list is a vector of references to HOB structures while the C hob list is a compact series of binary HOB structures. While the Rust HOB list is sufficient for most use cases that simply need information from the HOBs in a more type safe and ergonomic interface, there are still use cases that require binary compatibility of the HOB list such as placement of the HOB into the system table where it is discovered by other modules, including C modules. Today, this works because the HOB list pointer is direclty passed to the system table initialization function where it is placed into the HOB list system table. This change updates the stored HOB list context to maintain a C HOB list pointer in addition to the Rust managed list so all HOB list context is available in the structure. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
7d52820 to
98d4a67
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The HOB list is relocated to DXE allocated memory shortly into DXE core entry. The Rust allocated HOB list is not binary compatible with the C HOB list. The Rust HOB list is a vector of references to HOB structures while the C hob list is a compact series of binary HOB structures.
While the Rust HOB list is sufficient for most use cases that simply need information from the HOBs in a more type safe and ergonomic interface, there are still use cases that require binary compatibility of the HOB list such as placement of the HOB into the system table where it is discovered by other modules, including C modules.
Today, this works because the HOB list pointer is directly passed to the system table initialization function where it is placed into the HOB list system table. This change relocates both HOB lists in the same place in the
init_memory()function. Later DXE functionality consistently works on a relocated HOB list afterinit_memory()returns.How This Was Tested
cargo make allIntegration Instructions