Skip to content

uefi-raw: Add FirmwareVolume{,Block}2Protocol #1503

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
merged 1 commit into from
Jan 3, 2025

Conversation

crawfxrd
Copy link
Contributor

@crawfxrd crawfxrd commented Dec 19, 2024

Add bindings for EFI_FIRMWARE_VOLUME2_PROTOCOL, EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL, and related data types.

Reason: I need to read a raw section of a file (FV->ReadSection) added in edk2 for Platform GOP Policy driver implementation.

Ref: UEFI-PI 1.9: III-3.4.1 Firmware Volume2 Protocol
Ref: UEFI-PI 1.9: III-3.4.2 Firmware Volume Block2 Protocol

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

@@ -0,0 +1,219 @@
use crate::firmware_storage::FirmwareVolumeAttributes;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name is arguably wrong, since it's for EFI_FVB_ATTRIBUTES_2.

Ref: UEFI-PI 1.9: III-3.4.1 Firmware Volume2 Protocol
Ref: UEFI-PI 1.9: III-3.4.2 Firmware Volume Block2 Protocol
Signed-off-by: Tim Crawford <[email protected]>
Copy link
Member

@nicholasbishop nicholasbishop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, thanks for adding this!

@nicholasbishop nicholasbishop added this pull request to the merge queue Jan 3, 2025
Merged via the queue into rust-osdev:main with commit 21fabff Jan 3, 2025
15 checks passed
@crawfxrd crawfxrd deleted the fv2 branch January 3, 2025 19:44
Comment on lines +78 to +79
EFI_FV_UNRELIABLE_WRITE = 0,
EFI_FV_RELIABLE_WRITE = 1,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed I forgot to strip the prefix from this one.

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.

2 participants