xref: /openbmc/linux/arch/x86/kernel/cpu/sgx/driver.h (revision 85250a24)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ARCH_SGX_DRIVER_H__
3 #define __ARCH_SGX_DRIVER_H__
4 
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>
13 #include "sgx.h"
14 
15 #define SGX_EINIT_SPIN_COUNT	20
16 #define SGX_EINIT_SLEEP_COUNT	50
17 #define SGX_EINIT_SLEEP_TIME	20
18 
19 extern u64 sgx_attributes_reserved_mask;
20 extern u64 sgx_xfrm_reserved_mask;
21 extern u32 sgx_misc_reserved_mask;
22 
23 extern const struct file_operations sgx_provision_fops;
24 
25 long sgx_ioctl(struct file *filep, unsigned int cmd, unsigned long arg);
26 
27 int sgx_drv_init(void);
28 
29 #endif /* __ARCH_X86_SGX_DRIVER_H__ */
30