mirror of
https://github.com/reactos/reactos.git
synced 2026-11-16 04:17:39 +08:00
[HAL:APIC] Let the ACPI driver take over an input the HAL never enabled
This commit is contained in:
@@ -1095,6 +1095,7 @@ HalEnableSystemInterrupt(
|
||||
NTSTATUS Status;
|
||||
ULONG Input;
|
||||
UCHAR Index;
|
||||
UCHAR Previous;
|
||||
KIRQL OldIrql;
|
||||
ASSERT(Irql <= HIGH_LEVEL);
|
||||
ASSERT((IrqlToTpr(Irql) & 0xF0) == (Vector & 0xF0));
|
||||
@@ -1131,7 +1132,18 @@ HalEnableSystemInterrupt(
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Don't take over an input that belongs to another vector */
|
||||
/* The ACPI driver owns the input, so a vector the HAL gave it and never enabled is dropped */
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
Previous = HalpGsivToVector[Input];
|
||||
if ((Previous != APIC_FREE_VECTOR) && ApicReadIORedirectionEntry(Input).Mask)
|
||||
{
|
||||
HalpVectorToIndex[Previous] = APIC_FREE_VECTOR;
|
||||
HalpGsivToVector[Input] = APIC_FREE_VECTOR;
|
||||
}
|
||||
}
|
||||
|
||||
/* Don't take over an input another vector is using */
|
||||
if (!NT_SUCCESS(Status) || (HalpGsivToVector[Input] != APIC_FREE_VECTOR))
|
||||
{
|
||||
HalpReleaseVectorLock(OldIrql);
|
||||
|
||||
Reference in New Issue
Block a user