mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
This patch adds nvsciipc kernel driver. At present its only use is to support NvSciIpc secure buffer sharing use case across processes. JIRA ESLC-4105 Change-Id: Ib2889d7c0c7a3928ad1e84c8dd58f3aa287c6185 Signed-off-by: Abhijit <abhijit@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2146877 GVS: Gerrit_Virtual_Submit Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Sandeep Trasi <strasi@nvidia.com> Reviewed-by: Puneet Saxena <puneets@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
69 lines
2.0 KiB
C
69 lines
2.0 KiB
C
/*
|
|
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms and conditions of the GNU General Public License,
|
|
* version 2, as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*/
|
|
|
|
#ifndef __NVSCIIPC_INTERFACE_H__
|
|
#define __NVSCIIPC_INTERFACE_H__
|
|
|
|
/** Invalid VUID definition */
|
|
#define NVSCIIPC_ENDPOINT_VUID_INVALID 0U
|
|
/** Invalid authentication token definition */
|
|
#define NVSCIIPC_ENDPOINT_AUTHTOKEN_INVALID 0U
|
|
/** current self SOC ID */
|
|
#define NVSCIIPC_SELF_SOCID 0xFFFFFFFFU
|
|
/** current self VM ID */
|
|
#define NVSCIIPC_SELF_VMID 0xFFFFFFFFU
|
|
|
|
/**
|
|
* @brief Handle to the IPC endpoint.
|
|
*/
|
|
typedef uint64_t NvSciIpcEndpoint;
|
|
|
|
|
|
/**
|
|
* @brief VUID(VM unique ID) of the IPC endpoint.
|
|
*/
|
|
typedef uint64_t NvSciIpcEndpointVuid;
|
|
|
|
/**
|
|
* @brief authentication token of the IPC endpoint.
|
|
*/
|
|
typedef uint64_t NvSciIpcEndpointAuthToken;
|
|
|
|
/**
|
|
* @brief Defines topology ID of the IPC endpoint.
|
|
*/
|
|
typedef struct {
|
|
/*! Holds SOC ID */
|
|
uint32_t SocId;
|
|
/*! Holds VMID */
|
|
uint32_t VmId;
|
|
} NvSciIpcTopoId;
|
|
|
|
/**********************************************************************/
|
|
/*********************** Function Definitions *************************/
|
|
/**********************************************************************/
|
|
NvSciError NvSciIpcEndpointGetAuthToken(NvSciIpcEndpoint handle,
|
|
NvSciIpcEndpointAuthToken *authToken);
|
|
|
|
NvSciError NvSciIpcEndpointValidateAuthTokenLinuxCurrent(
|
|
NvSciIpcEndpointAuthToken authToken,
|
|
NvSciIpcEndpointVuid *localUserVuid);
|
|
|
|
NvSciError NvSciIpcEndpointMapVuid(NvSciIpcEndpointVuid localUserVuid,
|
|
NvSciIpcTopoId *peerTopoId, NvSciIpcEndpointVuid *peerUserVuid);
|
|
|
|
NvSciError NvSciIpcEndpointGetVuid(NvSciIpcEndpoint handle,
|
|
NvSciIpcEndpointVuid *vuid);
|
|
|
|
#endif /* __NVSCIIPC_INTERFACE_H__ */
|