|
|
NVIDIA DriveOS Linux SDK API Reference
|
7.2.5.0 Early Access Release
|
Go to the documentation of this file.
12 #ifndef INCLUDED_NVSCIIPC_H
13 #define INCLUDED_NVSCIIPC_H
22 #include <sys/iofunc.h>
24 #include "nvscierror.h"
320 #ifndef NVSCIIPC_ABILITY_ID
321 #define NVSCIIPC_ABILITY_ID "NvSciIpcEndpoint"
328 #define NVSCIIPC_BACKEND_ITC 0U
329 #define NVSCIIPC_BACKEND_IPC 1U
330 #define NVSCIIPC_BACKEND_ITC_NVSCICOM 2U
331 #define NVSCIIPC_BACKEND_IPC_NVSCICOM 3U
332 #define NVSCIIPC_BACKEND_ITC_IVCLIB 4U
333 #define NVSCIIPC_BACKEND_IPC_IVCLIB 5U
334 #define NVSCIIPC_BACKEND_IVC 6U
335 #define NVSCIIPC_BACKEND_C2C 7U
336 #define NVSCIIPC_BACKEND_C2C_PCIE 7U
337 #define NVSCIIPC_BACKEND_C2C_NPM 8U
338 #if defined(__linux__)
340 #define NVSCIIPC_BACKEND_MAX 9U
341 #elif defined(__QNX__)
343 #define NVSCIIPC_BACKEND_MAX 8U
346 #define NVSCIIPC_INVALID_IRQ (0xFFFFFFFFU)
347 #define NVSCIIPC_INVALID_IID (-1)
395 #define NVSCIIPC_MAX_ENDPOINT_NAME 64U
399 #define NV_SCI_IPC_EVENT_READ 0x01U
401 #define NV_SCI_IPC_EVENT_WRITE 0x02U
403 #define NV_SCI_IPC_EVENT_CONN_EST 0x04U
405 #define NV_SCI_IPC_EVENT_CONN_RESET 0x08U
407 #define NV_SCI_IPC_EVENT_WRITE_EMPTY 0x10U
409 #define NV_SCI_IPC_EVENT_ASYNC_ERROR 0x20U
411 #define NV_SCI_IPC_EVENT_CONN_EST_ALL (NV_SCI_IPC_EVENT_CONN_EST | \
412 NV_SCI_IPC_EVENT_WRITE | NV_SCI_IPC_EVENT_WRITE_EMPTY | \
413 NV_SCI_IPC_EVENT_READ)
416 #define NVSCIIPC_INFINITE_WAIT -1LL
420 #define NV_SCI_ASYNC_PCIE_EDMA_XFER_ERROR 0x1U
422 #define NV_SCI_ASYNC_PCIE_AER_UNCORRECTABLE_FATAL 0x2U
424 #define NV_SCI_ASYNC_PCIE_AER_UNCORRECTABLE_NONFATAL 0x4U
426 #define NV_SCI_ASYNC_PCIE_VALIDATION_ERROR 0x8U
1057 const volatile void **buf);
1177 uint32_t size, uint32_t *bytes);
1237 volatile void **buf);
1503 #if defined(__QNX__)
1580 int32_t NvSciIpcWaitEventQnx(int32_t chid, int64_t microseconds, uint32_t bytes,
1592 int32_t coid, int16_t pulsePriority, int16_t pulseCode,
1674 int32_t coid, int16_t pulsePriority, int16_t pulseCode);
1736 NvSciError NvSciIpcInspectEventQnx(int32_t chid, uint16_t numEvents,
1891 bool* isCompatible);
Defines access information about NvSciIpc endpoint.
NvSciError NvSciIpcWriteAdvance(NvSciIpcEndpoint handle)
Advance to the next write frame of the endpoint.
NVIDIA Software Communications Interface (SCI) : NvSci Event Service
uint64_t NvSciIpcEndpointVuid
VUID(VM unique ID) of the NvSciIpc endpoint.
void NvSciIpcDeinit(void)
De-initializes the NvSciIpc library.
void NvSciIpcCloseEndpoint(NvSciIpcEndpoint handle)
Closes an endpoint with the given handle.
NvSciError NvSciIpcGetEndpointInfo(NvSciIpcEndpoint handle, NvSciIpcEndpointInfo *info)
Returns endpoint information.
NvSciError NvSciIpcOpenEndpoint(const char *endpoint, NvSciIpcEndpoint *handle)
Opens an endpoint with the given name.
uint32_t notiIpaType
type of IPA to used to notify peer in inter-VM NVSCIIPC_TRAP_IPA, NVSCIIP_MSI_IPA
NvSciError NvSciIpcGetEventSafe(NvSciIpcEndpoint handle, uint32_t *events)
Get Events (safety version)
NvSciError NvSciIpcOpenEndpointWithEventService(const char *endpoint, NvSciIpcEndpoint *handle, NvSciEventService *eventService)
Opens an endpoint with the given name and event service.
NvSciError NvSciIpcRead(NvSciIpcEndpoint handle, void *buf, size_t size, int32_t *bytes)
Reads a frame from the endpoint.
An abstract interface to notify event to event consumer and to register event handler of the event co...
NvSciError NvSciIpcGetLinuxEventFd(NvSciIpcEndpoint handle, int32_t *fd)
Returns the NvSciIpc file descriptor for a given endpoint.
NvSciError NvSciIpcReadAdvance(NvSciIpcEndpoint handle)
Advance to the next read frame of the endpoint.
uint32_t backend
backend type of the endpoint NVSCIIPC_BACKEND_ITC, NVSCIIPC_BACKEND_IPC, NVSCIIPC_BACKEND_IVC,...
NvSciError NvSciIpcResetEndpointSafe(NvSciIpcEndpoint handle)
Resets an endpoint.
uint32_t uid
User id per endpoint.
uint32_t gid
unique group id of the endpoint
void NvSciIpcResetEndpoint(NvSciIpcEndpoint handle)
Resets an endpoint.
NvSciError NvSciIpcGetEvent(NvSciIpcEndpoint handle, uint32_t *events)
Get Events.
NvSciError NvSciIpcEnableNotification(NvSciIpcEndpoint handle, bool flag)
Enable event notification (or polling)
NvSciError NvSciIpcReadGetNextFrame(NvSciIpcEndpoint handle, const volatile void **buf)
Get a pointer to the read frame from the endpoint.
int32_t id
Queue id (Intra-VM: 0 or 1, Inter-VM: IVC queue ID of PCT.
uint64_t NvSciIpcEndpoint
Handle to the NvSciIpc endpoint.
NvSciError NvSciIpcReadSafe(NvSciIpcEndpoint handle, void *buf, uint32_t size, uint32_t *bytes)
Reads a frame from the endpoint (safety version)
NvSciIpcEndpointVuid vuid
VM-wide unique id(VUID) per endpoint.
static const uint32_t NvSciIpcMinorVersion
NvSciIpc API Minor version number.
NvSciError NvSciIpcWriteGetNextFrame(NvSciIpcEndpoint handle, volatile void **buf)
Get a pointer to the write frame from the endpoint.
int32_t irq
IRQ number of IVC signalling (inter-VM endpoint only) (-1: N/A)
NvSciError NvSciIpcInit(void)
Initializes the NvSciIpc library.
void NvSciIpcCloseCfgBlob(void)
Closes NvSciIpc ConfigBlob.
NvSciError NvSciIpcCloseEndpointSafe(NvSciIpcEndpoint handle, bool clear)
Closes an endpoint with the given handle (safety version)
NvSciError NvSciIpcWrite(NvSciIpcEndpoint handle, const void *buf, size_t size, int32_t *bytes)
Writes a frame to the endpoint.
NvSciError NvSciIpcOpenCfgBlob(void)
Opens NvSciIpc ConfigBlob.
const WFDCommitType const WFDHandle handle
uint32_t frame_size
Holds the frame size in bytes.
NvSciError NvSciIpcGetEventNotifier(NvSciIpcEndpoint handle, NvSciEventNotifier **eventNotifier)
Get NvSciIpc event notifier.
NvSciError NvSciIpcCheckVersionCompatibility(uint32_t majorVer, uint32_t minorVer, bool *isCompatible)
Check NvSciIpc library version compatibility.
NvSciError NvSciIpcGetAsyncErrors(NvSciIpcEndpoint handle, uint32_t *errors)
Get asynchronouse errors.
uint32_t nframes
Holds the number of frames.
Defines information about the NvSciIpc endpoint.
static const uint32_t NvSciIpcMajorVersion
NvSciIpc API Major version number.
NvSciError NvSciIpcGetEndpointAccessInfo(const char *endpoint, NvSciIpcEndpointAccessInfo *info)
Gets endpoint access information from ConfigBlob.
NvSciError NvSciIpcWriteSafe(NvSciIpcEndpoint handle, const void *buf, uint32_t size, uint32_t *bytes)
Writes a frame to the endpoint.
An abstract interface for a program's event handling infrastructure.