]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blob - packages/ti/ipc/tests/gatempapp_rsc_table_vayu_dsp.h
a73aeccc23afb4897c4dbcabafe413d4696b89d3
[ipc/ipcdev.git] / packages / ti / ipc / tests / gatempapp_rsc_table_vayu_dsp.h
1 /*
2  * Copyright (c) 2013-2014, 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  */
33 /*
34  *  ======== gatempapp_rsc_table_vayu_dsp.h ========
35  *
36  *  Define the resource table entries for all DSP cores. This will be
37  *  incorporated into corresponding base images, and used by the remoteproc
38  *  on the host-side to allocated/reserve resources.
39  *
40  */
42 #ifndef _GATEMPAPP_RSC_TABLE_VAYU_DSP_H_
43 #define _GATEMPAPP_RSC_TABLE_VAYU_DSP_H_
45 #include <ti/ipc/remoteproc/rsc_types.h>
47 /* DSP Memory Map */
48 #define L4_DRA7XX_BASE          0x4A000000
50 #define L4_PERIPHERAL_L4CFG     (L4_DRA7XX_BASE)
51 #define DSP_PERIPHERAL_L4CFG    0x4A000000
53 #define L4_PERIPHERAL_L4PER1    0x48000000
54 #define DSP_PERIPHERAL_L4PER1   0x48000000
56 #define L4_PERIPHERAL_L4PER2    0x48400000
57 #define DSP_PERIPHERAL_L4PER2   0x48400000
59 #define L4_PERIPHERAL_L4PER3    0x48800000
60 #define DSP_PERIPHERAL_L4PER3   0x48800000
62 #define L4_PERIPHERAL_L4EMU     0x54000000
63 #define DSP_PERIPHERAL_L4EMU    0x54000000
65 #define L3_PERIPHERAL_DMM       0x4E000000
66 #define DSP_PERIPHERAL_DMM      0x4E000000
68 #define L3_PERIPHERAL_ISS       0x52000000
69 #define DSP_PERIPHERAL_ISS      0x52000000
71 #define L3_TILER_MODE_0_1       0x60000000
72 #define DSP_TILER_MODE_0_1      0x60000000
74 #define L3_TILER_MODE_2         0x70000000
75 #define DSP_TILER_MODE_2        0x70000000
77 #define L3_TILER_MODE_3         0x78000000
78 #define DSP_TILER_MODE_3        0x78000000
80 #define DSP_MEM_TEXT            0x95000000
81 /* Co-locate alongside TILER region for easier flushing */
82 #define DSP_MEM_IOBUFS          0x80000000
83 #define DSP_MEM_DATA            0x95100000
84 #define DSP_MEM_HEAP            0x95200000
85 #define DSP_MEM_CMEM            0x95500000
87 //0x85900000
88 #define DSP_SR0_VIRT            0xBFB00000
89 #define DSP_SR0                 0xBFB00000
91 #define DSP_MEM_IPC_DATA        0x9F000000
92 #define DSP_MEM_IPC_VRING       0xA0000000
93 #define DSP_MEM_RPMSG_VRING0    0xA0000000
94 #define DSP_MEM_RPMSG_VRING1    0xA0004000
95 #define DSP_MEM_VRING_BUFS0     0xA0040000
96 #define DSP_MEM_VRING_BUFS1     0xA0080000
98 #define DSP_MEM_IPC_VRING_SIZE  SZ_1M
99 #define DSP_MEM_IPC_DATA_SIZE   SZ_1M
100 #define DSP_MEM_TEXT_SIZE       SZ_1M
101 #define DSP_MEM_DATA_SIZE       SZ_1M
102 #define DSP_MEM_HEAP_SIZE       (SZ_1M * 3)
103 #define DSP_MEM_IOBUFS_SIZE     (SZ_1M * 89)
104 #define DSP_SR0_SIZE            (SZ_1M * 1)
105 #define DSP_MEM_CMEM_SIZE       (SZ_1M * 4)
107 /*
108  * Assign fixed RAM addresses to facilitate a fixed MMU table.
109  */
110 /* This address is derived from current IPU & ION carveouts */
111 #define PHYS_MEM_IPC_VRING      0x99000000
113 /* Need to be identical to that of IPU */
114 #define PHYS_MEM_IOBUFS         0xBA300000
115 #define PHYS_MEM_CMEM           0x95400000
117 /*
118  * Sizes of the virtqueues (expressed in number of buffers supported,
119  * and must be power of 2)
120  */
121 #define DSP_RPMSG_VQ0_SIZE      256
122 #define DSP_RPMSG_VQ1_SIZE      256
124 /* flip up bits whose indices represent features we support */
125 #define RPMSG_DSP_C0_FEATURES         1
127 struct my_resource_table {
128     struct resource_table base;
130     UInt32 offset[20];  /* Should match 'num' in actual definition */
132     /* rpmsg vdev entry */
133     struct fw_rsc_vdev rpmsg_vdev;
134     struct fw_rsc_vdev_vring rpmsg_vring0;
135     struct fw_rsc_vdev_vring rpmsg_vring1;
137     /* text carveout entry */
138     struct fw_rsc_carveout text_cout;
140     /* data carveout entry */
141     struct fw_rsc_carveout data_cout;
143     /* heap carveout entry */
144     struct fw_rsc_carveout heap_cout;
146     /* ipcdata carveout entry */
147     struct fw_rsc_carveout ipcdata_cout;
149     /* trace entry */
150     struct fw_rsc_trace trace;
152     /* devmem entry */
153     struct fw_rsc_devmem devmem0;
155     /* devmem entry */
156     struct fw_rsc_devmem devmem1;
158     /* devmem entry */
159     struct fw_rsc_devmem devmem2;
161     /* devmem entry */
162     struct fw_rsc_devmem devmem3;
164     /* devmem entry */
165     struct fw_rsc_devmem devmem4;
167     /* devmem entry */
168     struct fw_rsc_devmem devmem5;
170     /* devmem entry */
171     struct fw_rsc_devmem devmem6;
173     /* devmem entry */
174     struct fw_rsc_devmem devmem7;
176     /* devmem entry */
177     struct fw_rsc_devmem devmem8;
179     /* devmem entry */
180     struct fw_rsc_devmem devmem9;
182     /* devmem entry */
183     struct fw_rsc_devmem devmem10;
185     /* devmem entry */
186     struct fw_rsc_devmem devmem11;
188     /* devmem entry */
189     struct fw_rsc_devmem devmem12;
191     /* devmem entry */
192     struct fw_rsc_devmem devmem13;
193 };
195 extern char ti_trace_SysMin_Module_State_0_outbuf__A;
196 #define TRACEBUFADDR (UInt32)&ti_trace_SysMin_Module_State_0_outbuf__A
198 #pragma DATA_SECTION(ti_ipc_remoteproc_ResourceTable, ".resource_table")
199 #pragma DATA_ALIGN(ti_ipc_remoteproc_ResourceTable, 4096)
201 struct my_resource_table ti_ipc_remoteproc_ResourceTable = {
202     1,      /* we're the first version that implements this */
203     20,     /* number of entries in the table */
204     0, 0,   /* reserved, must be zero */
205     /* offsets to entries */
206     {
207         offsetof(struct my_resource_table, rpmsg_vdev),
208         offsetof(struct my_resource_table, text_cout),
209         offsetof(struct my_resource_table, data_cout),
210         offsetof(struct my_resource_table, heap_cout),
211         offsetof(struct my_resource_table, ipcdata_cout),
212         offsetof(struct my_resource_table, trace),
213         offsetof(struct my_resource_table, devmem0),
214         offsetof(struct my_resource_table, devmem1),
215         offsetof(struct my_resource_table, devmem2),
216         offsetof(struct my_resource_table, devmem3),
217         offsetof(struct my_resource_table, devmem4),
218         offsetof(struct my_resource_table, devmem5),
219         offsetof(struct my_resource_table, devmem6),
220         offsetof(struct my_resource_table, devmem7),
221         offsetof(struct my_resource_table, devmem8),
222         offsetof(struct my_resource_table, devmem9),
223         offsetof(struct my_resource_table, devmem10),
224         offsetof(struct my_resource_table, devmem11),
225         offsetof(struct my_resource_table, devmem12),
226         offsetof(struct my_resource_table, devmem13),
227     },
229     /* rpmsg vdev entry */
230     {
231         TYPE_VDEV, VIRTIO_ID_RPMSG, 0,
232         RPMSG_DSP_C0_FEATURES, 0, 0, 0, 2, { 0, 0 },
233         /* no config data */
234     },
235     /* the two vrings */
236     { DSP_MEM_RPMSG_VRING0, 4096, DSP_RPMSG_VQ0_SIZE, 1, 0 },
237     { DSP_MEM_RPMSG_VRING1, 4096, DSP_RPMSG_VQ1_SIZE, 2, 0 },
239     {
240         TYPE_CARVEOUT,
241         DSP_MEM_TEXT, 0,
242         DSP_MEM_TEXT_SIZE, 0, 0, "DSP_MEM_TEXT",
243     },
245     {
246         TYPE_CARVEOUT,
247         DSP_MEM_DATA, 0,
248         DSP_MEM_DATA_SIZE, 0, 0, "DSP_MEM_DATA",
249     },
251     {
252         TYPE_CARVEOUT,
253         DSP_MEM_HEAP, 0,
254         DSP_MEM_HEAP_SIZE, 0, 0, "DSP_MEM_HEAP",
255     },
257     {
258         TYPE_CARVEOUT,
259         DSP_MEM_IPC_DATA, 0,
260         DSP_MEM_IPC_DATA_SIZE, 0, 0, "DSP_MEM_IPC_DATA",
261     },
263     {
264         TYPE_TRACE, TRACEBUFADDR, 0x8000, 0, "trace:dsp",
265     },
267     {
268         TYPE_DEVMEM,
269         DSP_MEM_IPC_VRING, PHYS_MEM_IPC_VRING,
270         DSP_MEM_IPC_VRING_SIZE, 0, 0, "DSP_MEM_IPC_VRING",
271     },
273     {
274         TYPE_DEVMEM,
275         DSP_MEM_IOBUFS, PHYS_MEM_IOBUFS,
276         DSP_MEM_IOBUFS_SIZE, 0, 0, "DSP_MEM_IOBUFS",
277     },
279     {
280         TYPE_DEVMEM,
281         DSP_MEM_CMEM, PHYS_MEM_CMEM,
282         DSP_MEM_CMEM_SIZE, 0, 0, "DSP_MEM_CMEM",
283     },
285     {
286         TYPE_DEVMEM,
287         DSP_TILER_MODE_0_1, L3_TILER_MODE_0_1,
288         SZ_256M, 0, 0, "DSP_TILER_MODE_0_1",
289     },
291     {
292         TYPE_DEVMEM,
293         DSP_TILER_MODE_2, L3_TILER_MODE_2,
294         SZ_128M, 0, 0, "DSP_TILER_MODE_2",
295     },
297     {
298         TYPE_DEVMEM,
299         DSP_TILER_MODE_3, L3_TILER_MODE_3,
300         SZ_128M, 0, 0, "DSP_TILER_MODE_3",
301     },
303     {
304         TYPE_DEVMEM,
305         DSP_PERIPHERAL_L4CFG, L4_PERIPHERAL_L4CFG,
306         SZ_16M, 0, 0, "DSP_PERIPHERAL_L4CFG",
307     },
309     {
310         TYPE_DEVMEM,
311         DSP_PERIPHERAL_L4PER1, L4_PERIPHERAL_L4PER1,
312         SZ_2M, 0, 0, "DSP_PERIPHERAL_L4PER1",
313     },
315     {
316         TYPE_DEVMEM,
317         DSP_PERIPHERAL_L4PER2, L4_PERIPHERAL_L4PER2,
318         SZ_4M, 0, 0, "DSP_PERIPHERAL_L4PER2",
319     },
321     {
322         TYPE_DEVMEM,
323         DSP_PERIPHERAL_L4PER3, L4_PERIPHERAL_L4PER3,
324         SZ_8M, 0, 0, "DSP_PERIPHERAL_L4PER3",
325     },
327     {
328         TYPE_DEVMEM,
329         DSP_PERIPHERAL_L4EMU, L4_PERIPHERAL_L4EMU,
330         SZ_16M, 0, 0, "DSP_PERIPHERAL_L4EMU",
331     },
333     {
334         TYPE_DEVMEM,
335         DSP_PERIPHERAL_DMM, L3_PERIPHERAL_DMM,
336         SZ_1M, 0, 0, "DSP_PERIPHERAL_DMM",
337     },
339     {
340         TYPE_DEVMEM,
341         DSP_PERIPHERAL_ISS, L3_PERIPHERAL_ISS,
342         SZ_256K, 0, 0, "DSP_PERIPHERAL_ISS",
343     },
345     {
346         TYPE_DEVMEM,
347         DSP_SR0_VIRT, DSP_SR0,
348         DSP_SR0_SIZE, 0, 0, "DSP_SR0",
349     },
351 };
353 #endif /* _GATEMPAPP_RSC_TABLE_VAYU_DSP_H_ */