HalpInterruptServiceActiveBoth
NTSTATUS __stdcall HalpInterruptServiceActiveBoth(INT64 a1){
__int64 v1;
unsigned int v2;
_DWORD *LinesForGsiRange;
_INTERRUPT_LINE_STATE *v4;
_REGISTERED_INTERRUPT_CONTROLLER *v5;
unsigned __int64 v6;
NTSTATUS result;
_INTERRUPT_LINE Line;
v1 = *(_QWORD *)(a1 + 160);
Line = 0i64;
v2 = *(_DWORD *)(v1 + 64);
LinesForGsiRange = HalpInterruptFindLinesForGsiRange(v2, v2 + 1);
Line.UnitId = LinesForGsiRange[4];
Line.Line = v2 + LinesForGsiRange[5] - LinesForGsiRange[7];
v4 = (_INTERRUPT_LINE_STATE *)(*((_QWORD *)LinesForGsiRange + 5) + 56i64 * (v2 - LinesForGsiRange[7]));
v5 = HalpInterruptLookupController(Line.UnitId);
v6 = (unsigned __int8)HalpAcquireHighLevelLock(&qword_140C49C40);
if( v4->Polarity == InterruptActiveHigh )
{
v4->Polarity = InterruptActiveLow;
}
else if( v4->Polarity == InterruptActiveLow )
{
v4->Polarity = InterruptActiveHigh;
}
if( HalpInterruptSetLineStateInternal(v5, &Line, v4) < 0 )
KeBugCheckEx(0x5Cu, (PVOID)0x205, (PVOID)(int)v5->KnownType, v5, (PVOID)Line.Line);
KxReleaseSpinLock(&qword_140C49C40);
result = KiIrqlFlags;
__writecr8(v6);
return result;
}Referenced by:
HalPerformEndOfInterrupt