forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathext_manifest.c
More file actions
105 lines (98 loc) · 3.2 KB
/
ext_manifest.c
File metadata and controls
105 lines (98 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright(c) 2020 Intel Corporation. All rights reserved.
//
// Author: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
//
#include <rtos/bit.h>
#include <sof/common.h>
#include <sof/compiler_info.h>
#include <sof/debug/debug.h>
#include <kernel/abi.h>
#include <kernel/ext_manifest.h>
#include <user/abi_dbg.h>
#include <sof_versions.h>
const struct ext_man_fw_version ext_man_fw_ver
__aligned(EXT_MAN_ALIGN) __section(".fw_metadata") = {
.hdr.type = EXT_MAN_ELEM_FW_VERSION,
.hdr.elem_size = ALIGN_UP_COMPILE(sizeof(struct ext_man_fw_version),
EXT_MAN_ALIGN),
.version = {
.hdr.size = sizeof(struct sof_ipc_fw_version),
.micro = SOF_MICRO,
.minor = SOF_MINOR,
.major = SOF_MAJOR,
/* opt-in; reproducible build by default */
#if BLD_COUNTERS
.build = SOF_BUILD,
.date = __DATE__,
.time = __TIME__,
#else
.build = -1,
.date = "dtermin.\0",
.time = "extman\0",
#endif
.tag = SOF_TAG,
.abi_version = SOF_ABI_VERSION,
.src_hash = SOF_SRC_HASH,
},
.flags = DEBUG_SET_FW_READY_FLAGS,
};
const struct ext_man_cc_version ext_man_cc_ver
__aligned(EXT_MAN_ALIGN) __section(".fw_metadata") = {
.hdr.type = EXT_MAN_ELEM_CC_VERSION,
.hdr.elem_size = ALIGN_UP_COMPILE(sizeof(struct ext_man_cc_version),
EXT_MAN_ALIGN),
.cc_version = {
.ext_hdr.hdr.size = sizeof(struct sof_ipc_cc_version),
.ext_hdr.hdr.cmd = SOF_IPC_FW_READY,
.ext_hdr.type = SOF_IPC_EXT_CC_INFO,
.micro = CC_MICRO,
.minor = CC_MINOR,
.major = CC_MAJOR,
.name = CC_NAME "\0", ///< eg. "XCC", "\0" is needed when
///< sizeof(CC_NAME)-1 == sizeof(.name)
.optim = CC_OPTIMIZE_FLAGS "\0", ///< eg. "O2"
.desc = CC_DESC "\0", ///< eg. " RG-2017.8-linux"
},
};
const struct ext_man_probe_support ext_man_probe
__aligned(EXT_MAN_ALIGN) __section(".fw_metadata") = {
.hdr.type = EXT_MAN_ELEM_PROBE_INFO,
.hdr.elem_size = ALIGN_UP_COMPILE(sizeof(struct ext_man_probe_support),
EXT_MAN_ALIGN),
.probe = {
.ext_hdr.hdr.size = sizeof(struct sof_ipc_probe_support),
.ext_hdr.hdr.cmd = SOF_IPC_FW_READY,
.ext_hdr.type = SOF_IPC_EXT_PROBE_INFO,
#if CONFIG_PROBE
.probe_points_max = CONFIG_PROBE_POINTS_MAX,
.injection_dmas_max = CONFIG_PROBE_DMA_MAX
#endif
},
};
const struct ext_man_dbg_abi ext_man_dbg_info
__aligned(EXT_MAN_ALIGN) __section(".fw_metadata") = {
.hdr.type = EXT_MAN_ELEM_DBG_ABI,
.hdr.elem_size = ALIGN_UP_COMPILE(sizeof(struct ext_man_dbg_abi),
EXT_MAN_ALIGN),
.dbg_abi = {
.ext_hdr.hdr.size = sizeof(struct sof_ipc_user_abi_version),
.ext_hdr.hdr.cmd = SOF_IPC_FW_READY,
.ext_hdr.type = SOF_IPC_EXT_USER_ABI_INFO,
.abi_dbg_version = SOF_ABI_DBG_VERSION,
},
};
/* increment this value after adding any element to ext_man_config dictionary */
#define CONFIG_ELEM_CNT (EXT_MAN_CONFIG_LAST_ELEM - 1)
const struct ext_man_config_data ext_man_config
__aligned(EXT_MAN_ALIGN) __section(".fw_metadata") = {
.hdr.type = EXT_MAN_ELEM_CONFIG_DATA,
.hdr.elem_size = ALIGN_UP_COMPILE(sizeof(struct ext_man_config_data) +
sizeof(struct config_elem) * CONFIG_ELEM_CNT,
EXT_MAN_ALIGN),
.elems = {
{EXT_MAN_CONFIG_IPC_MSG_SIZE, SOF_IPC_MSG_MAX_SIZE},
{EXT_MAN_CONFIG_MEMORY_USAGE_SCAN, IS_ENABLED(CONFIG_DEBUG_MEMORY_USAGE_SCAN)},
},
};