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
20 changes: 20 additions & 0 deletions src/include/kernel/ext_manifest.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,21 @@ enum ext_man_elem_type {
EXT_MAN_ELEM_CC_VERSION = SOF_IPC_EXT_CC_INFO,
EXT_MAN_ELEM_PROBE_INFO = SOF_IPC_EXT_PROBE_INFO,
EXT_MAN_ELEM_DBG_ABI = SOF_IPC_EXT_USER_ABI_INFO,
EXT_MAN_ELEM_CONFIG_DATA = 5,
EXT_MAN_ELEM_PLATFORM_CONFIG_DATA = 6,
};

/* EXT_MAN_ELEM_CONFIG_DATA elements identificators */
enum config_elem_type {
EXT_MAN_CONFIG_IPC_MSG_SIZE = 1,
EXT_MAN_CONFIG_LAST_ELEM, /**< keep it at the end of enum list */
};

struct config_elem {
uint32_t token;
uint32_t value;
} __packed;

/* FW version */
struct ext_man_fw_version {
struct ext_man_elem_header hdr;
Expand Down Expand Up @@ -87,4 +100,11 @@ struct ext_man_dbg_abi {
struct sof_ipc_user_abi_version dbg_abi;
} __packed;

/* EXT_MAN_ELEM_CONFIG_DATA elements */
struct ext_man_config_data {
struct ext_man_elem_header hdr;

struct config_elem elems[EXT_MAN_CONFIG_LAST_ELEM];
} __packed;

#endif /* __KERNEL_EXT_MANIFEST_H__ */
10 changes: 10 additions & 0 deletions src/init/ext_manifest.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,13 @@ const struct ext_man_dbg_abi ext_man_dbg_info
.abi_dbg_version = SOF_ABI_DBG_VERSION,
},
};

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(sizeof(struct ext_man_config_data),
EXT_MAN_ALIGN),
.elems = {
{EXT_MAN_CONFIG_IPC_MSG_SIZE, SOF_IPC_MSG_MAX_SIZE},
},
};
7 changes: 7 additions & 0 deletions src/platform/intel/cavs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,10 @@ endif()
add_local_sources(sof platform.c)

target_include_directories(sof_options INTERFACE ${PROJECT_SOURCE_DIR}/src/platform/intel/cavs/include)

add_library(cavs_ext_manifest STATIC "")
add_local_sources(cavs_ext_manifest ext_manifest.c)
sof_append_relative_path_definitions(cavs_ext_manifest)

target_link_libraries(cavs_ext_manifest sof_options)
target_link_libraries(sof_static_libraries INTERFACE cavs_ext_manifest)
25 changes: 25 additions & 0 deletions src/platform/intel/cavs/ext_manifest.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright(c) 2020 Intel Corporation. All rights reserved.
//
// Author: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
//

#include <cavs/ext_manifest.h>
#include <kernel/ext_manifest.h>
#include <sof/common.h>
#include <sof/lib/memory.h>

const struct ext_man_cavs_config_data ext_man_cavs_config
__aligned(EXT_MAN_ALIGN) __section(".fw_metadata") = {
.hdr.type = EXT_MAN_ELEM_PLATFORM_CONFIG_DATA,
.hdr.elem_size = ALIGN_UP(sizeof(struct ext_man_cavs_config_data),
EXT_MAN_ALIGN),
.elems = {
#if CONFIG_CAVS_LPRO
{EXT_MAN_CAVS_CONFIG_LPRO, CONFIG_CAVS_LPRO},
#endif
{EXT_MAN_CAVS_CONFIG_OUTBOX_SIZE, SRAM_OUTBOX_SIZE},
{EXT_MAN_CAVS_CONFIG_INBOX_SIZE, SRAM_INBOX_SIZE},
},
};
28 changes: 28 additions & 0 deletions src/platform/intel/cavs/include/cavs/ext_manifest.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2020 Intel Corporation. All rights reserved.
*
* Author: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
*/

#ifndef __CAVS_EXT_MANIFEST_H__
#define __CAVS_EXT_MANIFEST_H__

#include <kernel/ext_manifest.h>

/* EXT_MAN_ELEM_PLATFORM_CONFIG_DATA elements identificators */
enum cavs_config_elem_type {
EXT_MAN_CAVS_CONFIG_LPRO = 1,
EXT_MAN_CAVS_CONFIG_OUTBOX_SIZE,
EXT_MAN_CAVS_CONFIG_INBOX_SIZE,
EXT_MAN_CAVS_CONFIG_LAST_ELEM, /**< keep it at the end of enum list */
};

/* EXT_MAN_ELEM_PLATFORM_CONFIG_DATA elements */
struct ext_man_cavs_config_data {
struct ext_man_elem_header hdr;

struct config_elem elems[EXT_MAN_CAVS_CONFIG_LAST_ELEM];
} __packed;

#endif /* __KERNEL_EXT_MANIFEST_H__ */