Add EFI_RAM_DISK_PROTOCOL bindings#1490
Conversation
✅ QEMU Validation PassedAll QEMU validation jobs completed successfully.
Workflow run: https://github.com/OpenDevicePartnership/patina/actions/runs/25763683078 Boot Time to EFI Shell
Dependencies
This comment was automatically generated by the Patina QEMU PR Validation Post workflow. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
606b2d5 to
d903807
Compare
d903807 to
e50a168
Compare
b5a0a29 to
4cc7930
Compare
os-d
left a comment
There was a problem hiding this comment.
Same comment here as the nvme one if Patina boot is planning on consuming this.
| //! UEFI RAM Disk Protocol bindings. | ||
| //! | ||
| //! Used to install a contiguous range of system memory as a virtual block device the system | ||
| //! firmware can boot from. The SRE flow uses this to boot the recovery WIM after reading it |
There was a problem hiding this comment.
This reads as a platform behavior, we should keep the protocol to the broad definition (i.e. nothing in here should talk about SRE)
There was a problem hiding this comment.
Thanks for the catch — pushed an update that drops the SRE / recovery-flow language from the module-level doc. The binding is now described purely in terms of the UEFI protocol behavior (install a host memory range as a virtual block device the firmware can boot from), with no references to specific consumers.
4cc7930 to
67efb7d
Compare
67efb7d to
704458d
Compare
|
@kat-perez, given that this is a protocol defined in the UEFI Specification, can you please list the plan you have in mind here to coordinate your work using it with r-efi? |
I'm treating this as the interim — I'll prep the upstream r-efi patch in parallel and follow up here to swap sdk/patina/uefi_protocol/ram_disk to a re-export once it ships. |
Adds sdk/patina/src/uefi_protocol/ram_disk.rs implementing the FFI binding for EFI_RAM_DISK_PROTOCOL per UEFI 2.10 section 13.16. Exposes the Protocol struct, RegisterFn / UnregisterFn type aliases, and the four well-known RamDiskType GUIDs (virtual disk, virtual CD, persistent variants). Used by the SRE flow to install the recovery WIM as a virtual block device after reading it out of the NVMe boot partition into RAM. Adds two unit tests covering the protocol GUID against the UEFI-spec value and the distinctness of the four RamDiskType GUIDs. Closes OpenDevicePartnership#65.
704458d to
2102fc7
Compare
If this is temporary and you already have the It would be best to avoid adding public content to the normal crate that are intentionally short-lived/misplaced. |
Description
Adds
sdk/patina/src/uefi_protocol/ram_disk.rsproviding the FFI binding forEFI_RAM_DISK_PROTOCOL. Exposes theProtocolstruct,RegisterFn/UnregisterFntype aliases, and the four well-knownRamDiskTypeGUIDs.r-efidoesn't provide this binding today, so it lands here.Closes OpenDevicePartnership/odp-platform-common#65.
How This Was Tested
cargo make allIntegration Instructions