]> begriffs open source - freertos/commit
Update system call entry mechanism (#896)
authorGaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Tue, 21 Nov 2023 13:12:23 +0000 (18:42 +0530)
committerGitHub <noreply@github.com>
Tue, 21 Nov 2023 13:12:23 +0000 (18:42 +0530)
commit9bfd85a2537d77eefc1912ef7faeeeb467795769
treebb2df6920281a36b37e4dfd9b0637e0893bccf9a
parent52c1c6e578cbbc250b09fa19b17b456ea0fc076f
Update system call entry mechanism (#896)

Earlier the System Call entry from an unprivileged task looked like:

1. SVC for entering system call.
2. System call implementation.
3. SVC for exiting system call.

Now, the system call entry needs to make only one system call
and everything else is handled internally.

This PR also makes the following small changes:

1. Add one struct param for system calls with 5 parameters. This
   removes the need for special handling for system calls with 5
   parameters.
2. Remove raise privilege SVC when MPU wrapper v2 is used.
3. Add additional run time parameter checks to MPU wrappers
   for xTaskGenericNotify and xQueueTakeMutexRecursive APIs.

These changes are tested on the following platforms:
1. STM32H743ZI (Cortex-M7)
2. STM32L152RE (Cortex-M3)
3. Nuvoton M2351 (Cortex-M23)
4. NXP LPC55S69 (Cortex-M33)
115 files changed:
.github/workflows/unit-tests.yml
include/mpu_prototypes.h
include/mpu_syscall_numbers.h [new file with mode: 0644]
portable/ARMv8M/non_secure/port.c
portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/mpu_wrappers_v2_asm.c
portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portasm.c
portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/mpu_wrappers_v2_asm.c
portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portasm.c
portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/mpu_wrappers_v2_asm.c
portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portasm.c
portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/mpu_wrappers_v2_asm.c
portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portasm.c
portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/mpu_wrappers_v2_asm.S
portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/portasm.s
portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/mpu_wrappers_v2_asm.S
portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/portasm.s
portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/mpu_wrappers_v2_asm.S
portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/portasm.s
portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/mpu_wrappers_v2_asm.S
portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/portasm.s
portable/ARMv8M/non_secure/portmacrocommon.h
portable/Common/mpu_wrappers_v2.c
portable/GCC/ARM_CM23/non_secure/mpu_wrappers_v2_asm.c
portable/GCC/ARM_CM23/non_secure/port.c
portable/GCC/ARM_CM23/non_secure/portasm.c
portable/GCC/ARM_CM23/non_secure/portmacrocommon.h
portable/GCC/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.c
portable/GCC/ARM_CM23_NTZ/non_secure/port.c
portable/GCC/ARM_CM23_NTZ/non_secure/portasm.c
portable/GCC/ARM_CM23_NTZ/non_secure/portmacrocommon.h
portable/GCC/ARM_CM33/non_secure/mpu_wrappers_v2_asm.c
portable/GCC/ARM_CM33/non_secure/port.c
portable/GCC/ARM_CM33/non_secure/portasm.c
portable/GCC/ARM_CM33/non_secure/portmacrocommon.h
portable/GCC/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.c
portable/GCC/ARM_CM33_NTZ/non_secure/port.c
portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c
portable/GCC/ARM_CM33_NTZ/non_secure/portmacrocommon.h
portable/GCC/ARM_CM35P/non_secure/mpu_wrappers_v2_asm.c
portable/GCC/ARM_CM35P/non_secure/port.c
portable/GCC/ARM_CM35P/non_secure/portasm.c
portable/GCC/ARM_CM35P/non_secure/portmacrocommon.h
portable/GCC/ARM_CM35P_NTZ/non_secure/mpu_wrappers_v2_asm.c
portable/GCC/ARM_CM35P_NTZ/non_secure/port.c
portable/GCC/ARM_CM35P_NTZ/non_secure/portasm.c
portable/GCC/ARM_CM35P_NTZ/non_secure/portmacrocommon.h
portable/GCC/ARM_CM3_MPU/mpu_wrappers_v2_asm.c
portable/GCC/ARM_CM3_MPU/port.c [changed mode: 0755->0644]
portable/GCC/ARM_CM3_MPU/portmacro.h
portable/GCC/ARM_CM4_MPU/mpu_wrappers_v2_asm.c
portable/GCC/ARM_CM4_MPU/port.c [changed mode: 0755->0644]
portable/GCC/ARM_CM4_MPU/portmacro.h
portable/GCC/ARM_CM55/non_secure/mpu_wrappers_v2_asm.c
portable/GCC/ARM_CM55/non_secure/port.c
portable/GCC/ARM_CM55/non_secure/portasm.c
portable/GCC/ARM_CM55/non_secure/portmacrocommon.h
portable/GCC/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.c
portable/GCC/ARM_CM55_NTZ/non_secure/port.c
portable/GCC/ARM_CM55_NTZ/non_secure/portasm.c
portable/GCC/ARM_CM55_NTZ/non_secure/portmacrocommon.h
portable/GCC/ARM_CM85/non_secure/mpu_wrappers_v2_asm.c
portable/GCC/ARM_CM85/non_secure/port.c
portable/GCC/ARM_CM85/non_secure/portasm.c
portable/GCC/ARM_CM85/non_secure/portmacrocommon.h
portable/GCC/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.c
portable/GCC/ARM_CM85_NTZ/non_secure/port.c
portable/GCC/ARM_CM85_NTZ/non_secure/portasm.c
portable/GCC/ARM_CM85_NTZ/non_secure/portmacrocommon.h
portable/IAR/ARM_CM23/non_secure/mpu_wrappers_v2_asm.S
portable/IAR/ARM_CM23/non_secure/port.c
portable/IAR/ARM_CM23/non_secure/portasm.s
portable/IAR/ARM_CM23/non_secure/portmacrocommon.h
portable/IAR/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.S
portable/IAR/ARM_CM23_NTZ/non_secure/port.c
portable/IAR/ARM_CM23_NTZ/non_secure/portasm.s
portable/IAR/ARM_CM23_NTZ/non_secure/portmacrocommon.h
portable/IAR/ARM_CM33/non_secure/mpu_wrappers_v2_asm.S
portable/IAR/ARM_CM33/non_secure/port.c
portable/IAR/ARM_CM33/non_secure/portasm.s
portable/IAR/ARM_CM33/non_secure/portmacrocommon.h
portable/IAR/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.S
portable/IAR/ARM_CM33_NTZ/non_secure/port.c
portable/IAR/ARM_CM33_NTZ/non_secure/portasm.s
portable/IAR/ARM_CM33_NTZ/non_secure/portmacrocommon.h
portable/IAR/ARM_CM35P/non_secure/mpu_wrappers_v2_asm.S
portable/IAR/ARM_CM35P/non_secure/port.c
portable/IAR/ARM_CM35P/non_secure/portasm.s
portable/IAR/ARM_CM35P/non_secure/portmacrocommon.h
portable/IAR/ARM_CM35P_NTZ/non_secure/mpu_wrappers_v2_asm.S
portable/IAR/ARM_CM35P_NTZ/non_secure/port.c
portable/IAR/ARM_CM35P_NTZ/non_secure/portasm.s
portable/IAR/ARM_CM35P_NTZ/non_secure/portmacrocommon.h
portable/IAR/ARM_CM4F_MPU/mpu_wrappers_v2_asm.S
portable/IAR/ARM_CM4F_MPU/port.c [changed mode: 0755->0644]
portable/IAR/ARM_CM4F_MPU/portasm.s
portable/IAR/ARM_CM4F_MPU/portmacro.h
portable/IAR/ARM_CM55/non_secure/mpu_wrappers_v2_asm.S
portable/IAR/ARM_CM55/non_secure/port.c
portable/IAR/ARM_CM55/non_secure/portasm.s
portable/IAR/ARM_CM55/non_secure/portmacrocommon.h
portable/IAR/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.S
portable/IAR/ARM_CM55_NTZ/non_secure/port.c
portable/IAR/ARM_CM55_NTZ/non_secure/portasm.s
portable/IAR/ARM_CM55_NTZ/non_secure/portmacrocommon.h
portable/IAR/ARM_CM85/non_secure/mpu_wrappers_v2_asm.S
portable/IAR/ARM_CM85/non_secure/port.c
portable/IAR/ARM_CM85/non_secure/portasm.s
portable/IAR/ARM_CM85/non_secure/portmacrocommon.h
portable/IAR/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.S
portable/IAR/ARM_CM85_NTZ/non_secure/port.c
portable/IAR/ARM_CM85_NTZ/non_secure/portasm.s
portable/IAR/ARM_CM85_NTZ/non_secure/portmacrocommon.h
portable/RVDS/ARM_CM4_MPU/mpu_wrappers_v2_asm.c
portable/RVDS/ARM_CM4_MPU/port.c [changed mode: 0755->0644]
portable/RVDS/ARM_CM4_MPU/portmacro.h