/* Handles the ESBC uboot client image verification failure. This function handles all the errors which might occur in the public key hash comparison and signature verification of ESBC uboot client image. It will also set the error bits in the SEC_MON.  */
static void fsl_secboot_image_verification_failure(void)
/* Handles the ESBC uboot client image verification failure. This function handles all the errors which might occur in the public key hash comparison and signature verification of ESBC uboot client image. It will also set the error bits in the SEC_MON.  */
static void fsl_secboot_image_verification_failure(void)
{
	struct ccsr_sfp_regs *sfp_regs = (void *)(CONFIG_SYS_SFP_ADDR);
	u32 its = (sfp_in32(&sfp_regs->ospr) & ITS_MASK) >> ITS_BIT;
	if (its == 1) {
		set_sec_mon_state(HPSR_SSM_ST_SOFT_FAIL);
		printf("Generating reset request\n");
		do_reset(NULL, 0, 0, NULL);
		do_esbc_halt(NULL, 0, 0, NULL);
	} else {
		set_sec_mon_state(HPSR_SSM_ST_NON_SECURE);
	}
}