et-rs 0.6.2

Host-side Rust interface to the Esperanto ET-SoC-1 RISC-V accelerator
Documentation
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
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
/* automatically generated by rust-bindgen 0.72.1 */

pub const ESPERANTO_PCIE_IOCTL_MAGIC: u32 = 231;
pub const DEVICE_OPS_API_MAJOR: u32 = 2;
pub const DEVICE_OPS_API_MINOR: u32 = 6;
pub const DEVICE_OPS_API_PATCH: u32 = 0;
pub const DEVICE_OPS_KERNEL_LAUNCH_ARGS_PAYLOAD_MAX: u32 = 128;
pub const DEVICE_OPS_DMA_LIST_NODES_MAX: u32 = 4;
pub type __u8 = ::core::ffi::c_uchar;
pub type __u16 = ::core::ffi::c_ushort;
pub type __u32 = ::core::ffi::c_uint;
pub type __u64 = ::core::ffi::c_ulonglong;
pub mod cmd_desc_flag {
    #[doc = " enum cmd_desc_flag - Flag values for struct cmd_desc"]
    pub type Type = ::core::ffi::c_uint;
    pub const CMD_DESC_FLAG_NONE: Type = 0;
    pub const CMD_DESC_FLAG_DMA: Type = 1;
    pub const CMD_DESC_FLAG_MM_RESET: Type = 2;
    pub const CMD_DESC_FLAG_HIGH_PRIORITY: Type = 4;
    pub const CMD_DESC_FLAG_ETSOC_RESET: Type = 8;
    pub const CMD_DESC_FLAG_P2PDMA: Type = 16;
}
pub mod dev_config_form_factor {
    #[doc = " enum dev_config_form_factor - Form factor values for struct dev_config"]
    pub type Type = ::core::ffi::c_uint;
    pub const DEV_CONFIG_FORM_FACTOR_NONE: Type = 0;
    pub const DEV_CONFIG_FORM_FACTOR_PCIE: Type = 1;
    pub const DEV_CONFIG_FORM_FACTOR_M_2: Type = 2;
}
pub mod dev_config_arch_revision {
    #[doc = " enum dev_config_arch_revision - Architecture revision values"]
    pub type Type = ::core::ffi::c_uint;
    pub const DEV_CONFIG_ARCH_REVISION_ETSOC1: Type = 0;
    pub const DEV_CONFIG_ARCH_REVISION_PANTERO: Type = 1;
    pub const DEV_CONFIG_ARCH_REVISION_GEPARDO: Type = 2;
}
pub mod dev_state {
    #[doc = " enum dev_state - Device States\n\n TODO: SW-10535 To be removed\n @DEV_STATE_NOT_READY: This represents that device is not initialized yet\n i.e., no device specific structures are initialized. This is the state\n before probe or when device could never be initialized.\n @DEV_STATE_READY: This represents that device is properly initialized and is\n ready to use.\n @DEV_STATE_RESET_IN_PROGRESS: This represents that device is undergoing a\n reset. User will not be able to open the device node in this state. If the\n device node is already opened then device node must be closed to let the\n reset complete. On successful reset, state will be changed to\n `DEV_STATE_READY` or on failure, state will be changed to\n `DEV_STATE_NOT_RESPONDING`\n @DEV_STATE_NOT_RESPONDING: This represents that device has undergone a\n failure. This could be a failure at time of device discovery or during\n re-initialization of device after reset.\n TODO: SW-10535 To be removed\n @DEV_STATE_PENDING_COMMANDS: This represents the state of Virtual Queues.\n This is not an internal state of the device. This represents availability\n of pending command in any submission queue(s) of the device."]
    pub type Type = ::core::ffi::c_uint;
    pub const DEV_STATE_NOT_READY: Type = 0;
    pub const DEV_STATE_READY: Type = 1;
    pub const DEV_STATE_RESET_IN_PROGRESS: Type = 2;
    pub const DEV_STATE_NOT_RESPONDING: Type = 3;
    pub const DEV_STATE_PENDING_COMMANDS: Type = 4;
}
pub mod trace_buffer_type {
    #[doc = " enum trace_buffer_type - Trace buffer types"]
    pub type Type = ::core::ffi::c_uint;
    pub const TRACE_BUFFER_SP: Type = 0;
    pub const TRACE_BUFFER_MM: Type = 1;
    pub const TRACE_BUFFER_CM: Type = 2;
    pub const TRACE_BUFFER_SP_STATS: Type = 3;
    pub const TRACE_BUFFER_MM_STATS: Type = 4;
    pub const TRACE_BUFFER_TYPE_NUM: Type = 5;
}
#[doc = " struct fw_update_desc - Descriptor for ETSOC1_IOCTL_FW_UPDATE\n @ubuf: Pointer to memory in user-space\n @size: Size of the buffer in bytes"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fw_update_desc {
    pub ubuf: *mut ::core::ffi::c_void,
    pub size: __u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of fw_update_desc"][::core::mem::size_of::<fw_update_desc>() - 16usize];
    ["Alignment of fw_update_desc"][::core::mem::align_of::<fw_update_desc>() - 8usize];
    ["Offset of field: fw_update_desc::ubuf"]
        [::core::mem::offset_of!(fw_update_desc, ubuf) - 0usize];
    ["Offset of field: fw_update_desc::size"]
        [::core::mem::offset_of!(fw_update_desc, size) - 8usize];
};
impl Default for fw_update_desc {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " struct cmd_desc - Descriptor for ETSOC1_IOCTL_PUSH_SQ\n @cmd: Pointer to command memory in user-space\n @size: Size of the buffer in bytes\n @sq_index: SQ index\n @flags: value of enum cmd_desc_flag"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cmd_desc {
    pub cmd: *mut ::core::ffi::c_void,
    pub size: __u16,
    pub sq_index: __u16,
    pub flags: __u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of cmd_desc"][::core::mem::size_of::<cmd_desc>() - 16usize];
    ["Alignment of cmd_desc"][::core::mem::align_of::<cmd_desc>() - 8usize];
    ["Offset of field: cmd_desc::cmd"][::core::mem::offset_of!(cmd_desc, cmd) - 0usize];
    ["Offset of field: cmd_desc::size"][::core::mem::offset_of!(cmd_desc, size) - 8usize];
    ["Offset of field: cmd_desc::sq_index"][::core::mem::offset_of!(cmd_desc, sq_index) - 10usize];
    ["Offset of field: cmd_desc::flags"][::core::mem::offset_of!(cmd_desc, flags) - 12usize];
};
impl Default for cmd_desc {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " struct rsp_desc - Descriptor for ETSOC1_IOCTL_POP_CQ\n @rsp: Pointer to response memory in user-space\n @size: Size of the buffer in bytes\n @cq_index: CQ index"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rsp_desc {
    pub rsp: *mut ::core::ffi::c_void,
    pub size: __u16,
    pub cq_index: __u16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of rsp_desc"][::core::mem::size_of::<rsp_desc>() - 16usize];
    ["Alignment of rsp_desc"][::core::mem::align_of::<rsp_desc>() - 8usize];
    ["Offset of field: rsp_desc::rsp"][::core::mem::offset_of!(rsp_desc, rsp) - 0usize];
    ["Offset of field: rsp_desc::size"][::core::mem::offset_of!(rsp_desc, size) - 8usize];
    ["Offset of field: rsp_desc::cq_index"][::core::mem::offset_of!(rsp_desc, cq_index) - 10usize];
};
impl Default for rsp_desc {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " struct sq_threshold - Descriptor for ETSOC1_IOCTL_SET_SQ_THRESHOLD\n @bytes_needed: Free bytes needed for the threshold\n @sq_index: SQ index"]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct sq_threshold {
    pub bytes_needed: __u16,
    pub sq_index: __u16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of sq_threshold"][::core::mem::size_of::<sq_threshold>() - 4usize];
    ["Alignment of sq_threshold"][::core::mem::align_of::<sq_threshold>() - 2usize];
    ["Offset of field: sq_threshold::bytes_needed"]
        [::core::mem::offset_of!(sq_threshold, bytes_needed) - 0usize];
    ["Offset of field: sq_threshold::sq_index"]
        [::core::mem::offset_of!(sq_threshold, sq_index) - 2usize];
};
#[doc = " struct dram_info - Descriptor for ETSOC1_IOCTL_GET_USER_DRAM_INFO\n @base: Base address of SOC DRAM\n @size: Size of DRAM region\n @dma_max_elem_size: Max allowed size of DMA element/node\n @dma_max_elem_count: Max allowed number of elements/nodes in DMAlist command\n @align_in_bits: DRAM address alignment requirement"]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct dram_info {
    pub base: __u64,
    pub size: __u64,
    pub dma_max_elem_size: __u32,
    pub dma_max_elem_count: __u16,
    pub align_in_bits: __u16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of dram_info"][::core::mem::size_of::<dram_info>() - 24usize];
    ["Alignment of dram_info"][::core::mem::align_of::<dram_info>() - 8usize];
    ["Offset of field: dram_info::base"][::core::mem::offset_of!(dram_info, base) - 0usize];
    ["Offset of field: dram_info::size"][::core::mem::offset_of!(dram_info, size) - 8usize];
    ["Offset of field: dram_info::dma_max_elem_size"]
        [::core::mem::offset_of!(dram_info, dma_max_elem_size) - 16usize];
    ["Offset of field: dram_info::dma_max_elem_count"]
        [::core::mem::offset_of!(dram_info, dma_max_elem_count) - 20usize];
    ["Offset of field: dram_info::align_in_bits"]
        [::core::mem::offset_of!(dram_info, align_in_bits) - 22usize];
};
#[doc = " struct dev_config - Descriptor for ETSOC1_IOCTL_GET_DEVICE_CONFIGURATION\n @total_l3_size: Total L3 cache size (KB)\n @total_l2_size: Total L2 cache size (KB)\n @total_scp_size: Total Scratchpad size (KB)\n @ddr_bandwidth: DDR bandwidth (MB/sec)\n @minion_boot_freq: Minion boot frequency (MHz)\n @cm_shire_mask: Compute minion shire mask\n @form_factor: value of enum dev_config_form_factor type\n @tdp: Device TDP (W)\n @cache_line_size: Cache line size (B)\n @num_l2_cache_banks: Number of L2 shire cache banks\n @sync_min_shire_id: Spare/sync minion shire ID\n @arch_rev: value of enum dev_config_arch_revision type\n @devnum: Physical device node index / device number"]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct dev_config {
    pub total_l3_size: __u32,
    pub total_l2_size: __u32,
    pub total_scp_size: __u32,
    pub ddr_bandwidth: __u32,
    pub minion_boot_freq: __u32,
    pub cm_shire_mask: __u32,
    pub form_factor: __u8,
    pub tdp: __u8,
    pub cache_line_size: __u8,
    pub num_l2_cache_banks: __u8,
    pub sync_min_shire_id: __u8,
    pub arch_rev: __u8,
    pub devnum: __u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of dev_config"][::core::mem::size_of::<dev_config>() - 32usize];
    ["Alignment of dev_config"][::core::mem::align_of::<dev_config>() - 4usize];
    ["Offset of field: dev_config::total_l3_size"]
        [::core::mem::offset_of!(dev_config, total_l3_size) - 0usize];
    ["Offset of field: dev_config::total_l2_size"]
        [::core::mem::offset_of!(dev_config, total_l2_size) - 4usize];
    ["Offset of field: dev_config::total_scp_size"]
        [::core::mem::offset_of!(dev_config, total_scp_size) - 8usize];
    ["Offset of field: dev_config::ddr_bandwidth"]
        [::core::mem::offset_of!(dev_config, ddr_bandwidth) - 12usize];
    ["Offset of field: dev_config::minion_boot_freq"]
        [::core::mem::offset_of!(dev_config, minion_boot_freq) - 16usize];
    ["Offset of field: dev_config::cm_shire_mask"]
        [::core::mem::offset_of!(dev_config, cm_shire_mask) - 20usize];
    ["Offset of field: dev_config::form_factor"]
        [::core::mem::offset_of!(dev_config, form_factor) - 24usize];
    ["Offset of field: dev_config::tdp"][::core::mem::offset_of!(dev_config, tdp) - 25usize];
    ["Offset of field: dev_config::cache_line_size"]
        [::core::mem::offset_of!(dev_config, cache_line_size) - 26usize];
    ["Offset of field: dev_config::num_l2_cache_banks"]
        [::core::mem::offset_of!(dev_config, num_l2_cache_banks) - 27usize];
    ["Offset of field: dev_config::sync_min_shire_id"]
        [::core::mem::offset_of!(dev_config, sync_min_shire_id) - 28usize];
    ["Offset of field: dev_config::arch_rev"]
        [::core::mem::offset_of!(dev_config, arch_rev) - 29usize];
    ["Offset of field: dev_config::devnum"][::core::mem::offset_of!(dev_config, devnum) - 30usize];
};
#[doc = " struct trace_desc - Descriptor for ETSOC1_IOCTL_EXTRACT_TRACE_BUFFER\n @trace_type: value of enum trace_buffer_type type\n @buf: Pointer to memory buffer in user-space"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct trace_desc {
    pub trace_type: __u8,
    pub buf: *mut ::core::ffi::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of trace_desc"][::core::mem::size_of::<trace_desc>() - 16usize];
    ["Alignment of trace_desc"][::core::mem::align_of::<trace_desc>() - 8usize];
    ["Offset of field: trace_desc::trace_type"]
        [::core::mem::offset_of!(trace_desc, trace_type) - 0usize];
    ["Offset of field: trace_desc::buf"][::core::mem::offset_of!(trace_desc, buf) - 8usize];
};
impl Default for trace_desc {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type trace_rt_type_e = u32;
pub mod TRACE_RT_TYPE {
    #[doc = " \\enum TRACE_RT_TYPE\n\\brief"]
    pub type Type = ::core::ffi::c_uint;
    #[doc = "< Master Minion Trace"]
    pub const TRACE_RT_TYPE_MM: Type = 1;
    #[doc = "< Compute Minion Trace"]
    pub const TRACE_RT_TYPE_CM: Type = 2;
}
pub type trace_rt_control_e = u32;
pub mod TRACE_RT_CONTROL {
    #[doc = " \\enum TRACE_RT_CONTROL\n\\brief"]
    pub type Type = ::core::ffi::c_uint;
    #[doc = "< Disable Trace"]
    pub const TRACE_RT_CONTROL_DISABLE_TRACE: Type = 0;
    #[doc = "< Enable Trace"]
    pub const TRACE_RT_CONTROL_ENABLE_TRACE: Type = 1;
    #[doc = "< Redirect Logs to UART"]
    pub const TRACE_RT_CONTROL_LOG_TO_UART: Type = 2;
    #[doc = "< Redirect Logs to Trace"]
    pub const TRACE_RT_CONTROL_LOG_TO_TRACE: Type = 0;
    #[doc = "< Reset Trace buffer, it discards all existing data into Trace buffer."]
    pub const TRACE_RT_CONTROL_RESET_TRACEBUF: Type = 4;
}
pub type cmd_flags_e = u16;
pub mod CMD_FLAGS {
    #[doc = " \\enum CMD_FLAGS\n\\brief"]
    pub type Type = ::core::ffi::c_uint;
    #[doc = "< bit[0]: Clears the bit flag for barrier in command"]
    pub const CMD_FLAGS_BARRIER_DISABLE: Type = 0;
    #[doc = "< bit[0]: If set, indicates that command barrier needs to be enabled in the command"]
    pub const CMD_FLAGS_BARRIER_ENABLE: Type = 1;
    #[doc = "< bit[1]: Clears the bit flag for user trace configuration"]
    pub const CMD_FLAGS_COMPUTE_KERNEL_TRACE_DISABLE: Type = 0;
    #[doc = "< bit[1]: If set, indicates that user trace configuration is present in the kernel launch optional arguments"]
    pub const CMD_FLAGS_COMPUTE_KERNEL_TRACE_ENABLE: Type = 2;
    #[doc = "< Deprecated, to be removed"]
    pub const CMD_FLAGS_HOST_MANAGED_UBUF: Type = 0;
    #[doc = "< bit[2]: If set, indicates that Master Minion trace buffer needs to be extracted"]
    pub const CMD_FLAGS_MMFW_TRACEBUF: Type = 4;
    #[doc = "< bit[3]: If set, indicates that Compute Minion trace buffer needs to be extracted"]
    pub const CMD_FLAGS_CMFW_TRACEBUF: Type = 8;
    #[doc = "< bit[4]: If set, indicates that the L3-cache needs to be flushed before kernel launch"]
    pub const CMD_FLAGS_KERNEL_LAUNCH_FLUSH_L3: Type = 16;
    #[doc = "< bit[5]: If set, indicates that user kernel arguments are present in the kernel launch optional arguments"]
    pub const CMD_FLAGS_KERNEL_LAUNCH_ARGS_EMBEDDED: Type = 32;
    #[doc = "< bit[6]: If set, indicates that user stack configuration is present in the kernel launch optional arguments"]
    pub const CMD_FLAGS_KERNEL_LAUNCH_USER_STACK_CFG: Type = 64;
}
pub type dev_ops_api_abort_response_e = u32;
pub mod DEV_OPS_API_ABORT_RESPONSE {
    #[doc = " \\enum DEV_OPS_API_ABORT_RESPONSE\n\\brief"]
    pub type Type = ::core::ffi::c_uint;
    #[doc = "<"]
    pub const DEV_OPS_API_ABORT_RESPONSE_SUCCESS: Type = 0;
    #[doc = "<"]
    pub const DEV_OPS_API_ABORT_RESPONSE_UNEXPECTED_ERROR: Type = 1;
    #[doc = "< Deprecated"]
    pub const DEV_OPS_API_ABORT_RESPONSE_ERROR: Type = 1;
    #[doc = "<"]
    pub const DEV_OPS_API_ABORT_RESPONSE_INVALID_TAG_ID: Type = 2;
}
pub type dev_ops_api_cm_reset_response_e = u32;
pub mod DEV_OPS_API_CM_RESET_RESPONSE {
    #[doc = " \\enum DEV_OPS_API_CM_RESET_RESPONSE\n\\brief"]
    pub type Type = ::core::ffi::c_uint;
    #[doc = "<"]
    pub const DEV_OPS_API_CM_RESET_RESPONSE_SUCCESS: Type = 0;
    #[doc = "<"]
    pub const DEV_OPS_API_CM_RESET_RESPONSE_UNEXPECTED_ERROR: Type = 1;
    #[doc = "<"]
    pub const DEV_OPS_API_CM_RESET_RESPONSE_INVALID_SHIRE_MASK: Type = 2;
    #[doc = "<"]
    pub const DEV_OPS_API_CM_RESET_RESPONSE_CM_RESET_FAILED: Type = 3;
}
pub type dev_ops_api_kernel_launch_response_e = u32;
pub mod DEV_OPS_API_KERNEL_LAUNCH_RESPONSE {
    #[doc = " \\enum DEV_OPS_API_KERNEL_LAUNCH_RESPONSE\n\\brief"]
    pub type Type = ::core::ffi::c_uint;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_LAUNCH_RESPONSE_KERNEL_COMPLETED: Type = 0;
    #[doc = "< Deprecated"]
    pub const DEV_OPS_API_KERNEL_LAUNCH_RESPONSE_ERROR: Type = 1;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_LAUNCH_RESPONSE_UNEXPECTED_ERROR: Type = 1;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_LAUNCH_RESPONSE_EXCEPTION: Type = 2;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_LAUNCH_RESPONSE_SHIRES_NOT_READY: Type = 3;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_LAUNCH_RESPONSE_HOST_ABORTED: Type = 4;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_LAUNCH_RESPONSE_INVALID_ADDRESS: Type = 5;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_LAUNCH_RESPONSE_TIMEOUT_HANG: Type = 6;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_LAUNCH_RESPONSE_INVALID_ARGS_PAYLOAD_SIZE: Type = 7;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_LAUNCH_RESPONSE_CM_IFACE_MULTICAST_FAILED: Type = 8;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_LAUNCH_RESPONSE_CM_IFACE_UNICAST_FAILED: Type = 9;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_LAUNCH_RESPONSE_SP_IFACE_RESET_FAILED: Type = 10;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_LAUNCH_RESPONSE_CW_MINIONS_BOOT_FAILED: Type = 11;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_LAUNCH_RESPONSE_INVALID_ARGS_INVALID_SHIRE_MASK: Type = 12;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_LAUNCH_RESPONSE_USER_ERROR: Type = 13;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_LAUNCH_RESPONSE_INVALID_ARGS_INVALID_STACK_CFG: Type = 14;
}
pub type dev_ops_api_kernel_abort_response_e = u32;
pub mod DEV_OPS_API_KERNEL_ABORT_RESPONSE {
    #[doc = " \\enum DEV_OPS_API_KERNEL_ABORT_RESPONSE\n\\brief"]
    pub type Type = ::core::ffi::c_uint;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_ABORT_RESPONSE_SUCCESS: Type = 0;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_ABORT_RESPONSE_ERROR: Type = 1;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_ABORT_RESPONSE_INVALID_TAG_ID: Type = 2;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_ABORT_RESPONSE_TIMEOUT_HANG: Type = 3;
    #[doc = "<"]
    pub const DEV_OPS_API_KERNEL_ABORT_RESPONSE_HOST_ABORTED: Type = 4;
}
pub type dev_ops_api_dma_response_e = u32;
pub mod DEV_OPS_API_DMA_RESPONSE {
    #[doc = " \\enum DEV_OPS_API_DMA_RESPONSE\n\\brief"]
    pub type Type = ::core::ffi::c_uint;
    #[doc = "<"]
    pub const DEV_OPS_API_DMA_RESPONSE_COMPLETE: Type = 0;
    #[doc = "< Deprecated"]
    pub const DEV_OPS_API_DMA_RESPONSE_UNKNOWN_ERROR: Type = 1;
    #[doc = "<"]
    pub const DEV_OPS_API_DMA_RESPONSE_UNEXPECTED_ERROR: Type = 1;
    #[doc = "< Deprecated"]
    pub const DEV_OPS_API_DMA_RESPONSE_TIMEOUT_IDLE_CHANNEL_UNAVAILABLE: Type = 2;
    #[doc = "<"]
    pub const DEV_OPS_API_DMA_RESPONSE_HOST_ABORTED: Type = 3;
    #[doc = "<"]
    pub const DEV_OPS_API_DMA_RESPONSE_ERROR_ABORTED: Type = 4;
    #[doc = "< Deprecated"]
    pub const DEV_OPS_API_DMA_RESPONSE_TIMEOUT_HANG: Type = 5;
    #[doc = "<"]
    pub const DEV_OPS_API_DMA_RESPONSE_INVALID_ADDRESS: Type = 6;
    #[doc = "<"]
    pub const DEV_OPS_API_DMA_RESPONSE_INVALID_SIZE: Type = 7;
    #[doc = "<"]
    pub const DEV_OPS_API_DMA_RESPONSE_CM_IFACE_MULTICAST_FAILED: Type = 8;
    #[doc = "<"]
    pub const DEV_OPS_API_DMA_RESPONSE_DRIVER_DATA_CONFIG_FAILED: Type = 9;
    #[doc = "<"]
    pub const DEV_OPS_API_DMA_RESPONSE_DRIVER_LINK_CONFIG_FAILED: Type = 10;
    #[doc = "<"]
    pub const DEV_OPS_API_DMA_RESPONSE_DRIVER_CHAN_START_FAILED: Type = 11;
    #[doc = "<"]
    pub const DEV_OPS_API_DMA_RESPONSE_DRIVER_ABORT_FAILED: Type = 12;
}
pub type dev_ops_api_echo_response_e = u32;
pub mod DEV_OPS_API_ECHO_RESPONSE {
    #[doc = " \\enum DEV_OPS_API_ECHO_RESPONSE\n\\brief"]
    pub type Type = ::core::ffi::c_uint;
    #[doc = "<"]
    pub const DEV_OPS_API_ECHO_RESPONSE_SUCCESS: Type = 0;
    #[doc = "<"]
    pub const DEV_OPS_API_ECHO_RESPONSE_HOST_ABORTED: Type = 1;
}
pub type dev_ops_api_fw_version_response_e = u32;
pub mod DEV_OPS_API_FW_VERSION_RESPONSE {
    #[doc = " \\enum DEV_OPS_API_FW_VERSION_RESPONSE\n\\brief"]
    pub type Type = ::core::ffi::c_uint;
    #[doc = "<"]
    pub const DEV_OPS_API_FW_VERSION_RESPONSE_SUCCESS: Type = 0;
    #[doc = "<"]
    pub const DEV_OPS_API_FW_VERSION_RESPONSE_UNEXPECTED_ERROR: Type = 1;
    #[doc = "<"]
    pub const DEV_OPS_API_FW_VERSION_RESPONSE_BAD_FW_TYPE: Type = 2;
    #[doc = "<"]
    pub const DEV_OPS_API_FW_VERSION_RESPONSE_NOT_AVAILABLE: Type = 3;
    #[doc = "<"]
    pub const DEV_OPS_API_FW_VERSION_RESPONSE_HOST_ABORTED: Type = 4;
}
pub type dev_ops_api_compatibility_response_e = u32;
pub mod DEV_OPS_API_COMPATIBILITY_RESPONSE {
    #[doc = " \\enum DEV_OPS_API_COMPATIBILITY_RESPONSE\n\\brief"]
    pub type Type = ::core::ffi::c_uint;
    #[doc = "<"]
    pub const DEV_OPS_API_COMPATIBILITY_RESPONSE_SUCCESS: Type = 0;
    #[doc = "<"]
    pub const DEV_OPS_API_COMPATIBILITY_RESPONSE_UNEXPECTED_ERROR: Type = 1;
    #[doc = "<"]
    pub const DEV_OPS_API_COMPATIBILITY_RESPONSE_HOST_ABORTED: Type = 2;
}
pub type dev_ops_api_error_type_e = u32;
pub mod DEV_OPS_API_ERROR_TYPE {
    #[doc = " \\enum DEV_OPS_API_ERROR_TYPE\n\\brief"]
    pub type Type = ::core::ffi::c_uint;
    #[doc = "<"]
    pub const DEV_OPS_API_ERROR_TYPE_UNSUPPORTED_COMMAND: Type = 0;
    #[doc = "<"]
    pub const DEV_OPS_API_ERROR_TYPE_CM_SMODE_RT_EXCEPTION: Type = 1;
    #[doc = "<"]
    pub const DEV_OPS_API_ERROR_TYPE_CM_SMODE_RT_HANG: Type = 2;
}
pub type dev_ops_fw_type_e = u8;
pub mod DEV_OPS_FW_TYPE {
    #[doc = " \\enum DEV_OPS_FW_TYPE\n\\brief"]
    pub type Type = ::core::ffi::c_uint;
    #[doc = "<"]
    pub const DEV_OPS_FW_TYPE_MASTER_MINION_FW: Type = 0;
    #[doc = "<"]
    pub const DEV_OPS_FW_TYPE_MACHINE_MINION_FW: Type = 1;
    #[doc = "<"]
    pub const DEV_OPS_FW_TYPE_WORKER_MINION_FW: Type = 2;
}
pub type dev_ops_trace_rt_config_response_e = u32;
pub mod DEV_OPS_TRACE_RT_CONFIG_RESPONSE {
    #[doc = " \\enum DEV_OPS_TRACE_RT_CONFIG_RESPONSE\n\\brief"]
    pub type Type = ::core::ffi::c_uint;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONFIG_RESPONSE_SUCCESS: Type = 0;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONFIG_RESPONSE_UNEXPECTED_ERROR: Type = 1;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONFIG_RESPONSE_BAD_SHIRE_MASK: Type = 2;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONFIG_RESPONSE_BAD_THREAD_MASK: Type = 3;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONFIG_RESPONSE_BAD_EVENT_MASK: Type = 4;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONFIG_RESPONSE_BAD_FILTER_MASK: Type = 5;
    #[doc = "< Deprecated"]
    pub const DEV_OPS_TRACE_RT_CONFIG_RESPONSE_RT_CONFIG_ERROR: Type = 6;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONFIG_RESPONSE_HOST_ABORTED: Type = 7;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONFIG_RESPONSE_CM_TRACE_CONFIG_FAILED: Type = 8;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONFIG_RESPONSE_MM_TRACE_CONFIG_FAILED: Type = 9;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONFIG_RESPONSE_INVALID_TRACE_CONFIG_INFO: Type = 10;
}
pub type dev_ops_trace_rt_control_response_e = u32;
pub mod DEV_OPS_TRACE_RT_CONTROL_RESPONSE {
    #[doc = " \\enum DEV_OPS_TRACE_RT_CONTROL_RESPONSE\n\\brief"]
    pub type Type = ::core::ffi::c_uint;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONTROL_RESPONSE_SUCCESS: Type = 0;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONTROL_RESPONSE_UNEXPECTED_ERROR: Type = 1;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONTROL_RESPONSE_BAD_RT_TYPE: Type = 2;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONTROL_RESPONSE_BAD_CONTROL_MASK: Type = 3;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONTROL_RESPONSE_CM_RT_CTRL_ERROR: Type = 4;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONTROL_RESPONSE_MM_RT_CTRL_ERROR: Type = 5;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONTROL_RESPONSE_HOST_ABORTED: Type = 6;
    #[doc = "<"]
    pub const DEV_OPS_TRACE_RT_CONTROL_RESPONSE_CM_IFACE_MULTICAST_FAILED: Type = 7;
}
pub mod device_ops_api_msg_e {
    #[doc = " \\enum device_ops_api_msg_e\n\\brief Currently MM Firmware needs both cmd/rsp IDs. So this enum is retained for OPS node\nEnumeration of all the RPC messages that the Device Ops API\nsend/receive."]
    pub type Type = ::core::ffi::c_uint;
    pub const DEV_OPS_API_MID_NONE: Type = 512;
    #[doc = "< < Request the version of the device_ops_api supported by the target"]
    pub const DEV_OPS_API_MID_CHECK_DEVICE_OPS_API_COMPATIBILITY_CMD: Type = 513;
    #[doc = "< < Return the version implemented by the target"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_API_COMPATIBILITY_RSP: Type = 514;
    #[doc = "< < Request the version of the device firmware, advertise the one we support"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_DEVICE_FW_VERSION_CMD: Type = 515;
    #[doc = "< < Return the device fw version for the requested type"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_FW_VERSION_RSP: Type = 516;
    #[doc = "< < Echo command"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_ECHO_CMD: Type = 517;
    #[doc = "< < Echo response"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_ECHO_RSP: Type = 518;
    #[doc = "< < Command to abort a currently pipelined command in the device"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_ABORT_CMD: Type = 519;
    #[doc = "< < Response to an abort request"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_ABORT_RSP: Type = 520;
    #[doc = "< < Launch a kernel on the target"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_KERNEL_LAUNCH_CMD: Type = 521;
    #[doc = "< < Response and result of a kernel launch on the device"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_KERNEL_LAUNCH_RSP: Type = 522;
    #[doc = "< < Command to abort a currently running kernel on the device"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_KERNEL_ABORT_CMD: Type = 523;
    #[doc = "< < Response to an abort request"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_KERNEL_ABORT_RSP: Type = 524;
    #[doc = "< < Single list Command to perform multiple DMA reads from device memory"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_DMA_READLIST_CMD: Type = 525;
    #[doc = "< < DMA readlist command response"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_DMA_READLIST_RSP: Type = 526;
    #[doc = "< < Single list Command to perform multiple DMA writes on device memory"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_DMA_WRITELIST_CMD: Type = 527;
    #[doc = "< < DMA writelist command response"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_DMA_WRITELIST_RSP: Type = 528;
    #[doc = "< < Configure the trace configuration"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_TRACE_RT_CONFIG_CMD: Type = 529;
    #[doc = "< < Trace configure command reply"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_TRACE_RT_CONFIG_RSP: Type = 530;
    #[doc = "< < Configure options to start, stop, OR fetch trace logs."]
    pub const DEV_OPS_API_MID_DEVICE_OPS_TRACE_RT_CONTROL_CMD: Type = 531;
    #[doc = "< < Trace runtime control command reply"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_TRACE_RT_CONTROL_RSP: Type = 532;
    #[doc = "< < CM Reset command"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_CM_RESET_CMD: Type = 533;
    #[doc = "< < CM Reset response"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_CM_RESET_RSP: Type = 534;
    #[doc = "< < Generic error reported by the device"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_DEVICE_FW_ERROR: Type = 535;
    #[doc = "< < Event triggered when trace buffer has reached threshold or is full"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_TRACE_BUFFER_FULL_EVENT: Type = 536;
    #[doc = "< < Single list command to perform multiple P2P DMA read transfers"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_P2PDMA_READLIST_CMD: Type = 537;
    #[doc = "< < P2P DMA readlist command response"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_P2PDMA_READLIST_RSP: Type = 538;
    #[doc = "< < Single list command to perform multiple P2P DMA write transfers"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_P2PDMA_WRITELIST_CMD: Type = 539;
    #[doc = "< < P2P DMA writelist command response"]
    pub const DEV_OPS_API_MID_DEVICE_OPS_P2PDMA_WRITELIST_RSP: Type = 540;
    pub const DEV_OPS_API_MID_LAST: Type = 1023;
}