FreeRTOS / FreeRTOS-Kernel

FreeRTOS kernel files only, submoduled into https://github.com/FreeRTOS/FreeRTOS and various other repos.
https://www.FreeRTOS.org
MIT License
2.66k stars 1.1k forks source link

Update system call entry mechanism #898

Closed aggarg closed 9 months ago

aggarg commented 9 months ago

Description

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 changes:

  1. Update the Access Control List (ACL) mechanism to grant access to all the kernel objects before the scheduler is started.
  2. Add one struct param for system calls with 5 parameters. This removes the need for special handling for system calls with 5 parameters.
  3. Remove raise privilege SVC when MPU wrapper v2 is used.
  4. Add additional run time parameter checks to MPU wrappers for xTaskGenericNotify and xQueueTakeMutexRecursive APIs.

Test Steps

Tested on the following platforms:

  1. STM32H743ZI (Cortex-M7)
  2. STM32L152RE (Cortex-M3)
  3. Nuvoton M2351 (Cortex-M23)
  4. NXP LPC55S69 (Cortex-M33)

Checklist:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

sonarcloud[bot] commented 9 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (4ff01a7) 93.67% compared to head (a7b6e78) 93.67%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #898 +/- ## ======================================= Coverage 93.67% 93.67% ======================================= Files 6 6 Lines 3177 3177 Branches 884 884 ======================================= Hits 2976 2976 Misses 94 94 Partials 107 107 ``` | [Flag](https://app.codecov.io/gh/FreeRTOS/FreeRTOS-Kernel/pull/898/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=FreeRTOS) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/FreeRTOS/FreeRTOS-Kernel/pull/898/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=FreeRTOS) | `93.67% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=FreeRTOS#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.