mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 05:52:57 +00:00
[HALX86] Implement the clock IPI handler
This commit is contained in:
parent
d1c118b371
commit
79aaee6aac
8 changed files with 65 additions and 0 deletions
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include <hal.h>
|
||||
#include "apicp.h"
|
||||
#include <smp.h>
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
|
@ -182,10 +183,40 @@ HalpClockInterruptHandler(IN PKTRAP_FRAME TrapFrame)
|
|||
HalpSetClockRate = FALSE;
|
||||
}
|
||||
|
||||
/* Send the clock IPI to all other CPUs */
|
||||
HalpBroadcastClockIpi(CLOCK_IPI_VECTOR);
|
||||
|
||||
/* Update the system time -- on x86 the kernel will exit this trap */
|
||||
KeUpdateSystemTime(TrapFrame, LastIncrement, Irql);
|
||||
}
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
HalpClockIpiHandler(IN PKTRAP_FRAME TrapFrame)
|
||||
{
|
||||
KIRQL Irql;
|
||||
|
||||
/* Enter trap */
|
||||
KiEnterInterruptTrap(TrapFrame);
|
||||
#ifdef _M_AMD64
|
||||
/* This is for debugging */
|
||||
TrapFrame->ErrorCode = 0xc10c4;
|
||||
#endif
|
||||
|
||||
/* Start the interrupt */
|
||||
if (!HalBeginSystemInterrupt(CLOCK_LEVEL, CLOCK_IPI_VECTOR, &Irql))
|
||||
{
|
||||
/* Spurious, just end the interrupt */
|
||||
KiEoiHelper(TrapFrame);
|
||||
}
|
||||
|
||||
/* Call the kernel to update runtimes */
|
||||
KeUpdateRunTime(TrapFrame, Irql);
|
||||
|
||||
/* End the interrupt */
|
||||
KiEndInterrupt(Irql, TrapFrame);
|
||||
}
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
HalSetTimeIncrement(IN ULONG Increment)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue