1 // SPDX-License-Identifier: BSD-3-Clause 2 // 3 // Copyright(c) 2020 Intel Corporation. All rights reserved. 4 // 5 // Author: Karol Trzcinski <karolx.trzcinski@linux.intel.com> 6 7 /* 8 * Functions from this file is responsible for LDC file creation 9 */ 10 11 #ifndef __INCLUDE_LDC_H__ 12 #define __INCLUDE_LDC_H__ 13 14 #include <ipc/info.h> 15 16 #define SND_SOF_LOGS_SIG_SIZE 4 17 #define SND_SOF_LOGS_SIG "Logs" 18 19 #define SND_SOF_UIDS_SIG_SIZE 4 20 #define SND_SOF_UIDS_SIG "Uids" 21 22 /* 23 * Logs dictionary file header. 24 */ 25 struct snd_sof_logs_header { 26 unsigned char sig[SND_SOF_LOGS_SIG_SIZE]; /* "Logs" */ 27 uint32_t base_address; /* address of log entries section */ 28 uint32_t data_length; /* amount of bytes following this header */ 29 uint32_t data_offset; /* offset to first entry in this file */ 30 struct sof_ipc_fw_version version; 31 }; 32 33 struct snd_sof_uids_header { 34 unsigned char sig[SND_SOF_UIDS_SIG_SIZE]; /* "Uids" */ 35 uint32_t base_address; 36 uint32_t data_length; 37 uint32_t data_offset; 38 }; 39 40 struct image; 41 struct elf_module; 42 43 int write_dictionaries(struct image *image, const struct elf_module *src); 44 45 #endif /* __INCLUDE_LDC_H__ */ 46