Conversation
Ok, this is very strange. The error happens in the BIOS build when we call
The |
Here's a hacky workaround: diff --git a/bios/stage-4/src/main.rs b/bios/stage-4/src/main.rs
index 9ade45f..439b1fe 100644
--- a/bios/stage-4/src/main.rs
+++ b/bios/stage-4/src/main.rs
@@ -262,6 +262,7 @@ fn detect_rsdp() -> Option<PhysAddr> {
#[derive(Clone)]
struct IdentityMapped;
impl AcpiHandler for IdentityMapped {
+ #[inline(never)]
unsafe fn map_physical_region<T>(
&self,
physical_address: usize,
|
I agree with @Freax13, this should be investigated further. However, to unblock people (including myself), I've added the workaround, @phil-opp obv it depends on you whether you want this merged for now. I also don't think I'm experienced enough with I'm not sure what the Semver Checks do, and I'm not sure why they still fail with the data layout mismatch. |
Interesting! I guess a good next step could be to use the (Note that this might not be a bug caused by rustc. It could also be some undefined behavior in the |
@tsatke Thanks for implementing the workaround! I'm still debating whether I want to merge it before understanding the actual issue though...
This check runs the cargo-semver-checks tool to detect accidental breaking changes. It works by comparing the latest crates.io version with the PR code, which won't work in this case because the crates.io release doesn't compile anymore on the latest nightly. So the failure is expected here. |
searched nightlies: from nightly-2024-02-13 to nightly-2024-02-15 bisected with cargo-bisect-rustc v0.6.8Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --start 2024-02-13 --end 2024-02-15 --with-src --target x86_64-unknown-none --component llvm-tools -vvv -- test --target x86_64-unknown-linux-gnu check_boot_info |
So for some reason LLVM decides to optimize this whole function out, right? Could you upload the LLVM here or tell us the exact build options that you used for it? |
Update required because of rust-lang/rust#116672, which became effective once rust-lang/rust#120055 was merged.