# FreeRTOS MPU - Cortex M4 - Privilege task

**URL:** <https://forums.freertos.org/t/freertos-mpu-cortex-m4-privilege-task/21353>\
**Category:** Kernel\
**Created:** [September 9, 2024, 9:40am UTC](https://forums.freertos.org/t/freertos-mpu-cortex-m4-privilege-task/21353 "2024-09-09T09:40:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishalnxt](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/vishalnxt/32/4905_2.png) [@vishalnxt](https://forums.freertos.org/u/vishalnxt)\
**Post date:** [September 9, 2024, 9:40am UTC](https://forums.freertos.org/t/freertos-mpu-cortex-m4-privilege-task/21353/1 "2024-09-09T09:40:05Z")

</div>

If a privileged task is created using xTaskCreate, then in the vPortStoreTaskMPUSettings function, the FreeRTOS kernel explicitly gives access to the entire SRAM. Wanted to know the rationale behind this? Shouldn’t the access to the background region be sufficient for a privileged task? Does it really need access to the kernel data in SRAM?

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [September 9, 2024, 9:43am UTC](https://forums.freertos.org/t/freertos-mpu-cortex-m4-privilege-task/21353/2 "2024-09-09T09:43:02Z")

</div>

We specify Execute Never to ensure that code execution is not permitted from the data region.

---

<div class="post-metadata">

**Author:** ![vishalnxt](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/vishalnxt/32/4905_2.png) [@vishalnxt](https://forums.freertos.org/u/vishalnxt)\
**Post date:** [September 9, 2024, 9:55am UTC](https://forums.freertos.org/t/freertos-mpu-cortex-m4-privilege-task/21353/3 "2024-09-09T09:55:58Z")

</div>

Got it, thanks. Again just wanted to get it clarified from the experts!

---

<div class="post-metadata">

**Author:** ![richard-damon](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/richard-damon/32/38_2.png) [@richard-damon](https://forums.freertos.org/u/richard-damon)\
**Post date:** [September 9, 2024, 1:25pm UTC](https://forums.freertos.org/t/freertos-mpu-cortex-m4-privilege-task/21353/4 "2024-09-09T13:25:35Z")

</div>

One need for the privileged tasks to access the “kernel data” is that it avoids the need to switch to a “more privileged” mode to perform the operations for FreeRTOS API calls.
