Skip to content

Commit 5966965

Browse files
committed
rimage
1 parent 5028f40 commit 5966965

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

tools/rimage/src/adsp_config.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1910,7 +1910,7 @@ static int parse_module(const toml_table_t *toml, struct parse_ctx *pctx,
19101910
if (ret < 0)
19111911
return err_key_parse("uuid", NULL);
19121912

1913-
parse_uuid(buf, mod_man->uuid);
1913+
parse_uuid(buf, &mod_man->uuid);
19141914

19151915
mod_man->affinity_mask = parse_uint32_hex_key(mod_entry, &ctx_entry,
19161916
"affinity_mask", 1, &ret);
@@ -1952,7 +1952,7 @@ static int parse_module(const toml_table_t *toml, struct parse_ctx *pctx,
19521952
header->version_major = 2;
19531953
header->version_minor = 5;
19541954
header->ext_module_config_length = sizeof(struct fw_ext_mod_config_header);
1955-
memcpy(header->guid, mod_man->uuid, sizeof(mod_man->uuid));
1955+
memcpy(header->guid, &mod_man->uuid, sizeof(mod_man->uuid));
19561956

19571957
type = parse_uint32_hex_key(mod_entry, &ctx_entry, "module_type", 1, &ret);
19581958
if (ret < 0)

tools/rimage/src/include/rimage/sof/user/manifest.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,21 @@ struct sof_man_segment_desc {
8686
#define SOF_MAN_MOD_SHA384_LEN 48
8787
#define SOF_MAN_MOD_ID {'$', 'A', 'M', 'E'}
8888

89+
struct sof_man_uuid {
90+
uint32_t a;
91+
uint16_t b;
92+
uint16_t c;
93+
uint8_t d[8];
94+
};
95+
8996
/*
9097
* Each module has an entry in the FW header. Used by ROM - Immutable.
9198
*/
9299
struct sof_man_module {
93100
uint8_t struct_id[SOF_MAN_MOD_ID_LEN]; /* SOF_MAN_MOD_ID */
94101
uint8_t name[SOF_MAN_MOD_NAME_LEN];
95-
uint8_t uuid[16];
102+
//uint8_t uuid[16];
103+
struct sof_man_uuid uuid;
96104
struct sof_man_module_type type;
97105
uint8_t hash[SOF_MAN_MOD_SHA256_LEN];
98106
uint32_t entry_point;

tools/rimage/src/manifest.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ static void man_get_section_manifest(struct image *image,
205205
memcpy(man_module->struct_id, "$AME", 4);
206206
man_module->entry_point = sof_mod->module.entry_point;
207207
memcpy(man_module->name, sof_mod->module.name, SOF_MAN_MOD_NAME_LEN);
208-
memcpy(man_module->uuid, sof_mod->module.uuid, 16);
208+
memcpy(&man_module->uuid, &sof_mod->module.uuid, sizeof(man_module->uuid));
209209
man_module->affinity_mask = sof_mod->module.affinity_mask;
210210
man_module->instance_max_count = sof_mod->module.instance_max_count;
211211
man_module->type.auto_start = sof_mod->module.type.auto_start;

0 commit comments

Comments
 (0)