mirror of
https://github.com/reactos/reactos.git
synced 2025-02-28 19:32:59 +00:00
**** WIP HAL Set correct IRQL for interrupt handlers (see Timo's branch/PR for updated fix) ****
This commit is contained in:
parent
28b7f550ee
commit
03b4cf3544
4 changed files with 28 additions and 1 deletions
|
@ -743,6 +743,16 @@ HalDisableSystemInterrupt(
|
|||
IOApicWrite(IOAPIC_REDTBL + 2 * Index, ReDirReg.Long0);
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME: Left enabled, until the non-x86 HAL uses the kernel's
|
||||
* KeInitializeInterrupt(), KeConnectInterrupt() (or its HAL version)
|
||||
* so that, when the interrupt handlers are invoked, they already
|
||||
* are running with the correct IRQL, instead of being enforced with
|
||||
* HalBeginSystemInterrupt() and cleaned up with HalEndSystemInterrupt().
|
||||
*
|
||||
* This code was originally #ifndef _M_AMD64 by commit f085f50747 (r53631).
|
||||
*/
|
||||
// #ifndef _M_AMD64
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalBeginSystemInterrupt(
|
||||
|
@ -821,6 +831,7 @@ HalEndSystemInterrupt(
|
|||
/* Restore the old IRQL */
|
||||
ApicLowerIrql(OldIrql);
|
||||
}
|
||||
// #endif /* !_M_AMD64 */
|
||||
|
||||
|
||||
/* IRQL MANAGEMENT ************************************************************/
|
||||
|
|
|
@ -219,7 +219,7 @@ HalpClockIpiHandler(IN PKTRAP_FRAME TrapFrame)
|
|||
return;
|
||||
}
|
||||
|
||||
/* Call the kernel to update runtimes */
|
||||
/* Call the kernel to update runtime */
|
||||
KeUpdateRunTime(TrapFrame, Irql);
|
||||
|
||||
/* End the interrupt */
|
||||
|
|
|
@ -356,6 +356,13 @@ KeProfileInterruptWithSource(IN PKTRAP_FRAME TrapFrame,
|
|||
{
|
||||
PKPROCESS Process = KeGetCurrentThread()->ApcState.Process;
|
||||
|
||||
{
|
||||
KIRQL CurrIrql = KeGetCurrentIrql();
|
||||
if (CurrIrql < PROFILE_LEVEL)
|
||||
KdDbgPortPrintf("%s() running at IRQL %d\n", __FUNCTION__, CurrIrql);
|
||||
}
|
||||
// ASSERT(KeGetCurrentIrql() == PROFILE_LEVEL);
|
||||
|
||||
/* We have to parse 2 lists. Per-Process and System-Wide */
|
||||
KiParseProfileList(TrapFrame, Source, &Process->ProfileListHead);
|
||||
KiParseProfileList(TrapFrame, Source, &KiProfileListHead);
|
||||
|
|
|
@ -59,6 +59,8 @@ KiCheckForTimerExpiration(
|
|||
}
|
||||
}
|
||||
|
||||
extern void KdDbgPortPrintf(PCSTR Format, ...);
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
KeUpdateSystemTime(IN PKTRAP_FRAME TrapFrame,
|
||||
|
@ -69,6 +71,13 @@ KeUpdateSystemTime(IN PKTRAP_FRAME TrapFrame,
|
|||
ULARGE_INTEGER CurrentTime, InterruptTime;
|
||||
LONG OldTickOffset;
|
||||
|
||||
{
|
||||
KIRQL CurrIrql = KeGetCurrentIrql();
|
||||
if (CurrIrql < CLOCK_LEVEL)
|
||||
KdDbgPortPrintf("%s() CurrIrql %d ; PrevIrql %d\n", __FUNCTION__, CurrIrql, Irql);
|
||||
}
|
||||
// ASSERT(KeGetCurrentIrql() == CLOCK_LEVEL); // CLOCK2_LEVEL
|
||||
|
||||
/* Check if this tick is being skipped */
|
||||
if (Prcb->SkipTick)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue