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§
- ApicId
- Local APIC register.
- Apic
Version - ACIC Version Register.
- Bitfield
Register - Bitfield structure for the
ISR
,TMR
orIRR
. - Destination
Format - Destination Format Register.
- EndOf
Interrupt - End of Interrupt Register (EOI).
- ErrorLVT
- Error Vector Table Entry.
- Error
Status - Error Status Register (ESR).
- Interrupt
CmdHigh - Interrupt Command Register High (bits 63:32).
- Interrupt
CmdLow - Interrupt Command Register Low (bits 31:0).
- LIntLVT
- Structure for Local Interrupt 0 and 1 Vector Table Entries.
- Local
Apic - Local APIC registers.
- Logical
Destination - Logical Destination Register.
- PerfLVT
- Performance Counter Local Vector Table Entry.
- Priority
Register - Priority structure for the
TPR
,APR
orPPR
. - Spurious
Interrupt Vector - Spurious Interrupt Vector Register.
- ThermalLVT
- Thermal Local Vector Table Entry.
- Timer
Count - Structure for Initial and Current Timer Count Registers.
- Timer
DivConf - Timer Divide Configuration Register.
- TimerLVT
- Timer Local Vector Table Entry.