mirror of
https://github.com/reactos/reactos.git
synced 2025-06-11 04:47:22 +00:00
[HAL]: Implement Bus Handler support for HalGetInterruptVector too. The new functionality now includes support for checking against reserved HAL vectors instead of blindling assining IRQLs/Vectors to callers. A warning is printed on the debug log when the old HAL would've returned different values. Please test. If you have issues, the problem is in the DRIVERS, not this code.
svn path=/trunk/; revision=47676
This commit is contained in:
parent
566408b2d9
commit
7ebba8b83c
1 changed files with 36 additions and 10 deletions
|
@ -1163,10 +1163,10 @@ HalpTranslateBusAddress(IN INTERFACE_TYPE InterfaceType,
|
|||
ULONG
|
||||
NTAPI
|
||||
HalpGetSystemInterruptVector_Acpi(IN ULONG BusNumber,
|
||||
IN ULONG BusInterruptLevel,
|
||||
IN ULONG BusInterruptVector,
|
||||
OUT PKIRQL Irql,
|
||||
OUT PKAFFINITY Affinity)
|
||||
IN ULONG BusInterruptLevel,
|
||||
IN ULONG BusInterruptVector,
|
||||
OUT PKIRQL Irql,
|
||||
OUT PKAFFINITY Affinity)
|
||||
{
|
||||
ULONG Vector = IRQ2VECTOR(BusInterruptLevel);
|
||||
*Irql = (KIRQL)VECTOR2IRQL(Vector);
|
||||
|
@ -1314,12 +1314,38 @@ HalGetInterruptVector(IN INTERFACE_TYPE InterfaceType,
|
|||
OUT PKIRQL Irql,
|
||||
OUT PKAFFINITY Affinity)
|
||||
{
|
||||
/* Call the system bus translator */
|
||||
return HalpGetSystemInterruptVector_Acpi(BusNumber,
|
||||
BusInterruptLevel,
|
||||
BusInterruptVector,
|
||||
Irql,
|
||||
Affinity);
|
||||
PBUS_HANDLER Handler;
|
||||
ULONG Vector;
|
||||
PAGED_CODE();
|
||||
|
||||
/* Defaults */
|
||||
*Irql = 0;
|
||||
*Affinity = 0;
|
||||
|
||||
/* Find the handler */
|
||||
Handler = HalReferenceHandlerForBus(InterfaceType, BusNumber);
|
||||
if (!Handler) return 0;
|
||||
|
||||
/* Do the assignment */
|
||||
Vector = Handler->GetInterruptVector(Handler,
|
||||
Handler,
|
||||
BusInterruptLevel,
|
||||
BusInterruptVector,
|
||||
Irql,
|
||||
Affinity);
|
||||
if ((Vector != IRQ2VECTOR(BusInterruptLevel)) ||
|
||||
(*Irql != VECTOR2IRQL(IRQ2VECTOR(BusInterruptLevel))))
|
||||
{
|
||||
DPRINT1("Returning IRQL %lx, Vector %lx for Level/Vector: %lx/%lx\n",
|
||||
*Irql, Vector, BusInterruptLevel, BusInterruptVector);
|
||||
DPRINT1("Old HAL would've returned IRQL %lx and Vector %lx\n",
|
||||
VECTOR2IRQL(IRQ2VECTOR(BusInterruptLevel)),
|
||||
IRQ2VECTOR(BusInterruptLevel));
|
||||
}
|
||||
|
||||
/* Dereference the handler and return */
|
||||
HalDereferenceBusHandler(Handler);
|
||||
return Vector;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue