1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ARCH_SGX_DRIVER_H__
3 #define __ARCH_SGX_DRIVER_H__
5 #include <crypto/hash.h>
6 #include <linux/kref.h>
7 #include <linux/mmu_notifier.h>
8 #include <linux/radix-tree.h>
9 #include <linux/rwsem.h>
10 #include <linux/sched.h>
11 #include <linux/workqueue.h>
12 #include <uapi/asm/sgx.h>
15 #define SGX_EINIT_SPIN_COUNT 20
16 #define SGX_EINIT_SLEEP_COUNT 50
17 #define SGX_EINIT_SLEEP_TIME 20
19 extern u64 sgx_attributes_reserved_mask
;
20 extern u64 sgx_xfrm_reserved_mask
;
21 extern u32 sgx_misc_reserved_mask
;
23 extern const struct file_operations sgx_provision_fops
;
25 long sgx_ioctl(struct file
*filep
, unsigned int cmd
, unsigned long arg
);
27 int sgx_drv_init(void);
29 #endif /* __ARCH_X86_SGX_DRIVER_H__ */