tools/header_generation/create_hdr_esbc/taal_api/esbc_hdr_ta_3_x.c
/****************************************************************************
 * API's for Dumping Headers
 ****************************************************************************/
API's for Dumping Headers
API ' s for Dumping Headers
int dump_hdr_ta_3_x(void)
{
	int i;
	struct esbc_hdr_ta_3_x *hdr = (struct esbc_hdr_ta_3_x *)gd.hdr_struct;
	printf("\n-----------------------------------------------");
	printf("\n-\tDumping the Header Fields");
	printf("\n-----------------------------------------------");
	if (gd.iek_flag == 1) {
	printf("\n- IE FLAG = 1. No SRK/Public Key");
	printf("\n- \t IE Key Select : %x", hdr->ie_key_select);
	printf("\n- \t IE Key : %s(%x)", gd.pub_fname[0], gd.key_len);
	} else {
	printf("\n- SRK Information");
	printf("\n-\t SRK Offset : %x", hdr->srk_table_offset);
	printf("\n-\t Number of Keys : %x", hdr->num_keys);
	printf("\n-\t Key Select : %x", hdr->key_num_verify);
	printf("\n-\t Key List : ");
	for (i = 0; i < gd.num_srk_entries; i++) {
		printf("\n-\t\tKey%d %s(%x)", i + 1, gd.pub_fname[i],
				gd.key_table[i].key_len);
	}
	}
	printf("\n- UID Information");
	printf("\n-\t UID Flags = %02x", hdr->uid_flags);
	printf("\n-\t FSL UID = %08x_%08x",
			hdr->fsl_uid[0], hdr->fsl_uid[1]);
	for (i = 0; i < 5; i++)
		printf("\n-\t OEM UID%d = %08x", i, hdr->oem_uid[i]);
	printf("\n- FLAGS Information");
	printf("\n-\t MISC Flags = %02x", hdr->misc_flags);
	printf("\n- Image Information");
	printf("\n-\t %s (Size = %08x SRC = %08x_%08x) ",
		gd.entries[0].name, hdr->img_len,
		hdr->img_addr_h, hdr->img_addr_l);
	printf("\n- RSA Signature Information");
	printf("\n-\t RSA Offset : %x", hdr->psign);
	printf("\n-\t RSA Size : %x", hdr->sign_len);
	printf("\n-----------------------------------------------\n");
	return SUCCESS;
}
int dump_hdr_ta_3_x ( void ) { int i ; struct esbc_hdr_ta_3_x * hdr = ( struct esbc_hdr_ta_3_x * ) gd . hdr_struct ; printf ( " \n " ) ; printf ( " \n \t " ) ; printf ( " \n " ) ; if ( gd . iek_flag == 1 ) { printf ( " \n " ) ; printf ( " \n \t " , hdr -> ie_key_select ) ; printf ( " \n \t " , gd . pub_fname [ 0 ] , gd . key_len ) ; } else { printf ( " \n " ) ; printf ( " \n \t " , hdr -> srk_table_offset ) ; printf ( " \n \t " , hdr -> num_keys ) ; printf ( " \n \t " , hdr -> key_num_verify ) ; printf ( " \n \t " ) ; for ( i = 0 ; i < gd . num_srk_entries ; i ++ ) { printf ( " \n \t \t " , i + 1 , gd . pub_fname [ i ] , gd . key_table [ i ] . key_len ) ; } } printf ( " \n " ) ; printf ( " \n \t " , hdr -> uid_flags ) ; printf ( " \n \t " , hdr -> fsl_uid [ 0 ] , hdr -> fsl_uid [ 1 ] ) ; for ( i = 0 ; i < 5 ; i ++ ) printf ( " \n \t " , i , hdr -> oem_uid [ i ] ) ; printf ( " \n " ) ; printf ( " \n \t " , hdr -> misc_flags ) ; printf ( " \n " ) ; printf ( " \n \t " , gd . entries [ 0 ] . name , hdr -> img_len , hdr -> img_addr_h , hdr -> img_addr_l ) ; printf ( " \n " ) ; printf ( " \n \t " , hdr -> psign ) ; printf ( " \n \t " , hdr -> sign_len ) ; printf ( " \n \n " ) ; return SUCCESS ; }
API's for Dumping Headers
API ' s for Dumping Headers