1 /* 2 * Arm SCP/MCP Software 3 * Copyright (c) 2022, Arm Limited and Contributors. All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 */ 7 8 #ifndef MOD_ARMV8M_MPU_H 9 #define MOD_ARMV8M_MPU_H 10 11 #include <fmw_cmsis.h> 12 13 #include <stddef.h> 14 15 /*! 16 * \ingroup GroupModules 17 * \addtogroup GroupMPUARMv8M MPU (ARMv8-M) 18 * \{ 19 */ 20 21 /*! 22 * \brief MPU_MAIR registers indices. 23 */ 24 enum mod_armv8m_mpu_attr_id { 25 MPU_ATTR_0, 26 MPU_ATTR_1, 27 MPU_ATTR_2, 28 MPU_ATTR_3, 29 MPU_ATTR_4, 30 MPU_ATTR_5, 31 MPU_ATTR_6, 32 MPU_ATTR_7, 33 MPU_MAX_ATTR_COUNT, 34 }; 35 36 /*! 37 * \brief Module configuration. 38 */ 39 struct mod_armv8m_mpu_config { 40 /*! 41 * \brief Number of MPU attributes. 42 */ 43 uint8_t attributes_count; 44 45 /*! 46 * \brief Pointer to array of MPU attributes. 47 */ 48 const uint8_t *attributes; 49 50 /*! 51 * \brief First region number. 52 */ 53 uint32_t first_region_number; 54 55 /*! 56 * \brief Number of MPU regions. 57 */ 58 uint32_t region_count; 59 60 /*! 61 * \brief Pointer to array of MPU regions. 62 * 63 * \details Documentation for the \c ARM_MPU_Region_t can be found in the 64 * CMSIS 5 documentation for the ARMv8-M MPU. 65 * 66 * \see http://arm-software.github.io/CMSIS_5/General/html/index.html 67 */ 68 const ARM_MPU_Region_t *regions; 69 }; 70 71 /*! 72 * \} 73 */ 74 75 #endif /* MOD_ARMV8M_MPU_H */ 76