Commit graph

3290 commits

Author SHA1 Message Date
Nicholas Bishop
2ac78e4ad9
Merge pull request #1918 from rust-osdev/release-v0.37
release: uefi-raw-0.14.0, uefi-0.37
2026-03-23 01:23:16 +00:00
Philipp Schuster
072fa50425 release: uefi-raw-0.14.0, uefi-0.37.0 2026-03-22 21:18:36 -04:00
Nicholas Bishop
09f7b40003
Merge pull request #1915 from rust-osdev/var-to-cstr16
runtime: add `CStr16::from_bytes_with_nul` for UCS-2 strings in UEFI Variables
2026-03-23 00:35:39 +00:00
Philipp Schuster
2be7c63542 runtime: add CStr16::from_bytes_with_nul for UCS-2 string handling
Some UEFI variables hold UEFI strings. With the new constructor, it is
much simpler to transform a UEFI variable into a USC-2 string.
2026-03-22 10:10:42 +01:00
Philipp Schuster
3244fd0b26
Merge pull request #1917 from rust-osdev/push-yxlxulqwnpot
Replace a couple `as` casts with `ptr::from_ref`
2026-03-22 06:49:25 +00:00
Nicholas Bishop
75076ac220 Replace a couple as casts with ptr::from_ref 2026-03-21 18:32:28 -04:00
Nicholas Bishop
3210a82c51
Merge pull request #1875 from rust-osdev/uefi-serial-improve-read-write
uefi: serial: add read_exact() and write_exact() + fix core::fmt::Write for Serial
2026-03-21 22:11:33 +00:00
Philipp Schuster
3cdf68970a
Merge pull request #1916 from rust-osdev/updates
cargo: update deps (fix GitHub Security Alerts)
2026-03-21 15:08:59 +00:00
Philipp Schuster
64946c0d01 cargo: update all transitive deps 2026-03-21 16:00:34 +01:00
Philipp Schuster
01b735d59b cargo: update deps (fix GitHub Security Alerts) 2026-03-21 16:00:34 +01:00
Philipp Schuster
62f4691443 uefi: serial: retry on timeout in fmt::Write to prevent partial writes
On real hardware, Status::TIMEOUT is common even during normal
operation, not just on failure. The previous implementation treated it
as a hard error, silently dropping bytes. Retrying until all bytes are
sent makes the fmt::Write impl reliable and match the expectations of
its callers.

This uses an the same endless loop protection mentioned earlier.
2026-03-21 15:28:38 +01:00
Philipp Schuster
b2fc29b67b uefi: serial: read_exact() and write_exact() for reliable blocking I/O
Callers that simply want to send or receive a fixed number of bytes
should not have to implement their own retry loop. These helpers absorb
the TIMEOUT-and-retry pattern internally, keeping call sites clean.

Endless-loop protection ensures a hardware fault cannot stall the system
forever. Validated on real hardware with reading/writing 16 KiB chunks.
2026-03-21 15:25:04 +01:00
Philipp Schuster
02c60084c2 uefi: serial: add duration_per_byte_estimate() to support retries
Knowing how long a single byte takes to transmit at the current baud
rate lets retry logic stall for just the right amount of time - long
enough for the FIFO to drain or fill, short enough to stay responsive.
Required groundwork for the exact-read/write helpers that follow.
2026-03-21 15:22:09 +01:00
Philipp Schuster
b2192cff9b
Merge pull request #1913 from rust-osdev/renovate/clap-4.x-lockfile
chore(deps): update rust crate clap to v4.6.0
2026-03-16 06:22:14 +00:00
Philipp Schuster
b13563f749
Merge pull request #1914 from rust-osdev/renovate/tempfile-3.x-lockfile
chore(deps): update rust crate tempfile to v3.27.0
2026-03-16 06:22:11 +00:00
renovate[bot]
2bc2e85f35
chore(deps): update rust crate tempfile to v3.27.0 2026-03-16 02:14:35 +00:00
renovate[bot]
215a7c373a
chore(deps): update rust crate clap to v4.6.0 2026-03-16 02:14:31 +00:00
renovate[bot]
25fe23a8ed
Merge pull request #1894 from rust-osdev/renovate/crate-ci-typos-1.x
chore(deps): update crate-ci/typos action to v1.44.0
2026-03-15 16:41:29 +00:00
renovate[bot]
8d9748a13a
chore(deps): update crate-ci/typos action to v1.44.0 2026-03-15 16:36:33 +00:00
Philipp Schuster
409161c533
Merge pull request #1912 from rust-osdev/unblock-ci
test-runner: rename cpy -> copy to make `typos` happy
2026-03-15 16:26:05 +00:00
Nicholas Bishop
093e2278e6 test-runner: rename cpy -> copy to make typos happy 2026-03-15 17:20:53 +01:00
Philipp Schuster
696e0b59ee
Merge pull request #1909 from rust-osdev/renovate/ovmf-prebuilt-0.x-lockfile
chore(deps): update rust crate ovmf-prebuilt to v0.2.8
2026-03-15 16:20:04 +00:00
Philipp Schuster
8c617b9abe
Merge pull request #1910 from rust-osdev/renovate/quote-1.x-lockfile
chore(deps): update rust crate quote to v1.0.45
2026-03-15 16:20:02 +00:00
renovate[bot]
f20279c9c7
chore(deps): update rust crate quote to v1.0.45 2026-03-09 05:43:48 +00:00
renovate[bot]
4429e1d600
chore(deps): update rust crate ovmf-prebuilt to v0.2.8 2026-03-09 05:43:40 +00:00
Philipp Schuster
d417cd17f7
Merge pull request #1908 from rust-osdev/push-rylwqsolvvxk
Fix new clippy lints
2026-03-09 05:36:50 +00:00
Nicholas Bishop
1b06a3b613 Fix new clippy lints 2026-03-08 14:20:46 -04:00
Philipp Schuster
0466c50c4c
Merge pull request #1903 from the-shank/path-join
add `join` on `Path`
2026-03-04 07:52:21 +00:00
Shank
066835b605 uefi: fs: add Path::join() 2026-03-03 11:05:27 -05:00
renovate[bot]
8870d26d98
Merge pull request #1904 from rust-osdev/renovate/lock-file-maintenance
chore(deps): lock file maintenance
2026-02-28 22:13:06 +00:00
Nicholas Bishop
e65277c012
Merge pull request #1900 from rust-osdev/uefi-serial-improve-read-write-2
uefi: serial: improve documentation and correctness of read() and write()
2026-02-28 22:11:14 +00:00
renovate[bot]
0d3b78f4c2
chore(deps): lock file maintenance 2026-02-28 22:08:10 +00:00
Philipp Schuster
76594f1db4 uefi: serial: small code improvement 2026-02-22 12:29:34 +01:00
Philipp Schuster
4a1148795c uefi: serial: improve documentation and correctness of read() and write()
Next to documentation improvements, I replaced the debug assertions with
runtime assertions. If the underlying protocol implementation doesn't
behave as expected, we should at least fail hard.

