PDK API Guide for J721E
ipc_virtio.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Texas Instruments Incorporated 2018
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
15  * distribution.
16  *
17  * Neither the name of Texas Instruments Incorporated nor the names of
18  * its contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 
48 #ifndef IPC_VIRTIO_H_
49 #define IPC_VIRTIO_H_
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
55 #include <ti/drv/ipc/soc/ipc_soc.h>
57 
62 typedef struct Ipc_VirtIoParams_s
63 {
67  uint32_t vqBufSize;
73  uint32_t vringBufSize;
76  uint32_t timeoutCnt;
79 
83 uint32_t Ipc_getVqObjMemoryRequired(void);
84 
89 
95 int32_t Ipc_initVirtIO(Ipc_VirtIoParams *vqParam);
96 
97 
108 int32_t Ipc_loadResourceTable(void *rsctable);
109 
115 void * Ipc_getResourceTraceBufPtr(void);
116 
127 uint8_t Ipc_isRemoteReady(uint16_t procId);
128 
136 int32_t Ipc_lateVirtioCreate(uint16_t procId);
137 
138 #ifdef __cplusplus
139 }
140 #endif
141 
142 #endif /* #ifndef IPC_VIRTIO_H_ */
143 
144 /* @} */
int32_t Ipc_initVirtIO(Ipc_VirtIoParams *vqParam)
Initailize the Virtio module.
void * vqObjBaseAddr
Definition: ipc_virtio.h:64
uint32_t timeoutCnt
Definition: ipc_virtio.h:76
uint32_t vringBufSize
Definition: ipc_virtio.h:73
uint32_t vqBufSize
Definition: ipc_virtio.h:67
void * Ipc_getResourceTraceBufPtr(void)
Gets the address of the trace buffer.
uint8_t Ipc_isRemoteReady(uint16_t procId)
Checks if remote is ready.
int32_t Ipc_loadResourceTable(void *rsctable)
Loads the resource table. If the remote core A72, and has valid radource table then,...
uint32_t Ipc_getVqObjMemoryRequiredPerCore(void)
Returns local memory for Virtio objects for one core-pair.
Parameter structure for creating VirtIO table for each core combinations.
Definition: ipc_virtio.h:62
data types definitions for ipc module.
int32_t Ipc_lateVirtioCreate(uint16_t procId)
Creates Virtio late when Linux is ready.
uint32_t Ipc_getVqObjMemoryRequired(void)
Returns local memory for Virtio objects for all cores of SOC.
void * vringBaseAddr
Definition: ipc_virtio.h:70