Hiya all. I must admit I have hit a bit of a roadblock when trying to get started with acpi (or perhaps integrating acpica). I am working in Rust, and I am wondering if anyone could help me get started on integrating acpi into my kernel.
Does anyone know how to start with this? I have seen the ACPICA manual, but it seems a bit unwieldy with over 300 pages, so I am wondering what the best approach would be. I know of the libacpica crate, but the documentation is very lacking as far as I can find, so perhaps one of you lovely people knows how to use it?
Looking forward to your helpful replies
Help with ACPI in Rust
Re: Help with ACPI in Rust
I'm not trying to be mean, but don't you think there's a reason those 300 pages exist...skyesp wrote:Does anyone know how to start with this? I have seen the ACPICA manual, but it seems a bit unwieldy with over 300 pages, so I am wondering what the best approach would be
Maybe start by reading the intro sections at least, until you get an overall feel for how it works. If you don't understand something in particular you can ask specific questions but "how do I start with ACPICA, without reading the actual documentation" is not likely to go down well.
Oh, and the bad news: to understand ACPICA you probably want to read the ACPI spec as well.
Re: Help with ACPI in Rust
There's an acpi crate for Rust (just called "acpi") but it doesn't parse all devices. So you'll have to do some of that yourself. And either way you should probably learn how all that works anyhow.
-
- Member
- Posts: 47
- Joined: Sun Sep 06, 2015 5:40 am
Re: Help with ACPI in Rust
It's absolutely necessary to read the actual ACPI spec, but I think it's reasonable to wonder why you need another 300 pages to understand the implementation. While it has the benefit of being the reference implementation, ACPICA is a real mess and I'd argue is very difficult to use correctly outside of Linux.Oh, and the bad news: to understand ACPICA you probably want to read the ACPI spec as well.
The crate is, I'd say, a much better experience than ACPICA, and should be complete enough to get you started on QEMU or something.There's an acpi crate for Rust (just called "acpi") but it doesn't parse all devices. So you'll have to do some of that yourself. And either way you should probably learn how all that works anyhow.
Relatedly, if anyone does come across anything that is not supported, please do file an issue, or feel free to contribute (something as large and annoying to implement as ACPI could really do with a single implementation; the C side has managed this pretty well with `lai` so it'd be good to say the same for Rust).
Re: Help with ACPI in Rust
Yeah, I may have misinterpreted the question (as "help with APCICA" rather than "help with APCI, I've looked at APCICA and want alternatives").isaacwoods wrote:It's absolutely necessary to read the actual ACPI spec, but I think it's reasonable to wonder why you need another 300 pages to understand the implementation.
skyesp, sorry if I was off-handed.