Hello,
I am using Cortex-M33 FVP model to run the Keil RTX TrustZoneV8M RTOS example.Have also tried to experiment with the memory map configuration and the corresponding SAU region programming for NS/S patitioning and the behaviour is as expected.
However when i try to disable the SAU usage in the system, I am seeing SECUREFAULT when switching from NS to S.Here is the procedure i followed:
1) Configure SAU_INIT_CTRL=0 in TrustZoneV8M\RTOS\CM33_s\RTE\Device\ARMCM33_DSP_FP_TZ\partition_ARMCM33.h
=> Not attempting to program the SAU.
2) Disable SAU in the model,cpu0.SAU=0x0 # (int , init-time) default = '0x4' : Number of SAU regions (0 => no SAU) : [0x0..0x8]
cpu0.SAU_CTRL.ENABLE=0 # (bool , init-time) default = '0' : Enable SAU at reset
cpu0.SAU_CTRL.ALLNS=1 # (bool , init-time) default = '0' : At reset, the SAU treats entire memory space as NS when the SAU is disabled if this is set
VECTOR=SECUREFAULT FaultCause=SecureFault invalid transition SecurityState=SECURE
I also noticed that, If i enable the SAU but set ALLNS=1 ( both in SW and FVP config), the behaviour is still the same.
Note; I am not sure if this is even a valid experiment. Our target HW platform will not have an SAU.
Thanks,
Diwakar
Yes, if your system have TrustZone support, then SAU Control register will be available, even if the number of SAU region is configured to 0.
regards,
Joseph