FreeRTOS-Kernel/portable/GCC
Devaraj Ranganna a07f649bd5
Armv8-M (except Cortex-M23) interrupt priority checking (#673)
* Armv8-M: Formatting changes

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>

* Armv8-M: Add support for interrupt priority check

FreeRTOS provides `FromISR` system calls which can be called directly
from interrupt service routines. It is crucial that the priority of
these ISRs is set to same or lower value (numerically higher) than that
of `configMAX_SYSCALL_INTERRUPT_PRIORITY`. For more information refer
to https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html.

Add a check to trigger an assert when an ISR with priority higher
(numerically lower) than `configMAX_SYSCALL_INTERRUPT_PRIORITY` calls
`FromISR` system calls if `configASSERT` macro is defined.

In addition, add a config option
`configQEMU_DISABLE_INTERRUPT_PRIO_BITS_CHECK` to disable interrupt
priority check while running on QEMU. Based on the discussion
https://gitlab.com/qemu-project/qemu/-/issues/1122, The interrupt
priority bits in QEMU do not match the real hardware. Therefore the
assert that checks the number of implemented bits and __NVIC_PRIO_BITS
will always fail. The config option
 `configQEMU_DISABLE_INTERRUPT_PRIO_BITS_CHECK` should be defined in the
`FreeRTOSConfig.h` for QEMU targets.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>

* Use SHPR2 for calculating interrupt priority bits

This removes the dependency on the secure software to mark the interrupt
as non-secure.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

---------

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2023-05-11 09:41:00 -07:00
..
ARM7_AT91FR40008 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
ARM7_AT91SAM7S tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
ARM7_LPC23xx tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
ARM7_LPC2000 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
ARM_CA9 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
ARM_CA53_64_BIT tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
ARM_CA53_64_BIT_SRE tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
ARM_CM0 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
ARM_CM3 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
ARM_CM3_MPU tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
ARM_CM4_MPU ARMv7M: Adjust implemented priority bit assertions (#665) 2023-04-20 10:54:54 +05:30
ARM_CM4F tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
ARM_CM7 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
ARM_CM23 Armv8-M (except Cortex-M23) interrupt priority checking (#673) 2023-05-11 09:41:00 -07:00
ARM_CM23_NTZ/non_secure Armv8-M (except Cortex-M23) interrupt priority checking (#673) 2023-05-11 09:41:00 -07:00
ARM_CM33 Armv8-M (except Cortex-M23) interrupt priority checking (#673) 2023-05-11 09:41:00 -07:00
ARM_CM33_NTZ/non_secure Armv8-M (except Cortex-M23) interrupt priority checking (#673) 2023-05-11 09:41:00 -07:00
ARM_CM35P Armv8-M (except Cortex-M23) interrupt priority checking (#673) 2023-05-11 09:41:00 -07:00
ARM_CM35P_NTZ/non_secure Armv8-M (except Cortex-M23) interrupt priority checking (#673) 2023-05-11 09:41:00 -07:00
ARM_CM55 Armv8-M (except Cortex-M23) interrupt priority checking (#673) 2023-05-11 09:41:00 -07:00
ARM_CM55_NTZ/non_secure Armv8-M (except Cortex-M23) interrupt priority checking (#673) 2023-05-11 09:41:00 -07:00
ARM_CM85 Armv8-M (except Cortex-M23) interrupt priority checking (#673) 2023-05-11 09:41:00 -07:00
ARM_CM85_NTZ/non_secure Armv8-M (except Cortex-M23) interrupt priority checking (#673) 2023-05-11 09:41:00 -07:00
ARM_CR5 fix conversion warning (#658) 2023-04-04 08:10:54 -07:00
ARM_CRx_No_GIC tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
ATMega323 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
AVR32_UC3 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
AVR_AVRDx Remove AVR ports from main repo (#394) 2021-09-14 19:25:46 -07:00
AVR_Mega0 Remove AVR ports from main repo (#394) 2021-09-14 19:25:46 -07:00
ColdFire_V2 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
CORTUS_APS3 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
H8S2329 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
HCS12 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
IA32_flat tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
MCF5235 Replace two dashes and one whitespace with their corresponding ASCII characters. (#362) 2021-06-30 15:07:55 -07:00
MicroBlaze tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
MicroBlazeV8 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
MicroBlazeV9 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
MSP430F449 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
NiosII tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
PPC405_Xilinx tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
PPC440_Xilinx tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
RISC-V tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
RL78 Added support of 64bit events. (#597) 2023-02-03 07:34:02 -07:00
RX100 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
RX200 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
RX600 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
RX600v2 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
RX700v3_DPFPU tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
STR75x tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00
TriCore_1782 tree-wide: Unify formatting of __cplusplus ifdefs 2023-04-25 11:32:08 -07:00