1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
6 * Copyright(c) 2022 Intel Corporation
10 * Extended manifest is a place to store metadata about firmware, known during
11 * compilation time - for example firmware version or used compiler.
12 * Given information are read on host side before firmware startup.
13 * This part of output binary is not signed.
16 #ifndef __SOF_FIRMWARE_EXT_MANIFEST4_H__
17 #define __SOF_FIRMWARE_EXT_MANIFEST4_H__
19 #include <linux/uuid.h>
22 #define SOF_EXT_MAN4_MAGIC_NUMBER 0x31454124
24 #define MAX_MODULE_NAME_LEN 8
25 #define MAX_FW_BINARY_NAME 8
26 #define DEFAULT_HASH_SHA256_LEN 32
27 #define SOF_MAN4_FW_HDR_OFFSET 0x2000
28 #define SOF_MAN4_FW_HDR_OFFSET_CAVS_1_5 0x284
30 /*********************************************************************
31 * extended manifest (struct sof_ext_manifest4_hdr)
35 * offset reserved for future
37 * fw_hdr (struct sof_man4_fw_binary_header)
39 * module_entry[0] (struct sof_man4_module)
47 * module_config[0] (struct sof_man4_module_config)
57 *********************************************************************/
59 struct sof_ext_manifest4_hdr
{
61 uint32_t len
; /* length of extension manifest */
62 uint16_t version_major
; /* header version */
63 uint16_t version_minor
;
64 uint32_t num_module_entries
;
67 struct sof_man4_fw_binary_header
{
68 /* This part must be unchanged to be backward compatible with SPT-LP ROM */
70 uint32_t len
; /* sizeof(sof_man4_fw_binary_header) in bytes */
71 uint8_t name
[MAX_FW_BINARY_NAME
];
72 uint32_t preload_page_count
; /* number of pages of preloaded image */
73 uint32_t fw_image_flags
;
74 uint32_t feature_mask
;
75 uint16_t major_version
; /* Firmware version */
76 uint16_t minor_version
;
77 uint16_t hotfix_version
;
78 uint16_t build_version
;
79 uint32_t num_module_entries
;
81 /* This part may change to contain any additional data for BaseFw that is skipped by ROM */
82 uint32_t hw_buf_base_addr
;
83 uint32_t hw_buf_length
;
84 uint32_t load_offset
; /* This value is used by ROM */
87 struct sof_man4_segment_desc
{
93 struct sof_man4_module
{
95 uint8_t name
[MAX_MODULE_NAME_LEN
];
98 uint8_t hash
[DEFAULT_HASH_SHA256_LEN
];
102 uint32_t affinity_mask
;
103 uint16_t instance_max_count
;
104 uint16_t instance_stack_size
;
105 struct sof_man4_segment_desc segments
[3];
108 struct sof_man4_module_config
{
109 uint32_t par
[4]; /* module parameters */
110 uint32_t is_bytes
; /* actual size of instance .bss (bytes) */
111 uint32_t cps
; /* cycles per second */
112 uint32_t ibs
; /* input buffer size (bytes) */
113 uint32_t obs
; /* output buffer size (bytes) */
114 uint32_t module_flags
; /* flags, reserved for future use */
115 uint32_t cpc
; /* cycles per single run */
116 uint32_t obls
; /* output block size, reserved for future use */
119 #endif /* __SOF_FIRMWARE_EXT_MANIFEST4_H__ */