Redesign the interrupt controller crate; support x86_64 (#1051)
* The `interrupt_controller` crate still is not used on x86_64,
but it is now nearly fully implemented.
* Move initialization of x86-specific interrupt controllers (i.e., APIC)
into the x86-specific module of `interrupt_controller`,
which makes more sense than doing it from the `device_manager`.
* As such, the `captain` can now unconditionally initialize
the interrupt controller crate, which works on all architectures.
Two remaining to-do items, which will come in a future PR:
1. Implement `enable_local_timer_interrupt()` for aarch64
* This requires moving some aarch64-specific functionality
for setting up the system's per-CPU timer out of the `interrupts`
crate and into another crate.
2. Implement `SystemInterruptController::get()` for x86_64.
* This is a bit challenging because there can be _multiple_
system-wide interrupt controllers (I/O APICs) on x86_64,
so we can't simply implement a basic getter function.
* We may need to offer an iterator interface, or perhaps a
getter that takes the current CPU or NUMA domain or
some kind of other identifier into account.
* In the future, we'll move each `LocalInterruptController` instance
into CPU-local storage to allow for very fast access. K
Kevin Boos committed
493ac602e893b18ca233bd748bf79b2403ef894d
Parent: e9416d6
Committed by GitHub <noreply@github.com>
on 10/7/2023, 9:29:05 PM