You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
FreeRTOS-Kernel/portable
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>
2 years ago
..
ARMClang Normalize line endings and whitespace in source files 2 years ago
ARMv8M Armv8-M (except Cortex-M23) interrupt priority checking (#673) 2 years ago
BCC/16BitDOS Added support of 64bit events. (#597) 2 years ago
CCS tree-wide: Unify formatting of __cplusplus ifdefs 2 years ago
CodeWarrior tree-wide: Unify formatting of __cplusplus ifdefs 2 years ago
Common Normalize line endings and whitespace in source files 2 years ago
GCC Armv8-M (except Cortex-M23) interrupt priority checking (#673) 2 years ago
IAR Armv8-M (except Cortex-M23) interrupt priority checking (#673) 2 years ago
Keil Normalize line endings and whitespace in source files 2 years ago
MPLAB tree-wide: Unify formatting of __cplusplus ifdefs 2 years ago
MSVC-MingW Do not call exit() on MSVC Port when calling vPortEndScheduler (#624) 2 years ago
MemMang Only add alignment padding when needed (#650) 2 years ago
MikroC/ARM_CM4F tree-wide: Unify formatting of __cplusplus ifdefs 2 years ago
Paradigm/Tern_EE tree-wide: Unify formatting of __cplusplus ifdefs 2 years ago
RVDS tree-wide: Unify formatting of __cplusplus ifdefs 2 years ago
Renesas tree-wide: Unify formatting of __cplusplus ifdefs 2 years ago
Rowley Added support of 64bit events. (#597) 2 years ago
SDCC/Cygnal Added support of 64bit events. (#597) 2 years ago
Softune Added support of 64bit events. (#597) 2 years ago
Tasking/ARM_CM4F tree-wide: Unify formatting of __cplusplus ifdefs 2 years ago
ThirdParty Align StackSize and StackAddress for macOS (#674) 2 years ago
WizC/PIC18 Added support of 64bit events. (#597) 2 years ago
oWatcom/16BitDOS tree-wide: Unify formatting of __cplusplus ifdefs 2 years ago
CMakeLists.txt Cortex-M35P: Add Cortex-M35P port (#631) 2 years ago
readme.txt Normalize line endings and whitespace in source files 2 years ago

readme.txt

Each real time kernel port consists of three files that contain the core kernel
components and are common to every port, and one or more files that are
specific to a particular microcontroller and/or compiler.


+ The FreeRTOS/Source/Portable/MemMang directory contains the five sample
memory allocators as described on the https://www.FreeRTOS.org WEB site.

+ The other directories each contain files specific to a particular
microcontroller or compiler, where the directory name denotes the compiler
specific files the directory contains.



For example, if you are interested in the [compiler] port for the [architecture]
microcontroller, then the port specific files are contained in
FreeRTOS/Source/Portable/[compiler]/[architecture] directory.  If this is the
only port you are interested in then all the other directories can be
ignored.