Skip to content

uefi: bump from 0.20 to 0.38#566

Merged
phil-opp merged 3 commits into
rust-osdev:mainfrom
phip1611:uefi
Jul 7, 2026
Merged

uefi: bump from 0.20 to 0.38#566
phil-opp merged 3 commits into
rust-osdev:mainfrom
phip1611:uefi

Conversation

@phip1611

@phip1611 phip1611 commented Jun 16, 2026

Copy link
Copy Markdown
Member

Bump the outdated uefi code to a much newer uefi version + misc code improvements

@phip1611 phip1611 self-assigned this Jun 16, 2026
@phip1611 phip1611 changed the title uefi: bump from 0.20 to 0.37 uefi: bump from 0.20 to 0.38 Jun 26, 2026
@phip1611 phip1611 marked this pull request as ready for review June 26, 2026 11:31
@phip1611

Copy link
Copy Markdown
Member Author

what do we do about the semver CI issue?

@phil-opp

Copy link
Copy Markdown
Member

The semver CI job fails also on main. cargo-semver-checks is usually not updated directly when the metadata format changes, so we have to wait a bit until it is supported. Safe to ignore for now

@phip1611 phip1611 requested a review from Freax13 June 29, 2026 09:27

@Freax13 Freax13 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is great work!

Sorry for the delay.

Comment thread uefi/src/main.rs
unsafe { slice::from_raw_parts_mut(ptr.as_mut(), size) }
}

fn open_pxe_base_code() -> Option<boot::ScopedProtocol<BaseCode>> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is subtly changing the behavior isn't it? Previously, we opened the BaseCode handle that was used to load the base image, but now we're looking at all BaseCode handles, right? If a system has more than one network interface (e.g. a wireless one and a wired one), this could change which interface is used to load the files, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, that was a wonderful catch! I didn't thought about this. Fixed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've also conducted a "critical LLM review" to check behavioral changes - seems to be in good shape now!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've also conducted a "critical LLM review" to check behavioral changes - seems to be in good shape now!

how'd you do that?

@phip1611

phip1611 commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

The CI failures seem to be unrealated @Freax13 - probably caused by the new clippy beta/nightly update.

PSA: I'll be on vacation for the rest of the month

Modernize code while preserving behavior.

Assisted-by: Codex:GPT-5.5
@phil-opp

phil-opp commented Jul 7, 2026

Copy link
Copy Markdown
Member

I don't think that the CI failures are spurious. I found this in the logs of the failed Check job:

[lock_api 0.4.10] error[E0463]: can't find crate for `std`
  [lock_api 0.4.10]   |
  [lock_api 0.4.10]   = note: the `x86_64-unknown-uefi` target may not be installed
  [lock_api 0.4.10]   = help: consider downloading the target with `rustup target add x86_64-unknown-uefi`
  [lock_api 0.4.10]   = help: consider building the standard library from source with `cargo build -Zbuild-std`
  [lock_api 0.4.10] 
  [lock_api 0.4.10] error: aborting due to 1 previous error
  [lock_api 0.4.10] 
  [lock_api 0.4.10] For more information about this error, try `rustc --explain E0463`.
  [lock_api 0.4.10] error[E0463]: can't find crate for `core`
  [lock_api 0.4.10]   |
  [lock_api 0.4.10]   = note: the `x86_64-unknown-uefi` target may not be installed
  [lock_api 0.4.10]   = help: consider downloading the target with `rustup target add x86_64-unknown-uefi`
  [lock_api 0.4.10]   = help: consider building the standard library from source with `cargo build -Zbuild-std`
  [lock_api 0.4.10] 
  [lock_api 0.4.10] error: aborting due to 1 previous error
  [lock_api 0.4.10] 
  [lock_api 0.4.10] For more information about this error, try `rustc --explain E0463`.
  [lock_api 0.4.10] warning: autocfg could not probe for `std`

So something is trying to bring in a std dependency, which doesn't work for this bare-metal project.

I'll look into it, have a good vacation @phip1611!

edit: Ah, that's just a autocfg thing, not an actual error.

@phil-opp

phil-opp commented Jul 7, 2026

Copy link
Copy Markdown
Member

Ok, the actual error is:

error: error loading target specification: rustc-abi: invalid rustc abi: 'x86-softfloat'. allowed values: 'x86-sse2', 'powerpc-spe', 'softfloat' at line 23 column 1

This is fixed by #569 , so a merge/rebase should be enough to fix it.

Comment thread uefi/src/main.rs Outdated
@phil-opp phil-opp merged commit 4a07412 into rust-osdev:main Jul 7, 2026
7 of 9 checks passed
@phil-opp phil-opp mentioned this pull request Jul 7, 2026
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.

3 participants