Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/include/ipc/info.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ struct sof_ipc_window_elem {
struct sof_ipc_window {
struct sof_ipc_ext_data_hdr ext_hdr;
uint32_t num_windows;
struct sof_ipc_window_elem window[];
struct sof_ipc_window_elem window[SOF_IPC_MAX_ELEMS];
} __attribute__((packed));

/* extended data, compiler version */
Expand Down
2 changes: 1 addition & 1 deletion src/include/kernel/abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

/** \brief SOF ABI version major, minor and patch numbers */
#define SOF_ABI_MAJOR 3
#define SOF_ABI_MINOR 16
#define SOF_ABI_MINOR 17
#define SOF_ABI_PATCH 0

/** \brief SOF ABI version number. Format within 32bit word is MMmmmppp */
Expand Down
17 changes: 17 additions & 0 deletions src/include/kernel/ext_manifest.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,22 @@
#include <rimage/sof/kernel/ext_manifest.h>
#include <stdint.h>

/* Macro used to creeate copy of some structure in extended manifest */
#define EXT_MAN_PORT(XENUM, XSIZE, IPC_ELEM, XNAME, IPC_NAME, CONTENT) \
XNAME __aligned(EXT_MAN_ALIGN) __section(".fw_metadata") \
__attribute__ ((unused)) = { \
.hdr.type = XENUM, \
.hdr.elem_size = ALIGN_UP(XSIZE, EXT_MAN_ALIGN), \
.IPC_ELEM = { CONTENT } \
}; \
IPC_NAME = { CONTENT }

/* Now define extended manifest elements */

/* Extended manifest elements identificators */
enum ext_man_elem_type {
EXT_MAN_ELEM_FW_VERSION = 0,
EXT_MAN_ELEM_WINDOW = SOF_IPC_EXT_WINDOW,
EXT_MAN_ELEM_CC_VERSION = SOF_IPC_EXT_CC_INFO,
EXT_MAN_ELEM_PROBE_INFO = SOF_IPC_EXT_PROBE_INFO,
};
Expand All @@ -50,6 +60,13 @@ struct ext_man_fw_version {
uint32_t flags;
} __packed;

/* windows info */
struct ext_man_windows {
struct ext_man_elem_header hdr;
/* use sof_ipc struct because of code re-use */
struct sof_ipc_window window;
} __packed;

/* Used C compiler description */
struct ext_man_cc_version {
struct ext_man_elem_header hdr;
Expand Down
16 changes: 11 additions & 5 deletions src/platform/baytrail/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,18 @@ static const struct sof_ipc_fw_ready ready
};

#define NUM_BYT_WINDOWS 6
static const struct sof_ipc_window sram_window
__section(".fw_ready_metadata") = {

EXT_MAN_PORT(
EXT_MAN_ELEM_WINDOW,
sizeof(struct ext_man_windows),
window,
static const struct ext_man_windows xsram_window,
static const struct sof_ipc_window sram_window
__section(".fw_ready_metadata"),
_META_EXPAND(
.ext_hdr = {
.hdr.cmd = SOF_IPC_FW_READY,
.hdr.size = sizeof(struct sof_ipc_window) +
sizeof(struct sof_ipc_window_elem) * NUM_BYT_WINDOWS,
.hdr.size = sizeof(struct sof_ipc_window),
.type = SOF_IPC_EXT_WINDOW,
},
.num_windows = NUM_BYT_WINDOWS,
Expand Down Expand Up @@ -130,7 +136,7 @@ static const struct sof_ipc_window sram_window
.offset = MAILBOX_EXCEPTION_OFFSET,
},
},
};
));

SHARED_DATA struct timer timer = {
.id = TIMER3, /* external timer */
Expand Down
17 changes: 12 additions & 5 deletions src/platform/haswell/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <ipc/header.h>
#include <ipc/info.h>
#include <kernel/abi.h>
#include <kernel/ext_manifest.h>
#include <version.h>
#include <errno.h>
#include <stddef.h>
Expand Down Expand Up @@ -62,12 +63,18 @@ static const struct sof_ipc_fw_ready ready
};

#define NUM_HSW_WINDOWS 6
static const struct sof_ipc_window sram_window
__section(".fw_ready_metadata") = {

EXT_MAN_PORT(
EXT_MAN_ELEM_WINDOW,
sizeof(struct ext_man_windows),
window,
static const struct ext_man_windows xsram_window,
static const struct sof_ipc_window sram_window
__section(".fw_ready_metadata"),
_META_EXPAND(
.ext_hdr = {
.hdr.cmd = SOF_IPC_FW_READY,
.hdr.size = sizeof(struct sof_ipc_window) +
sizeof(struct sof_ipc_window_elem) * NUM_HSW_WINDOWS,
.hdr.size = sizeof(struct sof_ipc_window),
.type = SOF_IPC_EXT_WINDOW,
},
.num_windows = NUM_HSW_WINDOWS,
Expand Down Expand Up @@ -115,7 +122,7 @@ static const struct sof_ipc_window sram_window
.offset = MAILBOX_EXCEPTION_OFFSET,
},
},
};
));

