rust-kernel
Rustbelt: a hobby x86_64 kernel written in Rust
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | //! The Arm GICv2 interrupt controller (QEMU virt's default). Two parts:
//!
//! - the **distributor** (GICD) decides which interrupts are on and where
//! they go;
//! - the **CPU interface** (GICC) is per CPU: `IAR` says which interrupt
//! fired (and marks it "being handled"), `EOIR` says we're done.
//!
//! Interrupt numbers ("INTIDs"): 0-15 are software interrupts between
//! CPUs, 16-31 are per-CPU ("PPIs", like each CPU's timer), 32 and up are
//! shared devices ("SPIs"). 1020-1023 mean "nothing" (spurious).
use IrqController;
use mmio;
use ;
const GICD_CTLR: usize = 0x000;
const GICD_ISENABLER: usize = 0x100;
const GICD_ICENABLER: usize = 0x180;
const GICD_IPRIORITYR: usize = 0x400;
const GICC_CTLR: usize = 0x000;
const GICC_PMR: usize = 0x004;
const GICC_IAR: usize = 0x00c;
const GICC_EOIR: usize = 0x010;
|