Enable interrupts and halt CPU
This commit is contained in:
parent
bc7fd3f2fc
commit
43d945b5e8
@ -5,6 +5,16 @@ void cli()
|
||||
__asm("cli", "");
|
||||
}
|
||||
|
||||
void sti()
|
||||
{
|
||||
__asm("sti", "");
|
||||
}
|
||||
|
||||
void hlt()
|
||||
{
|
||||
__asm("hlt", "");
|
||||
}
|
||||
|
||||
ulong read_cr0()
|
||||
{
|
||||
return __asm!ulong("mov %cr0, %rax", "={rax}");
|
||||
|
@ -16,6 +16,7 @@ import hulk.pci;
|
||||
import hulk.gdt;
|
||||
import hulk.idt;
|
||||
import hos.cpu;
|
||||
import ldc.llvmasm;
|
||||
|
||||
extern extern(C) __gshared ubyte _hulk_total_size;
|
||||
|
||||
@ -46,8 +47,10 @@ void hulk_start()
|
||||
|
||||
hippo.initialize(&hulk_header);
|
||||
pci.initialize();
|
||||
sti();
|
||||
|
||||
for (;;)
|
||||
{
|
||||
hlt();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user