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:
Sami Mujawar 2021-06-07 13:29:26 +01:00 committed by mergify[bot]
parent 937fbe4878
commit 7f198321ee
2 changed files with 6 additions and 6 deletions

View File

@ -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++) {

View File

@ -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);
} }
} }