1#[derive(Default)]
2pub struct seL4_TCB_SetFlags_ret {
3 pub error: seL4_Error::Type,
4 pub flags: seL4_Word,
5}
6#[derive(Default)]
7pub struct seL4_ARM_Page_GetAddress_ret {
8 pub error: seL4_Error::Type,
9 pub paddr: seL4_Word,
10}
11#[derive(Default)]
12pub struct seL4_ARM_VCPU_ReadRegs_ret {
13 pub error: seL4_Error::Type,
14 pub value: seL4_Word,
15}
16impl seL4_IPCBuffer {
17 #[allow(clippy::field_reassign_with_default)]
18 pub fn seL4_Untyped_Retype(
19 &mut self,
20 service: seL4_Untyped,
21 r#type: seL4_Word,
22 r#size_bits: seL4_Word,
23 r#root: seL4_CNode,
24 r#node_index: seL4_Word,
25 r#node_depth: seL4_Word,
26 r#node_offset: seL4_Word,
27 r#num_objects: seL4_Word,
28 ) -> seL4_Error::Type {
29 log::trace!(
30 "seL4_Untyped_Retype(_service={:?}, type={:?}, size_bits={:?}, root={:?}, node_index={:?}, node_depth={:?}, node_offset={:?}, num_objects={:?})",
31 service, r#type, r#size_bits, r#root, r#node_index, r#node_depth,
32 r#node_offset, r#num_objects,
33 );
34 self.msg[..6usize].fill(0);
35 self.set_mr_bits(0usize..64usize, r#type);
36 self.set_mr_bits(64usize..128usize, r#size_bits);
37 self.set_cap(0usize, r#root);
38 self.set_mr_bits(128usize..192usize, r#node_index);
39 self.set_mr_bits(192usize..256usize, r#node_depth);
40 self.set_mr_bits(256usize..320usize, r#node_offset);
41 self.set_mr_bits(320usize..384usize, r#num_objects);
42 let info_in = seL4_MessageInfo::new(
43 invocation_label::UntypedRetype.into(),
44 0,
45 1u64,
46 6u64,
47 );
48 let info_out = self.seL4_Call(service, info_in);
49 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
50 err
51 }
52 #[allow(clippy::field_reassign_with_default)]
53 pub fn seL4_TCB_ReadRegisters(
54 &mut self,
55 service: seL4_TCB,
56 r#suspend_source: seL4_Bool,
57 r#arch_flags: seL4_Uint8,
58 r#count: seL4_Word,
59 r#regs: &mut seL4_UserContext,
60 ) -> seL4_Error::Type {
61 log::trace!(
62 "seL4_TCB_ReadRegisters(_service={:?}, suspend_source={:?}, arch_flags={:?}, count={:?})",
63 service, r#suspend_source, r#arch_flags, r#count,
64 );
65 self.msg[..2usize].fill(0);
66 self.set_mr_bits(0usize..1usize, r#suspend_source);
67 self.set_mr_bits(8usize..16usize, r#arch_flags);
68 self.set_mr_bits(64usize..128usize, r#count);
69 let info_in = seL4_MessageInfo::new(
70 invocation_label::TCBReadRegisters.into(),
71 0,
72 0u64,
73 2u64,
74 );
75 let info_out = self.seL4_Call(service, info_in);
76 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
77 regs.pc = self.get_mr_bits(0usize..64usize);
78 regs.sp = self.get_mr_bits(64usize..128usize);
79 regs.spsr = self.get_mr_bits(128usize..192usize);
80 regs.x0 = self.get_mr_bits(192usize..256usize);
81 regs.x1 = self.get_mr_bits(256usize..320usize);
82 regs.x2 = self.get_mr_bits(320usize..384usize);
83 regs.x3 = self.get_mr_bits(384usize..448usize);
84 regs.x4 = self.get_mr_bits(448usize..512usize);
85 regs.x5 = self.get_mr_bits(512usize..576usize);
86 regs.x6 = self.get_mr_bits(576usize..640usize);
87 regs.x7 = self.get_mr_bits(640usize..704usize);
88 regs.x8 = self.get_mr_bits(704usize..768usize);
89 regs.x16 = self.get_mr_bits(768usize..832usize);
90 regs.x17 = self.get_mr_bits(832usize..896usize);
91 regs.x18 = self.get_mr_bits(896usize..960usize);
92 regs.x29 = self.get_mr_bits(960usize..1024usize);
93 regs.x30 = self.get_mr_bits(1024usize..1088usize);
94 regs.x9 = self.get_mr_bits(1088usize..1152usize);
95 regs.x10 = self.get_mr_bits(1152usize..1216usize);
96 regs.x11 = self.get_mr_bits(1216usize..1280usize);
97 regs.x12 = self.get_mr_bits(1280usize..1344usize);
98 regs.x13 = self.get_mr_bits(1344usize..1408usize);
99 regs.x14 = self.get_mr_bits(1408usize..1472usize);
100 regs.x15 = self.get_mr_bits(1472usize..1536usize);
101 regs.x19 = self.get_mr_bits(1536usize..1600usize);
102 regs.x20 = self.get_mr_bits(1600usize..1664usize);
103 regs.x21 = self.get_mr_bits(1664usize..1728usize);
104 regs.x22 = self.get_mr_bits(1728usize..1792usize);
105 regs.x23 = self.get_mr_bits(1792usize..1856usize);
106 regs.x24 = self.get_mr_bits(1856usize..1920usize);
107 regs.x25 = self.get_mr_bits(1920usize..1984usize);
108 regs.x26 = self.get_mr_bits(1984usize..2048usize);
109 regs.x27 = self.get_mr_bits(2048usize..2112usize);
110 regs.x28 = self.get_mr_bits(2112usize..2176usize);
111 regs.tpidr_el0 = self.get_mr_bits(2176usize..2240usize);
112 regs.tpidrro_el0 = self.get_mr_bits(2240usize..2304usize);
113 err
114 }
115 #[allow(clippy::field_reassign_with_default)]
116 pub fn seL4_TCB_WriteRegisters(
117 &mut self,
118 service: seL4_TCB,
119 r#resume_target: seL4_Bool,
120 r#arch_flags: seL4_Uint8,
121 r#count: seL4_Word,
122 r#regs: &seL4_UserContext,
123 ) -> seL4_Error::Type {
124 log::trace!(
125 "seL4_TCB_WriteRegisters(_service={:?}, resume_target={:?}, arch_flags={:?}, count={:?}, regs={:?})",
126 service, r#resume_target, r#arch_flags, r#count, r#regs,
127 );
128 self.msg[..38usize].fill(0);
129 self.set_mr_bits(0usize..1usize, r#resume_target);
130 self.set_mr_bits(8usize..16usize, r#arch_flags);
131 self.set_mr_bits(64usize..128usize, r#count);
132 self.set_mr_bits(128usize..192usize, regs.pc);
133 self.set_mr_bits(192usize..256usize, regs.sp);
134 self.set_mr_bits(256usize..320usize, regs.spsr);
135 self.set_mr_bits(320usize..384usize, regs.x0);
136 self.set_mr_bits(384usize..448usize, regs.x1);
137 self.set_mr_bits(448usize..512usize, regs.x2);
138 self.set_mr_bits(512usize..576usize, regs.x3);
139 self.set_mr_bits(576usize..640usize, regs.x4);
140 self.set_mr_bits(640usize..704usize, regs.x5);
141 self.set_mr_bits(704usize..768usize, regs.x6);
142 self.set_mr_bits(768usize..832usize, regs.x7);
143 self.set_mr_bits(832usize..896usize, regs.x8);
144 self.set_mr_bits(896usize..960usize, regs.x16);
145 self.set_mr_bits(960usize..1024usize, regs.x17);
146 self.set_mr_bits(1024usize..1088usize, regs.x18);
147 self.set_mr_bits(1088usize..1152usize, regs.x29);
148 self.set_mr_bits(1152usize..1216usize, regs.x30);
149 self.set_mr_bits(1216usize..1280usize, regs.x9);
150 self.set_mr_bits(1280usize..1344usize, regs.x10);
151 self.set_mr_bits(1344usize..1408usize, regs.x11);
152 self.set_mr_bits(1408usize..1472usize, regs.x12);
153 self.set_mr_bits(1472usize..1536usize, regs.x13);
154 self.set_mr_bits(1536usize..1600usize, regs.x14);
155 self.set_mr_bits(1600usize..1664usize, regs.x15);
156 self.set_mr_bits(1664usize..1728usize, regs.x19);
157 self.set_mr_bits(1728usize..1792usize, regs.x20);
158 self.set_mr_bits(1792usize..1856usize, regs.x21);
159 self.set_mr_bits(1856usize..1920usize, regs.x22);
160 self.set_mr_bits(1920usize..1984usize, regs.x23);
161 self.set_mr_bits(1984usize..2048usize, regs.x24);
162 self.set_mr_bits(2048usize..2112usize, regs.x25);
163 self.set_mr_bits(2112usize..2176usize, regs.x26);
164 self.set_mr_bits(2176usize..2240usize, regs.x27);
165 self.set_mr_bits(2240usize..2304usize, regs.x28);
166 self.set_mr_bits(2304usize..2368usize, regs.tpidr_el0);
167 self.set_mr_bits(2368usize..2432usize, regs.tpidrro_el0);
168 let info_in = seL4_MessageInfo::new(
169 invocation_label::TCBWriteRegisters.into(),
170 0,
171 0u64,
172 38u64,
173 );
174 let info_out = self.seL4_Call(service, info_in);
175 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
176 err
177 }
178 #[allow(clippy::field_reassign_with_default)]
179 pub fn seL4_TCB_CopyRegisters(
180 &mut self,
181 service: seL4_TCB,
182 r#source: seL4_TCB,
183 r#suspend_source: seL4_Bool,
184 r#resume_target: seL4_Bool,
185 r#transfer_frame: seL4_Bool,
186 r#transfer_integer: seL4_Bool,
187 r#arch_flags: seL4_Uint8,
188 ) -> seL4_Error::Type {
189 log::trace!(
190 "seL4_TCB_CopyRegisters(_service={:?}, source={:?}, suspend_source={:?}, resume_target={:?}, transfer_frame={:?}, transfer_integer={:?}, arch_flags={:?})",
191 service, r#source, r#suspend_source, r#resume_target, r#transfer_frame,
192 r#transfer_integer, r#arch_flags,
193 );
194 self.msg[..1usize].fill(0);
195 self.set_cap(0usize, r#source);
196 self.set_mr_bits(0usize..1usize, r#suspend_source);
197 self.set_mr_bits(1usize..2usize, r#resume_target);
198 self.set_mr_bits(2usize..3usize, r#transfer_frame);
199 self.set_mr_bits(3usize..4usize, r#transfer_integer);
200 self.set_mr_bits(8usize..16usize, r#arch_flags);
201 let info_in = seL4_MessageInfo::new(
202 invocation_label::TCBCopyRegisters.into(),
203 0,
204 1u64,
205 1u64,
206 );
207 let info_out = self.seL4_Call(service, info_in);
208 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
209 err
210 }
211 #[allow(clippy::field_reassign_with_default)]
212 pub fn seL4_TCB_Configure(
213 &mut self,
214 service: seL4_TCB,
215 r#fault_ep: seL4_Word,
216 r#cspace_root: seL4_CNode,
217 r#cspace_root_data: seL4_Word,
218 r#vspace_root: seL4_CPtr,
219 r#vspace_root_data: seL4_Word,
220 r#buffer: seL4_Word,
221 r#bufferFrame: seL4_CPtr,
222 ) -> seL4_Error::Type {
223 log::trace!(
224 "seL4_TCB_Configure(_service={:?}, fault_ep={:?}, cspace_root={:?}, cspace_root_data={:?}, vspace_root={:?}, vspace_root_data={:?}, buffer={:?}, bufferFrame={:?})",
225 service, r#fault_ep, r#cspace_root, r#cspace_root_data, r#vspace_root,
226 r#vspace_root_data, r#buffer, r#bufferFrame,
227 );
228 self.msg[..4usize].fill(0);
229 self.set_mr_bits(0usize..64usize, r#fault_ep);
230 self.set_cap(0usize, r#cspace_root);
231 self.set_mr_bits(64usize..128usize, r#cspace_root_data);
232 self.set_cap(1usize, r#vspace_root);
233 self.set_mr_bits(128usize..192usize, r#vspace_root_data);
234 self.set_mr_bits(192usize..256usize, r#buffer);
235 self.set_cap(2usize, r#bufferFrame);
236 let info_in = seL4_MessageInfo::new(
237 invocation_label::TCBConfigure.into(),
238 0,
239 3u64,
240 4u64,
241 );
242 let info_out = self.seL4_Call(service, info_in);
243 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
244 err
245 }
246 #[allow(clippy::field_reassign_with_default)]
247 pub fn seL4_TCB_SetPriority(
248 &mut self,
249 service: seL4_TCB,
250 r#authority: seL4_TCB,
251 r#priority: seL4_Word,
252 ) -> seL4_Error::Type {
253 log::trace!(
254 "seL4_TCB_SetPriority(_service={:?}, authority={:?}, priority={:?})",
255 service, r#authority, r#priority,
256 );
257 self.msg[..1usize].fill(0);
258 self.set_cap(0usize, r#authority);
259 self.set_mr_bits(0usize..64usize, r#priority);
260 let info_in = seL4_MessageInfo::new(
261 invocation_label::TCBSetPriority.into(),
262 0,
263 1u64,
264 1u64,
265 );
266 let info_out = self.seL4_Call(service, info_in);
267 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
268 err
269 }
270 #[allow(clippy::field_reassign_with_default)]
271 pub fn seL4_TCB_SetMCPriority(
272 &mut self,
273 service: seL4_TCB,
274 r#authority: seL4_TCB,
275 r#mcp: seL4_Word,
276 ) -> seL4_Error::Type {
277 log::trace!(
278 "seL4_TCB_SetMCPriority(_service={:?}, authority={:?}, mcp={:?})", service,
279 r#authority, r#mcp,
280 );
281 self.msg[..1usize].fill(0);
282 self.set_cap(0usize, r#authority);
283 self.set_mr_bits(0usize..64usize, r#mcp);
284 let info_in = seL4_MessageInfo::new(
285 invocation_label::TCBSetMCPriority.into(),
286 0,
287 1u64,
288 1u64,
289 );
290 let info_out = self.seL4_Call(service, info_in);
291 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
292 err
293 }
294 #[allow(clippy::field_reassign_with_default)]
295 pub fn seL4_TCB_SetSchedParams(
296 &mut self,
297 service: seL4_TCB,
298 r#authority: seL4_TCB,
299 r#mcp: seL4_Word,
300 r#priority: seL4_Word,
301 ) -> seL4_Error::Type {
302 log::trace!(
303 "seL4_TCB_SetSchedParams(_service={:?}, authority={:?}, mcp={:?}, priority={:?})",
304 service, r#authority, r#mcp, r#priority,
305 );
306 self.msg[..2usize].fill(0);
307 self.set_cap(0usize, r#authority);
308 self.set_mr_bits(0usize..64usize, r#mcp);
309 self.set_mr_bits(64usize..128usize, r#priority);
310 let info_in = seL4_MessageInfo::new(
311 invocation_label::TCBSetSchedParams.into(),
312 0,
313 1u64,
314 2u64,
315 );
316 let info_out = self.seL4_Call(service, info_in);
317 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
318 err
319 }
320 #[allow(clippy::field_reassign_with_default)]
321 pub fn seL4_TCB_SetIPCBuffer(
322 &mut self,
323 service: seL4_TCB,
324 r#buffer: seL4_Word,
325 r#bufferFrame: seL4_CPtr,
326 ) -> seL4_Error::Type {
327 log::trace!(
328 "seL4_TCB_SetIPCBuffer(_service={:?}, buffer={:?}, bufferFrame={:?})",
329 service, r#buffer, r#bufferFrame,
330 );
331 self.msg[..1usize].fill(0);
332 self.set_mr_bits(0usize..64usize, r#buffer);
333 self.set_cap(0usize, r#bufferFrame);
334 let info_in = seL4_MessageInfo::new(
335 invocation_label::TCBSetIPCBuffer.into(),
336 0,
337 1u64,
338 1u64,
339 );
340 let info_out = self.seL4_Call(service, info_in);
341 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
342 err
343 }
344 #[allow(clippy::field_reassign_with_default)]
345 pub fn seL4_TCB_SetSpace(
346 &mut self,
347 service: seL4_TCB,
348 r#fault_ep: seL4_Word,
349 r#cspace_root: seL4_CNode,
350 r#cspace_root_data: seL4_Word,
351 r#vspace_root: seL4_CPtr,
352 r#vspace_root_data: seL4_Word,
353 ) -> seL4_Error::Type {
354 log::trace!(
355 "seL4_TCB_SetSpace(_service={:?}, fault_ep={:?}, cspace_root={:?}, cspace_root_data={:?}, vspace_root={:?}, vspace_root_data={:?})",
356 service, r#fault_ep, r#cspace_root, r#cspace_root_data, r#vspace_root,
357 r#vspace_root_data,
358 );
359 self.msg[..3usize].fill(0);
360 self.set_mr_bits(0usize..64usize, r#fault_ep);
361 self.set_cap(0usize, r#cspace_root);
362 self.set_mr_bits(64usize..128usize, r#cspace_root_data);
363 self.set_cap(1usize, r#vspace_root);
364 self.set_mr_bits(128usize..192usize, r#vspace_root_data);
365 let info_in = seL4_MessageInfo::new(
366 invocation_label::TCBSetSpace.into(),
367 0,
368 2u64,
369 3u64,
370 );
371 let info_out = self.seL4_Call(service, info_in);
372 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
373 err
374 }
375 #[allow(clippy::field_reassign_with_default)]
376 pub fn seL4_TCB_Suspend(&mut self, service: seL4_TCB) -> seL4_Error::Type {
377 log::trace!("seL4_TCB_Suspend(_service={:?})", service,);
378 self.msg[..0usize].fill(0);
379 let info_in = seL4_MessageInfo::new(
380 invocation_label::TCBSuspend.into(),
381 0,
382 0u64,
383 0u64,
384 );
385 let info_out = self.seL4_Call(service, info_in);
386 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
387 err
388 }
389 #[allow(clippy::field_reassign_with_default)]
390 pub fn seL4_TCB_Resume(&mut self, service: seL4_TCB) -> seL4_Error::Type {
391 log::trace!("seL4_TCB_Resume(_service={:?})", service,);
392 self.msg[..0usize].fill(0);
393 let info_in = seL4_MessageInfo::new(
394 invocation_label::TCBResume.into(),
395 0,
396 0u64,
397 0u64,
398 );
399 let info_out = self.seL4_Call(service, info_in);
400 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
401 err
402 }
403 #[allow(clippy::field_reassign_with_default)]
404 pub fn seL4_TCB_BindNotification(
405 &mut self,
406 service: seL4_TCB,
407 r#notification: seL4_CPtr,
408 ) -> seL4_Error::Type {
409 log::trace!(
410 "seL4_TCB_BindNotification(_service={:?}, notification={:?})", service,
411 r#notification,
412 );
413 self.msg[..0usize].fill(0);
414 self.set_cap(0usize, r#notification);
415 let info_in = seL4_MessageInfo::new(
416 invocation_label::TCBBindNotification.into(),
417 0,
418 1u64,
419 0u64,
420 );
421 let info_out = self.seL4_Call(service, info_in);
422 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
423 err
424 }
425 #[allow(clippy::field_reassign_with_default)]
426 pub fn seL4_TCB_UnbindNotification(
427 &mut self,
428 service: seL4_TCB,
429 ) -> seL4_Error::Type {
430 log::trace!("seL4_TCB_UnbindNotification(_service={:?})", service,);
431 self.msg[..0usize].fill(0);
432 let info_in = seL4_MessageInfo::new(
433 invocation_label::TCBUnbindNotification.into(),
434 0,
435 0u64,
436 0u64,
437 );
438 let info_out = self.seL4_Call(service, info_in);
439 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
440 err
441 }
442 #[allow(clippy::field_reassign_with_default)]
443 pub fn seL4_TCB_SetAffinity(
444 &mut self,
445 service: seL4_TCB,
446 r#affinity: seL4_Word,
447 ) -> seL4_Error::Type {
448 log::trace!(
449 "seL4_TCB_SetAffinity(_service={:?}, affinity={:?})", service, r#affinity,
450 );
451 self.msg[..1usize].fill(0);
452 self.set_mr_bits(0usize..64usize, r#affinity);
453 let info_in = seL4_MessageInfo::new(
454 invocation_label::TCBSetAffinity.into(),
455 0,
456 0u64,
457 1u64,
458 );
459 let info_out = self.seL4_Call(service, info_in);
460 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
461 err
462 }
463 #[allow(clippy::field_reassign_with_default)]
464 pub fn seL4_TCB_SetTLSBase(
465 &mut self,
466 service: seL4_TCB,
467 r#tls_base: seL4_Word,
468 ) -> seL4_Error::Type {
469 log::trace!(
470 "seL4_TCB_SetTLSBase(_service={:?}, tls_base={:?})", service, r#tls_base,
471 );
472 self.msg[..1usize].fill(0);
473 self.set_mr_bits(0usize..64usize, r#tls_base);
474 let info_in = seL4_MessageInfo::new(
475 invocation_label::TCBSetTLSBase.into(),
476 0,
477 0u64,
478 1u64,
479 );
480 let info_out = self.seL4_Call(service, info_in);
481 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
482 err
483 }
484 #[allow(clippy::field_reassign_with_default)]
485 pub fn seL4_TCB_SetFlags(
486 &mut self,
487 service: seL4_TCB,
488 r#clear: seL4_Word,
489 r#set: seL4_Word,
490 ) -> seL4_TCB_SetFlags_ret {
491 log::trace!(
492 "seL4_TCB_SetFlags(_service={:?}, clear={:?}, set={:?})", service, r#clear,
493 r#set,
494 );
495 self.msg[..2usize].fill(0);
496 self.set_mr_bits(0usize..64usize, r#clear);
497 self.set_mr_bits(64usize..128usize, r#set);
498 let info_in = seL4_MessageInfo::new(
499 invocation_label::TCBSetFlags.into(),
500 0,
501 0u64,
502 2u64,
503 );
504 let info_out = self.seL4_Call(service, info_in);
505 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
506 let mut ret: seL4_TCB_SetFlags_ret = Default::default();
507 ret.error = err;
508 ret.flags = self.get_mr_bits(0usize..64usize);
509 ret
510 }
511 #[allow(clippy::field_reassign_with_default)]
512 pub fn seL4_CNode_Revoke(
513 &mut self,
514 service: seL4_CNode,
515 r#index: seL4_Word,
516 r#depth: seL4_Uint8,
517 ) -> seL4_Error::Type {
518 log::trace!(
519 "seL4_CNode_Revoke(_service={:?}, index={:?}, depth={:?})", service, r#index,
520 r#depth,
521 );
522 self.msg[..2usize].fill(0);
523 self.set_mr_bits(0usize..64usize, r#index);
524 self.set_mr_bits(64usize..72usize, r#depth);
525 let info_in = seL4_MessageInfo::new(
526 invocation_label::CNodeRevoke.into(),
527 0,
528 0u64,
529 2u64,
530 );
531 let info_out = self.seL4_Call(service, info_in);
532 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
533 err
534 }
535 #[allow(clippy::field_reassign_with_default)]
536 pub fn seL4_CNode_Delete(
537 &mut self,
538 service: seL4_CNode,
539 r#index: seL4_Word,
540 r#depth: seL4_Uint8,
541 ) -> seL4_Error::Type {
542 log::trace!(
543 "seL4_CNode_Delete(_service={:?}, index={:?}, depth={:?})", service, r#index,
544 r#depth,
545 );
546 self.msg[..2usize].fill(0);
547 self.set_mr_bits(0usize..64usize, r#index);
548 self.set_mr_bits(64usize..72usize, r#depth);
549 let info_in = seL4_MessageInfo::new(
550 invocation_label::CNodeDelete.into(),
551 0,
552 0u64,
553 2u64,
554 );
555 let info_out = self.seL4_Call(service, info_in);
556 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
557 err
558 }
559 #[allow(clippy::field_reassign_with_default)]
560 pub fn seL4_CNode_CancelBadgedSends(
561 &mut self,
562 service: seL4_CNode,
563 r#index: seL4_Word,
564 r#depth: seL4_Uint8,
565 ) -> seL4_Error::Type {
566 log::trace!(
567 "seL4_CNode_CancelBadgedSends(_service={:?}, index={:?}, depth={:?})",
568 service, r#index, r#depth,
569 );
570 self.msg[..2usize].fill(0);
571 self.set_mr_bits(0usize..64usize, r#index);
572 self.set_mr_bits(64usize..72usize, r#depth);
573 let info_in = seL4_MessageInfo::new(
574 invocation_label::CNodeCancelBadgedSends.into(),
575 0,
576 0u64,
577 2u64,
578 );
579 let info_out = self.seL4_Call(service, info_in);
580 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
581 err
582 }
583 #[allow(clippy::field_reassign_with_default)]
584 pub fn seL4_CNode_Copy(
585 &mut self,
586 service: seL4_CNode,
587 r#dest_index: seL4_Word,
588 r#dest_depth: seL4_Uint8,
589 r#src_root: seL4_CNode,
590 r#src_index: seL4_Word,
591 r#src_depth: seL4_Uint8,
592 r#rights: seL4_CapRights_t,
593 ) -> seL4_Error::Type {
594 log::trace!(
595 "seL4_CNode_Copy(_service={:?}, dest_index={:?}, dest_depth={:?}, src_root={:?}, src_index={:?}, src_depth={:?}, rights={:?})",
596 service, r#dest_index, r#dest_depth, r#src_root, r#src_index, r#src_depth,
597 r#rights,
598 );
599 self.msg[..5usize].fill(0);
600 self.set_mr_bits(0usize..64usize, r#dest_index);
601 self.set_mr_bits(64usize..72usize, r#dest_depth);
602 self.set_cap(0usize, r#src_root);
603 self.set_mr_bits(128usize..192usize, r#src_index);
604 self.set_mr_bits(192usize..200usize, r#src_depth);
605 self.set_mr_bits_from_slice(256usize..320usize, r#rights.0.inner());
606 let info_in = seL4_MessageInfo::new(
607 invocation_label::CNodeCopy.into(),
608 0,
609 1u64,
610 5u64,
611 );
612 let info_out = self.seL4_Call(service, info_in);
613 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
614 err
615 }
616 #[allow(clippy::field_reassign_with_default)]
617 pub fn seL4_CNode_Mint(
618 &mut self,
619 service: seL4_CNode,
620 r#dest_index: seL4_Word,
621 r#dest_depth: seL4_Uint8,
622 r#src_root: seL4_CNode,
623 r#src_index: seL4_Word,
624 r#src_depth: seL4_Uint8,
625 r#rights: seL4_CapRights_t,
626 r#badge: seL4_Word,
627 ) -> seL4_Error::Type {
628 log::trace!(
629 "seL4_CNode_Mint(_service={:?}, dest_index={:?}, dest_depth={:?}, src_root={:?}, src_index={:?}, src_depth={:?}, rights={:?}, badge={:?})",
630 service, r#dest_index, r#dest_depth, r#src_root, r#src_index, r#src_depth,
631 r#rights, r#badge,
632 );
633 self.msg[..6usize].fill(0);
634 self.set_mr_bits(0usize..64usize, r#dest_index);
635 self.set_mr_bits(64usize..72usize, r#dest_depth);
636 self.set_cap(0usize, r#src_root);
637 self.set_mr_bits(128usize..192usize, r#src_index);
638 self.set_mr_bits(192usize..200usize, r#src_depth);
639 self.set_mr_bits_from_slice(256usize..320usize, r#rights.0.inner());
640 self.set_mr_bits(320usize..384usize, r#badge);
641 let info_in = seL4_MessageInfo::new(
642 invocation_label::CNodeMint.into(),
643 0,
644 1u64,
645 6u64,
646 );
647 let info_out = self.seL4_Call(service, info_in);
648 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
649 err
650 }
651 #[allow(clippy::field_reassign_with_default)]
652 pub fn seL4_CNode_Move(
653 &mut self,
654 service: seL4_CNode,
655 r#dest_index: seL4_Word,
656 r#dest_depth: seL4_Uint8,
657 r#src_root: seL4_CNode,
658 r#src_index: seL4_Word,
659 r#src_depth: seL4_Uint8,
660 ) -> seL4_Error::Type {
661 log::trace!(
662 "seL4_CNode_Move(_service={:?}, dest_index={:?}, dest_depth={:?}, src_root={:?}, src_index={:?}, src_depth={:?})",
663 service, r#dest_index, r#dest_depth, r#src_root, r#src_index, r#src_depth,
664 );
665 self.msg[..4usize].fill(0);
666 self.set_mr_bits(0usize..64usize, r#dest_index);
667 self.set_mr_bits(64usize..72usize, r#dest_depth);
668 self.set_cap(0usize, r#src_root);
669 self.set_mr_bits(128usize..192usize, r#src_index);
670 self.set_mr_bits(192usize..200usize, r#src_depth);
671 let info_in = seL4_MessageInfo::new(
672 invocation_label::CNodeMove.into(),
673 0,
674 1u64,
675 4u64,
676 );
677 let info_out = self.seL4_Call(service, info_in);
678 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
679 err
680 }
681 #[allow(clippy::field_reassign_with_default)]
682 pub fn seL4_CNode_Mutate(
683 &mut self,
684 service: seL4_CNode,
685 r#dest_index: seL4_Word,
686 r#dest_depth: seL4_Uint8,
687 r#src_root: seL4_CNode,
688 r#src_index: seL4_Word,
689 r#src_depth: seL4_Uint8,
690 r#badge: seL4_Word,
691 ) -> seL4_Error::Type {
692 log::trace!(
693 "seL4_CNode_Mutate(_service={:?}, dest_index={:?}, dest_depth={:?}, src_root={:?}, src_index={:?}, src_depth={:?}, badge={:?})",
694 service, r#dest_index, r#dest_depth, r#src_root, r#src_index, r#src_depth,
695 r#badge,
696 );
697 self.msg[..5usize].fill(0);
698 self.set_mr_bits(0usize..64usize, r#dest_index);
699 self.set_mr_bits(64usize..72usize, r#dest_depth);
700 self.set_cap(0usize, r#src_root);
701 self.set_mr_bits(128usize..192usize, r#src_index);
702 self.set_mr_bits(192usize..200usize, r#src_depth);
703 self.set_mr_bits(256usize..320usize, r#badge);
704 let info_in = seL4_MessageInfo::new(
705 invocation_label::CNodeMutate.into(),
706 0,
707 1u64,
708 5u64,
709 );
710 let info_out = self.seL4_Call(service, info_in);
711 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
712 err
713 }
714 #[allow(clippy::field_reassign_with_default)]
715 pub fn seL4_CNode_Rotate(
716 &mut self,
717 service: seL4_CNode,
718 r#dest_index: seL4_Word,
719 r#dest_depth: seL4_Uint8,
720 r#dest_badge: seL4_Word,
721 r#pivot_root: seL4_CNode,
722 r#pivot_index: seL4_Word,
723 r#pivot_depth: seL4_Uint8,
724 r#pivot_badge: seL4_Word,
725 r#src_root: seL4_CNode,
726 r#src_index: seL4_Word,
727 r#src_depth: seL4_Uint8,
728 ) -> seL4_Error::Type {
729 log::trace!(
730 "seL4_CNode_Rotate(_service={:?}, dest_index={:?}, dest_depth={:?}, dest_badge={:?}, pivot_root={:?}, pivot_index={:?}, pivot_depth={:?}, pivot_badge={:?}, src_root={:?}, src_index={:?}, src_depth={:?})",
731 service, r#dest_index, r#dest_depth, r#dest_badge, r#pivot_root,
732 r#pivot_index, r#pivot_depth, r#pivot_badge, r#src_root, r#src_index,
733 r#src_depth,
734 );
735 self.msg[..8usize].fill(0);
736 self.set_mr_bits(0usize..64usize, r#dest_index);
737 self.set_mr_bits(64usize..72usize, r#dest_depth);
738 self.set_mr_bits(128usize..192usize, r#dest_badge);
739 self.set_cap(0usize, r#pivot_root);
740 self.set_mr_bits(192usize..256usize, r#pivot_index);
741 self.set_mr_bits(256usize..264usize, r#pivot_depth);
742 self.set_mr_bits(320usize..384usize, r#pivot_badge);
743 self.set_cap(1usize, r#src_root);
744 self.set_mr_bits(384usize..448usize, r#src_index);
745 self.set_mr_bits(448usize..456usize, r#src_depth);
746 let info_in = seL4_MessageInfo::new(
747 invocation_label::CNodeRotate.into(),
748 0,
749 2u64,
750 8u64,
751 );
752 let info_out = self.seL4_Call(service, info_in);
753 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
754 err
755 }
756 #[allow(clippy::field_reassign_with_default)]
757 pub fn seL4_CNode_SaveCaller(
758 &mut self,
759 service: seL4_CNode,
760 r#index: seL4_Word,
761 r#depth: seL4_Uint8,
762 ) -> seL4_Error::Type {
763 log::trace!(
764 "seL4_CNode_SaveCaller(_service={:?}, index={:?}, depth={:?})", service,
765 r#index, r#depth,
766 );
767 self.msg[..2usize].fill(0);
768 self.set_mr_bits(0usize..64usize, r#index);
769 self.set_mr_bits(64usize..72usize, r#depth);
770 let info_in = seL4_MessageInfo::new(
771 invocation_label::CNodeSaveCaller.into(),
772 0,
773 0u64,
774 2u64,
775 );
776 let info_out = self.seL4_Call(service, info_in);
777 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
778 err
779 }
780 #[allow(clippy::field_reassign_with_default)]
781 pub fn seL4_IRQControl_Get(
782 &mut self,
783 service: seL4_IRQControl,
784 r#irq: seL4_Word,
785 r#root: seL4_CNode,
786 r#index: seL4_Word,
787 r#depth: seL4_Uint8,
788 ) -> seL4_Error::Type {
789 log::trace!(
790 "seL4_IRQControl_Get(_service={:?}, irq={:?}, root={:?}, index={:?}, depth={:?})",
791 service, r#irq, r#root, r#index, r#depth,
792 );
793 self.msg[..3usize].fill(0);
794 self.set_mr_bits(0usize..64usize, r#irq);
795 self.set_cap(0usize, r#root);
796 self.set_mr_bits(64usize..128usize, r#index);
797 self.set_mr_bits(128usize..136usize, r#depth);
798 let info_in = seL4_MessageInfo::new(
799 invocation_label::IRQIssueIRQHandler.into(),
800 0,
801 1u64,
802 3u64,
803 );
804 let info_out = self.seL4_Call(service, info_in);
805 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
806 err
807 }
808 #[allow(clippy::field_reassign_with_default)]
809 pub fn seL4_IRQHandler_Ack(&mut self, service: seL4_IRQHandler) -> seL4_Error::Type {
810 log::trace!("seL4_IRQHandler_Ack(_service={:?})", service,);
811 self.msg[..0usize].fill(0);
812 let info_in = seL4_MessageInfo::new(
813 invocation_label::IRQAckIRQ.into(),
814 0,
815 0u64,
816 0u64,
817 );
818 let info_out = self.seL4_Call(service, info_in);
819 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
820 err
821 }
822 #[allow(clippy::field_reassign_with_default)]
823 pub fn seL4_IRQHandler_SetNotification(
824 &mut self,
825 service: seL4_IRQHandler,
826 r#notification: seL4_CPtr,
827 ) -> seL4_Error::Type {
828 log::trace!(
829 "seL4_IRQHandler_SetNotification(_service={:?}, notification={:?})", service,
830 r#notification,
831 );
832 self.msg[..0usize].fill(0);
833 self.set_cap(0usize, r#notification);
834 let info_in = seL4_MessageInfo::new(
835 invocation_label::IRQSetIRQHandler.into(),
836 0,
837 1u64,
838 0u64,
839 );
840 let info_out = self.seL4_Call(service, info_in);
841 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
842 err
843 }
844 #[allow(clippy::field_reassign_with_default)]
845 pub fn seL4_IRQHandler_Clear(
846 &mut self,
847 service: seL4_IRQHandler,
848 ) -> seL4_Error::Type {
849 log::trace!("seL4_IRQHandler_Clear(_service={:?})", service,);
850 self.msg[..0usize].fill(0);
851 let info_in = seL4_MessageInfo::new(
852 invocation_label::IRQClearIRQHandler.into(),
853 0,
854 0u64,
855 0u64,
856 );
857 let info_out = self.seL4_Call(service, info_in);
858 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
859 err
860 }
861 #[allow(clippy::field_reassign_with_default)]
862 pub fn seL4_DomainSet_Set(
863 &mut self,
864 service: seL4_DomainSet,
865 r#domain: seL4_Uint8,
866 r#thread: seL4_TCB,
867 ) -> seL4_Error::Type {
868 log::trace!(
869 "seL4_DomainSet_Set(_service={:?}, domain={:?}, thread={:?})", service,
870 r#domain, r#thread,
871 );
872 self.msg[..1usize].fill(0);
873 self.set_mr_bits(0usize..8usize, r#domain);
874 self.set_cap(0usize, r#thread);
875 let info_in = seL4_MessageInfo::new(
876 invocation_label::DomainSetSet.into(),
877 0,
878 1u64,
879 1u64,
880 );
881 let info_out = self.seL4_Call(service, info_in);
882 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
883 err
884 }
885 #[allow(clippy::field_reassign_with_default)]
886 pub fn seL4_ARM_VSpace_Clean_Data(
887 &mut self,
888 service: seL4_ARM_VSpace,
889 r#start: seL4_Word,
890 r#end: seL4_Word,
891 ) -> seL4_Error::Type {
892 log::trace!(
893 "seL4_ARM_VSpace_Clean_Data(_service={:?}, start={:?}, end={:?})", service,
894 r#start, r#end,
895 );
896 self.msg[..2usize].fill(0);
897 self.set_mr_bits(0usize..64usize, r#start);
898 self.set_mr_bits(64usize..128usize, r#end);
899 let info_in = seL4_MessageInfo::new(
900 invocation_label::ARMVSpaceClean_Data.into(),
901 0,
902 0u64,
903 2u64,
904 );
905 let info_out = self.seL4_Call(service, info_in);
906 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
907 err
908 }
909 #[allow(clippy::field_reassign_with_default)]
910 pub fn seL4_ARM_VSpace_Invalidate_Data(
911 &mut self,
912 service: seL4_ARM_VSpace,
913 r#start: seL4_Word,
914 r#end: seL4_Word,
915 ) -> seL4_Error::Type {
916 log::trace!(
917 "seL4_ARM_VSpace_Invalidate_Data(_service={:?}, start={:?}, end={:?})",
918 service, r#start, r#end,
919 );
920 self.msg[..2usize].fill(0);
921 self.set_mr_bits(0usize..64usize, r#start);
922 self.set_mr_bits(64usize..128usize, r#end);
923 let info_in = seL4_MessageInfo::new(
924 invocation_label::ARMVSpaceInvalidate_Data.into(),
925 0,
926 0u64,
927 2u64,
928 );
929 let info_out = self.seL4_Call(service, info_in);
930 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
931 err
932 }
933 #[allow(clippy::field_reassign_with_default)]
934 pub fn seL4_ARM_VSpace_CleanInvalidate_Data(
935 &mut self,
936 service: seL4_ARM_VSpace,
937 r#start: seL4_Word,
938 r#end: seL4_Word,
939 ) -> seL4_Error::Type {
940 log::trace!(
941 "seL4_ARM_VSpace_CleanInvalidate_Data(_service={:?}, start={:?}, end={:?})",
942 service, r#start, r#end,
943 );
944 self.msg[..2usize].fill(0);
945 self.set_mr_bits(0usize..64usize, r#start);
946 self.set_mr_bits(64usize..128usize, r#end);
947 let info_in = seL4_MessageInfo::new(
948 invocation_label::ARMVSpaceCleanInvalidate_Data.into(),
949 0,
950 0u64,
951 2u64,
952 );
953 let info_out = self.seL4_Call(service, info_in);
954 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
955 err
956 }
957 #[allow(clippy::field_reassign_with_default)]
958 pub fn seL4_ARM_VSpace_Unify_Instruction(
959 &mut self,
960 service: seL4_ARM_VSpace,
961 r#start: seL4_Word,
962 r#end: seL4_Word,
963 ) -> seL4_Error::Type {
964 log::trace!(
965 "seL4_ARM_VSpace_Unify_Instruction(_service={:?}, start={:?}, end={:?})",
966 service, r#start, r#end,
967 );
968 self.msg[..2usize].fill(0);
969 self.set_mr_bits(0usize..64usize, r#start);
970 self.set_mr_bits(64usize..128usize, r#end);
971 let info_in = seL4_MessageInfo::new(
972 invocation_label::ARMVSpaceUnify_Instruction.into(),
973 0,
974 0u64,
975 2u64,
976 );
977 let info_out = self.seL4_Call(service, info_in);
978 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
979 err
980 }
981 #[allow(clippy::field_reassign_with_default)]
982 pub fn seL4_ARM_SMC_Call(
983 &mut self,
984 service: seL4_ARM_SMC,
985 r#smc_args: &seL4_ARM_SMCContext,
986 r#smc_response: &mut seL4_ARM_SMCContext,
987 ) -> seL4_Error::Type {
988 log::trace!(
989 "seL4_ARM_SMC_Call(_service={:?}, smc_args={:?})", service, r#smc_args,
990 );
991 self.msg[..8usize].fill(0);
992 self.set_mr_bits(0usize..64usize, smc_args.x0);
993 self.set_mr_bits(64usize..128usize, smc_args.x1);
994 self.set_mr_bits(128usize..192usize, smc_args.x2);
995 self.set_mr_bits(192usize..256usize, smc_args.x3);
996 self.set_mr_bits(256usize..320usize, smc_args.x4);
997 self.set_mr_bits(320usize..384usize, smc_args.x5);
998 self.set_mr_bits(384usize..448usize, smc_args.x6);
999 self.set_mr_bits(448usize..512usize, smc_args.x7);
1000 let info_in = seL4_MessageInfo::new(
1001 invocation_label::ARMSMCCall.into(),
1002 0,
1003 0u64,
1004 8u64,
1005 );
1006 let info_out = self.seL4_Call(service, info_in);
1007 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1008 smc_response.x0 = self.get_mr_bits(0usize..64usize);
1009 smc_response.x1 = self.get_mr_bits(64usize..128usize);
1010 smc_response.x2 = self.get_mr_bits(128usize..192usize);
1011 smc_response.x3 = self.get_mr_bits(192usize..256usize);
1012 smc_response.x4 = self.get_mr_bits(256usize..320usize);
1013 smc_response.x5 = self.get_mr_bits(320usize..384usize);
1014 smc_response.x6 = self.get_mr_bits(384usize..448usize);
1015 smc_response.x7 = self.get_mr_bits(448usize..512usize);
1016 err
1017 }
1018 #[allow(clippy::field_reassign_with_default)]
1019 pub fn seL4_ARM_PageTable_Map(
1020 &mut self,
1021 service: seL4_ARM_PageTable,
1022 r#vspace: seL4_CPtr,
1023 r#vaddr: seL4_Word,
1024 r#attr: seL4_ARM_VMAttributes::Type,
1025 ) -> seL4_Error::Type {
1026 log::trace!(
1027 "seL4_ARM_PageTable_Map(_service={:?}, vspace={:?}, vaddr={:?}, attr={:?})",
1028 service, r#vspace, r#vaddr, r#attr,
1029 );
1030 self.msg[..2usize].fill(0);
1031 self.set_cap(0usize, r#vspace);
1032 self.set_mr_bits(0usize..64usize, r#vaddr);
1033 self.set_mr_bits(64usize..128usize, r#attr);
1034 let info_in = seL4_MessageInfo::new(
1035 invocation_label::ARMPageTableMap.into(),
1036 0,
1037 1u64,
1038 2u64,
1039 );
1040 let info_out = self.seL4_Call(service, info_in);
1041 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1042 err
1043 }
1044 #[allow(clippy::field_reassign_with_default)]
1045 pub fn seL4_ARM_PageTable_Unmap(
1046 &mut self,
1047 service: seL4_ARM_PageTable,
1048 ) -> seL4_Error::Type {
1049 log::trace!("seL4_ARM_PageTable_Unmap(_service={:?})", service,);
1050 self.msg[..0usize].fill(0);
1051 let info_in = seL4_MessageInfo::new(
1052 invocation_label::ARMPageTableUnmap.into(),
1053 0,
1054 0u64,
1055 0u64,
1056 );
1057 let info_out = self.seL4_Call(service, info_in);
1058 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1059 err
1060 }
1061 #[allow(clippy::field_reassign_with_default)]
1062 pub fn seL4_ARM_Page_Map(
1063 &mut self,
1064 service: seL4_ARM_Page,
1065 r#vspace: seL4_CPtr,
1066 r#vaddr: seL4_Word,
1067 r#rights: seL4_CapRights_t,
1068 r#attr: seL4_ARM_VMAttributes::Type,
1069 ) -> seL4_Error::Type {
1070 log::trace!(
1071 "seL4_ARM_Page_Map(_service={:?}, vspace={:?}, vaddr={:?}, rights={:?}, attr={:?})",
1072 service, r#vspace, r#vaddr, r#rights, r#attr,
1073 );
1074 self.msg[..3usize].fill(0);
1075 self.set_cap(0usize, r#vspace);
1076 self.set_mr_bits(0usize..64usize, r#vaddr);
1077 self.set_mr_bits_from_slice(64usize..128usize, r#rights.0.inner());
1078 self.set_mr_bits(128usize..192usize, r#attr);
1079 let info_in = seL4_MessageInfo::new(
1080 invocation_label::ARMPageMap.into(),
1081 0,
1082 1u64,
1083 3u64,
1084 );
1085 let info_out = self.seL4_Call(service, info_in);
1086 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1087 err
1088 }
1089 #[allow(clippy::field_reassign_with_default)]
1090 pub fn seL4_ARM_Page_Unmap(&mut self, service: seL4_ARM_Page) -> seL4_Error::Type {
1091 log::trace!("seL4_ARM_Page_Unmap(_service={:?})", service,);
1092 self.msg[..0usize].fill(0);
1093 let info_in = seL4_MessageInfo::new(
1094 invocation_label::ARMPageUnmap.into(),
1095 0,
1096 0u64,
1097 0u64,
1098 );
1099 let info_out = self.seL4_Call(service, info_in);
1100 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1101 err
1102 }
1103 #[allow(clippy::field_reassign_with_default)]
1104 pub fn seL4_ARM_Page_Clean_Data(
1105 &mut self,
1106 service: seL4_ARM_Page,
1107 r#start_offset: seL4_Word,
1108 r#end_offset: seL4_Word,
1109 ) -> seL4_Error::Type {
1110 log::trace!(
1111 "seL4_ARM_Page_Clean_Data(_service={:?}, start_offset={:?}, end_offset={:?})",
1112 service, r#start_offset, r#end_offset,
1113 );
1114 self.msg[..2usize].fill(0);
1115 self.set_mr_bits(0usize..64usize, r#start_offset);
1116 self.set_mr_bits(64usize..128usize, r#end_offset);
1117 let info_in = seL4_MessageInfo::new(
1118 invocation_label::ARMPageClean_Data.into(),
1119 0,
1120 0u64,
1121 2u64,
1122 );
1123 let info_out = self.seL4_Call(service, info_in);
1124 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1125 err
1126 }
1127 #[allow(clippy::field_reassign_with_default)]
1128 pub fn seL4_ARM_Page_Invalidate_Data(
1129 &mut self,
1130 service: seL4_ARM_Page,
1131 r#start_offset: seL4_Word,
1132 r#end_offset: seL4_Word,
1133 ) -> seL4_Error::Type {
1134 log::trace!(
1135 "seL4_ARM_Page_Invalidate_Data(_service={:?}, start_offset={:?}, end_offset={:?})",
1136 service, r#start_offset, r#end_offset,
1137 );
1138 self.msg[..2usize].fill(0);
1139 self.set_mr_bits(0usize..64usize, r#start_offset);
1140 self.set_mr_bits(64usize..128usize, r#end_offset);
1141 let info_in = seL4_MessageInfo::new(
1142 invocation_label::ARMPageInvalidate_Data.into(),
1143 0,
1144 0u64,
1145 2u64,
1146 );
1147 let info_out = self.seL4_Call(service, info_in);
1148 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1149 err
1150 }
1151 #[allow(clippy::field_reassign_with_default)]
1152 pub fn seL4_ARM_Page_CleanInvalidate_Data(
1153 &mut self,
1154 service: seL4_ARM_Page,
1155 r#start_offset: seL4_Word,
1156 r#end_offset: seL4_Word,
1157 ) -> seL4_Error::Type {
1158 log::trace!(
1159 "seL4_ARM_Page_CleanInvalidate_Data(_service={:?}, start_offset={:?}, end_offset={:?})",
1160 service, r#start_offset, r#end_offset,
1161 );
1162 self.msg[..2usize].fill(0);
1163 self.set_mr_bits(0usize..64usize, r#start_offset);
1164 self.set_mr_bits(64usize..128usize, r#end_offset);
1165 let info_in = seL4_MessageInfo::new(
1166 invocation_label::ARMPageCleanInvalidate_Data.into(),
1167 0,
1168 0u64,
1169 2u64,
1170 );
1171 let info_out = self.seL4_Call(service, info_in);
1172 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1173 err
1174 }
1175 #[allow(clippy::field_reassign_with_default)]
1176 pub fn seL4_ARM_Page_Unify_Instruction(
1177 &mut self,
1178 service: seL4_ARM_Page,
1179 r#start_offset: seL4_Word,
1180 r#end_offset: seL4_Word,
1181 ) -> seL4_Error::Type {
1182 log::trace!(
1183 "seL4_ARM_Page_Unify_Instruction(_service={:?}, start_offset={:?}, end_offset={:?})",
1184 service, r#start_offset, r#end_offset,
1185 );
1186 self.msg[..2usize].fill(0);
1187 self.set_mr_bits(0usize..64usize, r#start_offset);
1188 self.set_mr_bits(64usize..128usize, r#end_offset);
1189 let info_in = seL4_MessageInfo::new(
1190 invocation_label::ARMPageUnify_Instruction.into(),
1191 0,
1192 0u64,
1193 2u64,
1194 );
1195 let info_out = self.seL4_Call(service, info_in);
1196 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1197 err
1198 }
1199 #[allow(clippy::field_reassign_with_default)]
1200 pub fn seL4_ARM_Page_GetAddress(
1201 &mut self,
1202 service: seL4_ARM_Page,
1203 ) -> seL4_ARM_Page_GetAddress_ret {
1204 log::trace!("seL4_ARM_Page_GetAddress(_service={:?})", service,);
1205 self.msg[..0usize].fill(0);
1206 let info_in = seL4_MessageInfo::new(
1207 invocation_label::ARMPageGetAddress.into(),
1208 0,
1209 0u64,
1210 0u64,
1211 );
1212 let info_out = self.seL4_Call(service, info_in);
1213 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1214 let mut ret: seL4_ARM_Page_GetAddress_ret = Default::default();
1215 ret.error = err;
1216 ret.paddr = self.get_mr_bits(0usize..64usize);
1217 ret
1218 }
1219 #[allow(clippy::field_reassign_with_default)]
1220 pub fn seL4_ARM_ASIDControl_MakePool(
1221 &mut self,
1222 service: seL4_ARM_ASIDControl,
1223 r#untyped: seL4_Untyped,
1224 r#root: seL4_CNode,
1225 r#index: seL4_Word,
1226 r#depth: seL4_Uint8,
1227 ) -> seL4_Error::Type {
1228 log::trace!(
1229 "seL4_ARM_ASIDControl_MakePool(_service={:?}, untyped={:?}, root={:?}, index={:?}, depth={:?})",
1230 service, r#untyped, r#root, r#index, r#depth,
1231 );
1232 self.msg[..2usize].fill(0);
1233 self.set_cap(0usize, r#untyped);
1234 self.set_cap(1usize, r#root);
1235 self.set_mr_bits(0usize..64usize, r#index);
1236 self.set_mr_bits(64usize..72usize, r#depth);
1237 let info_in = seL4_MessageInfo::new(
1238 invocation_label::ARMASIDControlMakePool.into(),
1239 0,
1240 2u64,
1241 2u64,
1242 );
1243 let info_out = self.seL4_Call(service, info_in);
1244 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1245 err
1246 }
1247 #[allow(clippy::field_reassign_with_default)]
1248 pub fn seL4_ARM_ASIDPool_Assign(
1249 &mut self,
1250 service: seL4_ARM_ASIDPool,
1251 r#vspace: seL4_CPtr,
1252 ) -> seL4_Error::Type {
1253 log::trace!(
1254 "seL4_ARM_ASIDPool_Assign(_service={:?}, vspace={:?})", service, r#vspace,
1255 );
1256 self.msg[..0usize].fill(0);
1257 self.set_cap(0usize, r#vspace);
1258 let info_in = seL4_MessageInfo::new(
1259 invocation_label::ARMASIDPoolAssign.into(),
1260 0,
1261 1u64,
1262 0u64,
1263 );
1264 let info_out = self.seL4_Call(service, info_in);
1265 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1266 err
1267 }
1268 #[allow(clippy::field_reassign_with_default)]
1269 pub fn seL4_ARM_VCPU_SetTCB(
1270 &mut self,
1271 service: seL4_ARM_VCPU,
1272 r#tcb: seL4_TCB,
1273 ) -> seL4_Error::Type {
1274 log::trace!("seL4_ARM_VCPU_SetTCB(_service={:?}, tcb={:?})", service, r#tcb,);
1275 self.msg[..0usize].fill(0);
1276 self.set_cap(0usize, r#tcb);
1277 let info_in = seL4_MessageInfo::new(
1278 invocation_label::ARMVCPUSetTCB.into(),
1279 0,
1280 1u64,
1281 0u64,
1282 );
1283 let info_out = self.seL4_Call(service, info_in);
1284 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1285 err
1286 }
1287 #[allow(clippy::field_reassign_with_default)]
1288 pub fn seL4_ARM_VCPU_InjectIRQ(
1289 &mut self,
1290 service: seL4_ARM_VCPU,
1291 r#virq: seL4_Uint16,
1292 r#priority: seL4_Uint8,
1293 r#group: seL4_Uint8,
1294 r#index: seL4_Uint8,
1295 ) -> seL4_Error::Type {
1296 log::trace!(
1297 "seL4_ARM_VCPU_InjectIRQ(_service={:?}, virq={:?}, priority={:?}, group={:?}, index={:?})",
1298 service, r#virq, r#priority, r#group, r#index,
1299 );
1300 self.msg[..1usize].fill(0);
1301 self.set_mr_bits(0usize..16usize, r#virq);
1302 self.set_mr_bits(16usize..24usize, r#priority);
1303 self.set_mr_bits(24usize..32usize, r#group);
1304 self.set_mr_bits(32usize..40usize, r#index);
1305 let info_in = seL4_MessageInfo::new(
1306 invocation_label::ARMVCPUInjectIRQ.into(),
1307 0,
1308 0u64,
1309 1u64,
1310 );
1311 let info_out = self.seL4_Call(service, info_in);
1312 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1313 err
1314 }
1315 #[allow(clippy::field_reassign_with_default)]
1316 pub fn seL4_ARM_VCPU_ReadRegs(
1317 &mut self,
1318 service: seL4_ARM_VCPU,
1319 r#field: seL4_VCPUReg::Type,
1320 ) -> seL4_ARM_VCPU_ReadRegs_ret {
1321 log::trace!(
1322 "seL4_ARM_VCPU_ReadRegs(_service={:?}, field={:?})", service, r#field,
1323 );
1324 self.msg[..1usize].fill(0);
1325 self.set_mr_bits(0usize..64usize, r#field);
1326 let info_in = seL4_MessageInfo::new(
1327 invocation_label::ARMVCPUReadReg.into(),
1328 0,
1329 0u64,
1330 1u64,
1331 );
1332 let info_out = self.seL4_Call(service, info_in);
1333 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1334 let mut ret: seL4_ARM_VCPU_ReadRegs_ret = Default::default();
1335 ret.error = err;
1336 ret.value = self.get_mr_bits(0usize..64usize);
1337 ret
1338 }
1339 #[allow(clippy::field_reassign_with_default)]
1340 pub fn seL4_ARM_VCPU_WriteRegs(
1341 &mut self,
1342 service: seL4_ARM_VCPU,
1343 r#field: seL4_VCPUReg::Type,
1344 r#value: seL4_Word,
1345 ) -> seL4_Error::Type {
1346 log::trace!(
1347 "seL4_ARM_VCPU_WriteRegs(_service={:?}, field={:?}, value={:?})", service,
1348 r#field, r#value,
1349 );
1350 self.msg[..2usize].fill(0);
1351 self.set_mr_bits(0usize..64usize, r#field);
1352 self.set_mr_bits(64usize..128usize, r#value);
1353 let info_in = seL4_MessageInfo::new(
1354 invocation_label::ARMVCPUWriteReg.into(),
1355 0,
1356 0u64,
1357 2u64,
1358 );
1359 let info_out = self.seL4_Call(service, info_in);
1360 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1361 err
1362 }
1363 #[allow(clippy::field_reassign_with_default)]
1364 pub fn seL4_ARM_VCPU_AckVPPI(
1365 &mut self,
1366 service: seL4_ARM_VCPU,
1367 r#irq: seL4_Word,
1368 ) -> seL4_Error::Type {
1369 log::trace!("seL4_ARM_VCPU_AckVPPI(_service={:?}, irq={:?})", service, r#irq,);
1370 self.msg[..1usize].fill(0);
1371 self.set_mr_bits(0usize..64usize, r#irq);
1372 let info_in = seL4_MessageInfo::new(
1373 invocation_label::ARMVCPUAckVPPI.into(),
1374 0,
1375 0u64,
1376 1u64,
1377 );
1378 let info_out = self.seL4_Call(service, info_in);
1379 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1380 err
1381 }
1382 #[allow(clippy::field_reassign_with_default)]
1383 pub fn seL4_IRQControl_GetTrigger(
1384 &mut self,
1385 service: seL4_IRQControl,
1386 r#irq: seL4_Word,
1387 r#trigger: seL4_Word,
1388 r#root: seL4_CNode,
1389 r#index: seL4_Word,
1390 r#depth: seL4_Uint8,
1391 ) -> seL4_Error::Type {
1392 log::trace!(
1393 "seL4_IRQControl_GetTrigger(_service={:?}, irq={:?}, trigger={:?}, root={:?}, index={:?}, depth={:?})",
1394 service, r#irq, r#trigger, r#root, r#index, r#depth,
1395 );
1396 self.msg[..4usize].fill(0);
1397 self.set_mr_bits(0usize..64usize, r#irq);
1398 self.set_mr_bits(64usize..128usize, r#trigger);
1399 self.set_cap(0usize, r#root);
1400 self.set_mr_bits(128usize..192usize, r#index);
1401 self.set_mr_bits(192usize..200usize, r#depth);
1402 let info_in = seL4_MessageInfo::new(
1403 invocation_label::ARMIRQIssueIRQHandlerTrigger.into(),
1404 0,
1405 1u64,
1406 4u64,
1407 );
1408 let info_out = self.seL4_Call(service, info_in);
1409 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1410 err
1411 }
1412 #[allow(clippy::field_reassign_with_default)]
1413 pub fn seL4_IRQControl_GetTriggerCore(
1414 &mut self,
1415 service: seL4_IRQControl,
1416 r#irq: seL4_Word,
1417 r#trigger: seL4_Word,
1418 r#root: seL4_CNode,
1419 r#index: seL4_Word,
1420 r#depth: seL4_Uint8,
1421 r#target: seL4_Word,
1422 ) -> seL4_Error::Type {
1423 log::trace!(
1424 "seL4_IRQControl_GetTriggerCore(_service={:?}, irq={:?}, trigger={:?}, root={:?}, index={:?}, depth={:?}, target={:?})",
1425 service, r#irq, r#trigger, r#root, r#index, r#depth, r#target,
1426 );
1427 self.msg[..5usize].fill(0);
1428 self.set_mr_bits(0usize..64usize, r#irq);
1429 self.set_mr_bits(64usize..128usize, r#trigger);
1430 self.set_cap(0usize, r#root);
1431 self.set_mr_bits(128usize..192usize, r#index);
1432 self.set_mr_bits(192usize..200usize, r#depth);
1433 self.set_mr_bits(256usize..320usize, r#target);
1434 let info_in = seL4_MessageInfo::new(
1435 invocation_label::ARMIRQIssueIRQHandlerTriggerCore.into(),
1436 0,
1437 1u64,
1438 5u64,
1439 );
1440 let info_out = self.seL4_Call(service, info_in);
1441 let err: seL4_Error::Type = info_out.get_label().try_into().unwrap();
1442 err
1443 }
1444}