plat/arm/board/common/board_arm_trusted_boot.c
/*
 * Return the non-volatile counter value stored in the platform. The cookie
 * specifies the OID of the counter in the certificate.
 *
 * Return: 0 = success, Otherwise = error
 */
Return the non-volatile counter value stored in the platform. The cookie
specifies the OID of the counter in the certificate.

0 = success, Otherwise = error
Return the non - volatile counter value stored in the platform . The cookie specifies the OID of the counter in the certificate . 0 = success Otherwise = error
int plat_get_nv_ctr(void *cookie, unsigned int *nv_ctr)
{
	CCError_t error = CC_FAIL;
	if (strcmp(cookie, TRUSTED_FW_NVCOUNTER_OID) == 0) {
		error = NVM_GetSwVersion(PLAT_CRYPTOCELL_BASE,
				CC_SW_VERSION_COUNTER1, nv_ctr);
	} else if (strcmp(cookie, NON_TRUSTED_FW_NVCOUNTER_OID) == 0) {
		error = NVM_GetSwVersion(PLAT_CRYPTOCELL_BASE,
				CC_SW_VERSION_COUNTER2, nv_ctr);
	}
	return (error != CC_OK);
}
int plat_get_nv_ctr ( void * cookie , unsigned int * nv_ctr ) { CCError_t error = CC_FAIL ; if ( strcmp ( cookie , TRUSTED_FW_NVCOUNTER_OID ) == 0 ) { error = NVM_GetSwVersion ( PLAT_CRYPTOCELL_BASE , CC_SW_VERSION_COUNTER1 , nv_ctr ) ; } else if ( strcmp ( cookie , NON_TRUSTED_FW_NVCOUNTER_OID ) == 0 ) { error = NVM_GetSwVersion ( PLAT_CRYPTOCELL_BASE , CC_SW_VERSION_COUNTER2 , nv_ctr ) ; } return ( error != CC_OK ) ; }
Return the non-volatile counter value stored in the platform.
Return the non - volatile counter value stored in the platform .