Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
main.c File Reference

Functions

bool custom_ram_func (void)
 Simple func to verify PXN via DT config since code with __customramfunc falls in an MPU region with PXN set.
 
__ramfunc bool ram_function (void)
 This is a simple solution to execute a code with and without PXN set because code that falls in __ramfunc section has PXN attr set if built with CONFIG_USERSPACE and unset otherwise.
 
void test_arm_mpu_pxn_static_config_user (void)
 Verify that MPU region with PXN attribute set can be executed from unprivileged mode.
 
void test_arm_mpu_pxn_dt (void)
 Verify that region marked with PXN attribute via DT can be executed from unprivileged mode but cannot be executed from privileged mode.
 
void test_arm_mpu_pxn_static_config (void)
 This func is always called in privileged mode so, verify that:
 
 ZTEST_SUITE (arm_mpu_pxn, NULL, NULL, NULL, NULL, NULL)
 

Function Documentation

◆ custom_ram_func()

bool custom_ram_func ( void )

Simple func to verify PXN via DT config since code with __customramfunc falls in an MPU region with PXN set.

◆ ram_function()

__ramfunc bool ram_function ( void )

This is a simple solution to execute a code with and without PXN set because code that falls in __ramfunc section has PXN attr set if built with CONFIG_USERSPACE and unset otherwise.

◆ test_arm_mpu_pxn_dt()

void test_arm_mpu_pxn_dt ( void )

Verify that region marked with PXN attribute via DT can be executed from unprivileged mode but cannot be executed from privileged mode.

◆ test_arm_mpu_pxn_static_config()

void test_arm_mpu_pxn_static_config ( void )

This func is always called in privileged mode so, verify that:

  • region marked with PXN attribute cannot be executed from privileged mode
  • and same region when marked without PXN attribute can be executed from privileged mode

◆ test_arm_mpu_pxn_static_config_user()

void test_arm_mpu_pxn_static_config_user ( void )

Verify that MPU region with PXN attribute set can be executed from unprivileged mode.

◆ ZTEST_SUITE()

ZTEST_SUITE ( arm_mpu_pxn ,
NULL ,
NULL ,
NULL ,
NULL ,
NULL  )