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#
Configures internal SRAM as non-executable and enable MPU.
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.
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).
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.
N/A | address_begin | Beginning of memory segment. |
N/A | address_end | End of memory segment. |
N/A | size | 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.
75
of file platform/service/mpu/inc/sl_mpu.h