Disable PIC

This commit is contained in:
josh committed 2022-09-06 22:35:41 -04:00
1 parent 43d945b5e8
commit b3ca9af48a
3 files changed
+28

No files matched your search

+2
View File
@@ -17,6 +17,7 @@ import hulk.gdt;
import hulk.idt;
import hos.cpu;
import ldc.llvmasm;
import hulk.pic;
extern extern(C) __gshared ubyte _hulk_total_size;
@@ -47,6 +48,7 @@ void hulk_start()
hippo.initialize(&hulk_header);
pci.initialize();
pic.initialize();
sti();
for (;;)
+16
View File
@@ -0,0 +1,16 @@
/**
* PIC (Programmable Interrupt Controller) functionality.
*/
module hulk.pic;
import hos.cpu;
struct pic
{
public static void initialize()
{
/* Disable the PIC. */
out8(0xA1u, 0xFFu);
out8(0x21u, 0xFFu);
}
}