From: "Sami Mujawar" <sami.mujawar@arm.com>
To: <devel@edk2.groups.io>
Cc: Sami Mujawar <sami.mujawar@arm.com>, <ardb+tianocore@kernel.org>,
<quic_llindhol@quicinc.com>, <neil.jones@blaize.com>,
<pedro.falcato@gmail.com>, <pierre.gondois@arm.com>,
<Matteo.Carlini@arm.com>, <Akanksha.Jain2@arm.com>,
<Ben.Adderson@arm.com>, <Sibel.Allinson@arm.com>, <nd@arm.com>
Subject: [PATCH v2 06/11] ArmPkg: Make variables used for GicInterrupt UINTN
Date: Wed, 24 May 2023 14:38:35 +0100 [thread overview]
Message-ID: <20230524133840.28612-7-sami.mujawar@arm.com> (raw)
In-Reply-To: <20230524133840.28612-1-sami.mujawar@arm.com>
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>
---
Notes:
v2:
- Updated GicV3IrqInterruptHandler () to change [Sami]
GicInterrupt to UINTN and added typecast before
printing GicInterrupt in both
GicV[2|3]IrqInterruptHandler ().
ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c | 8 ++++----
ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c b/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c
index a1670021c30f05707d7c37a789fdbacc4ffa9140..cd371cab2a0159b54d8e6f0f5d3930e1276cbf7e 100644
--- a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c
+++ b/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c
@@ -162,7 +162,7 @@ GicV2IrqInterruptHandler (
IN EFI_SYSTEM_CONTEXT SystemContext
)
{
- UINT32 GicInterrupt;
+ UINTN GicInterrupt;
HARDWARE_INTERRUPT_HANDLER InterruptHandler;
GicInterrupt = ArmGicV2AcknowledgeInterrupt (mGicInterruptInterfaceBase);
@@ -179,7 +179,7 @@ GicV2IrqInterruptHandler (
// Call the registered interrupt handler.
InterruptHandler (GicInterrupt, SystemContext);
} 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);
}
}
@@ -349,8 +349,8 @@ GicV2ExitBootServicesEvent (
IN VOID *Context
)
{
- UINTN Index;
- UINT32 GicInterrupt;
+ UINTN Index;
+ UINTN GicInterrupt;
// Disable all the interrupts
for (Index = 0; Index < mGicNumInterrupts; Index++) {
diff --git a/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c b/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c
index 719701a67e756c2d2aeae8fc23d50b519a1997aa..41aec70481e05594628fe01cf9ad5626e4ddbf9b 100644
--- a/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c
+++ b/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c
@@ -156,7 +156,7 @@ GicV3IrqInterruptHandler (
IN EFI_SYSTEM_CONTEXT SystemContext
)
{
- UINT32 GicInterrupt;
+ UINTN GicInterrupt;
HARDWARE_INTERRUPT_HANDLER InterruptHandler;
GicInterrupt = ArmGicV3AcknowledgeInterrupt ();
@@ -173,7 +173,7 @@ GicV3IrqInterruptHandler (
// Call the registered interrupt handler.
InterruptHandler (GicInterrupt, SystemContext);
} 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);
}
}
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
next prev parent reply other threads:[~2023-05-24 13:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 13:38 [PATCH v2 00/11] ArmPkg: Arm GIC Library and Driver improvements Sami Mujawar
2023-05-24 13:38 ` [PATCH v2 01/11] ArmPkg: Fix data type used for GicDistributorBase Sami Mujawar
2023-05-24 13:38 ` [PATCH v2 02/11] ArmPkg: Fix data type used for GicInterruptInterfaceBase Sami Mujawar
2023-05-24 13:38 ` [PATCH v2 03/11] ArmPkg: Fix ArmGicSendSgiTo() parameters Sami Mujawar
2023-05-24 13:38 ` [PATCH v2 04/11] ArmPkg: Fix Non-Boolean comparison in ArmGicEnableDistributor Sami Mujawar
2023-05-24 13:38 ` [PATCH v2 05/11] ArmPkg: Fix return type for ArmGicGetInterfaceIdentification Sami Mujawar
2023-05-24 13:38 ` Sami Mujawar [this message]
2023-05-24 13:38 ` [PATCH v2 07/11] ArmPkg: Typecast IntID to UINT32 in ArmGicV2EndOfInterrupt Sami Mujawar
2023-05-24 13:38 ` [PATCH v2 08/11] ArmPkg: Remove unused function declarations Sami Mujawar
2023-05-24 13:38 ` [PATCH v2 09/11] ArmPkg: Prevent SgiId from setting RES0 bits of GICD_SGIR Sami Mujawar
2023-05-24 13:38 ` [PATCH v2 10/11] ArmPkg: Adjust variable type and cast for RegShift & RegOffset Sami Mujawar
2023-05-24 13:38 ` [PATCH v2 11/11] ArmPkg: Fix ArmGicAcknowledgeInterrupt () for GICv3 Sami Mujawar
2023-06-01 16:09 ` [PATCH v2 00/11] ArmPkg: Arm GIC Library and Driver improvements Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230524133840.28612-7-sami.mujawar@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox