blob: b8bd3e5dd59cbde96d43cf8b891d3a41b529fa08 [file] [log] [blame]
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef __INCLUDE_UAPI_SOUND_SOF_USER_MANIFEST_H__
20#define __INCLUDE_UAPI_SOUND_SOF_USER_MANIFEST_H__
21#define SOF_MAN_ELF_TEXT_OFFSET 0x2000
22#define SOF_MAN_EXT_HEADER_MAGIC 0x31454124
23#define SOF_MAN_MOD_TYPE_BUILTIN 0
24#define SOF_MAN_MOD_TYPE_MODULE 1
25struct sof_man_module_type {
26 uint32_t load_type : 4;
27 uint32_t auto_start : 1;
28 uint32_t domain_ll : 1;
29 uint32_t domain_dp : 1;
30 uint32_t rsvd_ : 25;
31};
32#define SOF_MAN_SEGMENT_TEXT 0
33#define SOF_MAN_SEGMENT_RODATA 1
34#define SOF_MAN_SEGMENT_DATA 1
35#define SOF_MAN_SEGMENT_BSS 2
36#define SOF_MAN_SEGMENT_EMPTY 15
37union sof_man_segment_flags {
38 uint32_t ul;
39 struct {
40 uint32_t contents : 1;
41 uint32_t alloc : 1;
42 uint32_t load : 1;
43 uint32_t readonly : 1;
44 uint32_t code : 1;
45 uint32_t data : 1;
46 uint32_t _rsvd0 : 2;
47 uint32_t type : 4;
48 uint32_t _rsvd1 : 4;
49 uint32_t length : 16;
50 } r;
51} __packed;
52struct sof_man_segment_desc {
53 union sof_man_segment_flags flags;
54 uint32_t v_base_addr;
55 uint32_t file_offset;
56} __packed;
57#define SOF_MAN_MOD_ID_LEN 4
58#define SOF_MAN_MOD_NAME_LEN 8
59#define SOF_MAN_MOD_SHA256_LEN 32
60#define SOF_MAN_MOD_ID { '$', 'A', 'M', 'E' }
61struct sof_man_module {
62 uint8_t struct_id[SOF_MAN_MOD_ID_LEN];
63 uint8_t name[SOF_MAN_MOD_NAME_LEN];
64 uint8_t uuid[16];
65 struct sof_man_module_type type;
66 uint8_t hash[SOF_MAN_MOD_SHA256_LEN];
67 uint32_t entry_point;
68 uint16_t cfg_offset;
69 uint16_t cfg_count;
70 uint32_t affinity_mask;
71 uint16_t instance_max_count;
72 uint16_t instance_bss_size;
73 struct sof_man_segment_desc segment[3];
74} __packed;
75struct sof_man_mod_config {
76 uint32_t par[4];
77 uint32_t is_pages;
78 uint32_t cps;
79 uint32_t ibs;
80 uint32_t obs;
81 uint32_t module_flags;
82 uint32_t cpc;
83 uint32_t obls;
84} __packed;
85#define SOF_MAN_FW_HDR_FW_NAME_LEN 8
86#define SOF_MAN_FW_HDR_ID { '$', 'A', 'M', '1' }
87#define SOF_MAN_FW_HDR_NAME "ADSPFW"
88#define SOF_MAN_FW_HDR_FLAGS 0x0
89#define SOF_MAN_FW_HDR_FEATURES 0xff
90struct sof_man_fw_header {
91 uint8_t header_id[4];
92 uint32_t header_len;
93 uint8_t name[SOF_MAN_FW_HDR_FW_NAME_LEN];
94 uint32_t preload_page_count;
95 uint32_t fw_image_flags;
96 uint32_t feature_mask;
97 uint16_t major_version;
98 uint16_t minor_version;
99 uint16_t hotfix_version;
100 uint16_t build_version;
101 uint32_t num_module_entries;
102 uint32_t hw_buf_base_addr;
103 uint32_t hw_buf_length;
104 uint32_t load_offset;
105} __packed;
106struct sof_man_fw_desc {
107 struct sof_man_fw_header header;
108} __packed;
109struct sof_man_component_desc {
110 uint32_t reserved[2];
111 uint32_t version;
112 uint8_t hash[SOF_MAN_MOD_SHA256_LEN];
113 uint32_t base_offset;
114 uint32_t limit_offset;
115 uint32_t attributes[4];
116} __packed;
117struct sof_man_adsp_meta_file_ext {
118 uint32_t ext_type;
119 uint32_t ext_len;
120 uint32_t imr_type;
121 uint8_t reserved[16];
122 struct sof_man_component_desc comp_desc[1];
123} __packed;
124struct sof_man_module_manifest {
125 struct sof_man_module module;
126 uint32_t text_size;
127} __packed;
128#endif