| 39 | } |
| 40 | |
| 41 | int Initialize(){ |
| 42 | Local::base = ReadBase() & LOCAL_APIC_BASE; |
| 43 | virtualBase = Memory::GetIOMapping(base); |
| 44 | |
| 45 | if(debugLevelInterrupts >= DebugLevelNormal){ |
| 46 | Log::Info("[APIC] Local APIC Base %x (%x)", base, virtualBase); |
| 47 | } |
| 48 | |
| 49 | IDT::RegisterInterruptHandler(0xFF, SpuriousInterruptHandler); |
| 50 | |
| 51 | Enable(); |
| 52 | |
| 53 | return 0; |
| 54 | } |
| 55 | |
| 56 | uint32_t Read(uint32_t off){ |
| 57 | return *((volatile uint32_t*)(virtualBase + off)); |
nothing calls this directly
no test coverage detected