You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/core/EXT_IPC_MEM_HANDLE_TYPE.rst
+70Lines changed: 70 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,17 @@ When users are requesting IPC handles for L0 memory, there may be requirements f
39
39
40
40
To facilitate this, the IPC Memory Handle Type Extension provides a mechanism to specify the type of IPC handle to be created during memory allocation or when obtaining an IPC handle for existing memory.
41
41
42
+
Physical memory handles (``${x}_physical_mem_handle_t``) may be used as a source for IPC handles via
43
+
${x}MemGetIpcHandleWithProperties. The ``ptr`` argument may be either:
44
+
45
+
- A virtual address that was mapped to a physical memory object via ${x}VirtualMemMap, or
46
+
- A value returned directly from ${x}PhysicalMemCreate.
47
+
48
+
Only one physical memory object may be associated with a single IPC handle at a time. When the
49
+
resulting IPC handle is opened in the receiving process via ${x}MemOpenIpcHandle, the driver
50
+
assigns a new virtual address in the importing process without requiring a separate
51
+
${x}VirtualMemReserve or ${x}VirtualMemMap call.
52
+
42
53
Checking IPC Support
43
54
~~~~~~~~~~~~~~~~~~~~~
44
55
@@ -77,6 +88,65 @@ To request an IPC handle for L0 memory that is fabric accessible, the user would
77
88
78
89
If the driver does not support ``ZE_IPC_MEM_HANDLE_TYPE_FLAG_FABRIC_ACCESSIBLE``, the function will return ``ZE_RESULT_ERROR_UNSUPPORTED_FEATURE``. Applications can proactively check for support by querying ``${x}_driver_ipc_properties_t`` as shown in the "Checking IPC Support" section above.
79
90
91
+
Get IPC Handle from Physical Memory Example
92
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
93
+
94
+
To obtain an IPC handle from a physical memory object, the ``ptr`` argument passed to
95
+
${x}MemGetIpcHandleWithProperties may be either the physical memory handle cast to a pointer,
96
+
or a virtual address previously mapped to the physical memory object via ${x}VirtualMemMap.
97
+
The following example demonstrates the mapped VA case:
0 commit comments