PDK API Guide for AM64x
ipc_rsctypes.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2020, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
42 /*
43  * \file ipc_rsctypes.h
44  *
45  * \brief Include common definitions for sizes and type of resources
46  * used by the the resource table in each base image, which is
47  * read from remoteproc on host side.
48  *
49  */
50 
51 #ifndef IPC_RSCTYPES_H_
52 #define IPC_RSCTYPES_H_
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
59 
60 /* Virtio Ids: keep in sync with the linux "include/linux/virtio_ids.h" */
62 #define VIRTIO_ID_CONSOLE 3
63 
65 #define VIRTIO_ID_RPMSG 7
66 
67 /* Indices of rpmsg virtio features we support */
69 #define VIRTIO_RPMSG_F_NS 0
70 
71 #define VIRTIO_RING_F_SYMMETRIC 30
72 
73 /* Resource info: Must match include/linux/remoteproc.h: */
75 #define TYPE_CARVEOUT 0
76 
77 #define TYPE_DEVMEM 1
78 
79 #define TYPE_TRACE 2
80 
81 #define TYPE_VDEV 3
82 
83 /* Linux kernel defines this as (-1), below define avoids compile warnings */
85 #define FW_RSC_ADDR_ANY (~0)
86 
88 #define NUM_ENTRIES 2
89 
91 #define NAME_LEN 32
92 
93 
94 #define TRACE_INTS_VER0 (0 << 16)
95 #define TRACE_INTS_VER1 (1 << 16)
96 
97 /* ========================================================================== */
98 /* Structure Declarations */
99 /* ========================================================================== */
100 
104 typedef struct
105 {
106  uint32_t ver;
109  uint32_t num;
112  uint32_t reserved[2];
114 }Ipc_Hdr;
115 
119 typedef struct
120 {
121  uint32_t type;
124 #ifdef BUILD_C7X_1
125  uint64_t da;
126 #else
127  uint32_t da;
128 #endif
129 
131  uint32_t len;
134  uint32_t reserved;
137  uint8_t name[NAME_LEN];
139 }Ipc_Trace;
140 
144 typedef struct
145 {
146  uint32_t da;
149  uint32_t align;
152  uint32_t num;
155  uint32_t notifyid;
158  uint32_t reserved;
162 
166 typedef struct
167 {
168  uint32_t type;
171  uint32_t id;
174  uint32_t notifyid;
177  uint32_t dfeatures;
180  uint32_t gfeatures;
183  uint32_t config_len;
186  uint8_t status;
189  uint8_t num_of_vrings;
192  uint8_t reserved[2];
195 }Ipc_VDev;
196 
200 typedef struct
201 {
205  uint32_t offset[NUM_ENTRIES];
217  /* trace entry */
222 
223 
224 #ifdef __cplusplus
225 }
226 #endif
227 
228 #endif /* IPC_RSCTYPES_H_ */
229 
230 /* @} */
uint32_t notifyid
Definition: ipc_rsctypes.h:174
Ipc_VDevVRing rpmsg_vring1
Definition: ipc_rsctypes.h:214
Ipc_VDevVRing rpmsg_vring0
Definition: ipc_rsctypes.h:211
#define NAME_LEN
Name Length.
Definition: ipc_rsctypes.h:91
uint32_t dfeatures
Definition: ipc_rsctypes.h:177
Resource Table Device VRing Structure.
Definition: ipc_rsctypes.h:144
IPC Resource Table used by IPC app.
Definition: ipc_rsctypes.h:200
VDEV structure. Must match with Linux.
Definition: ipc_rsctypes.h:166
uint32_t reserved
Definition: ipc_rsctypes.h:158
Structure used for remoteproc trace.
Definition: ipc_rsctypes.h:119
uint32_t ver
Definition: ipc_rsctypes.h:106
uint32_t config_len
Definition: ipc_rsctypes.h:183
Ipc_Trace trace
Definition: ipc_rsctypes.h:218
uint32_t da
Definition: ipc_rsctypes.h:146
data types definitions for ipc module.
Ipc_Hdr base
Definition: ipc_rsctypes.h:202
#define NUM_ENTRIES
Number of e ntries.
Definition: ipc_rsctypes.h:88
uint32_t notifyid
Definition: ipc_rsctypes.h:155
uint32_t len
Definition: ipc_rsctypes.h:131
Ipc_VDev rpmsg_vdev
Definition: ipc_rsctypes.h:208
uint32_t gfeatures
Definition: ipc_rsctypes.h:180
IPC Resource Table Header.
Definition: ipc_rsctypes.h:104
uint32_t id
Definition: ipc_rsctypes.h:171
uint32_t num
Definition: ipc_rsctypes.h:109
uint32_t num
Definition: ipc_rsctypes.h:152
uint32_t type
Definition: ipc_rsctypes.h:168
uint32_t da
Definition: ipc_rsctypes.h:127
uint32_t type
Definition: ipc_rsctypes.h:121
uint16_t reserved
Definition: tisci_boardcfg_rm.h:437
uint32_t align
Definition: ipc_rsctypes.h:149
uint32_t reserved
Definition: ipc_rsctypes.h:134
uint8_t status
Definition: ipc_rsctypes.h:186
uint8_t num_of_vrings
Definition: ipc_rsctypes.h:189