Implement HlClearApicErrors() and HlSendEoi() routines, change HlDisableLegacyPic() calling convention
This commit is contained in:
parent
73cd4bd4f2
commit
77bc796769
@ -10,6 +10,21 @@
|
||||
#include <xtos.h>
|
||||
|
||||
|
||||
/**
|
||||
* Clears all errors on the APIC.
|
||||
*
|
||||
* @return This routine does not return any value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
VOID
|
||||
HlClearApicErrors()
|
||||
{
|
||||
/* Clear APIC errors */
|
||||
HlWriteApicRegister(APIC_ESR, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables the legacy 8259 Programmable Interrupt Controller (PIC).
|
||||
*
|
||||
@ -17,9 +32,9 @@
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTCDECL
|
||||
XTAPI
|
||||
VOID
|
||||
HlDisablePic(VOID)
|
||||
HlDisableLegacyPic()
|
||||
{
|
||||
HlIoPortOutByte(PIC1_DATA_PORT, 0xFF);
|
||||
HlIoPortOutByte(PIC2_DATA_PORT, 0xFF);
|
||||
@ -51,6 +66,21 @@ HlReadApicRegister(IN APIC_REGISTER Register)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Signals to the APIC that handling an interrupt is complete.
|
||||
*
|
||||
* @return This routine does not return any value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
VOID
|
||||
HlSendEoi()
|
||||
{
|
||||
/* Send APIC EOI */
|
||||
HlWriteApicRegister(APIC_EOI, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes to the APIC register.
|
||||
*
|
||||
|
@ -13,14 +13,22 @@
|
||||
|
||||
|
||||
/* HAL library routines forward references */
|
||||
XTCDECL
|
||||
XTAPI
|
||||
VOID
|
||||
HlDisablePic(VOID);
|
||||
HlClearApicErrors();
|
||||
|
||||
XTAPI
|
||||
VOID
|
||||
HlDisableLegacyPic();
|
||||
|
||||
XTFASTCALL
|
||||
ULONG
|
||||
HlReadApicRegister(IN APIC_REGISTER Register);
|
||||
|
||||
XTAPI
|
||||
VOID
|
||||
HlSendEoi();
|
||||
|
||||
XTFASTCALL
|
||||
VOID
|
||||
HlWriteApicRegister(IN APIC_REGISTER Register,
|
||||
|
@ -13,14 +13,22 @@
|
||||
|
||||
|
||||
/* HAL library routines forward references */
|
||||
XTCDECL
|
||||
XTAPI
|
||||
VOID
|
||||
HlDisablePic(VOID);
|
||||
HlClearApicErrors();
|
||||
|
||||
XTAPI
|
||||
VOID
|
||||
HlDisableLegacyPic();
|
||||
|
||||
XTFASTCALL
|
||||
ULONG
|
||||
HlReadApicRegister(IN APIC_REGISTER Register);
|
||||
|
||||
XTAPI
|
||||
VOID
|
||||
HlSendEoi();
|
||||
|
||||
XTFASTCALL
|
||||
VOID
|
||||
HlWriteApicRegister(IN APIC_REGISTER Register,
|
||||
|
@ -71,7 +71,7 @@ KepInitializeMachine(VOID)
|
||||
HlIoPortOutByte(0x3F6, 0);
|
||||
|
||||
/* Disable the legacy PIC */
|
||||
HlDisablePic();
|
||||
HlDisableLegacyPic();
|
||||
|
||||
/* Initialize frame buffer */
|
||||
HlInitializeFrameBuffer();
|
||||
|
@ -71,7 +71,7 @@ KepInitializeMachine(VOID)
|
||||
HlIoPortOutByte(0x3F6, 0);
|
||||
|
||||
/* Disable the legacy PIC */
|
||||
HlDisablePic();
|
||||
HlDisableLegacyPic();
|
||||
|
||||
/* Initialize frame buffer */
|
||||
HlInitializeFrameBuffer();
|
||||
|
Loading…
Reference in New Issue
Block a user