Skip to content

Rewrite acpi crate and entire AML interpreter #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 88 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
50ea695
`acpi`: remove redundant import
IsaacWoods Jun 26, 2024
e2811fa
`aml`: fix fuzz target
IsaacWoods Jun 26, 2024
598ad9c
`aml`: don't panic if AML tries to create a giant `Buffer`
IsaacWoods Jun 26, 2024
b337022
Remove unmaintained changelog
IsaacWoods Sep 7, 2024
691252b
Remove old `rsdp` crate
IsaacWoods Sep 7, 2024
1849d79
Move `aml_tester` and `acpi_dumper` into tools subdirectory
IsaacWoods Sep 7, 2024
44ab415
Improve layout of AML test runner output
IsaacWoods Sep 7, 2024
0553142
Reverse `reset` option to `combined` in AML tester
IsaacWoods Sep 7, 2024
6a6daf8
Fix crates compiled on CI
IsaacWoods Sep 7, 2024
041f5ea
Add doc comment for `Namespace::get_level_for_path`
IsaacWoods Nov 8, 2024
3577b5a
`acpi`: remove lifetime from `ManagedSlice`
IsaacWoods Jan 18, 2025
65f08e2
`acpi`: make `wakeup_aps` unsafe
IsaacWoods Jan 18, 2025
e495007
`acpi`: break out HPET fields
IsaacWoods Jan 18, 2025
0308864
`acpi`: make all table fields public
IsaacWoods Jan 18, 2025
33057d7
Clean-up a few straggling bits
IsaacWoods Jan 30, 2025
04bbfa7
Start complete rewrite of AML interpreter
IsaacWoods Feb 6, 2025
c6de62f
`aml`: support `DefPackage` + strings + refactor block handling
IsaacWoods Feb 7, 2025
708dd48
`aml`: stub out support for `DefOpRegion`, `DefField`, `DefThermalZon…
IsaacWoods Feb 7, 2025
4ae5c06
`aml`: fix parsing of `NameString`s
IsaacWoods Feb 7, 2025
2dd835f
`aml`: handle `DefBuffer`
IsaacWoods Feb 7, 2025
fa332ba
`aml`: fix handling of package creation
IsaacWoods Feb 9, 2025
3944926
`aml`: support method calls by eliding lifetimes to AML streams
IsaacWoods Feb 9, 2025
a1bcccc
`aml`: support `DefIfElse`
IsaacWoods Feb 9, 2025
7c9931b
`aml`: support creation of buffer field objects
IsaacWoods Feb 9, 2025
b77079b
`aml`: general parsing cleanup + little bits
IsaacWoods Feb 9, 2025
dea87c4
`aml`: nicer `Display` impl for `Namespace`
IsaacWoods Feb 10, 2025
33b41f6
`aml`: support `DefIncrement`, `DefDecrement`
IsaacWoods Feb 12, 2025
a56959e
`aml`: support `DefObjectType`
IsaacWoods Feb 12, 2025
db0362f
`aml`: support reads from and writes to buffer fields
IsaacWoods Feb 12, 2025
6d629b0
`aml_tester`: allow running a single test instead of a directory of them
IsaacWoods Feb 15, 2025
5185140
`aml`: fix package parsing (again)
IsaacWoods Feb 15, 2025
4ceaa01
`aml`: handle legacy `DefProcessor` operations
IsaacWoods Feb 15, 2025
b8749ce
`aml`: fix branching calculations for `DefIfElse`
IsaacWoods Feb 16, 2025
5d4a75d
`aml`: stub out `DefMutex` and `DefEvent` support
IsaacWoods Feb 16, 2025
763bc74
`aml`: binary maths
IsaacWoods Feb 16, 2025
782e26b
`aml`: handle `DefFindSetLeftBit` and `DefFindSetRightBit`
IsaacWoods Feb 17, 2025
97861f8
`aml`: support executing method objects
IsaacWoods Feb 17, 2025
3f616f5
`aml`: general cleanup
IsaacWoods Feb 18, 2025
d45879d
`aml`: support `DefBreakpoint` + some logical operations
IsaacWoods Feb 18, 2025
4e13b65
`aml`: introduce 'transparent' reference types + handle undefined pac…
IsaacWoods Feb 18, 2025
462f92e
`aml`: re-add old resource descriptor and `_PRT` parsing
IsaacWoods Feb 18, 2025
b8cb18f
`aml`: implement `DefSizeOf`
IsaacWoods Feb 18, 2025
41edbac
`aml`: monomorphise over `Handler` type
IsaacWoods Feb 18, 2025
62330d0
`aml`: implement `DefTimer`, `DefFatal`, `Debug`, and `Revision`
IsaacWoods Feb 19, 2025
86b47eb
`aml`: implement `DefToBCD` and `DefFromBCD`
IsaacWoods Feb 19, 2025
fe877bd
`aml`: support parsing of bank and index fields
IsaacWoods Feb 20, 2025
4c24b08
`aml`: implement `DefIndex`
IsaacWoods Feb 22, 2025
8378db4
`aml`: better type mismatch errors + `DefNot` support
IsaacWoods Feb 22, 2025
9795a38
`aml`: support aliases
IsaacWoods Mar 5, 2025
aee45b3
`aml`: implement `DefWhile`,`DefBreak`,`DefContinue`
IsaacWoods Mar 5, 2025
7442604
`aml`: implement `DefRefOf`, `DefCondRefOf`
IsaacWoods Mar 5, 2025
eb47b1c
`aml`: implement `DefMid`
IsaacWoods Mar 5, 2025
d38ca73
`aml`: fix handling of `DefContinue`
IsaacWoods Mar 5, 2025
55989b3
`aml`: handle strings and buffers in logical ops
IsaacWoods Mar 5, 2025
b6b78ca
`aml`: lay groundwork for field reads + support system memory + IO reads
IsaacWoods Mar 9, 2025
77d446e
`aml`: support PCI config space field reads
IsaacWoods Mar 10, 2025
df5778a
`aml`: implement `DefConcat` and `DefConcatRes`
IsaacWoods Mar 10, 2025
5ef7860
`aml`: fix behaviour of binary ops
IsaacWoods Mar 13, 2025
bb3107a
`aml`: make `InvalidOperationOnObject` error more useful
IsaacWoods Mar 13, 2025
b8e382d
`aml`: initial implementation of mutexes, `DefAcquire`, `DefRelease`
IsaacWoods Mar 13, 2025
b5bb2a5
`aml`: initial implementation of field writing
IsaacWoods Mar 13, 2025
6331744
`acpi`: don't gate `allocator_api` on a feature
IsaacWoods Mar 13, 2025
184ddbf
`acpi`: include revision of AML tables in `AmlTable`
IsaacWoods Mar 13, 2025
15b608d
`acpi`: rewrite most of the library
IsaacWoods Mar 24, 2025
c3efed1
`aml`: implement `DerefOf`
IsaacWoods Mar 24, 2025
12f8a33
`aml`: handle transparent references in return values
IsaacWoods Mar 24, 2025
e2158d6
`aml`: resolve fields at the top-level if required
IsaacWoods Mar 24, 2025
37afb69
`aml`: don't fail on `DefDataRegion` ops
IsaacWoods Mar 25, 2025
2561e5a
`aml`: handle stores to locals/args
IsaacWoods Mar 25, 2025
de76c39
`aml`: improve interpreter docs + few bits and bobs
IsaacWoods Mar 25, 2025
9cf6293
`aml`: start process for initializing namespace - `_STA` and `_INI` o…
IsaacWoods Mar 25, 2025
b266a6a
`aml`: commit some comments/other bits in prep of merging crates
IsaacWoods Mar 25, 2025
3e73ac4
Merge `acpi` and `aml` crates into one top-level crate
IsaacWoods Mar 25, 2025
fe31c72
Add `Interpreter::new_from_tables` helper method
IsaacWoods Mar 25, 2025
35ccb3b
AML: respect the table revision in `DefFindSetLeftBit`
IsaacWoods Mar 28, 2025
88fd134
Fix CI
IsaacWoods Mar 30, 2025
3956699
Make error enums `non_exhaustive`
IsaacWoods Apr 2, 2025
4ce1dad
AML: implement `ToString`, `ToBuffer`, `ToDecimalString`, `ToHexStrin…
IsaacWoods Apr 2, 2025
abb054b
AML: attempt implicit integer conversion on stores
IsaacWoods Apr 2, 2025
6e81489
AML: fix handling of `If` ops at the end of blocks
IsaacWoods Apr 2, 2025
4d66363
Add `ToInteger` test case from uACPI
IsaacWoods Apr 2, 2025
ccde4c7
AML: support `DefVarPackage`
IsaacWoods Apr 3, 2025
a880918
AML: improve safety of mutable object handling
IsaacWoods Apr 4, 2025
22867c6
AML: add rudimentary operation tracing for debugging
IsaacWoods Apr 7, 2025
cf43067
AML: fix bug in `ToHexString`, add test for `To*` opcodes from uACPI
IsaacWoods Apr 7, 2025
91e0c0f
AML: fix bug in string comparisons with strings of less than 4 bytes
IsaacWoods Apr 7, 2025
e986ac7
AML: don't error on name collisions
IsaacWoods Apr 7, 2025
beb2950
AML: allow use of `Local`/`Arg` transparent references in `OpRegion`s
IsaacWoods Apr 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alias]
run_tests = "run --manifest-path tools/aml_tester/Cargo.toml --"
22 changes: 8 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
target: ${{ matrix.target }}
components: llvm-tools-preview

