RAM execution disable#

RAM execution disable utilities can be used to disable execution from RAM and other selected memory regions.

RAM execution disable utilities are useful to protect against code injection attacks. These utilities make use of MPU to disable execution from RAM and other selected memory regions.

Functions#

void

Configures internal SRAM as non-executable and enable MPU.

sl_status_t
sl_mpu_disable_execute(uint32_t address_begin, uint32_t address_end, uint32_t size)

Configures an address range as non-executable and enable MPU.

Function Documentation#

sl_mpu_disable_execute_from_ram#

void sl_mpu_disable_execute_from_ram (void )

Configures internal SRAM as non-executable and enable MPU.

Parameters
N/A

Note

  • This function configures the MPU in order to make the entire RAM as non-executable (with the exception of the functions marked as ramfunc).


Definition at line 59 of file platform/service/mpu/inc/sl_mpu.h

sl_mpu_disable_execute#

sl_status_t sl_mpu_disable_execute (uint32_t address_begin, uint32_t address_end, uint32_t size)

Configures an address range as non-executable and enable MPU.

Parameters
N/Aaddress_begin

Beginning of memory segment.

N/Aaddress_end

End of memory segment.

N/Asize

Size of memory segment.

Note

  • Configures a MPU region in order to make an address range as non-executable. The memory region must have a size of at least 32 bytes.

Returns

  • 0 if successful. Error code otherwise.


Definition at line 75 of file platform/service/mpu/inc/sl_mpu.h