Skip to content

Commit ecf6ddd

Browse files
authored
Add cl_arm_protected_memory_allocation specification (#727)
* Add cl_arm_protected_memory_allocation specification Signed-off-by: Kevin Petit <kevin.petit@arm.com> Change-Id: I969d5c64fdf167e6453fc545e85b46cb5663d1c5 * declare extension in XML Change-Id: Id0ed65abf1786c938739d26c019f3b8568cacf11
1 parent c6ff293 commit ecf6ddd

2 files changed

Lines changed: 110 additions & 1 deletion

File tree

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
// Copyright 2018-2021 The Khronos Group. This work is licensed under a
2+
// Creative Commons Attribution 4.0 International License; see
3+
// http://creativecommons.org/licenses/by/4.0/
4+
5+
:data-uri:
6+
:icons: font
7+
include::../config/attribs.txt[]
8+
:source-highlighter: coderay
9+
10+
= cl_arm_protected_memory_allocation
11+
12+
== Name Strings
13+
14+
`cl_arm_protected_memory_allocation`
15+
16+
== Contact
17+
18+
Kevin Petit (kevin.petit 'at' arm.com)
19+
20+
== Contributors
21+
22+
Kevin Petit, Arm Ltd. +
23+
24+
== Notice
25+
26+
Copyright (c) 2021 Arm Ltd.
27+
28+
== Status
29+
30+
Shipping
31+
32+
== Version
33+
34+
Built On: {docdate} +
35+
Version: 1.0.0
36+
37+
== Dependencies
38+
39+
This extension is written against the OpenCL Specification version 3.0.6.
40+
41+
This extension requires OpenCL 1.2.
42+
43+
== Overview
44+
45+
This extensions enables the creation of buffers and images backed by protected
46+
memory, i.e. memory protected using TrustZone Media Protection.
47+
48+
== New API Enums
49+
50+
New flag added to `cl_mem_flags`:
51+
52+
[source,c]
53+
----
54+
CL_MEM_PROTECTED_ALLOC_ARM (1 << 36)
55+
----
56+
57+
== Modifications to the OpenCL API Specification
58+
59+
(Modify Section 5.2.1, *Creating Buffer Objects*) ::
60+
+
61+
--
62+
63+
(Add the following to Table 12, _List of supported memory flag values_) ::
64+
+
65+
--
66+
67+
[cols="1,1",options="header"]
68+
|====
69+
| Memory flags
70+
| Description
71+
72+
| `CL_MEM_PROTECTED_ALLOC_ARM`
73+
| Specifies that the memory object being created will be backed by protected
74+
memory. When this flag is present, the only host flag allowed is
75+
`CL_MEM_HOST_NO_ACCESS`. If host flags are omitted, `CL_MEM_HOST_NO_ACCESS`
76+
is assumed.
77+
78+
|====
79+
80+
--
81+
--
82+
83+
== Interactions with Other Extensions
84+
85+
None.
86+
87+
== Conformance tests
88+
89+
None.
90+
91+
== Issues
92+
93+
None.
94+
95+
== Version History
96+
97+
[cols="5,15,15,70"]
98+
[grid="rows"]
99+
[options="header"]
100+
|====
101+
| Version | Date | Author | Changes
102+
| 1.0.0 | 2021-07-09 | Kevin Petit | *Initial revision*
103+
|====
104+

xml/cl.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ server's OpenCL/api-docs repository.
840840
<enum bitpos="33" name="CL_MEM_RESERVED1_ARM"/>
841841
<enum bitpos="34" name="CL_MEM_RESERVED2_ARM"/>
842842
<enum bitpos="35" name="CL_MEM_RESERVED3_ARM"/>
843-
<enum bitpos="36" name="CL_MEM_RESERVED4_ARM"/>
843+
<enum bitpos="36" name="CL_MEM_PROTECTED_ALLOC_ARM"/>
844844
<enum bitpos="37" name="CL_MEM_RESERVED0_QCOM"/>
845845
<enum bitpos="38" name="CL_MEM_RESERVED1_QCOM"/>
846846
<enum bitpos="39" name="CL_MEM_RESERVED2_QCOM"/>
@@ -6886,5 +6886,10 @@ server's OpenCL/api-docs repository.
68866886
<command name="clGetCommandBufferInfoKHR"/>
68876887
</require>
68886888
</extension>
6889+
<extension name="cl_arm_protected_memory_allocation" supported="opencl">
6890+
<require>
6891+
<enum name="CL_MEM_PROTECTED_ALLOC_ARM"/>
6892+
</require>
6893+
</extension>
68896894
</extensions>
68906895
</registry>

0 commit comments

Comments
 (0)