FreeRTOS-Kernel/portable
kar-rahul-aws 170a291d4d
Add Access Control List to MPU ports (#765)
This PR adds Access Control to kernel objects on a per task basis to MPU
ports. The following needs to be defined in the `FreeRTOSConfig.h` to
enable this feature:

```c
#define configUSE_MPU_WRAPPERS_V1 0
#define configENABLE_ACCESS_CONTROL_LIST 1
```

This PR adds the following new APIs:

```c
void vGrantAccessToTask( TaskHandle_t xTask,
                         TaskHandle_t xTaskToGrantAccess );
void vRevokeAccessToTask( TaskHandle_t xTask,
                          TaskHandle_t xTaskToRevokeAccess );

void vGrantAccessToSemaphore( TaskHandle_t xTask,
                              SemaphoreHandle_t xSemaphoreToGrantAccess );
void vRevokeAccessToSemaphore( TaskHandle_t xTask,
                               SemaphoreHandle_t xSemaphoreToRevokeAccess );

void vGrantAccessToQueue( TaskHandle_t xTask,
                          QueueHandle_t xQueueToGrantAccess );
void vRevokeAccessToQueue( TaskHandle_t xTask,
                           QueueHandle_t xQueueToRevokeAccess );

void vGrantAccessToQueueSet( TaskHandle_t xTask,
                             QueueSetHandle_t xQueueSetToGrantAccess );
void vRevokeAccessToQueueSet( TaskHandle_t xTask,
                              QueueSetHandle_t xQueueSetToRevokeAccess );

void vGrantAccessToEventGroup( TaskHandle_t xTask,
                               EventGroupHandle_t xEventGroupToGrantAccess );
void vRevokeAccessToEventGroup( TaskHandle_t xTask,
                                EventGroupHandle_t xEventGroupToRevokeAccess );

void vGrantAccessToStreamBuffer( TaskHandle_t xTask,
                                 StreamBufferHandle_t xStreamBufferToGrantAccess );
void vRevokeAccessToStreamBuffer( TaskHandle_t xTask,
                                  StreamBufferHandle_t xStreamBufferToRevokeAccess );

void vGrantAccessToMessageBuffer( TaskHandle_t xTask,
                                  MessageBufferHandle_t xMessageBufferToGrantAccess );
void vRevokeAccessToMessageBuffer( TaskHandle_t xTask,
                                   MessageBufferHandle_t xMessageBufferToRevokeAccess );

void vGrantAccessToTimer( TaskHandle_t xTask,
                          TimerHandle_t xTimerToGrantAccess );
void vRevokeAccessToTimer( TaskHandle_t xTask,
                           TimerHandle_t xTimerToRevokeAccess );
```

An unprivileged task by default has access to itself only and no other
kernel object. The application writer needs to explicitly grant an
unprivileged task access to all the kernel objects it needs. The best
place to do that is before starting the scheduler when all the kernel
objects are created. 

For example, let's say an unprivileged tasks needs access to a queue and
an event group, the application writer needs to do the following:

```c
vGrantAccessToQueue( xUnprivilegedTaskHandle, xQueue );
vGrantAccessToEventGroup( xUnprivilegedTaskHandle, xEventGroup );
```

The application writer MUST revoke all the accesses before deleting a
task. Failing to do so will result in undefined behavior. In the above
example, the application writer needs to make the following 2 calls
before deleting the task:

```c
vRevokeAccessToQueue( xUnprivilegedTaskHandle, xQueue );
vRevokeAccessToEventGroup( xUnprivilegedTaskHandle, xEventGroup );

```
2023-09-18 15:34:42 +05:30
..
ARMClang Normalize line endings and whitespace in source files 2022-11-29 15:38:47 -08:00
ARMv8M Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
BCC/16BitDOS CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
CCS CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
CodeWarrior CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
Common Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
GCC Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
IAR Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
Keil Normalize line endings and whitespace in source files 2022-11-29 15:38:47 -08:00
MemMang CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
MikroC/ARM_CM4F CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
MPLAB CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
MSVC-MingW CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
oWatcom/16BitDOS CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
Paradigm/Tern_EE CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
Renesas CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
Rowley CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
RVDS Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
SDCC/Cygnal CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
Softune CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
Tasking/ARM_CM4F CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
ThirdParty CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
WizC/PIC18 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
CMakeLists.txt Fix typo in the include directory for the the GCC_ARM_CM55_TFM port (#764) 2023-08-25 11:16:36 +05:30
readme.txt Normalize line endings and whitespace in source files 2022-11-29 15:38:47 -08:00

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.