35#ifndef PARTITION_CMSDK_ARMv8MBL_H
36#define PARTITION_CMSDK_ARMv8MBL_H
45#define SAU_INIT_CTRL 1
51#define SAU_INIT_CTRL_ENABLE 1
60#define SAU_INIT_CTRL_ALLNS 0
73#define SAU_REGIONS_MAX 8
79#define SAU_INIT_REGION0 1
84#define SAU_INIT_START0 0x00000000
89#define SAU_INIT_END0 0x001FFFFF
96#define SAU_INIT_NSC0 1
105#define SAU_INIT_REGION1 1
110#define SAU_INIT_START1 0x00200000
115#define SAU_INIT_END1 0x003FFFFF
122#define SAU_INIT_NSC1 0
131#define SAU_INIT_REGION2 1
136#define SAU_INIT_START2 0x20200000
141#define SAU_INIT_END2 0x203FFFFF
148#define SAU_INIT_NSC2 0
157#define SAU_INIT_REGION3 1
162#define SAU_INIT_START3 0x40000000
167#define SAU_INIT_END3 0x40040000
174#define SAU_INIT_NSC3 0
183#define SAU_INIT_REGION4 0
188#define SAU_INIT_START4 0x00000000
193#define SAU_INIT_END4 0x00000000
200#define SAU_INIT_NSC4 0
209#define SAU_INIT_REGION5 0
214#define SAU_INIT_START5 0x00000000
219#define SAU_INIT_END5 0x00000000
226#define SAU_INIT_NSC5 0
235#define SAU_INIT_REGION6 0
240#define SAU_INIT_START6 0x00000000
245#define SAU_INIT_END6 0x00000000
252#define SAU_INIT_NSC6 0
261#define SAU_INIT_REGION7 0
266#define SAU_INIT_START7 0x00000000
271#define SAU_INIT_END7 0x00000000
278#define SAU_INIT_NSC7 0
290#define SCB_CSR_AIRCR_INIT 1
298#define SCB_CSR_DEEPSLEEPS_VAL 1
306#define SCB_AIRCR_SYSRESETREQS_VAL 1
314#define SCB_AIRCR_PRIS_VAL 1
322#define SCB_AIRCR_BFHFNMINS_VAL 0
332#define SCB_ICSR_INIT 0
341#define SCB_ICSR_STTNS_VAL 0
355#define NVIC_INIT_ITNS0 1
392#define NVIC_INIT_ITNS0_VAL 0x0000122B
401#define NVIC_INIT_ITNS1 1
429#define NVIC_INIT_ITNS1_VAL 0x00000000
446#define SAU_INIT_REGION(n) \
447 SAU->RNR = (n & SAU_RNR_REGION_Msk); \
448 SAU->RBAR = (SAU_INIT_START##n & SAU_RBAR_BADDR_Msk); \
449 SAU->RLAR = (SAU_INIT_END##n & SAU_RLAR_LADDR_Msk) | \
450 ((SAU_INIT_NSC##n << SAU_RLAR_NSC_Pos) & SAU_RLAR_NSC_Msk) | 1U
460#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U)
462 #if defined (SAU_INIT_REGION0) && (SAU_INIT_REGION0 == 1U)
466 #if defined (SAU_INIT_REGION1) && (SAU_INIT_REGION1 == 1U)
470 #if defined (SAU_INIT_REGION2) && (SAU_INIT_REGION2 == 1U)
474 #if defined (SAU_INIT_REGION3) && (SAU_INIT_REGION3 == 1U)
478 #if defined (SAU_INIT_REGION4) && (SAU_INIT_REGION4 == 1U)
482 #if defined (SAU_INIT_REGION5) && (SAU_INIT_REGION5 == 1U)
486 #if defined (SAU_INIT_REGION6) && (SAU_INIT_REGION6 == 1U)
490 #if defined (SAU_INIT_REGION7) && (SAU_INIT_REGION7 == 1U)
499 #if defined (SAU_INIT_CTRL) && (SAU_INIT_CTRL == 1U)
504 #if defined (SCB_CSR_AIRCR_INIT) && (SCB_CSR_AIRCR_INIT == 1U)
505 SCB->SCR = (SCB->SCR & ~(SCB_SCR_SLEEPDEEPS_Msk )) |
508 SCB->AIRCR = (SCB->AIRCR & ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_SYSRESETREQS_Msk |
509 SCB_AIRCR_BFHFNMINS_Msk | SCB_AIRCR_PRIS_Msk) ) |
510 ((0x05FAU << SCB_AIRCR_VECTKEY_Pos) & SCB_AIRCR_VECTKEY_Msk) |
516 #if defined (SCB_ICSR_INIT) && (SCB_ICSR_INIT == 1U)
517 SCB->ICSR = (SCB->ICSR & ~(SCB_ICSR_STTNS_Msk )) |
521 #if defined (NVIC_INIT_ITNS0) && (NVIC_INIT_ITNS0 == 1U)
525 #if defined (NVIC_INIT_ITNS1) && (NVIC_INIT_ITNS1 == 1U)
#define __STATIC_INLINE
Definition compiler.h:14
__STATIC_INLINE void TZ_SAU_Setup(void)
Setup a SAU Region.
Definition partition_CMSDK_ARMv8MBL.h:457
#define SAU_INIT_CTRL_ALLNS
Definition partition_CMSDK_ARMv8MBL.h:60
#define SCB_CSR_DEEPSLEEPS_VAL
Definition partition_CMSDK_ARMv8MBL.h:298
#define SAU_INIT_CTRL_ENABLE
Definition partition_CMSDK_ARMv8MBL.h:51
#define SAU_INIT_REGION(n)
Definition partition_CMSDK_ARMv8MBL.h:446
#define SCB_AIRCR_SYSRESETREQS_VAL
Definition partition_CMSDK_ARMv8MBL.h:306
#define SCB_ICSR_STTNS_VAL
Definition partition_CMSDK_ARMv8MBL.h:341
#define NVIC_INIT_ITNS1_VAL
Definition partition_CMSDK_ARMv8MBL.h:429
#define SCB_AIRCR_BFHFNMINS_VAL
Definition partition_CMSDK_ARMv8MBL.h:322
#define SCB_AIRCR_PRIS_VAL
Definition partition_CMSDK_ARMv8MBL.h:314
#define NVIC_INIT_ITNS0_VAL
Definition partition_CMSDK_ARMv8MBL.h:392