SHARED_DATA struct timer timer = {
.id = TIMER1, /* internal timer */
Expand Down
16 changes: 11 additions & 5 deletions src/platform/imx8/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <ipc/header.h>
#include <ipc/info.h>
#include <kernel/abi.h>
#include <kernel/ext_manifest.h>
#include <version.h>
#include <errno.h>
#include <stdint.h>
Expand Down Expand Up @@ -62,12 +63,17 @@ static const struct sof_ipc_fw_ready ready

#define NUM_IMX_WINDOWS 6

static const struct sof_ipc_window sram_window
__section(".fw_ready_metadata") = {
EXT_MAN_PORT(
EXT_MAN_ELEM_WINDOW,
sizeof(struct ext_man_windows),
window,
static const struct ext_man_windows xsram_window,
static const struct sof_ipc_window sram_window
__section(".fw_ready_metadata"),
_META_EXPAND(
.ext_hdr = {
.hdr.cmd = SOF_IPC_FW_READY,
.hdr.size = sizeof(struct sof_ipc_window) +
sizeof(struct sof_ipc_window_elem) * NUM_IMX_WINDOWS,
.hdr.size = sizeof(struct sof_ipc_window),
.type = SOF_IPC_EXT_WINDOW,
},
.num_windows = NUM_IMX_WINDOWS,
Expand Down Expand Up @@ -115,7 +121,7 @@ static const struct sof_ipc_window sram_window
.offset = MAILBOX_EXCEPTION_OFFSET,
},
},
};
));

SHARED_DATA struct timer timer = {
.id = TIMER0, /* internal timer */
Expand Down
16 changes: 11 additions & 5 deletions src/platform/imx8m/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <ipc/header.h>
#include <ipc/info.h>
#include <kernel/abi.h>
#include <kernel/ext_manifest.h>
#include <version.h>
#include <errno.h>
#include <stdint.h>
Expand Down Expand Up @@ -61,12 +62,17 @@ static const struct sof_ipc_fw_ready ready

#define NUM_IMX_WINDOWS 6

static const struct sof_ipc_window sram_window
__section(".fw_ready_metadata") = {
EXT_MAN_PORT(
EXT_MAN_ELEM_WINDOW,
sizeof(struct ext_man_windows),
window,
static const struct ext_man_windows xsram_window,
static const struct sof_ipc_window sram_window
__section(".fw_ready_metadata"),
_META_EXPAND(
.ext_hdr = {
.hdr.cmd = SOF_IPC_FW_READY,
.hdr.size = sizeof(struct sof_ipc_window) +
sizeof(struct sof_ipc_window_elem) * NUM_IMX_WINDOWS,
.hdr.size = sizeof(struct sof_ipc_window),
.type = SOF_IPC_EXT_WINDOW,
},
.num_windows = NUM_IMX_WINDOWS,
Expand Down Expand Up @@ -114,7 +120,7 @@ static const struct sof_ipc_window sram_window
.offset = MAILBOX_EXCEPTION_OFFSET,
},
},
};
));

SHARED_DATA struct timer timer = {
.id = TIMER0, /* internal timer */
Expand Down
16 changes: 11 additions & 5 deletions src/platform/intel/cavs/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <ipc/header.h>
#include <ipc/info.h>
#include <kernel/abi.h>
#include <kernel/ext_manifest.h>
#include <config.h>
#include <version.h>
#include <errno.h>
Expand Down Expand Up @@ -76,12 +77,17 @@ static const struct sof_ipc_fw_ready ready

#define NUM_WINDOWS 7

static const struct sof_ipc_window sram_window
__section(".fw_ready_metadata") = {
EXT_MAN_PORT(
EXT_MAN_ELEM_WINDOW,
sizeof(struct ext_man_windows),
window,
static const struct ext_man_windows xsram_window,
static const struct sof_ipc_window sram_window
__section(".fw_ready_metadata"),
_META_EXPAND(
.ext_hdr = {
.hdr.cmd = SOF_IPC_FW_READY,
.hdr.size = sizeof(struct sof_ipc_window) +
sizeof(struct sof_ipc_window_elem) * NUM_WINDOWS,
.hdr.size = sizeof(struct sof_ipc_window),
.type = SOF_IPC_EXT_WINDOW,
},
.num_windows = NUM_WINDOWS,
Expand Down Expand Up @@ -136,7 +142,7 @@ static const struct sof_ipc_window sram_window
.offset = 0,
},
},
};
));
#endif

#if CONFIG_CANNONLAKE || CONFIG_ICELAKE || CONFIG_TIGERLAKE
Expand Down