int sec_boot_enabled (void) { switch(rom_info.m_SEC_CTRL.m_sec_boot) { case ATTR_SBOOT_ENABLE: SMSG(bMsg,"[%s] SBOOT is enabled\n",MOD); SMSG(bMsg,"0x%x\n",ATTR_SBOOT_ENABLE); return 1; /* secure boot can't be disabled on security chip */ case ATTR_SBOOT_DISABLE: case ATTR_SBOOT_ONLY_ENABLE_ON_SCHIP: SMSG(bMsg,"[%s] SBOOT is only enabled on S-CHIP\n",MOD); if(TRUE == es_sbc_enabled()) { SMSG(true,"0x%x, SC\n",ATTR_SBOOT_ONLY_ENABLE_ON_SCHIP); return 1; } else { SMSG(true,"0x%x, NSC\n",ATTR_SBOOT_ONLY_ENABLE_ON_SCHIP); return 0; } default: SMSG(true,"[%s] invalid sboot config (0x%x)\n",MOD,rom_info.m_SEC_CTRL.m_sec_boot); SEC_ASSERT(0); } return 0; }
int sec_usbdl_enabled (void) { switch(rom_info.m_SEC_CTRL.m_sec_usb_dl) { case ATTR_SUSBDL_ENABLE: SMSG(bMsg,"[%s] SUSBDL is enabled\n",MOD); SMSG(bMsg,"0x%x\n",ATTR_SUSBDL_ENABLE); return 1; /* SUSBDL can't be disabled on security chip */ case ATTR_SUSBDL_DISABLE: case ATTR_SUSBDL_ONLY_ENABLE_ON_SCHIP: SMSG(bMsg,"[%s] SUSBDL is only enabled on S-CHIP\n",MOD); if(TRUE == es_sbc_enabled()) { SMSG(true,"0x%x, SC\n",ATTR_SUSBDL_ONLY_ENABLE_ON_SCHIP); return 1; } else { SMSG(true,"0x%x, NSC\n",ATTR_SUSBDL_ONLY_ENABLE_ON_SCHIP); return 0; } default: SMSG(true,"[%s] invalid susbdl config (0x%x)\n",MOD,rom_info.m_SEC_CTRL.m_sec_usb_dl); SEC_ASSERT(0); return 1; } }
int sec_schip_enabled (void) { if(TRUE == es_sbc_enabled()) { SMSG(true,"SC\n"); return 1; } else { SMSG(true,"NSC\n"); return 0; } return 0; }
/****************************************************************************** * CHECK IF SECROIMG AC IS ENABLED ******************************************************************************/ bool sec_secro_ac (void) { /* PLEASE NOTE THAT !!!!!!!!!!!!!!!!!! SECRO AC is only effected when SUSBDL is on */ if(TRUE == sec_usbdl_enabled()) { return TRUE; } /* If security chip, secroimage must be encrypted */ else if(TRUE == es_sbc_enabled()) { return TRUE; } else { return FALSE; } }