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