MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / Initialize

Function Initialize

Kernel/src/arch/x86_64/apic.cpp:41–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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));

Callers

nothing calls this directly

Calls 12

ReadBaseFunction · 0.85
GetIOMappingFunction · 0.85
InfoFunction · 0.85
RegisterInterruptHandlerFunction · 0.85
EnableFunction · 0.85
ErrorFunction · 0.85
Read32Function · 0.85
RedirectFunction · 0.85
CPUIDFunction · 0.85
DisablePICFunction · 0.85
get_atMethod · 0.80
get_lengthMethod · 0.45

Tested by

no test coverage detected