manifest: add v2.5 definitions

New version of manifest introduced with TGL platform
uses SHA384 for component hash.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
This commit is contained in:
Janusz Jankowski 2019-09-30 18:43:18 +02:00 committed by Daniel Leung
parent 009cd503aa
commit b0d68a6bc6
6 changed files with 17 additions and 17 deletions

View File

@ -13,7 +13,7 @@
void ri_cse_create(struct image *image)
{
struct CsePartitionDirHeader *cse_hdr = image->fw_image;
struct sof_man_adsp_meta_file_ext *meta = image->fw_image +
struct sof_man_adsp_meta_file_ext_v1_8 *meta = image->fw_image +
MAN_META_EXT_OFFSET_V1_8;
struct CsePartitionDirEntry *cse_entry =
image->fw_image + sizeof(*cse_hdr);

View File

@ -31,7 +31,7 @@ struct fw_image_manifest_v1_8 apl_manifest = {
{ /* ADSPMetadataFileExtension */
.entry_name = "cavs0015.met",
.offset = MAN_META_EXT_OFFSET_V1_8,
.length = sizeof(struct sof_man_adsp_meta_file_ext),
.length = sizeof(struct sof_man_adsp_meta_file_ext_v1_8),
},
{ /* AdspFwBinaryDesc */
.entry_name = "cavs0015",
@ -98,7 +98,7 @@ struct fw_image_manifest_v1_8 apl_manifest = {
.adsp_file_ext = {
.ext_type = 17,
.ext_len = sizeof(struct sof_man_adsp_meta_file_ext),
.ext_len = sizeof(struct sof_man_adsp_meta_file_ext_v1_8),
.comp_desc[0] = {
.version = 0,
.base_offset = MAN_DESC_OFFSET_V1_8,

View File

@ -30,7 +30,7 @@ struct fw_image_manifest_v1_8 cnl_manifest = {
{ /* ADSPMetadataFileExtension */
.entry_name = "cavs0015.met",
.offset = MAN_META_EXT_OFFSET_V1_8,
.length = sizeof(struct sof_man_adsp_meta_file_ext),
.length = sizeof(struct sof_man_adsp_meta_file_ext_v1_8),
},
{ /* AdspFwBinaryDesc */
.entry_name = "cavs0015",
@ -97,7 +97,7 @@ struct fw_image_manifest_v1_8 cnl_manifest = {
.adsp_file_ext = {
.ext_type = 17,
.ext_len = sizeof(struct sof_man_adsp_meta_file_ext),
.ext_len = sizeof(struct sof_man_adsp_meta_file_ext_v1_8),
.comp_desc[0] = {
.version = 0,
.base_offset = MAN_DESC_OFFSET_V1_8,

View File

@ -578,7 +578,7 @@ static int man_write_unsigned_mod(struct image *image, int meta_start_offset,
/* write metadata file for unsigned FW */
count = fwrite(image->fw_image + meta_start_offset,
sizeof(struct sof_man_adsp_meta_file_ext), 1,
sizeof(struct sof_man_adsp_meta_file_ext_v1_8), 1,
image->out_man_fd);
/* did the metadata/manifest write succeed ? */
@ -880,7 +880,7 @@ static int man_write_fw_v1_8(struct image *image)
/* calculate hash for platform auth data - repeated in hash 2 and 4 */
ri_hash(image, MAN_META_EXT_OFFSET_V1_8,
sizeof(struct sof_man_adsp_meta_file_ext), hash);
sizeof(struct sof_man_adsp_meta_file_ext_v1_8), hash);
/* hash values in reverse order */
for (i = 0; i < SOF_MAN_MOD_SHA256_LEN; i++) {
@ -920,8 +920,8 @@ err:
static int man_write_fw_meu_v1_5(struct image *image)
{
const int meta_start_offset = image->meu_offset -
sizeof(struct sof_man_adsp_meta_file_ext) - MAN_EXT_PADDING;
struct sof_man_adsp_meta_file_ext *meta;
sizeof(struct sof_man_adsp_meta_file_ext_v1_8) - MAN_EXT_PADDING;
struct sof_man_adsp_meta_file_ext_v1_8 *meta;
struct sof_man_fw_desc *desc;
uint32_t preload_size;
int ret;
@ -991,8 +991,8 @@ err:
static int man_write_fw_meu_v1_8(struct image *image)
{
const int meta_start_offset = image->meu_offset -
sizeof(struct sof_man_adsp_meta_file_ext) - MAN_EXT_PADDING;
struct sof_man_adsp_meta_file_ext *meta;
sizeof(struct sof_man_adsp_meta_file_ext_v1_8) - MAN_EXT_PADDING;
struct sof_man_adsp_meta_file_ext_v1_8 *meta;
struct sof_man_fw_desc *desc;
uint32_t preload_size;
int ret;
@ -1020,7 +1020,7 @@ static int man_write_fw_meu_v1_8(struct image *image)
/* copy data */
memcpy(meta, &image->adsp->man_v1_8->adsp_file_ext,
sizeof(struct sof_man_adsp_meta_file_ext));
sizeof(struct sof_man_adsp_meta_file_ext_v1_8));
memcpy(desc, &image->adsp->man_v1_8->desc,
sizeof(struct sof_man_fw_desc));

View File

@ -57,7 +57,7 @@
#define MAN_FW_DESC_OFFSET_V1_8 \
(MAN_META_EXT_OFFSET_V1_8 + \
sizeof(struct sof_man_adsp_meta_file_ext) + \
sizeof(struct sof_man_adsp_meta_file_ext_v1_8) + \
MAN_EXT_PADDING)
#define MAN_DESC_PADDING_SIZE_V1_8 \
@ -75,7 +75,7 @@
#define MAN_FW_DESC_OFFSET_V1_5 \
(MAN_META_EXT_OFFSET_V1_5 + \
sizeof(struct sof_man_adsp_meta_file_ext) + \
sizeof(struct sof_man_adsp_meta_file_ext_v1_8) + \
MAN_EXT_PADDING)
/*
@ -89,7 +89,7 @@ struct fw_image_manifest_v1_8 {
struct signed_pkg_info_ext signed_pkg;
struct partition_info_ext partition_info;
uint8_t cse_padding[MAN_CSE_PADDING_SIZE];
struct sof_man_adsp_meta_file_ext adsp_file_ext;
struct sof_man_adsp_meta_file_ext_v1_8 adsp_file_ext;
/* reserved / pading at end of ext data - all 0s*/
uint8_t reserved[MAN_EXT_PADDING];

View File

@ -12,7 +12,7 @@
void ri_adsp_meta_data_create(struct image *image, int meta_start_offset,
int meta_end_offset)
{
struct sof_man_adsp_meta_file_ext *meta =
struct sof_man_adsp_meta_file_ext_v1_8 *meta =
image->fw_image + meta_start_offset;
fprintf(stdout, " meta: completing ADSP manifest\n");
@ -29,7 +29,7 @@ void ri_plat_ext_data_create(struct image *image)
{
struct partition_info_ext *part = image->fw_image
+ MAN_PART_INFO_OFFSET_V1_8;
struct sof_man_adsp_meta_file_ext *meta =
struct sof_man_adsp_meta_file_ext_v1_8 *meta =
image->fw_image + MAN_META_EXT_OFFSET_V1_8;
struct sof_man_fw_desc *desc = image->fw_image + MAN_DESC_OFFSET_V1_8;