@ -38,6 +38,9 @@ static unsigned char nt_world_bl_hash_buf[HASH_DER_LEN];
static unsigned char trusted_world_pk_buf [ PK_DER_LEN ] ;
static unsigned char non_trusted_world_pk_buf [ PK_DER_LEN ] ;
static unsigned char content_pk_buf [ PK_DER_LEN ] ;
static unsigned char soc_fw_config_hash_buf [ HASH_DER_LEN ] ;
static unsigned char tos_fw_config_hash_buf [ HASH_DER_LEN ] ;
static unsigned char nt_fw_config_hash_buf [ HASH_DER_LEN ] ;
/*
* Parameter type descriptors
@ -80,14 +83,20 @@ static auth_param_type_desc_t scp_fw_hash = AUTH_PARAM_TYPE_DESC(
AUTH_PARAM_HASH , SCP_FW_HASH_OID ) ;
static auth_param_type_desc_t soc_fw_hash = AUTH_PARAM_TYPE_DESC (
AUTH_PARAM_HASH , SOC_AP_FW_HASH_OID ) ;
static auth_param_type_desc_t soc_fw_config_hash = AUTH_PARAM_TYPE_DESC (
AUTH_PARAM_HASH , SOC_FW_CONFIG_HASH_OID ) ;
static auth_param_type_desc_t tos_fw_hash = AUTH_PARAM_TYPE_DESC (
AUTH_PARAM_HASH , TRUSTED_OS_FW_HASH_OID ) ;
static auth_param_type_desc_t tos_fw_config_hash = AUTH_PARAM_TYPE_DESC (
AUTH_PARAM_HASH , TRUSTED_OS_FW_CONFIG_HASH_OID ) ;
static auth_param_type_desc_t tos_fw_extra1_hash = AUTH_PARAM_TYPE_DESC (
AUTH_PARAM_HASH , TRUSTED_OS_FW_EXTRA1_HASH_OID ) ;
static auth_param_type_desc_t tos_fw_extra2_hash = AUTH_PARAM_TYPE_DESC (
AUTH_PARAM_HASH , TRUSTED_OS_FW_EXTRA2_HASH_OID ) ;
static auth_param_type_desc_t nt_world_bl_hash = AUTH_PARAM_TYPE_DESC (
AUTH_PARAM_HASH , NON_TRUSTED_WORLD_BOOTLOADER_HASH_OID ) ;
static auth_param_type_desc_t nt_fw_config_hash = AUTH_PARAM_TYPE_DESC (
AUTH_PARAM_HASH , NON_TRUSTED_FW_CONFIG_HASH_OID ) ;
static auth_param_type_desc_t scp_bl2u_hash = AUTH_PARAM_TYPE_DESC (
AUTH_PARAM_HASH , SCP_FWU_CFG_HASH_OID ) ;
static auth_param_type_desc_t bl2u_hash = AUTH_PARAM_TYPE_DESC (
@ -379,6 +388,13 @@ static const auth_img_desc_t cot_desc[] = {
. ptr = ( void * ) soc_fw_hash_buf ,
. len = ( unsigned int ) HASH_DER_LEN
}
} ,
[ 1 ] = {
. type_desc = & soc_fw_config_hash ,
. data = {
. ptr = ( void * ) soc_fw_config_hash_buf ,
. len = ( unsigned int ) HASH_DER_LEN
}
}
}
} ,
@ -396,6 +412,21 @@ static const auth_img_desc_t cot_desc[] = {
}
}
} ,
/* SOC FW Config */
[ SOC_FW_CONFIG_ID ] = {
. img_id = SOC_FW_CONFIG_ID ,
. img_type = IMG_RAW ,
. parent = & cot_desc [ SOC_FW_CONTENT_CERT_ID ] ,
. img_auth_methods = {
[ 0 ] = {
. type = AUTH_METHOD_HASH ,
. param . hash = {
. data = & raw_data ,
. hash = & soc_fw_config_hash ,
}
}
}
} ,
/*
* Trusted OS Firmware
*/
@ -474,6 +505,13 @@ static const auth_img_desc_t cot_desc[] = {
. ptr = ( void * ) tos_fw_extra2_hash_buf ,
. len = ( unsigned int ) HASH_DER_LEN
}
} ,
[ 3 ] = {
. type_desc = & tos_fw_config_hash ,
. data = {
. ptr = ( void * ) tos_fw_config_hash_buf ,
. len = ( unsigned int ) HASH_DER_LEN
}
}
}
} ,
@ -519,6 +557,21 @@ static const auth_img_desc_t cot_desc[] = {
}
}
} ,
/* TOS FW Config */
[ TOS_FW_CONFIG_ID ] = {
. img_id = TOS_FW_CONFIG_ID ,
. img_type = IMG_RAW ,
. parent = & cot_desc [ TRUSTED_OS_FW_CONTENT_CERT_ID ] ,
. img_auth_methods = {
[ 0 ] = {
. type = AUTH_METHOD_HASH ,
. param . hash = {
. data = & raw_data ,
. hash = & tos_fw_config_hash ,
}
}
}
} ,
/*
* Non - Trusted Firmware
*/
@ -583,6 +636,13 @@ static const auth_img_desc_t cot_desc[] = {
. ptr = ( void * ) nt_world_bl_hash_buf ,
. len = ( unsigned int ) HASH_DER_LEN
}
} ,
[ 1 ] = {
. type_desc = & nt_fw_config_hash ,
. data = {
. ptr = ( void * ) nt_fw_config_hash_buf ,
. len = ( unsigned int ) HASH_DER_LEN
}
}
}
} ,
@ -600,6 +660,21 @@ static const auth_img_desc_t cot_desc[] = {
}
}
} ,
/* NT FW Config */
[ NT_FW_CONFIG_ID ] = {
. img_id = NT_FW_CONFIG_ID ,
. img_type = IMG_RAW ,
. parent = & cot_desc [ NON_TRUSTED_FW_CONTENT_CERT_ID ] ,
. img_auth_methods = {
[ 0 ] = {
. type = AUTH_METHOD_HASH ,
. param . hash = {
. data = & raw_data ,
. hash = & nt_fw_config_hash ,
}
}
}
} ,
/*
* FWU auth descriptor .
*/