|
SmartSnippets DA1459x SDK
|
Definition of API for the Memory Protection Unit (MPU) Low Level Driver. More...
Go to the source code of this file.
Data Structures | |
| struct | mpu_region_config |
| Memory Region Configuration. More... | |
Enumerations | |
| enum | HW_MPU_REGION_NUM { HW_MPU_REGION_NONE = MPU_REGION_NONE, HW_MPU_REGION_0 = MPU_REGION_0, HW_MPU_REGION_1 = MPU_REGION_1, HW_MPU_REGION_2 = MPU_REGION_2, HW_MPU_REGION_3 = MPU_REGION_3, HW_MPU_REGION_4 = MPU_REGION_4, HW_MPU_REGION_5 = MPU_REGION_5, HW_MPU_REGION_6 = MPU_REGION_6, HW_MPU_REGION_7 = MPU_REGION_7 } |
| Region Definitions. More... | |
| enum | HW_MPU_XN { HW_MPU_XN_FALSE = 0x00, HW_MPU_XN_TRUE = 0x01 } |
| Executable Region. More... | |
| enum | HW_MPU_APH_RO { HW_MPU_APH_RO_RW = 0x00, HW_MPU_APH_RO_RO = 0x01 } |
| Region Read/Write or Read Only. More... | |
| enum | HW_MPU_APL_NP { HW_MPU_APL_NP_PRIVRW = 0x00, HW_MPU_APL_NP_RW = 0x01 } |
| Privileged or Non-Privileged access. More... | |
| enum | HW_MPU_AP { HW_MPU_AP_PRIVRW = ARM_MPU_AP_(HW_MPU_APH_RO_RW, HW_MPU_APL_NP_PRIVRW), HW_MPU_AP_RW = ARM_MPU_AP_(HW_MPU_APH_RO_RW, HW_MPU_APL_NP_RW), HW_MPU_AP_PRIVRO = ARM_MPU_AP_(HW_MPU_APH_RO_RO, HW_MPU_APL_NP_PRIVRW), HW_MPU_AP_RO = ARM_MPU_AP_(HW_MPU_APH_RO_RO, HW_MPU_APL_NP_RW) } |
| Access Permissions. More... | |
| enum | HW_MPU_ATTR_INDEX { HW_MPU_ATTR_INDEX_0, HW_MPU_ATTR_INDEX_1, HW_MPU_ATTR_INDEX_2, HW_MPU_ATTR_INDEX_3, HW_MPU_ATTR_INDEX_4, HW_MPU_ATTR_INDEX_5, HW_MPU_ATTR_INDEX_6, HW_MPU_ATTR_INDEX_7 } |
| Memory attributes. More... | |
| enum | HW_MPU_SH { HW_MPU_SH_NS = ARM_MPU_SH_NON, HW_MPU_SH_OS = ARM_MPU_SH_OUTER, HW_MPU_SH_IS = ARM_MPU_SH_INNER } |
| Shareability. More... | |
| enum | HW_MPU_ATTR { HW_MPU_ATTR_DEVICE = 0x00, HW_MPU_ATTR_NORMAL = 0x44 } |
| Memory Type. More... | |
Functions | |
| __STATIC_FORCEINLINE void | hw_mpu_hardfault_nmi_handlers_enable (bool hfnmiena) |
| Enables/Disables the operation of MPU during hard fault, NMI, and FAULTMASK handlers. More... | |
| __STATIC_FORCEINLINE void | hw_mpu_privileged_background_access_enable (bool privdefena) |
| Enables/Disables Privileged Background Access. More... | |
| __STATIC_FORCEINLINE void | hw_mpu_enable (bool privdefena) |
| Initializes the MPU by disabling its operation during faults, defining the background region privilege access and finally by enabling the actual HW block. More... | |
| __STATIC_FORCEINLINE void | hw_mpu_disable (void) |
| Disables the MPU. More... | |
| __STATIC_FORCEINLINE bool | hw_mpu_is_enabled (void) |
| Checks if MPU is enabled. More... | |
| void | hw_mpu_set_attribute_indirection (HW_MPU_REGION_NUM region_num, HW_MPU_ATTR_INDEX attr) |
| Configures an MPU attribute indirection. More... | |
| void | hw_mpu_reset_attribute_indirections () |
| Resets all MPU attribute indirections. MPU Attribute Index pattern is returned to one-to-one configuration. | |
| void | hw_mpu_config_region (HW_MPU_REGION_NUM region_num, mpu_region_config *cfg) |
| Configures an MPU region. Region's start and end addresses will be aligned to 32 byte boundary. The start address is ANDed with 0xFFFFFFE0 whereas the end address is ORed with 0x1F. More... | |
| void | hw_mpu_fetch_region_configuration (HW_MPU_REGION_NUM region_num, mpu_region_config *cfg) |
| Fetches the configuration of an MPU region. More... | |
Definition of API for the Memory Protection Unit (MPU) Low Level Driver.
The MPU is an optional ARM CM33 feature supported in DA14yyx SoC families that enables protecting loosely defined regions of system RAM memory through enforcing privilege and access rules per region. All MPU LLD terminology is based on the ARM CM33 nomenclature.
Copyright (C) 2017-2023 Renesas Electronics Corporation and/or its affiliates. All rights reserved. Confidential Information.
This software ("Software") is supplied by Renesas Electronics Corporation and/or its affiliates ("Renesas"). Renesas grants you a personal, non-exclusive, non-transferable, revocable, non-sub-licensable right and license to use the Software, solely if used in or together with Renesas products. You may make copies of this Software, provided this copyright notice and disclaimer ("Notice") is included in all such copies. Renesas reserves the right to change or discontinue the Software at any time without notice.
THE SOFTWARE IS PROVIDED "AS IS". RENESAS DISCLAIMS ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. TO THE MAXIMUM EXTENT PERMITTED UNDER LAW, IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE, EVEN IF RENESAS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. USE OF THIS SOFTWARE MAY BE SUBJECT TO TERMS AND CONDITIONS CONTAINED IN AN ADDITIONAL AGREEMENT BETWEEN YOU AND RENESAS. IN CASE OF CONFLICT BETWEEN THE TERMS OF THIS NOTICE AND ANY SUCH ADDITIONAL LICENSE AGREEMENT, THE TERMS OF THE AGREEMENT SHALL TAKE PRECEDENCE. BY CONTINUING TO USE THIS SOFTWARE, YOU AGREE TO THE TERMS OF THIS NOTICE.IF YOU DO NOT AGREE TO THESE TERMS, YOU ARE NOT PERMITTED TO USE THIS SOFTWARE.
1.8.16