- name: Build rsdp, acpi, and aml
run: cargo build -p rsdp -p acpi -p aml --target $TARGET
- name: Build crates
run: cargo build --target $TARGET

test:
runs-on: ubuntu-latest
Expand All @@ -60,10 +60,10 @@ jobs:
run: sudo apt-get install -y acpica-tools

- name: Run tests
run: cargo test --all
run: cargo test

- name: Run AML test suite
run: cargo run --bin aml_tester -- -p tests --reset
run: cargo run_tests -p tests

clippy:
runs-on: ubuntu-latest
Expand All @@ -79,14 +79,8 @@ jobs:
profile: minimal
components: clippy

- name: Run clippy (ACPI)
run: cargo clippy -p acpi
- name: Run clippy
run: cargo clippy

- name: Run clippy (ACPI tests)
run: cargo clippy -p acpi --tests

- name: Run clippy (AML)
run: cargo clippy -p aml

- name: Run clippy (AML tests)
run: cargo clippy -p aml --tests
- name: Run clippy (tests)
run: cargo clippy --tests
4 changes: 0 additions & 4 deletions CHANGELOG.md

This file was deleted.

26 changes: 25 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
[workspace]
members = ["rsdp", "acpi", "aml", "acpi-dumper", "aml_tester"]
members = ["tools/aml_tester", "tools/acpi_dumper"]
resolver = "2"

[package]
name = "acpi"
version = "5.1.0"
authors = ["Isaac Woods"]
repository = "https://github.com/rust-osdev/acpi"
description = "A pure-Rust library for interacting with ACPI"
categories = ["hardware-support", "no-std"]
readme = "../README.md"
license = "MIT/Apache-2.0"
edition = "2024"

[dependencies]
bit_field = "0.10.2"
bitflags = "2.5.0"
log = "0.4.20"
spinning_top = "0.3.0"
pci_types = { version = "0.10.0", public = true, optional = true }
byteorder = { version = "1.5.0", default-features = false }

[features]
default = ["alloc", "aml"]
alloc = []
aml = ["alloc", "pci_types"]
20 changes: 0 additions & 20 deletions acpi/Cargo.toml

This file was deleted.

Loading
Loading