Expand description
A self-contained crate implementing safe types for the local APIC registers on x86_64 systems.
More information on the local APIC standard can be obtained on chapter 16: Local APIC from the AMD Architecture Programmer’s Manual Vol. 2: System Programming.
This crate does not depend on the standard Rust library and uses
#![forbid(unsafe_code)]
.
Usage
The main type of this crate is the LocalApic
structure. It has
no invalid representations, and has every APIC register laid out
as needed so it can be safely laid over mapped memory, provided
the region has the right alignment.
All the registers in the structure provide safe setters and getters to access the bitfields in those registers, as well as methods to convert the registers to and from raw bytes, thanks to the modular_bitfield crate.
Structs
- Local APIC register.
- ACIC Version Register.
- Destination Format Register.
- End of Interrupt Register (EOI).
- Error Vector Table Entry.
- Error Status Register (ESR).
- Interrupt Command Register High (bits 63:32).
- Interrupt Command Register Low (bits 31:0).
- Structure for Local Interrupt 0 and 1 Vector Table Entries.
- Local APIC registers.
- Logical Destination Register.
- Performance Counter Local Vector Table Entry.
- Spurious Interrupt Vector Register.
- Thermal Local Vector Table Entry.
- Timer Divide Configuration Register.
- Timer Local Vector Table Entry.