Disable legacy 8259 PIC before enabling APIC
Reviewed-on: #5 Reviewed-by: Rafal Kupiec <belliash@noreply.codingworkshop.git> Co-authored-by: Jozef Nagy <schkwve@gmail.com> Co-committed-by: Jozef Nagy <schkwve@gmail.com>
This commit is contained in:
parent
669b84a826
commit
c8a54e602b
@ -4,10 +4,25 @@
|
|||||||
* FILE: xtoskrnl/hl/x86/pic.c
|
* FILE: xtoskrnl/hl/x86/pic.c
|
||||||
* DESCRIPTION: Programmable Interrupt Controller (PIC) for x86 (i686/AMD64) support
|
* DESCRIPTION: Programmable Interrupt Controller (PIC) for x86 (i686/AMD64) support
|
||||||
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
|
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
|
||||||
|
* Jozef Nagy <schkwve@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <xtos.h>
|
#include <xtos.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.
|
* Reads from the APIC register.
|
||||||
|
@ -11,8 +11,11 @@
|
|||||||
|
|
||||||
#include <xtos.h>
|
#include <xtos.h>
|
||||||
|
|
||||||
|
|
||||||
/* HAL library routines forward references */
|
/* HAL library routines forward references */
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlDisablePic(VOID);
|
||||||
|
|
||||||
XTAPI
|
XTAPI
|
||||||
VOID
|
VOID
|
||||||
HlClearScreen(VOID);
|
HlClearScreen(VOID);
|
||||||
|
@ -69,6 +69,9 @@ KepInitializeMachine(VOID)
|
|||||||
/* Re-enable IDE interrupts */
|
/* Re-enable IDE interrupts */
|
||||||
HlIoPortOutByte(0x376, 0);
|
HlIoPortOutByte(0x376, 0);
|
||||||
HlIoPortOutByte(0x3F6, 0);
|
HlIoPortOutByte(0x3F6, 0);
|
||||||
|
|
||||||
|
/* Disable the legacy PIC */
|
||||||
|
HlDisablePic();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,6 +69,9 @@ KepInitializeMachine(VOID)
|
|||||||
/* Re-enable IDE interrupts */
|
/* Re-enable IDE interrupts */
|
||||||
HlIoPortOutByte(0x376, 0);
|
HlIoPortOutByte(0x376, 0);
|
||||||
HlIoPortOutByte(0x3F6, 0);
|
HlIoPortOutByte(0x3F6, 0);
|
||||||
|
|
||||||
|
/* Disable the legacy PIC */
|
||||||
|
HlDisablePic();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user