-
-
Notifications
You must be signed in to change notification settings - Fork 169
proto/media: add LoadFile2Protocol #945
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks like a good addition to me. I've added a few comments.
Plot twist, after testing it for a while and reading the EDK2 source code, you will discover that the handle put on the thing responsible for an EFI PXE boot, which do have a LoadFileProtocol (and not a LoadFile2Protocol BTW), ignores completely the file path and calling LoadFile on it is restarting the PXE boot process. So, it seems like the only reasonable way to download additional files yourself is to use the (M)TFTP services present on the EFI PXE base code protocol… |
Thanks for the review @nicholasbishop — I will work on it! |
Any update here, @RaitoBezarius ? |
To be frank, I am a bit confused / blocked by the DevicePathProtocol API that seems different from the Ffi stuff I had and I don't think I can get it back in |
a6aa9f6
to
cb79048
Compare
Right now, I am stuck on fixing some compilation issues, if anyone is interested to take over and I don't complete it in time, please go for it. |
...
#[unsafe_protocol(uefi_raw::protocol::media::LoadFile2::GUID)]
pub struct LoadFile2(uefi_raw::protocol::media::LoadFile2);
... There is no |
cb79048
to
970bd10
Compare
Yep, I just forgot to include the file, done. |
Any update here? We'd love to merge this |
Covered by #1297 |
The idea is to provide the LoadFile(2)Protocol family in
uefi-rs
with nice alloc helpers.My goal is to use them as an alternative to the SimpleFilesystemProtocol when my bootloader is chained via PXE, which means that the SFS protocol is not available on the booted image handle, but… LoadFile(2)Protocol should, which enable me to continue downloading things like an initrd or a kernel as long as I know their exact paths.
This is a draft to open the discussion on the design.
https://uefi.org/specs/UEFI/2.10/13_Protocols_Media_Access.html#load-file-2-protocol
Checklist