Add apic module that does not do anything yet
This commit is contained in:
1 parent
dba58b2277
commit
b1be5b888f
2 files changed
+24
No files matched your search
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* APIC (Advanced Programmable Interrupt Controller) functionality.
|
||||
*/
|
||||
module hulk.apic;
|
||||
|
||||
import hulk.klog;
|
||||
import hulk.hurl;
|
||||
import hulk.acpi;
|
||||
|
||||
struct apic
|
||||
{
|
||||
public enum uint * local_apic_registers = cast(uint *)0xFEE0_0000u;
|
||||
|
||||
public static void initialize()
|
||||
{
|
||||
Hurl.map(cast(ulong)local_apic_registers,
|
||||
cast(ulong)local_apic_registers,
|
||||
MAP_WRITABLE | MAP_WRITE_THROUGH | MAP_DISABLE_CACHE | MAP_NO_EXECUTE);
|
||||
klog.writefln("LAPIC ID: 0x%08x", local_apic_registers[0x20/4]);
|
||||
klog.writefln("LAPIC version: 0x%08x", local_apic_registers[0x30/4]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user