You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/this-month/2021-03/index.md
+40Lines changed: 40 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ date = 0000-01-01
6
6
month = "March 2021"
7
7
authors = [
8
8
"phil-opp",
9
+
"IsaacWoods",
9
10
# add yourself here
10
11
]
11
12
+++
@@ -79,6 +80,45 @@ The `volatile` crate provides a safe wrapper type for implementing volatile read
79
80
80
81
Thanks to [@KernelFreeze](https://github.com/KernelFreeze) for their contribution!
81
82
83
+
### [`acpi`](https://github.com/rust-osdev/acpi)
84
+
85
+
The `acpi` repository contains crates for parsing the ACPI tables – data structures that the firmware of modern
86
+
computers use to relay information about the hardware to the OS. This month has seen substantial changes to both
87
+
the `acpi` and `aml` crates:
88
+
89
+
-[We made the types that represent raw ACPI tables public](https://github.com/rust-osdev/acpi/pull/86). This allows library users to work directly with tables such as the
90
+
[FADT](https://docs.rs/acpi/2.3.1/acpi/fadt/struct.Fadt.html) if they need to, which is needed to access power
91
+
management features we don't yet expose. <spanclass="gray">(published as `acpi v2.3.1`)</span>
92
+
-[Native functions are now supported by the AML interpreter!](https://github.com/rust-osdev/acpi/pull/88). A
93
+
'native function' is an AML method that is defined in Rust, rather than using AML bytecode. This is useful for
94
+
defining "up-call" methods (where a method is provided by the OS, and called by the firmware), and will hopefully
95
+
by useful in the future for patching methods in broken tables. A native method can easily be created with
96
+
the [`AmlValue::native_method` constructor](https://docs.rs/aml/0.11.0/aml/value/enum.AmlValue.html#method.native_method).
97
+
- However, supporting native functions needed a bit of breakage - `AmlValue` no longer implements `PartialEq` or `Eq`. This actually improves correctness,
98
+
as correctly comparing two `AmlValue`s may require type conversions to be done, and so should be done with the
99
+
[`AmlValue::cmp`](https://docs.rs/aml/0.11.0/aml/value/enum.AmlValue.html#method.cmp) method, but does make `aml
100
+
v0.11.0` a breaking change.
101
+
- We also used this opportunity to remove the `legacy_mode` parameter to `AmlContext::new`, which will affect all
102
+
crate users, but makes user's lives simpler - handling old tables will now be done automatically.
103
+
- Fallout from `AmlValue` no longer being `Eq` also led to some cleanups in how control flow is handled in the
104
+
interpreter. This is not likely to affect users, but the "fake" error `AmlError::Return` has been removed, which
105
+
is also technically a breaking change in `aml v0.11.0`.
106
+
- The AML interpreter now correctly supplies the `\_OS`, `\_OSI`, and `\_REV` objects. These objects were designed
107
+
to allow firmware to detect OS support for new AML features, but [come with a bit of baggage](https://www.kernel.org/doc/html/latest/firmware-guide/acpi/osi.html).
108
+
This is important for supporting running on real hardware, which often assumes the existence of these objects.
109
+
<spanclass="gray">(published as `aml v0.11.0`)</span>
110
+
111
+
## Call for Participation
112
+
Want to contribute to a Rust OSDev project, but don't know where to start? Pick up one of these outstanding
113
+
issues in one of our projects and get started!
114
+
115
+
If you maintain a Rust OSDev project and are looking for contributors, especially for tasks suited to people
116
+
getting started in this space, please [create a PR](https://github.com/rust-osdev/homepage/pulls) against the
117
+
`next` branch with the tasks you want to include in the next issue.
118
+
119
+
-[(`acpi`) Record attempted conversion in `AmlError::IncompatibleValueConversion`](https://github.com/rust-osdev/acpi/issues/53)
120
+
-[(`acpi`) Support the new MADT Multiprocessor Wakeup structure](https://github.com/rust-osdev/acpi/issues/87)
121
+
82
122
## Personal Projects
83
123
84
124
In this section, we describe updates to personal projects that are not directly related to the `rust-osdev` organization. Feel free to [create a pull request](https://github.com/rust-osdev/homepage/pulls) with the updates of your OS project for the next post.
0 commit comments