Skip to content

Conversation

nicholasbishop
Copy link
Member

No description provided.

nicholasbishop and others added 2 commits August 26, 2022 15:07
The `Header` `Debug` implementation was accidentally printing the `size`
field for the `signature`. Rather than just fix that field, switch the
whole thing back to using `derive(Debug)`. This adds in the `_reserved`
field, which probably doesn't matter much either way but might as well
show the whole struct when debug printing.

(cherry picked from commit 0427cc1)
@nicholasbishop nicholasbishop force-pushed the bishop-update-version016 branch from 05ff777 to 291595d Compare August 26, 2022 19:07
nicholasbishop and others added 6 commits August 26, 2022 15:26
Add constants for all the EFI versions (from section 4.3 "EFI System
Table"). Also make the new/major/minor methods of Revision const.

(cherry picked from commit b84fa5f)
The create_event_ex function (in boot services) and query_variable_info
(in runtime services) were added to their respective tables in UEFI
2.0. In earlier versions these functions can't be called, so check the
table revision before using these function pointers.

(cherry picked from commit 00b56d8)
When passing in a specific algorithm type to the get_rng function, a
pointer to the `Option`-wrapped value was incorrectly being passed
in. The pointer should be to the `RngAlgorithmType` inside the `Option`
instead.

Fixes rust-osdev#446

(cherry picked from commit 03493c3)
Allow older versions of some dependencies to be used if that's all
that's available. This change will have no effect for typical builds
with Cargo, as Cargo will just pick the latest version and download
it. But in more restrictive/sandboxed build environments where the
latest versions of packages might not be available, it's helpful to
allow a wider range of versions.

Only non-dev dependencies have been changed, and only in the three
published packages.

Tested locally by temporarily prefixing these depdency versions with `=`
to force Cargo to use exactly that version, and verifying that
build/test/run commands still worked.

(cherry picked from commit 08ddf18)
Add a `docsrs` config in the `docs.rs` metadata in Cargo.toml. This will
set `--cfg docsrs` when building on docs.rs. Enable the `doc_auto_cfg`
feature when the `docsrs` config is enabled. This feature is currently
unstable, but docs.rs uses a nightly compiler so this works fine.

The effect of this is that docs.rs will show a badge for items that are
only available if some feature is enabled. For example,
`BootServices::find_handles` will have a badge saying "Available on
crate feature exts only."

To view this locally, run this:
```
RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc --all-features --open
```

This change has only been applied to the `uefi` package, since the
`uefi-macros` package does not have any features and the `uefi-services`
package's features don't control the visiblity of any public items.

rust-osdev#486
(cherry picked from commit 9924472)
@nicholasbishop nicholasbishop force-pushed the bishop-update-version016 branch from af0b4ac to 789cca2 Compare August 26, 2022 19:52
@nicholasbishop nicholasbishop changed the title WIP: cherry-pick fixes to the version-0.16 branch Cherry-pick fixes to the version-0.16 branch Aug 26, 2022
@nicholasbishop nicholasbishop merged commit d254566 into rust-osdev:version-0.16 Aug 26, 2022
@nicholasbishop nicholasbishop deleted the bishop-update-version016 branch August 26, 2022 19:57
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.

1 participant