:orphan: .. title:: CONFIG_NULL_POINTER_EXCEPTION_DETECTION_MPU .. kconfig:: CONFIG_NULL_POINTER_EXCEPTION_DETECTION_MPU CONFIG_NULL_POINTER_EXCEPTION_DETECTION_MPU ########################################### *Use MPU for null pointer exception detection* Type: ``bool`` Help ==== .. code-block:: none Null pointer dereference detection implemented using MPU functionality. Notes: - Mutually exclusive to the DWT-based solution - Not enabled for Non-Secure FW images, where null-pointer dereferencing is likely caught as a SecureFault. - Requires MPU functionality to be present and enabled. The implementation consumes 1 MPU region. - In ARMv8-M, explicit null-pointer dereference detection with MPU requires, additionally, that the area: [0x0, CORTEX_M_NULL_POINTER_EXCEPTION_PAGE_SIZE) is not unmapped (covered by an MPU region already). If it is unmapped null-pointer dereferencing may still be idirectly detected (e.g. via a precise Bus access fault), but this is not guaranteed. A build-time message warns the user of this scenario. Direct dependencies =================== !\ :kconfig:`TRUSTED_EXECUTION_NONSECURE ` && \ :kconfig:`ARM_MPU ` && \ :ref:` ` *(Includes any dependencies from ifs and menus.)* Symbols selected by this symbol =============================== - \ :kconfig:`CORTEX_M_NULL_POINTER_EXCEPTION ` Kconfig definition ================== At ``/arm/core/aarch32/cortex_m/Kconfig:384`` Included via ``Kconfig:8`` → ``Kconfig.zephyr:39`` → ``/Kconfig:12`` → ``/arm/Kconfig:57`` → ``/arm/core/aarch32/Kconfig:294`` Menu path: (Top) → ARM Options → Enable and use null-pointer exception .. code-block:: kconfig config NULL_POINTER_EXCEPTION_DETECTION_MPU bool "Use MPU for null pointer exception detection" select CORTEX_M_NULL_POINTER_EXCEPTION depends on !TRUSTED_EXECUTION_NONSECURE && ARM_MPU && help Null pointer dereference detection implemented using MPU functionality. Notes: - Mutually exclusive to the DWT-based solution - Not enabled for Non-Secure FW images, where null-pointer dereferencing is likely caught as a SecureFault. - Requires MPU functionality to be present and enabled. The implementation consumes 1 MPU region. - In ARMv8-M, explicit null-pointer dereference detection with MPU requires, additionally, that the area: [0x0, CORTEX_M_NULL_POINTER_EXCEPTION_PAGE_SIZE) is not unmapped (covered by an MPU region already). If it is unmapped null-pointer dereferencing may still be idirectly detected (e.g. via a precise Bus access fault), but this is not guaranteed. A build-time message warns the user of this scenario. *(The 'depends on' condition includes propagated dependencies from ifs and menus.)*