I tested this with OVMF in QEMU 10.x and also on real hardware.
2026-02-22 12:28:53 +01:00
renovate[bot]
e35404f211
Merge pull request #1895 from rust-osdev/renovate/lock-file-maintenance
chore(deps): lock file maintenance
2026-02-09 01:21:05 +00:00
renovate[bot]
c134dcc2b1
chore(deps): lock file maintenance 2026-02-09 01:16:28 +00:00
Philipp Schuster
9d6b950872
Merge pull request #1891 from rust-osdev/push-sqnzwsqrlprt
Improve docs of `OpenProtocolAttributes`
2026-02-08 11:42:15 +00:00
Philipp Schuster
7cfcc35f50
Merge pull request #1893 from rust-osdev/push-xuwxpsxosplk
uefi: Add `handle_protocol` doc alias to open_protocol functions
2026-02-08 11:40:45 +00:00
Nicholas Bishop
756590206f uefi: Add handle_protocol doc alias to open_protocol functions 2026-02-07 13:34:11 -05:00
Nicholas Bishop
1580a4ef88 uefi: Update doc for OpenProtocolParams::GetProtocol
Make it clear that this can be used by applications as well as
drivers. Also add safety docs.
2026-02-07 13:06:54 -05:00
Nicholas Bishop
aee9bf1d8c uefi: Add warnings to OpenProtocolParams::Exclusive/ByDriverExclusive 2026-02-07 13:06:54 -05:00
Nicholas Bishop
9b8322d38e uefi: Sort OpenProtocolAttributes variants numerically 2026-02-07 12:45:58 -05:00
renovate[bot]
3f61a21778
Merge pull request #1890 from rust-osdev/renovate/lock-file-maintenance
chore(deps): lock file maintenance
2026-02-07 16:43:17 +00:00
renovate[bot]
7f7be3b4d2
chore(deps): lock file maintenance 2026-02-07 16:38:05 +00:00
Philipp Schuster
8c8eadffec
Merge pull request #1858 from rust-osdev/handle-convenience
uefi: significantly improve ergonomics of Handle (device path and component2 protocols)
2026-02-02 12:19:40 +00:00
Philipp Schuster
84e00a3c5a uefi-test-runner: test new protocol helpers on Handle 2026-02-02 13:14:42 +01:00
Philipp Schuster
506f10ec1a uefi: handle: add protocol-based helpers: component_name() and device_path()
In practice, UEFI applications frequently need to extract additional
metadata from handles for logging, debugging, and user-facing selection.
The Device Path and Component Name 2 protocols provide helpful information,
but accessing them repeatedly requires non-trivial boilerplate.

This change introduces convenience helpers on Handle to streamline
common queries and improve ergonomics when working with these protocols.
2026-02-02 13:14:21 +01:00
Philipp Schuster
7cbc1ff575 uefi: cleanup use and mod statements in data_types
Clean up the mess and follow our convention:

- pub mod
- mod
- pub use
- use
2026-02-02 13:13:57 +01:00
Philipp Schuster
47095b1097 uefi: impl Display for DevicePath, DevicePathNode, and ScopedProtocol
For device paths, it is very convenient to use the DevicePathToText
protocol to visualize/print the device path. By providing a
convenient Display impl, we improve the ergonomics of device paths
significantly and reducing boilerplate.
2026-02-02 13:13:22 +01:00
Philipp Schuster
86f82fabf4 uefi: rename DevicePath[Node]::{to_string -> to_string16}()
This is a pre-requisite for the next commit that implements
Display. Display comes with a to_string() method already.
2026-02-02 13:13:20 +01:00