xref: /illumos-gate/usr/src/uts/intel/io/amdzen/zen_udf.h (revision d464f34577edaa31dd6978ec04d66a57529dd2c8)
1 /*
2  * This file and its contents are supplied under the terms of the
3  * Common Development and Distribution License ("CDDL"), version 1.0.
4  * You may only use this file in accordance with the terms of version
5  * 1.0 of the CDDL.
6  *
7  * A full copy of the text of the CDDL should have accompanied this
8  * source.  A copy of the CDDL is also available via the Internet at
9  * http://www.illumos.org/license/CDDL.
10  */
11 
12 /*
13  * Copyright 2020 Oxide Computer Company
14  */
15 
16 #ifndef _ZEN_UDF_H
17 #define	_ZEN_UDF_H
18 
19 /*
20  * Private ioctls for interfacing with the zen_udf driver.
21  */
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #define	ZEN_UDF_IOCTL	(('u' << 24) | ('d' << 16) | ('f' << 8))
28 
29 #define	ZEN_UDF_READ32	(ZEN_UDF_IOCTL | 0x01)
30 #define	ZEN_UDF_READ64	(ZEN_UDF_IOCTL | 0x02)
31 
32 typedef struct zen_udf_io {
33 	uint8_t zui_inst;
34 	uint8_t zui_func;
35 	uint16_t zui_reg;
36 	uint32_t zui_pad;
37 	uint64_t zui_data;
38 } zen_udf_io_t;
39 
40 #ifdef __cplusplus
41 }
42 #endif
43 
44 #endif /* _ZEN_UDF_H */
45