In the i.MX 7ULP ROM, the HABv4 library interfaces with the SNVS module to guarantee the system security state. After closing the chip (Enabling Secure Configuration), HAB automatically transitions the SNVS Security State Machine (SSM) to a Trusted state and starts to monitor the SoC security system.
The SNVS SSM can be only transitioned if HAB completes its security self-tests and no hardware security violations happened during the ROM boot process. Once SNVS SSM is in a Trusted state the HAB library is in charge to lock the following SNVS features, which can be enabled by adding an unlock command in CSF.
- Disable LP Software Reset in SNVS_HPCOMR register.
- Locks writes on Zeroisable Master Key.
The i.MX 7ULP has two independents HABv4 libraries running in each core, but only CA7 HAB library has the SNVS software support. As the HAB running in CM4 lacks the support of the SNVS module, the SNVS SSM is not transitioned to a Trusted state in low power boot mode and thus remains in check state (b1001). As no SW support is available the SNVS locks mentioned above cannot be applied in this mode.
All i.MX 7ULP B0 and B1 silicon revisions are impacted by this issue. i.MX7ULP Low power boot mode users MUST apply the workaround below.
i.MX 7ULP B2 addresses this issue in Silicon.
Users can transition the SNVS SSM in CM4 software image after ROM boot. Here is an example of how the workaround can be implemented on a Hello World demo application.
BOARD_BootClockRUN();
BOARD_InitDebugConsole();
/* Get Boot Configuration */
uint32_t bt0_cfg = SMC_GetBootOptionConfig(MSMC0);
bt0_cfg &= (BT0CFG_LPBOOT_MASK | BT0CFG_DUALBOOT_MASK);
/* Check Boot mode is LP Boot Mode */
+ if (bt0_cfg & BT0CFG_LPBOOT_MASK) {
+ /* Initialize SNVS */
+ SNVS_LP_Init(SNVS);
+
+ /* Transition SSM State */
+ SNVS_LP_SSM_State_Transition(SNVS);
+
+ /* Set Locks in SNVS HP Domain*/
+ SNVS_HP_SetLocks(SNVS);
+ }
+
PRINTF("hello world.\r\n");
while (1)
--