1
0
ответвлено от xt-sys/exectos

Implement HlClearApicErrors() and HlSendEoi() routines, change HlDisableLegacyPic() calling convention

Этот коммит содержится в:
2024-02-09 15:11:14 +01:00
родитель 73cd4bd4f2
Коммит 77bc796769
5 изменённых файлов: 54 добавлений и 8 удалений

Просмотреть файл

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