Implement HlClearApicErrors() and HlSendEoi() routines, change HlDisableLegacyPic() calling convention
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 45s
Builds / ExectOS (i686) (push) Successful in 20s

This commit is contained in:
2024-02-09 15:11:14 +01:00
parent 73cd4bd4f2
commit 77bc796769
5 changed files with 54 additions and 8 deletions

View File

@@ -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.
*