GVM User Suite
User tools for the GVM open source project.
types.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 2666680 Ontario Inc.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  *
18  */
19 #ifndef GPU_NVIDIA_RESMAN_TYPES_H
20 #define GPU_NVIDIA_RESMAN_TYPES_H
21 
22 #include <stdint.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
34  uint32_t cmd;
35  uint32_t reply;
36  char version[64];
37 };
38 
44  uint32_t client;
45  uint32_t device;
46  int fd;
48  uint32_t status;
49 };
50 
55 struct RmAllocRes {
56  uint32_t hRoot;
57  uint32_t hObjectParent;
58  uint32_t hObjectNew;
59  uint32_t hClass;
60  void *pAllocParams;
61  uint32_t status;
62 };
63 
68 struct RmAllocEvent {
69  uint32_t parent;
70  uint32_t src;
71  uint32_t event_class;
72  uint32_t notify;
73  uint64_t event_data;
74 };
75 
81  uint32_t event;
82  uint32_t action;
83 };
84 
89 struct RmFreeRes {
90  uint32_t hRoot;
91  uint32_t hObjectParent;
92  uint32_t hObjectOld;
93  uint32_t status;
94 };
95 
100 struct RmControlRes {
101  uint32_t client;
102  uint32_t object;
103  uint32_t cmd;
104  uint32_t flags;
105  void* params;
106  uint32_t param_size;
107  uint32_t status;
108 };
109 
110 #ifdef __cplusplus
111 };
112 #endif
113 
114 #endif
RM API Version Check.
Definition: types.h:33
uint32_t cmd
Command override (Allows you to hid the version).
Definition: types.h:34
uint32_t reply
Reply if the driver is correct or not.
Definition: types.h:35
char version[64]
Version for the driver.
Definition: types.h:36
Allocates a RM Event.
Definition: types.h:68
uint32_t parent
Parent of the event.
Definition: types.h:69
uint64_t event_data
Data for the event.
Definition: types.h:73
uint32_t notify
Notification of the event.
Definition: types.h:72
uint32_t src
Source of the event.
Definition: types.h:70
uint32_t event_class
Class of the event.
Definition: types.h:71
Operating System Event Allocator.
Definition: types.h:43
uint32_t client
Client for the operating system event.
Definition: types.h:44
uint32_t status
Status for the allocation.
Definition: types.h:48
uint32_t device
Device for the operating system event.
Definition: types.h:45
Resource Allocator.
Definition: types.h:55
uint32_t hRoot
Client allocating the object.
Definition: types.h:56
uint32_t hClass
Class of the new object.
Definition: types.h:59
uint32_t hObjectNew
New object we allocate.
Definition: types.h:58
uint32_t status
Status regarding execution.
Definition: types.h:61
uint32_t hObjectParent
Parent of the object we allocate.
Definition: types.h:57
void * pAllocParams
Allocation parameters.
Definition: types.h:60
Resource Control Message.
Definition: types.h:100
uint32_t flags
Flags for the control of the resource.
Definition: types.h:104
uint32_t object
Object to run the object control on.
Definition: types.h:102
uint32_t param_size
Size of the parameter.
Definition: types.h:106
uint32_t status
Status regarding execution.
Definition: types.h:107
uint32_t cmd
Command to run on the object.
Definition: types.h:103
uint32_t client
Client for running the object control.
Definition: types.h:101
void * params
Parameter to pass into the control command.
Definition: types.h:105
Resource Deallocator.
Definition: types.h:89
uint32_t status
Status regarding execution.
Definition: types.h:93
uint32_t hObjectOld
Object to deallocate.
Definition: types.h:92
uint32_t hObjectParent
Parent to deallocate the object.
Definition: types.h:91
uint32_t hRoot
Client for deallocation of the object.
Definition: types.h:90
Sets the type of notification to use.
Definition: types.h:80
uint32_t action
Action to use for the notification.
Definition: types.h:82
uint32_t event
Event to set the notification structure.
Definition: types.h:81