Skip to content

Conversation

@Javagedes
Copy link
Collaborator

@Javagedes Javagedes commented Nov 21, 2025

Description

The compiler, on release builds, is removing the set_hob_list call due to being wrapped in a debug_assert. This results in in the hob list not being set, and us failing to get the hob list later. Due to lack to tests down the main setup code path, this was missed.

This commit wraps the code in an assert instead and changes the interface.

REF: OpenDevicePartnership/patina-qemu#86

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

How This Was Tested

Boot to shell Q35 RELEASE

Integration Instructions

N/A

@github-actions github-actions bot added the impact:non-functional Does not have a functional impact label Nov 21, 2025
@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Javagedes Javagedes force-pushed the personal/joeyvagedes/stop-optimize branch from 9c8eb92 to 45a79d0 Compare November 21, 2025 05:21
The compiler, on release builds, was optimizing out the call_once call, so future calls to set_hob_list was panicking. This commit changes the debug_assert to an �ssert and changes the 	rue return from set_hob_list to be based off of the inner value of hob_list to hint to the compiler that the call_once cannot be optimized away.
@Javagedes Javagedes force-pushed the personal/joeyvagedes/stop-optimize branch from 45a79d0 to ce7a11d Compare November 21, 2025 16:10
@Javagedes Javagedes added the type:bug Something isn't working label Nov 21, 2025
@Javagedes Javagedes self-assigned this Nov 21, 2025
@Javagedes Javagedes enabled auto-merge (squash) November 21, 2025 16:19
@Javagedes Javagedes merged commit d48045f into OpenDevicePartnership:main Nov 21, 2025
8 checks passed
@Javagedes Javagedes changed the title patina_dxe_core: Prevent setting hob_list from being optimized out patina_dxe_core: Do not wrap set_hob_list in debug_assert Nov 21, 2025
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 type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants