PSDK QNX API Guide
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;
70  /* Add padding members below to fix PORTING.STORAGE.STRUCT KW issue */
71  uint32_t padding;
77  uint32_t vringBufSize;
80  uint32_t timeoutCnt;
83 
88 
93 
99 int32_t Ipc_initVirtIO(Ipc_VirtIoParams *vqParam);
100 
101 
112 int32_t Ipc_loadResourceTable(void *rsctable);
113 
120 
131 Bool Ipc_isRemoteReady(uint16_t procId);
132 
140 int32_t Ipc_lateVirtioCreate(uint16_t procId);
141 
150 Bool Ipc_isRemoteVirtioCreated(uint32_t remoteId);
151 
160 void Ipc_resetCoreVirtIO(uint32_t remoteId);
161 
162 #ifdef __cplusplus
163 }
164 #endif
165 
166 #endif /* #ifndef IPC_VIRTIO_H_ */
167 
168 /* @} */
uint32_t vqBufSize
Definition: ipc_virtio.h:67
Bool Ipc_isRemoteReady(uint16_t procId)
Checks if remote is ready.
uint32_t vringBufSize
Definition: ipc_virtio.h:77
uint32_t Ipc_getVqObjMemoryRequired(void)
Returns local memory for Virtio objects for all cores of SOC.
uint32_t padding
Definition: ipc_virtio.h:71
uint32_t Ipc_getVqObjMemoryRequiredPerCore(void)
Returns local memory for Virtio objects for one core-pair.
int32_t Ipc_lateVirtioCreate(uint16_t procId)
Creates Virtio late when Linux is ready.
Bool Ipc_isRemoteVirtioCreated(uint32_t remoteId)
Check if a remote Virtio has been created.
void * Ipc_getResourceTraceBufPtr(void)
Gets the address of the trace buffer.
void * vringBaseAddr
Definition: ipc_virtio.h:74
int32_t Ipc_initVirtIO(Ipc_VirtIoParams *vqParam)
Initailize the Virtio module.
uint32_t timeoutCnt
Definition: ipc_virtio.h:80
int32_t Ipc_loadResourceTable(void *rsctable)
Loads the resource table. If the remote core A72, and has valid radource table then,...
void * vqObjBaseAddr
Definition: ipc_virtio.h:64
void Ipc_resetCoreVirtIO(uint32_t remoteId)
Resets the local VRing queue handles for the remote core.
data types definitions for ipc module.
Parameter structure for creating VirtIO table for each core combinations.
Definition: ipc_virtio.h:63