1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
|
<!DOCTYPE html>
<html class="client-nojs" lang="en" dir="ltr">
<head>
<meta charset="UTF-8"/>
<title>View source for OpenRM - Open-IOV</title>
<script>document.documentElement.className="client-js";RLCONF={"wgBreakFrames":!0,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"f5476a3376cc898f3e3470d4","wgCSPNonce":!1,"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":!1,"wgNamespaceNumber":0,"wgPageName":"OpenRM","wgTitle":"OpenRM","wgCurRevisionId":23739,"wgRevisionId":0,"wgArticleId":40,"wgIsArticle":!1,"wgIsRedirect":!1,"wgAction":"edit","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"OpenRM","wgRelevantArticleId":40,"wgIsProbablyEditable":!1,"wgRelevantPageIsProbablyEditable":!1,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},
"wgEditSubmitButtonLabelPublish":!1};RLSTATE={"site.styles":"ready","noscript":"ready","user.styles":"ready","user":"ready","user.options":"loading","skins.vector.styles.legacy":"ready","jquery.tablesorter.styles":"ready","jquery.makeCollapsible.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready"};RLPAGEMODULES=["mediawiki.action.edit.collapsibleFooter","site","mediawiki.page.ready","jquery.tablesorter","jquery.makeCollapsible","skins.vector.legacy.js","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader"];</script>
<script>(RLQ=window.RLQ||[]).push(function(){mw.loader.implement("user.options@1hzgi",function($,jQuery,require,module){/*@nomin*/mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"});
});});</script>
<link rel="stylesheet" href="load.php%3Flang=en&modules=ext.visualEditor.desktopArticleTarget.noscript|jquery.makeCollapsible.styles|jquery.tablesorter.styles|skins.vector.styles.legacy&only=styles&skin=vector.css"/>
<script async="" src="load.php%3Flang=en&modules=startup&only=scripts&raw=1&skin=vector"></script>
<meta name="generator" content="MediaWiki 1.37.1"/>
<meta name="robots" content="noindex,nofollow"/>
<meta name="format-detection" content="telephone=no"/>
<link rel="shortcut icon" href="favicon.ico.html"/>
<link rel="search" type="application/opensearchdescription+xml" href="opensearch_desc.php" title="Open-IOV (en)"/>
<link rel="EditURI" type="application/rsd+xml" href="api.php%3Faction=rsd"/>
<link rel="alternate" type="application/atom+xml" title="Open-IOV Atom feed" href="./index.php%3Ftitle=Special:RecentChanges&feed=atom"/>
</head>
<body class="mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-OpenRM rootpage-OpenRM skin-vector action-edit skin-vector-legacy"><div id="mw-page-base" class="noprint"></div>
<div id="mw-head-base" class="noprint"></div>
<div id="content" class="mw-body" role="main">
<a id="top"></a>
<div id="siteNotice"></div>
<div class="mw-indicators">
</div>
<h1 id="firstHeading" class="firstHeading" >View source for OpenRM</h1>
<div id="bodyContent" class="vector-body">
<div id="contentSub">← <a href="index.php/OpenRM.html" title="OpenRM">OpenRM</a></div>
<div id="contentSub2"></div>
<div id="jump-to-nav"></div>
<a class="mw-jump-link" href="index.php%3Ftitle=OpenRM&action=edit.html#mw-head">Jump to navigation</a>
<a class="mw-jump-link" href="index.php%3Ftitle=OpenRM&action=edit.html#searchInput">Jump to search</a>
<div id="mw-content-text" class="mw-body-content"><p>You do not have permission to edit this page, for the following reason:
</p>
<div class="permissions-errors">
<p>The action you have requested is limited to users in the group: <a href="https://open-iov.org/index.php?title=Open-IOV:Administrators&action=edit&redlink=1" class="new" title="Open-IOV:Administrators (page does not exist)">Administrators</a>.
</p>
</div><hr />
<p>You can view and copy the source of this page.
</p><textarea readonly="" accesskey="," id="wpTextbox1" cols="80" rows="25" style="" class="mw-editfont-monospace" lang="en" dir="ltr" name="wpTextbox1">OpenRM refers to the open sourcing of the NVIDIA kernel module for Linux, specifically the RM Core or the internal resource manager.
Through the open sourced code ([https://github.com/NVIDIA/open-gpu-kernel-modules located here]) we have been able to deduce 7 top level APIs that are being exposed to the Linux developers.<blockquote>An absence of critical technical documentation has historically slowed growth and adoption of developer ecosystems for GPU virtualization.
This [https://creativecommons.org/licenses/by/4.0/ CC-BY-4.0] licensed content can either be used with attribution, or used as inspiration for new documentation, created by GPU vendors for public commercial distribution as developer documentation.
Where possible, this documentation will clearly label dates and versions of observed-but-not-guaranteed behaviour vs. vendor-documented stable interfaces/behaviour with guarantees of forward or backward compatibility.</blockquote>
==Interaction With OpenRM==
All of OpenRM is a high scale object oriented abstraction layer for the GPU, all resources are internally classes which have control definitions (methods) on how you can use them. These classes can also represent physical resources or engines.
===Alloc (Client)===
This is analogous to calling an object constructor in a higher level programming language, such as C#.
The data for this call requires the following components:
#hRoot - RM Client Id (given by the kernel module for an individual process that is interacting with the kernel module).
#hObjectParent - Parent of the resource we are allocating.
#hObjectNew - New object to allocate.
#hClass - Class of the object we are dealing with.
#pAllocParams - Pointer to values passed into the constructor call.
#status - Status of the constructor call (did it succeed or fail)
===Alloc Memory 64===
This creates a CPU's mapping to a resource.
The data for this call requires the following components:
#hRoot - RM Client Id (given by the kernel module for an individual process that is interacting with the kernel module).
#hObjectParent - Parent of the resource we create the CPU mapping to.
#hObjectNew - Mapping object resource id.
#hClass - Class of the mapped object.
#flags - Flags to use on the mapped object.
#pMemory - pointer for the memory to map.
#pLimit - Edge of memory map.
#status - Status of the constructor call.
NOTE: Seems to be deprecated.
===Control===
This is a control command which is analogous to calling a method on a class.
The data for this call requires the following components:
#hClient - RM Client Id.
#hObject - Object id.
#cmd - Method to call.
#params - Parameters into this method.
#paramsSize - Size of the params.
#status - Status of the control call.
NOTE: The control will overwrite the object we pass in over the params pointer.
===Dup Object===
Duplicates the object, or clones the object, which is a deep copy. This procedure can be used across processes in order to produce shared memory.
The data for this call requires the following components:
#hClient - RM Client Id.
#hParent - Parent of the object.
#hObject - Object destination for duplicating.
#hClientSrc - Client source id.
#hObjectSrc - Object source.
#flags - Flags to use.
#status - Status of the duplication.
===Free===
Frees an object from the object tree.
The data for this call requires the following components:
#hRoot - Client Id.
#hObjectParent - Parent of the object.
#hObjectOld - Object to call the destructor on.
#status - Status of the free.
===Vid Heap Control===
TODO: Figure out what this does.
NOTE: Seems to be deprecated.
===Map Memory===
This seems to be the same as alloc memory but seems to be used more often.
The data for this call requires the following components:
#hClient - Client Id.
#hDevice - Device id.
#hMemory - Memory resource.
#offset - Offset of the memory.
#length - Length of the memory.
#pLinearAddress - Pointer for returned address.
#status - Status of the map memory.
#flags - Flags to use.
===Unmap Memory===
This unmaps the CPU memory mapping from the resource.
The data for this call requires the following components:
#hClient - Client Id.
#hDevice - Device Id.
#hMemory - Memory Id.
#pLinearAddress - pointer to virtual address.
#status - Status of the unmap command.
#flags - Flags to use.
===Alloc Context DMA 2===
Allocates a context for DMA.
The data for this call requires the following components:
#hObjectParent - Object parent.
#hSubDevice - Sub device to allocate on.
#hObjectNew - Context id.
#hClass - Type of class.
#flags - Flags to use.
#selector - UNKNOWN.
#hMemory - Handle for Memory resource to DMA map.
#offset - Offset for the DMA mapping.
#limit - Limit of the DMA map.
#status - Status of the allocation.
NOTE: Seems to be deprecated.
===Map Memory DMA===
Map a region of memory for DMA access.
The data for this call requires the following components:
#hClient - Client Id.
#hDevice - Device Id.
#hDma - DMA Id.
#hMemory - Memory Id.
#offset - Offset of the region.
#limit - Limit of the region.
#flags - flags to use.
#dmaOffset - Offset of the mapping.
#status - Status of the map Memory DMA.
===Un-map Memory DMA===
Unmaps a region of memory for DMA access.
The data for this call requires the following components:
#hClient - Client Id.
#hDevice - Device Id.
#hDma - DMA handle.
#hMemory - Memory handle.
#flags - Flags to use.
#dmaOffset - DMA Offset to unmap.
#status - Status of the unmap Memory DMA.
===Bind Context DMA===
Binds a context for DMA interaction to a channel.
The data for this call requires the following components:
#hClient - Client Id.
#hChannel - Channel Id.
#hCtxDma - Context for DMA Id.
#status - Status of the bind context DMA.
NOTE: Seems to be deprecated.
===Share===
Sharing of a resource between multiple clients.
TODO: Understand this sharing more.
The data for this call requires the following components:
#hClient - Client Id.
#hObject - Resource Id.
#sharePolicy - Share policy.
#status - Status of sharing.
===Add VBlank Callback===
TODO: Figure out what this does.
NOTE: Seems to be deprecated.
==Engines==
There are engines which internally act as classes inside the OpenRM driver.
These classes have a few key components that make them unique.
===Table of Engines===
{| class="wikitable sortable mw-collapsible"
|+Engines
!Engine
!Description
|-
|Invalid
|Does not exist.
|-
|Software
|Abstraction layer for software processes inside the OS Software.
|-
|GPU
|Interaction layer with the GPU.
|-
|Falcon
|Interaction with the Falcon on the GPU.
|-
|Master Control
|Unknown.
|-
|Kernel Master Control
|Interaction with the PMC.[https://github.com/NVIDIA/open-gpu-kernel-modules/blob/d8f3bcff924776518f1e63286537c3cf365289ac/src/nvidia/generated/g_kernel_mc_nvoc.h]
|-
|Private Ring
|Interaction with a private messaging ring.
|-
|Software Interrupt
|Interaction with software interrupts.
|-
|Memory System
|Interaction with the memory system.
|-
|Kernel Memory System
|Interaction with the kernel memory system.
|-
|Memory Manager
|Interaction with the memory management system.
|-
|FBFlcn
|Interaction with the FBFlcn subsystem.
|-
|TMR
|Interaction with the TMR on specific chips.
|-
|DMA
|Interaction with a GPU's DMA access.
|-
|Kernel FIFO
|First in First out queue in the GPU driver.
|-
|FIFO
|Interaction with a generic FIFO.
|-
|OS
|Interaction with the OS.
|-
|BUS
|PCI Bus interaction
|-
|Kernel BUS
|Internal module BUS.
|-
|INFOROM
|Interaction with the INFOROM Region on the GPU.
|-
|PERF
|Unknown.
|-
|Kernel PERF
|Unknown.
|-
|BIF
|Unknown.
|-
|Kernel BIF
|Unknown.
|-
|SF
|Unknown.
|-
|GPIO
|Interaction with GPIO.
|-
|CLK
|Clock manager system.
|-
|Kernel Display
|Kernel Display system.
|-
|DISP
|Display system.
|-
|DPU
|Data Processing Unit.
|-
|
|
|-
|
|
|}
</textarea><div class="templatesUsed"></div><p id="mw-returnto">Return to <a href="index.php/OpenRM.html" title="OpenRM">OpenRM</a>.</p>
<div class="printfooter">Retrieved from "<a dir="ltr" href="index.php/OpenRM.html">https://open-iov.org/index.php/OpenRM</a>"</div></div>
<div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"></div>
</div>
</div>
<div id="mw-navigation">
<h2>Navigation menu</h2>
<div id="mw-head">
<nav id="p-personal" class="mw-portlet mw-portlet-personal vector-user-menu-legacy vector-menu" aria-labelledby="p-personal-label" role="navigation"
>
<h3 id="p-personal-label" class="vector-menu-heading"> <span>Personal tools</span>
</h3>
<div class="vector-menu-content">
<ul class="vector-menu-content-list"><li id="pt-login" class="mw-list-item"><a href="https://open-iov.org/index.php?title=Special:UserLogin&returnto=OpenRM&returntoquery=action%3Dedit" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o">Log in</a></li></ul>
</div>
</nav>
<div id="left-navigation">
<nav id="p-namespaces" class="mw-portlet mw-portlet-namespaces vector-menu vector-menu-tabs" aria-labelledby="p-namespaces-label" role="navigation"
>
<h3 id="p-namespaces-label" class="vector-menu-heading"> <span>Namespaces</span>
</h3>
<div class="vector-menu-content">
<ul class="vector-menu-content-list"><li id="ca-nstab-main" class="selected mw-list-item"><a href="index.php/OpenRM.html" title="View the content page [c]" accesskey="c">Page</a></li><li id="ca-talk" class="new mw-list-item"><a href="https://open-iov.org/index.php?title=Talk:OpenRM&action=edit&redlink=1" rel="discussion" title="Discussion about the content page (page does not exist) [t]" accesskey="t">Discussion</a></li></ul>
</div>
</nav>
<nav id="p-variants" class="mw-portlet mw-portlet-variants emptyPortlet vector-menu-dropdown-noicon vector-menu vector-menu-dropdown" aria-labelledby="p-variants-label" role="navigation"
>
<input type="checkbox"
id="p-variants-checkbox"
role="button"
aria-haspopup="true"
data-event-name="ui.dropdown-p-variants"
class=" vector-menu-checkbox" aria-labelledby="p-variants-label" />
<h3 id="p-variants-label" class="vector-menu-heading"> <span>Variants</span>
<span class="vector-menu-checkbox-expanded">expanded</span>
<span class="vector-menu-checkbox-collapsed">collapsed</span>
</h3>
<div class="vector-menu-content">
<ul class="vector-menu-content-list"></ul>
</div>
</nav>
</div>
<div id="right-navigation">
<nav id="p-views" class="mw-portlet mw-portlet-views vector-menu vector-menu-tabs" aria-labelledby="p-views-label" role="navigation"
>
<h3 id="p-views-label" class="vector-menu-heading"> <span>Views</span>
</h3>
<div class="vector-menu-content">
<ul class="vector-menu-content-list"><li id="ca-view" class="mw-list-item"><a href="index.php/OpenRM.html">Read</a></li><li id="ca-viewsource" class="selected mw-list-item"><a href="index.php%3Ftitle=OpenRM&action=edit.html" title="This page is protected. You can view its source [e]" accesskey="e">View source</a></li><li id="ca-history" class="mw-list-item"><a href="index.php%3Ftitle=OpenRM&action=history.html" title="Past revisions of this page [h]" accesskey="h">View history</a></li></ul>
</div>
</nav>
<nav id="p-cactions" class="mw-portlet mw-portlet-cactions emptyPortlet vector-menu-dropdown-noicon vector-menu vector-menu-dropdown" aria-labelledby="p-cactions-label" role="navigation" title="More options"
>
<input type="checkbox"
id="p-cactions-checkbox"
role="button"
aria-haspopup="true"
data-event-name="ui.dropdown-p-cactions"
class=" vector-menu-checkbox" aria-labelledby="p-cactions-label" />
<h3 id="p-cactions-label" class="vector-menu-heading"> <span>More</span>
<span class="vector-menu-checkbox-expanded">expanded</span>
<span class="vector-menu-checkbox-collapsed">collapsed</span>
</h3>
<div class="vector-menu-content">
<ul class="vector-menu-content-list"></ul>
</div>
</nav>
<div id="p-search" role="search" class="vector-search-box">
<div>
<h3 >
<label for="searchInput">Search</label>
</h3>
<form action="https://open-iov.org/index.php" id="searchform">
<div id="simpleSearch" data-search-loc="header-navigation">
<input type="search" name="search" placeholder="Search Open-IOV" autocapitalize="sentences" title="Search Open-IOV [f]" accesskey="f" id="searchInput"/>
<input type="hidden" name="title" value="Special:Search"/>
<input type="submit" name="fulltext" value="Search" title="Search the pages for this text" id="mw-searchButton" class="searchButton mw-fallbackSearchButton"/>
<input type="submit" name="go" value="Go" title="Go to a page with this exact name if it exists" id="searchButton" class="searchButton"/>
</div>
</form>
</div>
</div>
</div>
</div>
<div id="mw-panel">
<div id="p-logo" role="banner">
<a class="mw-wiki-logo" href="images/archive/c/c3/20221214193624!I915_Scheduling_Events_and_Requests.png.html"
title="Visit the main page"></a>
</div>
<nav id="p-navigation" class="mw-portlet mw-portlet-navigation vector-menu vector-menu-portal portal" aria-labelledby="p-navigation-label" role="navigation"
>
<h3 id="p-navigation-label" class="vector-menu-heading"> <span>Navigation</span>
</h3>
<div class="vector-menu-content">
<ul class="vector-menu-content-list"><li id="n-mainpage-description" class="mw-list-item"><a href="images/archive/c/c3/20221214193624!I915_Scheduling_Events_and_Requests.png.html" title="Visit the main page [z]" accesskey="z">Main page</a></li><li id="n-recentchanges" class="mw-list-item"><a href="https://open-iov.org/index.php/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r">Recent changes</a></li><li id="n-randompage" class="mw-list-item"><a href="index.php/Special:Random.html" title="Load a random page [x]" accesskey="x">Random page</a></li><li id="n-help-mediawiki" class="mw-list-item"><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents">Help about MediaWiki</a></li></ul>
</div>
</nav>
<nav id="p-tb" class="mw-portlet mw-portlet-tb vector-menu vector-menu-portal portal" aria-labelledby="p-tb-label" role="navigation"
>
<h3 id="p-tb-label" class="vector-menu-heading"> <span>Tools</span>
</h3>
<div class="vector-menu-content">
<ul class="vector-menu-content-list"><li id="t-whatlinkshere" class="mw-list-item"><a href="index.php/Special:WhatLinksHere/OpenRM.html" title="A list of all wiki pages that link here [j]" accesskey="j">What links here</a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="https://open-iov.org/index.php/Special:RecentChangesLinked/OpenRM" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li><li id="t-specialpages" class="mw-list-item"><a href="index.php/Special:SpecialPages.html" title="A list of all special pages [q]" accesskey="q">Special pages</a></li><li id="t-info" class="mw-list-item"><a href="index.php%3Ftitle=OpenRM&action=info.html" title="More information about this page">Page information</a></li></ul>
</div>
</nav>
</div>
</div>
<footer id="footer" class="mw-footer" role="contentinfo" >
<ul id="footer-info" >
</ul>
<ul id="footer-places" >
<li id="footer-places-privacy"><a href="https://open-iov.org/index.php/Open-IOV:Privacy_policy" title="Open-IOV:Privacy policy">Privacy policy</a></li>
<li id="footer-places-about"><a href="index.php/Open-IOV:About.html" title="Open-IOV:About">About Open-IOV</a></li>
<li id="footer-places-disclaimer"><a href="https://open-iov.org/index.php/Open-IOV:General_disclaimer" title="Open-IOV:General disclaimer">Disclaimers</a></li>
</ul>
<ul id="footer-icons" class="noprint">
<li id="footer-poweredbyico"><a href="https://www.mediawiki.org/"><img src="resources/assets/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" srcset="resources/assets/poweredby_mediawiki_132x47.png 1.5x, resources/assets/poweredby_mediawiki_176x62.png 2x" width="88" height="31" loading="lazy"/></a></li>
</ul>
</footer>
<script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgBackendResponseTime":63});});</script>
<script>(function(){function c(){var b=a.contentDocument||(a.contentWindow&&a.contentWindow.document);if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'a399698bbc9039c9',t:'MTc4OTE1ODQzNw=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script></body></html>
|