Is there an existing issue for this?
Current Behavior
https://github.com/OpenDevicePartnership/patina/blob/main/sdk/patina/src/pi/hob.rs
Hob Said
/// Union of all the possible HOB Types.
///
#[derive(Clone, Debug)]
pub enum Hob<'a> {
But it is not true. The MemoryPool and Unused are not covered.
Expected Behavior
The enum Hob and its iterator should support iterating through all HOBs intuitively.
SHOULD: Review or document the Hob::Misc design.
Per the spec and my understanding, HOB is an open design, and all HOBs share a common header. Binding to a generic header is more intuitive than using a heterogeneous integer representation. If we agree with this, the code should be refactored.
If we do not accept this, it would be better to add documentation explaining the rationale and the associated trade-offs.
Steps To Reproduce
Added a C-based CheckHobApp and rust-based chk-hob source code and checked logs.
Comparing the aaa and bbb, see the difference.
BTW, I know I can adjust the rust example to accommodate and hack the current Patina HOB behavior. I just want to say that current Hob::Misc is counterintuitive.
CheckHobApp.c.txt
chk-hob.rs.txt
aaa-by-EDK2-CheckHobApp.txt
bbb-by-Rust-chk-hob.txt
Build Environment
- OS(s): Windows 11
- Targets Impacted:
Version Information
Urgency
Low
Are you going to fix this?
Someone else needs to fix it
Do you need maintainer feedback?
Maintainer feedback requested
Anything else?
No response
Is there an existing issue for this?
Current Behavior
https://github.com/OpenDevicePartnership/patina/blob/main/sdk/patina/src/pi/hob.rs
Hob Said
But it is not true. The
MemoryPoolandUnusedare not covered.Expected Behavior
The
enum Hoband its iterator should support iterating through all HOBs intuitively.SHOULD: Review or document the
Hob::Miscdesign.Per the spec and my understanding, HOB is an open design, and all HOBs share a common header. Binding to a generic header is more intuitive than using a heterogeneous integer representation. If we agree with this, the code should be refactored.
If we do not accept this, it would be better to add documentation explaining the rationale and the associated trade-offs.
Steps To Reproduce
Added a C-based CheckHobApp and rust-based chk-hob source code and checked logs.
Comparing the
aaaandbbb, see the difference.BTW, I know I can adjust the rust example to accommodate and hack the current Patina HOB behavior. I just want to say that current
Hob::Miscis counterintuitive.CheckHobApp.c.txt
chk-hob.rs.txt
aaa-by-EDK2-CheckHobApp.txt
bbb-by-Rust-chk-hob.txt
Build Environment
Version Information
Urgency
Low
Are you going to fix this?
Someone else needs to fix it
Do you need maintainer feedback?
Maintainer feedback requested
Anything else?
No response