SDL API Guide for J721E
|
Header file containing various enumerations, structure definitions and function.
(C) Copyright 2019, Texas Instruments, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Go to the source code of this file.
Data Structures | |
struct | SDL_ArmR5MpuRegionCfg |
Structure containing the region configuration parameters. If application wants to do it's own MPU region configuration (override the default one), then it needs to define this variable and initialize that to desired values: Var: 'const SDL_ArmR5MpuRegionCfg gSdlR5MpuCfg[SDL_ARM_R5F_MPU_REGIONS_MAX]' With above application can have it's own MPU configuration, but MPU configuration will still happen at boot/startup time. Default configurations for MPU regions is present under file: "\src\startup\startup.c". More... | |
struct | SDL_MPU_staticRegs |
MPU Static Registers structure. More... | |
Macros | |
#define | SDL_ARM_R5_MPU_REGION_BASE_ADDR_MASK (0xFFFFFFFEU) |
#define | SDL_ARM_R5_MPU_REGION_BASE_ADDR_SHIFT (0x00000005U) |
#define | SDL_ARM_R5_MPU_REGION_BASE_ADDR_RESETVAL (0x00000000U) |
#define | SDL_ARM_R5_MPU_REGION_BASE_ADDR_MAX (0x07FFFFFFU) |
#define | SDL_ARM_R5_MPU_REGION_SZEN_EN_MASK (0x00000001U) |
#define | SDL_ARM_R5_MPU_REGION_SZEN_EN_SHIFT (0x00000000U) |
#define | SDL_ARM_R5_MPU_REGION_SZEN_EN_RESETVAL (0x00000000U) |
#define | SDL_ARM_R5_MPU_REGION_SZEN_EN_MAX (0x00000001U) |
#define | SDL_ARM_R5_MPU_REGION_SZEN_SZ_MASK (0x00000037U) |
#define | SDL_ARM_R5_MPU_REGION_SZEN_SZ_SHIFT (0x00000001U) |
#define | SDL_ARM_R5_MPU_REGION_SZEN_SZ_RESETVAL (0x00000000U) |
#define | SDL_ARM_R5_MPU_REGION_SZEN_SZ_MAX (0x0000001FU) |
#define | SDL_ARM_R5_MPU_REGION_SZEN_SRD_MASK (0x0000FF00U) |
#define | SDL_ARM_R5_MPU_REGION_SZEN_SRD_SHIFT (0x00000008U) |
#define | SDL_ARM_R5_MPU_REGION_SZEN_SRD_RESETVAL (0x00000000U) |
#define | SDL_ARM_R5_MPU_REGION_SZEN_SRD_MAX (0x000000FFU) |
#define | SDL_ARM_R5_MPU_REGION_AC_B_MASK (0x00000001U) |
#define | SDL_ARM_R5_MPU_REGION_AC_B_SHIFT (0x00000000U) |
#define | SDL_ARM_R5_MPU_REGION_AC_B_RESETVAL (0x00000000U) |
#define | SDL_ARM_R5_MPU_REGION_AC_B_MAX (0x00000001U) |
#define | SDL_ARM_R5_MPU_REGION_AC_CB_MASK (0x00000003U) |
#define | SDL_ARM_R5_MPU_REGION_AC_CB_SHIFT (0x00000000U) |
#define | SDL_ARM_R5_MPU_REGION_AC_CB_RESETVAL (0x00000000U) |
#define | SDL_ARM_R5_MPU_REGION_AC_C_MASK (0x00000002U) |
#define | SDL_ARM_R5_MPU_REGION_AC_C_SHIFT (0x00000001U) |
#define | SDL_ARM_R5_MPU_REGION_AC_C_RESETVAL (0x00000000U) |
#define | SDL_ARM_R5_MPU_REGION_AC_C_MAX (0x00000001U) |
#define | SDL_ARM_R5_MPU_REGION_AC_S_MASK (0x00000004U) |
#define | SDL_ARM_R5_MPU_REGION_AC_S_SHIFT (0x00000002U) |
#define | SDL_ARM_R5_MPU_REGION_AC_S_RESETVAL (0x00000000U) |
#define | SDL_ARM_R5_MPU_REGION_AC_S_MAX (0x00000001U) |
#define | SDL_ARM_R5_MPU_REGION_AC_TEX_MASK (0x00000038U) |
#define | SDL_ARM_R5_MPU_REGION_AC_TEX_SHIFT (0x00000003U) |
#define | SDL_ARM_R5_MPU_REGION_AC_TEX_RESETVAL (0x00000000U) |
#define | SDL_ARM_R5_MPU_REGION_AC_TEX_MAX (0x00000007U) |
#define | SDL_ARM_R5_MPU_REGION_AC_AP_MASK (0x00000700U) |
#define | SDL_ARM_R5_MPU_REGION_AC_AP_SHIFT (0x00000008U) |
#define | SDL_ARM_R5_MPU_REGION_AC_AP_RESETVAL (0x00000000U) |
#define | SDL_ARM_R5_MPU_REGION_AC_AP_MAX (0x00000007U) |
#define | SDL_ARM_R5_MPU_REGION_AC_AP_VAL_NO_ACCESS (0U) |
#define | SDL_ARM_R5_MPU_REGION_AC_AP_VAL_RW (3U) |
#define | SDL_ARM_R5_MPU_REGION_AC_AP_VAL_RO (6U) |
#define | SDL_ARM_R5_MPU_REGION_AC_XN_MASK (0x00001000U) |
#define | SDL_ARM_R5_MPU_REGION_AC_XN_SHIFT (0x0000000CU) |
#define | SDL_ARM_R5_MPU_REGION_AC_XN_RESETVAL (0x00000000U) |
#define | SDL_ARM_R5_MPU_REGION_AC_XN_MAX (0x00000001U) |
Maximum number of MPU regions available in R5F SS. | |
#define | SDL_ARM_R5F_MPU_REGIONS_MAX ((uint32_t) 16U) |
Number of R5 MPU region. More... | |
Arm R5F MPU sub-region disable control. | |
#define | SDL_ARM_R5_MPU_SUB_REGION_ENABLE_ALL ((uint32_t) 0x0U) |
Enable all sub-regions. More... | |
#define | SDL_ARM_R5_MPU_SUB_REGION_0_DISABLE ((uint32_t) 0x1U) |
Disable sub-region 0. More... | |
#define | SDL_ARM_R5_MPU_SUB_REGION_1_DISABLE ((uint32_t) 0x2U) |
Disable sub-region 1. More... | |
#define | SDL_ARM_R5_MPU_SUB_REGION_2_DISABLE ((uint32_t) 0x4U) |
Disable sub-region 2. More... | |
#define | SDL_ARM_R5_MPU_SUB_REGION_3_DISABLE ((uint32_t) 0x8U) |
Disable sub-region 3. More... | |
#define | SDL_ARM_R5_MPU_SUB_REGION_4_DISABLE ((uint32_t) 0x10U) |
Disable sub-region 4. More... | |
#define | SDL_ARM_R5_MPU_SUB_REGION_5_DISABLE ((uint32_t) 0x20U) |
Disable sub-region 5. More... | |
#define | SDL_ARM_R5_MPU_SUB_REGION_6_DISABLE ((uint32_t) 0x40U) |
Disable sub-region 6. More... | |
#define | SDL_ARM_R5_MPU_SUB_REGION_8_DISABLE ((uint32_t) 0x80U) |
Disable sub-region 7. More... | |
Arm R5F MPU region access permissions. | |
#define | SDL_ARM_R5_ACC_PERM_NO_ACCESS ((uint32_t) 0x0U) |
No accesses are permitted to MPU region. More... | |
#define | SDL_ARM_R5_ACC_PERM_PRIV_RD_WR ((uint32_t) 0x1U) |
Privileged accesses only. More... | |
#define | SDL_ARM_R5_ACC_PERM_PRIV_RD_WR_USR_RD ((uint32_t) 0x2U) |
Privileged read/write accesses and user read only. More... | |
#define | SDL_ARM_R5_ACC_PERM_PRIV_USR_RD_WR ((uint32_t) 0x3U) |
Full access to privileged and user modes. More... | |
#define | SDL_ARM_R5_ACC_PERM_PRIV_RD_ONLY ((uint32_t) 0x5U) |
Privileged read accesses only. More... | |
#define | SDL_ARM_R5_ACC_PERM_PRIV_USR_RD ((uint32_t) 0x6U) |
Read only accesses to privileged and user modes. More... | |
Arm R5F MPU region cache policy. | |
#define | SDL_ARM_R5_CACHE_POLICY_NON_CACHEABLE ((uint32_t) 0x0U) |
Cache Policy: Non-cacheable. More... | |
#define | SDL_ARM_R5_CACHE_POLICY_WB_WA ((uint32_t) 0x1U) |
Cache Policy: Write-back, write-allocate. More... | |
#define | SDL_ARM_R5_CACHE_POLICY_WT_NO_WA ((uint32_t) 0x2U) |
Cache Policy: Write-through, no write-allocate. More... | |
#define | SDL_ARM_R5_CACHE_POLICY_WB_NO_WA ((uint32_t) 0x3U) |
Cache Policy: Write-back, no write-allocate. More... | |
Arm R5F MPU region attributes. | |
#define | SDL_ARM_R5_MEM_ATTR_STRONGLY_ORDERED ((uint32_t) 0x0U) |
Memory type and cache policies: Strongly-ordered. More... | |
#define | SDL_ARM_R5_MEM_ATTR_SHAREABLE ((uint32_t) 0x1U) |
Memory type and cache policies: Shareable. More... | |
#define | SDL_ARM_R5_MEM_ATTR_CACHED_WT_NO_WA ((uint32_t) 0x2U) |
Memory type and cache policies: Outer and Inner write-through, no write-allocate. More... | |
#define | SDL_ARM_R5_MEM_ATTR_CACHED_WB_NO_WA ((uint32_t) 0x3U) |
Memory type and cache policies: Outer and Inner write-back, no write-allocate. More... | |
#define | SDL_ARM_R5_MEM_ATTR_STRONGLY_NON_CACHED ((uint32_t) 0x4U) |
Memory type and cache policies: Non cacheable. More... | |
#define | SDL_ARM_R5_MEM_ATTR_CACHED_WB_WA ((uint32_t) 0x5U) |
Memory type and cache policies: Outer and Inner write-back, write-allocate. More... | |
#define | SDL_ARM_R5_MEM_ATTR_NON_SHAREABLE ((uint32_t) 0x6U) |
Memory type and cache policies: Non-shareable Device. More... | |
#define | SDL_ARM_R5_MEM_ATTR_MAX ((uint32_t) 0x7U) |
This should be passed to configuration. More... | |
Functions | |
void | SDL_R5MPU_Enable (uint32_t enable) |
Enable/disable the Memory Protection Unit (MPU) More... | |
uint32_t | SDL_R5MPU_getNumRegions (void) |
Get the number of unified MPU regions supported. More... | |
void | SDL_R5MPU_Cfg (uint32_t regionNum, uint32_t baseAddrRegVal, uint32_t sizeRegVal, uint32_t accessCtrlRegVal) |
Configure an MPU region. More... | |
int32_t | SDL_R5MPU_VerifyCfg (uint32_t regionNum, uint32_t baseAddrRegVal, uint32_t sizeRegVal, uint32_t accessCtrlRegVal) |
Verify an MPU region that is previously configured. More... | |
void | SDL_R5FMPU_enableRegion (uint32_t regionNum, uint32_t enable) |
Enable/disable an MPU region. More... | |
int32_t | SDL_R5MPU_VerifyEnableRegion (uint32_t regionNum, uint32_t enable) |
Verifies the previously called Enable/disable an MPU region API. More... | |
void | SDL_R5MPU_readStaticRegisters (SDL_MPU_staticRegs *pStaticRegs, uint32_t regionNum) |
MPU API to Read the Static Registers. This function reads the values of the static registers such as System Control Register, MPU Type Register and MPU Region Number Register. More... | |
#define SDL_ARM_R5_MPU_REGION_BASE_ADDR_MASK (0xFFFFFFFEU) |
#define SDL_ARM_R5_MPU_REGION_BASE_ADDR_SHIFT (0x00000005U) |
#define SDL_ARM_R5_MPU_REGION_BASE_ADDR_RESETVAL (0x00000000U) |
#define SDL_ARM_R5_MPU_REGION_BASE_ADDR_MAX (0x07FFFFFFU) |
#define SDL_ARM_R5_MPU_REGION_SZEN_EN_MASK (0x00000001U) |
#define SDL_ARM_R5_MPU_REGION_SZEN_EN_SHIFT (0x00000000U) |
#define SDL_ARM_R5_MPU_REGION_SZEN_EN_RESETVAL (0x00000000U) |
#define SDL_ARM_R5_MPU_REGION_SZEN_EN_MAX (0x00000001U) |
#define SDL_ARM_R5_MPU_REGION_SZEN_SZ_MASK (0x00000037U) |
#define SDL_ARM_R5_MPU_REGION_SZEN_SZ_SHIFT (0x00000001U) |
#define SDL_ARM_R5_MPU_REGION_SZEN_SZ_RESETVAL (0x00000000U) |
#define SDL_ARM_R5_MPU_REGION_SZEN_SZ_MAX (0x0000001FU) |
#define SDL_ARM_R5_MPU_REGION_SZEN_SRD_MASK (0x0000FF00U) |
#define SDL_ARM_R5_MPU_REGION_SZEN_SRD_SHIFT (0x00000008U) |
#define SDL_ARM_R5_MPU_REGION_SZEN_SRD_RESETVAL (0x00000000U) |
#define SDL_ARM_R5_MPU_REGION_SZEN_SRD_MAX (0x000000FFU) |
#define SDL_ARM_R5_MPU_REGION_AC_B_MASK (0x00000001U) |
#define SDL_ARM_R5_MPU_REGION_AC_B_SHIFT (0x00000000U) |
#define SDL_ARM_R5_MPU_REGION_AC_B_RESETVAL (0x00000000U) |
#define SDL_ARM_R5_MPU_REGION_AC_B_MAX (0x00000001U) |
#define SDL_ARM_R5_MPU_REGION_AC_CB_MASK (0x00000003U) |
#define SDL_ARM_R5_MPU_REGION_AC_CB_SHIFT (0x00000000U) |
#define SDL_ARM_R5_MPU_REGION_AC_CB_RESETVAL (0x00000000U) |
#define SDL_ARM_R5_MPU_REGION_AC_C_MASK (0x00000002U) |
#define SDL_ARM_R5_MPU_REGION_AC_C_SHIFT (0x00000001U) |
#define SDL_ARM_R5_MPU_REGION_AC_C_RESETVAL (0x00000000U) |
#define SDL_ARM_R5_MPU_REGION_AC_C_MAX (0x00000001U) |
#define SDL_ARM_R5_MPU_REGION_AC_S_MASK (0x00000004U) |
#define SDL_ARM_R5_MPU_REGION_AC_S_SHIFT (0x00000002U) |
#define SDL_ARM_R5_MPU_REGION_AC_S_RESETVAL (0x00000000U) |
#define SDL_ARM_R5_MPU_REGION_AC_S_MAX (0x00000001U) |
#define SDL_ARM_R5_MPU_REGION_AC_TEX_MASK (0x00000038U) |
#define SDL_ARM_R5_MPU_REGION_AC_TEX_SHIFT (0x00000003U) |
#define SDL_ARM_R5_MPU_REGION_AC_TEX_RESETVAL (0x00000000U) |
#define SDL_ARM_R5_MPU_REGION_AC_TEX_MAX (0x00000007U) |
#define SDL_ARM_R5_MPU_REGION_AC_AP_MASK (0x00000700U) |
#define SDL_ARM_R5_MPU_REGION_AC_AP_SHIFT (0x00000008U) |
#define SDL_ARM_R5_MPU_REGION_AC_AP_RESETVAL (0x00000000U) |
#define SDL_ARM_R5_MPU_REGION_AC_AP_MAX (0x00000007U) |
#define SDL_ARM_R5_MPU_REGION_AC_AP_VAL_NO_ACCESS (0U) |
#define SDL_ARM_R5_MPU_REGION_AC_AP_VAL_RW (3U) |
#define SDL_ARM_R5_MPU_REGION_AC_AP_VAL_RO (6U) |
#define SDL_ARM_R5_MPU_REGION_AC_XN_MASK (0x00001000U) |
#define SDL_ARM_R5_MPU_REGION_AC_XN_SHIFT (0x0000000CU) |
#define SDL_ARM_R5_MPU_REGION_AC_XN_RESETVAL (0x00000000U) |
#define SDL_ARM_R5_MPU_REGION_AC_XN_MAX (0x00000001U) |