Rust
- Started writing some notes on investigating a bug in Rust with division on the x86_64 UEFI target.
uefi-rs
- Back in Week 0003 I started looking at a generic
buffer interface. I paused that to work on the removal of
uefi::Completion
, but now that that's done I'm resuming buffer work. Some rough goals:- Generic interface that can be used for all UEFI interfaces that take
a buffer. Underlying type is some kind of contiguous slice of
T
. - Avoid needing multiple wrapper methods for the same underlying UEFI interface. E.g. we don't want one method that takes a slice, another that takes a MaybeUninit slice, and another that dynamically allocates.
- Make it hard or impossible to accidentally use the wrong length of the buffer. Currently it's easy to pass in a slice of zeroed memory, get UEFI to fill in the first N elements, and then end up using the full original slice, which may have junk data (initialized in the Rust sense, but not containing real data) at the end.
- For the dynamic allocation case, allow capping the size to avoid unbounded memory usage.
- Make it easy to get alignment correct. This comes up for example with the file info types, which are DSTs.
- Generic interface that can be used for all UEFI interfaces that take
a buffer. Underlying type is some kind of contiguous slice of