Commit 7f70cd29 authored by Abdellatif El Khlifi's avatar Abdellatif El Khlifi
Browse files

feat: disabling non volatile counters in diphda



At this stage of development Non Volatile counters are not implemented
in the Diphda platform.

This commit disables their use during the Trusted Board Boot by
overriding the NV counters get/set functions.

Change-Id: I8dcbebe0281cc4d0837c283ff637e20b850988ef
Signed-off-by: default avatarAbdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
parent bf3ce993
......@@ -30,3 +30,24 @@ int plat_get_rotpk_info(void *cookie, void **key_ptr, unsigned int *key_len,
{
return arm_get_rotpk_info(cookie, key_ptr, key_len, flags);
}
/*
* STUB overriding the non-volatile counter reading.
* NV counters are not implemented at this stage of development.
* Return: 0 = success
*/
int plat_get_nv_ctr(void *cookie, unsigned int *nv_ctr)
{
*nv_ctr = DIPHDA_FW_NVCTR_VAL;
return 0;
}
/*
* STUB overriding the non-volatile counter updating.
* NV counters are not implemented at this stage of development.
* Return: 0 = success
*/
int plat_set_nv_ctr(void *cookie, unsigned int nv_ctr)
{
return 0;
}
......@@ -16,6 +16,11 @@ PLAT_INCLUDES := -Iplat/arm/board/diphda/common/include \
-Iinclude/plat/arm/common \
-Iinclude/plat/arm/css/common/aarch64
DIPHDA_FW_NVCTR_VAL := 255
TFW_NVCTR_VAL := ${DIPHDA_FW_NVCTR_VAL}
NTFW_NVCTR_VAL := ${DIPHDA_FW_NVCTR_VAL}
override NEED_BL1 := no
override NEED_BL2 := yes
......@@ -64,5 +69,8 @@ $(eval $(call TOOL_ADD_PAYLOAD,${DIPHDA_TOS_FW_CONFIG},--tos-fw-config,${DIPHDA_
# Adding TARGET_PLATFORM as a GCC define (-D option)
$(eval $(call add_define,TARGET_PLATFORM_$(call uppercase,${TARGET_PLATFORM})))
# Adding DIPHDA_FW_NVCTR_VAL as a GCC define (-D option)
$(eval $(call add_define,DIPHDA_FW_NVCTR_VAL))
include plat/arm/common/arm_common.mk
include plat/arm/board/common/board_common.mk
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment