diff --git a/xtoskrnl/hl/x86/pic.c b/xtoskrnl/hl/x86/pic.c index a385b74..f3794b0 100644 --- a/xtoskrnl/hl/x86/pic.c +++ b/xtoskrnl/hl/x86/pic.c @@ -4,10 +4,25 @@ * FILE: xtoskrnl/hl/x86/pic.c * DESCRIPTION: Programmable Interrupt Controller (PIC) for x86 (i686/AMD64) support * DEVELOPERS: Rafal Kupiec + * Jozef Nagy */ #include +/** + * Disables the 8259 PIC. + * + * @return This routine does not return any value. + * + * @since XT 1.0 + */ +XTCDECL +VOID +HlDisablePic(VOID) +{ + HlIoPortOutByte(PIC1_DATA_PORT, 0xFF); + HlIoPortOutByte(PIC2_DATA_PORT, 0xFF); +} /** * Reads from the APIC register. diff --git a/xtoskrnl/includes/hl.h b/xtoskrnl/includes/hl.h index 96d0986..4c680d5 100644 --- a/xtoskrnl/includes/hl.h +++ b/xtoskrnl/includes/hl.h @@ -11,8 +11,11 @@ #include - /* HAL library routines forward references */ +XTCDECL +VOID +HlDisablePic(VOID); + XTAPI VOID HlClearScreen(VOID); diff --git a/xtoskrnl/ke/amd64/krnlinit.c b/xtoskrnl/ke/amd64/krnlinit.c index e09923b..90bdb66 100644 --- a/xtoskrnl/ke/amd64/krnlinit.c +++ b/xtoskrnl/ke/amd64/krnlinit.c @@ -69,6 +69,9 @@ KepInitializeMachine(VOID) /* Re-enable IDE interrupts */ HlIoPortOutByte(0x376, 0); HlIoPortOutByte(0x3F6, 0); + + /* Disable the legacy PIC */ + HlDisablePic(); } /** diff --git a/xtoskrnl/ke/i686/krnlinit.c b/xtoskrnl/ke/i686/krnlinit.c index faefae0..f8ec530 100644 --- a/xtoskrnl/ke/i686/krnlinit.c +++ b/xtoskrnl/ke/i686/krnlinit.c @@ -69,6 +69,9 @@ KepInitializeMachine(VOID) /* Re-enable IDE interrupts */ HlIoPortOutByte(0x376, 0); HlIoPortOutByte(0x3F6, 0); + + /* Disable the legacy PIC */ + HlDisablePic(); } /**