201 Commits

Author SHA1 Message Date
Philipp Schuster 6ccb83e260 misc: update to typos 1.45 2026-04-06 14:10:57 +02:00
Philipp Schuster 4bae2a382c xtask: check-raw: allow #[allow(non_camel_case_types)]
`cargo xtask check-raw` is very strict to prevent higher-level or
sophisticated types in `uefi-raw`. Here, however, I think, it is perfectly
fine to allow this.

One example is `SerialIoProtocol_1_1`, which follows in the next commit.
2026-02-02 10:47:29 +01:00
renovate[bot] 0daeecfa32 fix(deps): update rust crate nix to 0.31.0 2026-01-26 04:35:25 +00:00
Nicholas Bishop 98f0d5c33c Revert "ci/fix: upgrade QEMU on windows" 2026-01-25 23:21:36 -05:00
Philipp Schuster df2a493343 xtask: print the used QEMU version
This is especially useful in CI where it is not clear which QEMU version we
use on Windows.
2026-01-25 11:49:07 +01:00
Nicholas Bishop 3f8049ebca xtask: Replace addr_of with raw pointer syntax 2026-01-20 15:21:16 -05:00
Markus Ebner 3d29ddaed1 uefi: Refactor PciRootBridgeIo::enumerate() with tree-topology information
- Refactored return type from standard BTreeSet to custom PciTree struct
- Removed special FullPciIoAddress type, since segment number is PciRoot dependent
- During enumeration, skip branches we have already seen
- During enumeration, collect tree topology information (which child bus linked from where)
- Add complicated pci structure in integration test vm
- Print child busses for every device entry in integration test
2025-11-26 21:54:32 +01:00
Philipp Schuster 2083642b4b clippy: latest nightly fixes 2025-11-02 09:27:37 +01:00
Nicholas Bishop 299f1d79e0 xtask: Check uefi-raw for uses of the primitive bool type 2025-10-24 15:03:54 -04:00
Philipp Schuster f0e28719a2 uefi: remove type duplication + update documentation 2025-10-21 07:39:45 +02:00
Philipp Schuster 6b314c5325 uefi-raw: fix latest nightly clippy issues (unused import)
We were inconsistent with the use of the newtype_enum! macro.
Sometimes we imported it directly, sometimes we used it from
the global scope (#[macro_use]). We now prefer an explicit
dependency for every usage.
2025-10-01 06:55:28 +02:00
Philipp Schuster ea7f4ced07 uefi: remove support for unstable allocator_api feature
The allocator_api feature [0] is old and not developed in years. Since
then, understanding of memory safety and best practises has evolved.
It is unlikely that in its current form the functionality will ever
be merged.

Therefore, we drop the complexity we have from this feature for now,
leading to simpler code.

[0] https://github.com/rust-lang/rust/issues/32838
2025-09-16 07:31:42 +02:00
Philipp Schuster 75ba8ea72d uefi: doc: Parameters -> Arguments
This is to streamline the wild mixture of different headings.
2025-09-13 11:22:39 +02:00
Philipp Schuster b5919ff95a xtask: improved error output for "wrong" repr
This helps to better understand why something fails.
2025-08-16 13:42:22 +02:00
Nicholas Bishop 7e0b8b3d5d Use size_of/align_of from prelude
As of the 2024 edition, size_of/size_of_val/align_of/align_of_val are in the
prelude, so no need to import or use a fully qualified path.
2025-08-02 16:37:20 -04:00
Philipp Schuster fe5491f6ae uefi-services: remove again
Context: https://github.com/rust-osdev/uefi-rs/pull/1709
2025-06-24 09:26:21 +02:00
Philipp Schuster 00372ca68f uefi-services: prepare v0.26.0 release to accelerate migration/deprecation
Apparently, still a lot of people are using uefi-services, probably mostly due to
auto-upgrades. This seems to cause upgrades when people keep upgrading `uefi`
while still using an outdated version of `uefi-services`.

This update will cause everyone using auto-updates to either rethink to pin
their crate versions or to finally migrate.
2025-06-24 09:08:38 +02:00
Nicholas Bishop 427689557f xtask: Skip uefi-macros ui tests on the nightly toolchain
These tests are sensitive to compiler version, and sometimes the output on
nightly doesn't match the stable toolchain.
2025-06-19 15:48:15 -04:00
Philipp Schuster 6fb6005099 Merge pull request #1690 from rust-osdev/bishop-fix-lints-4
Fix mismatched_lifetime_syntaxes lint
2025-06-10 05:46:23 +00:00
Nicholas Bishop 01b52b9bfe xtask: Allow clippy::collapsible_if lint
Let-chains are being stabilized in 1.88, so this lint triggers on nightly. Since
current stable is 1.87, we can't change the code to fix this lint, and we also
can't use `expect` here. For now, the best solution is just to allow the lint.
2025-06-08 15:11:27 -04:00
Nicholas Bishop d339387e2a xtask: Fix mismatched_lifetime_syntaxes lint in device_path_gen 2025-06-08 14:26:16 -04:00
Philipp Schuster 0a90b89cc0 xtask: explicitly set MAC address of QEMU net device
This helps to identify the network interface in integration tests.
2025-05-31 19:58:01 +02:00
Jarl Evanson cc6bca7386 uefi: Add integration test for the USB I/O protocol 2025-05-23 07:11:06 -05:00
Philipp Schuster 3b664361ab cleanup of IPConfig2/Http Protocol PR 2025-05-19 22:14:01 +02:00
renovate[bot] 2556741da8 fix(deps): update rust crate mbrman to 0.6.0 2025-05-18 23:15:55 +00:00
renovate[bot] f4b6166c85 fix(deps): update rust crate nix to 0.30.0 2025-05-18 23:03:06 +00:00
Philipp Schuster 90f24de04d clippy: apply latest fixes 2025-05-17 13:33:02 +02:00
Philipp Schuster b8e1df0f5d rustfmt: fixes for device_path_gen for 2024 edition 2025-05-17 12:27:06 +02:00
Philipp Schuster 83412b60a0 rustfmt: update to edition 2024
We can delete rustfmt.toml as the style version defaults to
the crate's rust edition.
2025-05-17 12:27:06 +02:00
Philipp Schuster 5cbf1a1c5e rust: fix device path code generation for 2024 edition
rust: fix unsafe entry attribute
2025-05-17 12:21:52 +02:00
Nicholas Bishop dbf015244e xtask: Improve error message for enums in uefi-raw
Instead of a generic "forbidden type of item" error, recommend using the
`newtype_enum!` macro.
2025-05-09 11:20:17 +02:00
Philipp Schuster e3acd45920 xtask: simplify env variables 2025-05-07 09:04:31 +02:00
Nicholas Bishop 5055445946 xtask: Add --ovmf-shell arg
This makes the shell more consistent with ovmf-code/ovmf-vars.
2025-05-06 20:59:45 -04:00
Philipp Schuster 762905abd0 uefi: remove duplication in DevicePathHeader; use uefi-raw type 2025-04-19 11:23:02 +02:00
Gerd Hoffmann 3fc70b0df7 Add CA trust database to the repo.
This is needed for https support (tls server certificate verification).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2025-04-18 12:12:23 -04:00
Gerd Hoffmann f765d19cb5 log ovmf firmware output
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2025-04-18 12:12:23 -04:00
Nicholas Bishop 2edbbbaf08 xtask: Update OVMF release to EDK2_STABLE202502_R2
This will allow https requests to work.
2025-04-17 11:29:02 -04:00
Markus Ebner 0ce684c375 uefi: Add integration test for ATA_PASS_THRU_PROTOCOL 2025-04-14 22:04:38 +02:00
Markus Ebner ff49771650 uefi: Add integration test for NVM_EXPRESS_PASS_THRU_PROTOCOL 2025-04-12 19:42:54 +02:00
Gerd Hoffmann 36a493546f xtask: turn on PXE tests for all platforms
With the switch to virtio-net we have networking on all platforms.
Turn on the pxe test everywhere.

Also serves as workaround for
https://github.com/rust-osdev/uefi-rs/issues/1617

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2025-04-10 22:16:03 +02:00
Gerd Hoffmann 47ba7efa6a xtask/qemu: switch to virtio-net nic.
Use virtio-net instead of e1000.  This gets network going on non-x86
platforms (aarch64, riscv64).

While being at it switch qemu network configuration to modern netdev
method.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2025-04-10 22:16:03 +02:00
Philipp Schuster 870517f871 xtask: fix nix formatting
nixfmt wants to be called with arguments of files to check
and does not walk the tree by itself.
2025-04-07 10:00:20 +02:00
Markus Ebner 19c4805835 uefi: Implement safe wrapper for EFI_DISK_INFO_PROTOCOL 2025-03-25 18:25:13 +01:00
Nicholas Bishop 19703938fb Fix unwanted rebuilds in xtask commands
Recently, `cargo xtask test` started doing a lot of rebuilding. Possibly this
started with cargo 1.85, but I'm not sure.

The behavior was: `cargo xtask test` builds `xtask` and all of its dependencies
in order to launch `xtask`. Then it would rebuild everything again to run the
test command. If you then ran `cargo xtask test` a second time, everything would
again be rebuilt. In other words, the build cache essentially wasn't working.

Fix by clearing all `CARGO` env vars in `fix_nested_cargo_env`.
2025-03-01 18:35:37 -05:00
Nicholas Bishop aecfa0a08f xtask: Update command_to_string to exclude cleared env vars
Rather than maintaining a list of all variables cleared by
`fix_nested_cargo_env`, just skip over all variables that are cleared by
checking if the value is `Some`.

That PATH var is still excluded by name since it's set (usually to a long value)
rather than cleared.
2025-03-01 18:35:37 -05:00
Philipp Schuster 3560842c07 xtask/uefi-raw: improve check-raw error messages
This helps to better identify why the check-raw step fails.
2025-02-12 08:11:11 +01:00
Nicholas Bishop 93062c1d5a xtask fmt: Make missing SPDX headers a fatal error 2025-02-07 13:18:26 -05:00
Nicholas Bishop df0f31a1ff Add SPDX headers to xtask 2025-02-07 13:18:26 -05:00
Nicholas Bishop 7e5b1b4812 xtask: Add file header check to xtask fmt
This will be used to verify that source files (just *.rs for now) all have an
SPDX license header. In non-check mode, the license header will be added.

For now, in check mode an error is shown but it's not treated as fatal. Once all
files have been fixed, the error will be made fatal.
2025-02-07 13:18:20 -05:00
Nicholas Bishop 5dd3ef6603 Add SPDX header to generated device-path code 2025-02-06 23:46:59 -05:00