Rust acpi crate erroring with RsdpIncorrectSignature

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
AlulaTheDev
Posts: 5
Joined: Mon Sep 15, 2025 9:43 am

Rust acpi crate erroring with RsdpIncorrectSignature

Post by AlulaTheDev »

So I've been trying to learn OSDev for a while and keep getting stuck to the point I have to do fundemental rewrites, the latest of which moved my kernel from C to rust. I am using the acpi crate and I have implemented a handler, but I always error during init with RsdpIncorrectSignature.

https://github.com/AlulaOneshot/kobold/ ... ev/acpi.rs
Linked is the offending file. I will be actively monitoring this thread until 12:20. After which I will passively monitor. Help would be greatly appreciated.
Last edited by AlulaTheDev on Mon Sep 15, 2025 11:09 am, edited 1 time in total.
Octocontrabass
Member
Member
Posts: 6248
Joined: Mon Mar 25, 2013 7:01 pm

Re: Rust acpi crate erroring with RsdpIncorrectSignature

Post by Octocontrabass »

AlulaTheDev wrote: Mon Sep 15, 2025 9:48 amLinked is the offending file.
That doesn't look like Rust to me.
AlulaTheDev wrote: Mon Sep 15, 2025 9:48 amI will be actively monitoring this thread until 12:20.
This is a forum, we don't expect you to reply immediately. (And how are we supposed to know what time zone you're in?)
AlulaTheDev
Posts: 5
Joined: Mon Sep 15, 2025 9:43 am

Re: Rust acpi crate erroring with RsdpIncorrectSignature

Post by AlulaTheDev »

EST. forgot to specify
AlulaTheDev
Posts: 5
Joined: Mon Sep 15, 2025 9:43 am

Re: Rust acpi crate erroring with RsdpIncorrectSignature

Post by AlulaTheDev »

Octocontrabass wrote: Mon Sep 15, 2025 10:42 am
AlulaTheDev wrote: Mon Sep 15, 2025 9:48 amLinked is the offending file.
That doesn't look like Rust to me.
AlulaTheDev wrote: Mon Sep 15, 2025 9:48 amI will be actively monitoring this thread until 12:20.
This is a forum, we don't expect you to reply immediately. (And how are we supposed to know what time zone you're in?)
I am an idiot and linked the old one (as I said I rewrite a lot)
Here is the correct file
https://github.com/AlulaOneshot/kobold/ ... ev/acpi.rs
User avatar
Demindiro
Member
Member
Posts: 165
Joined: Fri Jun 11, 2021 6:02 am
Libera.chat IRC: demindiro
Location: Belgium
Contact:

Re: Rust acpi crate erroring with RsdpIncorrectSignature

Post by Demindiro »

I'm not familiar with limine, but my first thought was that static signifies immutable by default, which could be an issue. However, Response<T> uses an UnsafeCell inside, so that should not be an issue.

The second thing I'd check then is whether the response contains the expected values. If it is all zeroes or some other bogus value it's probably wrong.

It looks like you're mapping in pages at the time of request. Personally, I set up an identity mapping of all memory (as reported by UEFI) since I find it much easier to work with as you just need to return the address + a constant offset.

I would also copy the dbg!() macro from Rust's std, it's very useful.
GeneSYS exokernel (Codeberg)
Lemmings! micro-/multikernel (Github, Codeberg)
Waddle container tool (Codeberg)
AlulaTheDev
Posts: 5
Joined: Mon Sep 15, 2025 9:43 am

Re: Rust acpi crate erroring with RsdpIncorrectSignature

Post by AlulaTheDev »

It is returning a correct looking RSDP
AlulaTheDev
Posts: 5
Joined: Mon Sep 15, 2025 9:43 am

Re: Rust acpi crate erroring with RsdpIncorrectSignature

Post by AlulaTheDev »

I have decided to use uacpi instead, disregard this thread
User avatar
Demindiro
Member
Member
Posts: 165
Joined: Fri Jun 11, 2021 6:02 am
Libera.chat IRC: demindiro
Location: Belgium
Contact:

Re: Rust acpi crate erroring with RsdpIncorrectSignature

Post by Demindiro »

FWIW I use acpi v5.2.0 and it works fine for me, both in QEMU and real hardware (last I checked, anyway). Are you sure that the RSDP is intact? One possibility that I forgot to consider is that you may inadvertently be corrupting it somehow, e.g. by accidentally marking it as unallocated.
GeneSYS exokernel (Codeberg)
Lemmings! micro-/multikernel (Github, Codeberg)
Waddle container tool (Codeberg)
Post Reply