Skip to content

Commit 3e73ac4

Browse files
committed
Merge acpi and aml crates into one top-level crate
1 parent b266a6a commit 3e73ac4

25 files changed

+58
-51
lines changed

Cargo.toml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
11
[workspace]
2-
members = ["acpi", "aml", "tools/aml_tester", "tools/acpi_dumper"]
2+
members = ["tools/aml_tester", "tools/acpi_dumper"]
33
resolver = "2"
4+
5+
[package]
6+
name = "acpi"
7+
version = "5.1.0"
8+
authors = ["Isaac Woods"]
9+
repository = "https://github.com/rust-osdev/acpi"
10+
description = "A pure-Rust library for interacting with ACPI"
11+
categories = ["hardware-support", "no-std"]
12+
readme = "../README.md"
13+
license = "MIT/Apache-2.0"
14+
edition = "2024"
15+
16+
[dependencies]
17+
bit_field = "0.10.2"
18+
bitflags = "2.5.0"
19+
log = "0.4.20"
20+
spinning_top = "0.3.0"
21+
pci_types = { version = "0.10.0", public = true, optional = true }
22+
byteorder = { version = "1.5.0", default-features = false }
23+
24+
[features]
25+
default = ["alloc", "aml"]
26+
alloc = []
27+
aml = ["alloc", "pci_types"]

acpi/Cargo.toml

Lines changed: 0 additions & 19 deletions
This file was deleted.

aml/Cargo.toml

Lines changed: 0 additions & 17 deletions
This file was deleted.
File renamed without changes.

aml/src/lib.rs renamed to src/aml/mod.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1-
#![no_std]
2-
#![feature(let_chains, inherent_str_constructors)]
3-
4-
extern crate alloc;
1+
/*
2+
* TODO:
3+
* - Field reads supporting custom handlers
4+
* - Run `_REG` on supported op region handlers
5+
* - Sort out situation with `gain_mut` omg - thinking we should have a weird mutex thingy and
6+
* gain a 'token' to give us access to objects. Objects themselves should probs be in like an
7+
* `UnsafeCell` or something.
8+
* - Count operations performed and time
9+
* - Do stores properly :(
10+
* - Load and LoadTable
11+
* - Entire Event subsystem and opcodes for them
12+
*
13+
* - Method recursion depth?
14+
* - Loop timeouts
15+
* - Fuzz the shit out of it I guess?
16+
*/
517

618
pub mod namespace;
719
pub mod object;

aml/src/namespace.rs renamed to src/aml/namespace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{AmlError, object::Object};
1+
use crate::aml::{AmlError, object::Object};
22
use alloc::{
33
collections::btree_map::BTreeMap,
44
string::{String, ToString},

aml/src/object.rs renamed to src/aml/object.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{AmlError, Handle, Operation, op_region::OpRegion};
1+
use crate::aml::{AmlError, Handle, Operation, op_region::OpRegion};
22
use alloc::{borrow::Cow, string::String, sync::Arc, vec::Vec};
33
use bit_field::BitField;
44

aml/src/op_region.rs renamed to src/aml/op_region.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{AmlError, namespace::AmlName};
1+
use crate::aml::{AmlError, namespace::AmlName};
22

33
#[derive(Clone, Debug)]
44
pub struct OpRegion {

aml/src/pci_routing.rs renamed to src/aml/pci_routing.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{
1+
use crate::aml::{
22
AmlError,
33
Handler,
44
Interpreter,
@@ -11,7 +11,7 @@ use alloc::{vec, vec::Vec};
1111
use bit_field::BitField;
1212
use core::str::FromStr;
1313

14-
pub use crate::resource::IrqDescriptor;
14+
pub use crate::aml::resource::IrqDescriptor;
1515

1616
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
1717
pub enum Pin {

aml/src/resource.rs renamed to src/aml/resource.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{AmlError, Operation, object::Object};
1+
use crate::aml::{AmlError, Operation, object::Object};
22
use alloc::{sync::Arc, vec::Vec};
33
use bit_field::BitField;
44
use byteorder::{ByteOrder, LittleEndian};

0 commit comments

Comments
 (0)