Capitalize namespacing structs
This helps to avoid name clashes when breaking up modules into packages.
This commit is contained in:
1 parent
a423cdf1b1
commit
25ee1775f0
16 files changed
+86
-86
No files matched your search
+13
-13
@@ -9,7 +9,7 @@ import hulk.acpi;
|
||||
import hulk.idt;
|
||||
import hulk.rtc;
|
||||
|
||||
struct apic
|
||||
struct Apic
|
||||
{
|
||||
private enum uint PERIODIC_MODE = 0x2_0000u;
|
||||
|
||||
@@ -66,22 +66,22 @@ struct apic
|
||||
|
||||
public static void initialize()
|
||||
{
|
||||
apic_registers = cast(ApicRegisters *)acpi.apic_address;
|
||||
apic_registers = cast(ApicRegisters *)Acpi.apic_address;
|
||||
io_apic_registers = cast(IoApicRegisters *)0xFEC0_0000u;
|
||||
hurl.map(cast(ulong)apic_registers, cast(ulong)apic_registers,
|
||||
Hurl.map(cast(ulong)apic_registers, cast(ulong)apic_registers,
|
||||
PT_WRITABLE | PT_WRITE_THROUGH | PT_DISABLE_CACHE | PT_NO_EXECUTE);
|
||||
hurl.map(cast(ulong)io_apic_registers, cast(ulong)io_apic_registers,
|
||||
Hurl.map(cast(ulong)io_apic_registers, cast(ulong)io_apic_registers,
|
||||
PT_WRITABLE | PT_WRITE_THROUGH | PT_DISABLE_CACHE | PT_NO_EXECUTE);
|
||||
klog.writefln("LAPIC ID: 0x%08x", apic_registers.lapic_id.value);
|
||||
klog.writefln("LAPIC version: 0x%08x", apic_registers.lapic_version.value);
|
||||
Klog.writefln("LAPIC ID: 0x%08x", apic_registers.lapic_id.value);
|
||||
Klog.writefln("LAPIC version: 0x%08x", apic_registers.lapic_version.value);
|
||||
/* Enable local APIC to receive interrupts and set spurious interrupt
|
||||
* vector to 0xFF. */
|
||||
apic_registers.spurious_interrupt_vector.value = 0x100u | idt.INT_APIC_SPURIOUS;
|
||||
apic_registers.lvt_timer.value = idt.INT_APIC_TIMER;
|
||||
apic_registers.lvt_lint[0].value = idt.INT_APIC_LINT0;
|
||||
apic_registers.lvt_lint[1].value = idt.INT_APIC_LINT1;
|
||||
apic_registers.spurious_interrupt_vector.value = 0x100u | Idt.INT_APIC_SPURIOUS;
|
||||
apic_registers.lvt_timer.value = Idt.INT_APIC_TIMER;
|
||||
apic_registers.lvt_lint[0].value = Idt.INT_APIC_LINT0;
|
||||
apic_registers.lvt_lint[1].value = Idt.INT_APIC_LINT1;
|
||||
/* Enable RTC interrupt. */
|
||||
configure_io_apic_irq(IRQ_RTC, idt.INT_APIC_BASE + IRQ_RTC);
|
||||
configure_io_apic_irq(IRQ_RTC, Idt.INT_APIC_BASE + IRQ_RTC);
|
||||
}
|
||||
|
||||
private static void configure_io_apic_irq(size_t io_apic_irq, size_t interrupt_id)
|
||||
@@ -102,8 +102,8 @@ struct apic
|
||||
{
|
||||
switch (vector)
|
||||
{
|
||||
case idt.INT_APIC_BASE + IRQ_RTC:
|
||||
rtc.isr();
|
||||
case Idt.INT_APIC_BASE + IRQ_RTC:
|
||||
Rtc.isr();
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in new issue
Block a user