Skip to content

Commit 1fa333d

Browse files
author
Cruz Monrreal
authored
Merge pull request #7032 from TomoYamanaka/feature-rtx_update
Update cmsis/rtx for Cortex-A
2 parents 0aeb150 + 4251af0 commit 1fa333d

File tree

5 files changed

+417
-397
lines changed

5 files changed

+417
-397
lines changed

cmsis/TARGET_CORTEX_A/irq_ctrl_gic.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**************************************************************************//**
22
* @file irq_ctrl_gic.c
33
* @brief Interrupt controller handling implementation for GIC
4-
* @version V1.0.0
5-
* @date 30. June 2017
4+
* @version V1.0.1
5+
* @date 9. April 2018
66
******************************************************************************/
77
/*
88
* Copyright (c) 2017 ARM Limited. All rights reserved.
@@ -37,7 +37,7 @@
3737
#endif
3838

3939
static IRQHandler_t IRQTable[IRQ_GIC_LINE_COUNT] = { 0U };
40-
static uint32_t IRQ_ID0;
40+
static uint32_t IRQ_ID0;
4141

4242
/// Initialize interrupt controller.
4343
__WEAK int32_t IRQ_Initialize (void) {
@@ -70,6 +70,9 @@ __WEAK int32_t IRQ_SetHandler (IRQn_ID_t irqn, IRQHandler_t handler) {
7070
__WEAK IRQHandler_t IRQ_GetHandler (IRQn_ID_t irqn) {
7171
IRQHandler_t h;
7272

73+
// Ignore CPUID field (software generated interrupts)
74+
irqn &= 0x3FFU;
75+
7376
if ((irqn >= 0) && (irqn < (IRQn_ID_t)IRQ_GIC_LINE_COUNT)) {
7477
h = IRQTable[irqn];
7578
} else {
@@ -271,9 +274,12 @@ __WEAK IRQn_ID_t IRQ_GetActiveFIQ (void) {
271274
/// Signal end of interrupt processing.
272275
__WEAK int32_t IRQ_EndOfInterrupt (IRQn_ID_t irqn) {
273276
int32_t status;
277+
IRQn_Type irq = (IRQn_Type)irqn;
278+
279+
irqn &= 0x3FFU;
274280

275281
if ((irqn >= 0) && (irqn < (IRQn_ID_t)IRQ_GIC_LINE_COUNT)) {
276-
GIC_EndInterrupt ((IRQn_Type)irqn);
282+
GIC_EndInterrupt (irq);
277283

278284
if (irqn == 0) {
279285
IRQ_ID0 = 0U;

0 commit comments

Comments
 (0)