48 version_check.
cmd = 0x32;
56 ret = version_check.
reply == 1;
80 alloc_res.
hClass = rm_class;
89 if (alloc_res.
status == 0x00)
128 if (
object == NULL || fd == -1)
131 free_res.
hRoot =
object->client;
151 deattach_ids.
gpu_ids[1] = 0xFFFFFFFF;
164 void*
rm_ctrl_res(
int fd, uint32_t client, uint32_t device, uint32_t command,
void* data, uint32_t size)
173 ctrl_res.
cmd = command;
186 "Failed RM Control Mechanism:\n"
193 "\tstatus: 0x%.8X\n",
213 event.device = device_id;
219 return event.status == 0;
uint8_t rm_alloc_os_event(int fd, uint32_t client_id, uint32_t device_id)
Allocates an Operating System Event.
void * rm_ctrl_res(int fd, uint32_t client, uint32_t device, uint32_t command, void *data, uint32_t size)
Control resource command.
void rm_free_tree(int fd, struct NvResource *root)
Frees a resource tree for the system.
uint8_t rm_version_check(int ctl_fd, uint8_t ignore_version, const char *version)
Version check for the RM API.
struct NvResource * rm_alloc_res(int fd, struct NvResource *parent, uint32_t object, uint32_t rm_class, void *data)
Allocates a Node for a resource.
uint8_t rm_free_res(int fd, struct NvResource *object)
Frees a Node for a Resource.
#define _RM_CTRL(fd, client, object, cmd, data)
Controls a RM Resource.
#define NV_FREE_RES
IOCTL command to control a resource.
#define NV_VERSION_CHECK
IOCTL command to perform a version check on the system.
#define NV_CREATE_OS_EVENT
IOCTL command to create an OS event.
#define NV_ALLOC_RES
IOCTL command to free a resource.
#define NV0000_DEATTACH_IDS
Command to detach a gpu id from the driver.
DeAttaches the following ids to the GPU driver.
uint32_t gpu_ids[32]
List of GPU Ids to detach.
Resource for managing NVIDIA kernel module objects.
struct NvResource * next
Next child on the level.
void * class_info
Class info for the resource.
uint32_t rm_class
Class of the resource.
uint32_t client
All resources require a client/root.
uint32_t parent
Parent of the resource.
struct NvResource * child
Child of the resource.
uint32_t object
Object of the resource.
uint32_t cmd
Command override (Allows you to hid the version).
uint32_t reply
Reply if the driver is correct or not.
char version[64]
Version for the driver.
Operating System Event Allocator.
uint32_t client
Client for the operating system event.
uint32_t status
Status for the allocation.
uint32_t hRoot
Client allocating the object.
uint32_t hClass
Class of the new object.
uint32_t hObjectNew
New object we allocate.
uint32_t status
Status regarding execution.
uint32_t hObjectParent
Parent of the object we allocate.
void * pAllocParams
Allocation parameters.
Resource Control Message.
uint32_t flags
Flags for the control of the resource.
uint32_t object
Object to run the object control on.
uint32_t param_size
Size of the parameter.
uint32_t status
Status regarding execution.
uint32_t cmd
Command to run on the object.
uint32_t client
Client for running the object control.
void * params
Parameter to pass into the control command.
uint32_t status
Status regarding execution.
uint32_t hObjectOld
Object to deallocate.
uint32_t hObjectParent
Parent to deallocate the object.
uint32_t hRoot
Client for deallocation of the object.