mirror of https://github.com/acidanthera/audk.git
ArmPkg: Make variables used for GicInterrupt UINTN
Although the maximum interrupt ID on GicV2 is 10bit and for GicV3/4 is 24bit, and that the IAR and EOIR registers of the Gic CPU interface are 32 bit; the typedef HARDWARE_INTERRUPT_SOURCE is defined as UINTN in EmbeddedPkg\Include\Protocol\HardwareInterrupt.h Therefore, use UINTN for Gic Interrupt variables and use appropriate typecasts wherever needed. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
parent
937fbe4878
commit
7f198321ee
|
@ -162,7 +162,7 @@ GicV2IrqInterruptHandler (
|
||||||
IN EFI_SYSTEM_CONTEXT SystemContext
|
IN EFI_SYSTEM_CONTEXT SystemContext
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINT32 GicInterrupt;
|
UINTN GicInterrupt;
|
||||||
HARDWARE_INTERRUPT_HANDLER InterruptHandler;
|
HARDWARE_INTERRUPT_HANDLER InterruptHandler;
|
||||||
|
|
||||||
GicInterrupt = ArmGicV2AcknowledgeInterrupt (mGicInterruptInterfaceBase);
|
GicInterrupt = ArmGicV2AcknowledgeInterrupt (mGicInterruptInterfaceBase);
|
||||||
|
@ -179,7 +179,7 @@ GicV2IrqInterruptHandler (
|
||||||
// Call the registered interrupt handler.
|
// Call the registered interrupt handler.
|
||||||
InterruptHandler (GicInterrupt, SystemContext);
|
InterruptHandler (GicInterrupt, SystemContext);
|
||||||
} else {
|
} else {
|
||||||
DEBUG ((DEBUG_ERROR, "Spurious GIC interrupt: 0x%x\n", GicInterrupt));
|
DEBUG ((DEBUG_ERROR, "Spurious GIC interrupt: 0x%x\n", (UINT32)GicInterrupt));
|
||||||
GicV2EndOfInterrupt (&gHardwareInterruptV2Protocol, GicInterrupt);
|
GicV2EndOfInterrupt (&gHardwareInterruptV2Protocol, GicInterrupt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -349,8 +349,8 @@ GicV2ExitBootServicesEvent (
|
||||||
IN VOID *Context
|
IN VOID *Context
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
UINT32 GicInterrupt;
|
UINTN GicInterrupt;
|
||||||
|
|
||||||
// Disable all the interrupts
|
// Disable all the interrupts
|
||||||
for (Index = 0; Index < mGicNumInterrupts; Index++) {
|
for (Index = 0; Index < mGicNumInterrupts; Index++) {
|
||||||
|
|
|
@ -156,7 +156,7 @@ GicV3IrqInterruptHandler (
|
||||||
IN EFI_SYSTEM_CONTEXT SystemContext
|
IN EFI_SYSTEM_CONTEXT SystemContext
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINT32 GicInterrupt;
|
UINTN GicInterrupt;
|
||||||
HARDWARE_INTERRUPT_HANDLER InterruptHandler;
|
HARDWARE_INTERRUPT_HANDLER InterruptHandler;
|
||||||
|
|
||||||
GicInterrupt = ArmGicV3AcknowledgeInterrupt ();
|
GicInterrupt = ArmGicV3AcknowledgeInterrupt ();
|
||||||
|
@ -173,7 +173,7 @@ GicV3IrqInterruptHandler (
|
||||||
// Call the registered interrupt handler.
|
// Call the registered interrupt handler.
|
||||||
InterruptHandler (GicInterrupt, SystemContext);
|
InterruptHandler (GicInterrupt, SystemContext);
|
||||||
} else {
|
} else {
|
||||||
DEBUG ((DEBUG_ERROR, "Spurious GIC interrupt: 0x%x\n", GicInterrupt));
|
DEBUG ((DEBUG_ERROR, "Spurious GIC interrupt: 0x%x\n", (UINT32)GicInterrupt));
|
||||||
GicV3EndOfInterrupt (&gHardwareInterruptV3Protocol, GicInterrupt);
|
GicV3EndOfInterrupt (&gHardwareInterruptV3Protocol, GicInterrupt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue