Skip to content

Commit db12b2c

Browse files
committed
boot metadata: Move mem window and cc version info to .fw_ready section.
Move extended boot metadata structures to compile-time section .fw_ready_metadata which is appended to .fw_ready section of binary. Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
1 parent 19b9c3d commit db12b2c

File tree

8 files changed

+14
-8
lines changed

8 files changed

+14
-8
lines changed

src/include/ipc/info.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,4 @@ struct sof_ipc_probe_support {
151151
uint32_t reserved[2];
152152
} __attribute__((packed));
153153

154-
extern const struct sof_ipc_cc_version cc_version;
155-
156154
#endif /* __IPC_INFO_H__ */

src/include/sof/fw-ready-metadata.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <ipc/info.h>
1212

13+
extern const struct sof_ipc_cc_version cc_version;
1314
extern const struct sof_ipc_probe_support probe_support;
1415

1516
#endif /* __IPC_FW_READY_METADATA_H__ */

src/ipc/cc_version.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// Author: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
66

77
#include <ipc/info.h>
8+
#include <sof/fw-ready-metadata.h>
89
#include <sof/common.h>
910
#include <sof/compiler_info.h>
1011

@@ -18,7 +19,8 @@
1819
field = CC_OPTIMIZE_FLAGS, \
1920
field[ARRAY_SIZE(((struct sof_ipc_cc_version *)(0))->optim) - 1] = 0
2021

21-
const struct sof_ipc_cc_version cc_version = {
22+
const struct sof_ipc_cc_version cc_version
23+
__attribute__((section(".fw_ready_metadata"))) = {
2224
.ext_hdr = {
2325
.hdr.cmd = SOF_IPC_FW_READY,
2426
.hdr.size = sizeof(struct sof_ipc_cc_version)

src/platform/baytrail/platform.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ static const struct sof_ipc_fw_ready ready
6666
};
6767

6868
#define NUM_BYT_WINDOWS 6
69-
static const struct sof_ipc_window sram_window = {
69+
static const struct sof_ipc_window sram_window
70+
__attribute__((section(".fw_ready_metadata"))) = {
7071
.ext_hdr = {
7172
.hdr.cmd = SOF_IPC_FW_READY,
7273
.hdr.size = sizeof(struct sof_ipc_window) +

src/platform/haswell/platform.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ static const struct sof_ipc_fw_ready ready
6262
};
6363

6464
#define NUM_HSW_WINDOWS 6
65-
static const struct sof_ipc_window sram_window = {
65+
static const struct sof_ipc_window sram_window
66+
__attribute__((section(".fw_ready_metadata"))) = {
6667
.ext_hdr = {
6768
.hdr.cmd = SOF_IPC_FW_READY,
6869
.hdr.size = sizeof(struct sof_ipc_window) +

src/platform/imx8/platform.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ static const struct sof_ipc_fw_ready ready
6161

6262
#define NUM_IMX_WINDOWS 6
6363

64-
static const struct sof_ipc_window sram_window = {
64+
static const struct sof_ipc_window sram_window
65+
__attribute__((section(".fw_ready_metadata"))) = {
6566
.ext_hdr = {
6667
.hdr.cmd = SOF_IPC_FW_READY,
6768
.hdr.size = sizeof(struct sof_ipc_window) +

src/platform/imx8m/platform.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ static const struct sof_ipc_fw_ready ready
6060

6161
#define NUM_IMX_WINDOWS 6
6262

63-
static const struct sof_ipc_window sram_window = {
63+
static const struct sof_ipc_window sram_window
64+
__attribute__((section(".fw_ready_metadata"))) = {
6465
.ext_hdr = {
6566
.hdr.cmd = SOF_IPC_FW_READY,
6667
.hdr.size = sizeof(struct sof_ipc_window) +

src/platform/intel/cavs/platform.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ static const struct sof_ipc_fw_ready ready
7676

7777
#define NUM_WINDOWS 7
7878

79-
static const struct sof_ipc_window sram_window = {
79+
static const struct sof_ipc_window sram_window
80+
__attribute__((section(".fw_ready_metadata"))) = {
8081
.ext_hdr = {
8182
.hdr.cmd = SOF_IPC_FW_READY,
8283
.hdr.size = sizeof(struct sof_ipc_window) +

0 commit comments

Comments
 (0)