Handout
This commit is contained in:
44
arch/ioapic.cc
Normal file
44
arch/ioapic.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
#include "ioapic.h"
|
||||
|
||||
namespace IOAPIC {
|
||||
/*! \brief IOAPIC registers memory mapped into the CPU's address space.
|
||||
*
|
||||
* Access to the actual IOAPIC registers can be obtained by performing the
|
||||
* following steps:
|
||||
* 1. Write the number of the IOAPIC register to the address stored in
|
||||
* `IOREGSEL_REG`
|
||||
* 2. Read the value from / write the value to the address referred to by
|
||||
* `IOWIN_REG`.
|
||||
*
|
||||
* \see [IO-APIC manual](intel_ioapic.pdf#page=8)
|
||||
*/
|
||||
volatile Index *IOREGSEL_REG = reinterpret_cast<volatile Index *>(0xfec00000);
|
||||
/// \copydoc IOREGSEL_REG
|
||||
volatile Register *IOWIN_REG =
|
||||
reinterpret_cast<volatile Register *>(0xfec00010);
|
||||
|
||||
// IOAPIC manual, p. 8
|
||||
const Index IOAPICID_IDX = 0x00;
|
||||
const Index IOREDTBL_IDX = 0x10;
|
||||
|
||||
const uint8_t slot_max = 24;
|
||||
|
||||
void init() {}
|
||||
|
||||
void config(uint8_t slot, Core::Interrupt::Vector vector,
|
||||
TriggerMode trigger_mode, Polarity polarity) {
|
||||
(void)slot;
|
||||
(void)vector;
|
||||
(void)trigger_mode;
|
||||
(void)polarity;
|
||||
}
|
||||
|
||||
void allow(uint8_t slot) { (void)slot; }
|
||||
|
||||
void forbid(uint8_t slot) { (void)slot; }
|
||||
|
||||
bool status(uint8_t slot) {
|
||||
(void)slot;
|
||||
return false;
|
||||
}
|
||||
} // namespace IOAPIC
|
||||
Reference in New Issue
Block a user