Expand description
§ACPICA bindings
Incomplete rust bindings to Intel’s ACPICA kernel subsystem. This crate is very much still under development - I am adding features as they are needed by my OS project.
If you are using this crate, expect lots of compiler warnings and todo!
s.
§Build Dependencies
This crate builds ACPICA from source, using the cc
crate. This crate requires the presence of a C compiler on the system -
see that crate’s documentation for more information.
The crate also uses unstable rust features, so needs a nightly or beta compiler.
§Runtime Dependencies
As the crate is designed to be used in an OS kernel, it has minimal dependencies. The crate does require dynamic memory allocation, however.
The crate also uses the log
crate for logging.
§Usage
The ACPICA kernel subsystem calls into OS code using various functions prefixed with AcpiOs
. These are translated by this library into calls to methods on the AcpiHandler
trait. An object implementing this trait must be passed to register_handler
before any ACPI functionality can be used. Initializing the library could look like this:
struct HandlerStruct {}
impl AcpiHandler for HandlerStruct {
// ...
}
let handler = HandlerStruct {};
let initialization = register_interface(handler)?;
let initialization = initialization.load_tables()?;
let initialization = initialization.enable_subsystem()?;
let initialization = initialization.initialize_objects()?;
Modules§
- devices
- Code to manage AML devices
- handler
- The
AcpiHandler
trait, which is the interface with which ACPICA calls OS functions. - status
- The
AcpiError
error type - types
- Contains rust equivalents of types used by ACPICA
Structs§
- Acpica
Operation - The interface to ACPICA functions. The state of ACPICA’s initialization is tracked using const generics on this type.
Functions§
- register_
interface - Registers
interface
as the handler for ACPICA functions, and starts the initialization of ACPICA. See the docs forAcpicaOperation
for more info.
Type Aliases§
- Acpica
Operation Fully Initialized - An alias to an
AcpicaOperation
which is completely initialized, and all methods are available.