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 #896

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 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.

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
No Duplication information No Duplication information

codecov[bot] commented 9 months ago

Codecov Report

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

Comparison is base (5678e7a) 94.36% compared to head (a6f8b43) 94.44%. Report is 7 commits behind head on 10.6.x.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## 10.6.x #896 +/- ## ========================================== + Coverage 94.36% 94.44% +0.08% ========================================== Files 6 6 Lines 2430 2430 Branches 596 596 ========================================== + Hits 2293 2295 +2 + Misses 87 85 -2 Partials 50 50 ``` | [Flag](https://app.codecov.io/gh/FreeRTOS/FreeRTOS-Kernel/pull/896/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/896/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=FreeRTOS) | `94.44% <ø> (+0.08%)` | :arrow_up: | 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.

f0rki commented 9 months ago

looks good to me.