OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 4:03 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Help with ACPI in Rust
PostPosted: Sun Apr 10, 2022 4:29 am 
Offline

Joined: Sat Oct 16, 2021 11:57 am
Posts: 15
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 :D


Top
 Profile  
 
 Post subject: Re: Help with ACPI in Rust
PostPosted: Wed Apr 13, 2022 10:14 pm 
Offline
Member
Member

Joined: Mon Jul 05, 2021 6:57 pm
Posts: 118
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


I'm not trying to be mean, but don't you think there's a reason those 300 pages exist...

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.


Top
 Profile  
 
 Post subject: Re: Help with ACPI in Rust
PostPosted: Wed Apr 13, 2022 11:16 pm 
Offline
Member
Member

Joined: Sun Jun 23, 2019 5:36 pm
Posts: 618
Location: North Dakota, United States
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.


Top
 Profile  
 
 Post subject: Re: Help with ACPI in Rust
PostPosted: Thu Apr 14, 2022 12:45 pm 
Offline
Member
Member

Joined: Sun Sep 06, 2015 5:40 am
Posts: 47
Quote:
Oh, and the bad news: to understand ACPICA you probably want to read the ACPI spec as well.


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.

Quote:
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.


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.

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).

_________________
OS on Github | My Rust ACPI library


Top
 Profile  
 
 Post subject: Re: Help with ACPI in Rust
PostPosted: Fri Apr 15, 2022 3:05 am 
Offline
Member
Member

Joined: Mon Jul 05, 2021 6:57 pm
Posts: 118
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.


Yeah, I may have misinterpreted the question (as "help with APCICA" rather than "help with APCI, I've looked at APCICA and want alternatives").

skyesp, sorry if I was off-handed.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Amazonbot [bot], Bing [Bot], DotBot [Bot], Google [Bot], SanderR and 67 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group