13fe0778eSJarkko Sakkinen /* SPDX-License-Identifier: GPL-2.0 */ 23fe0778eSJarkko Sakkinen #ifndef __ARCH_SGX_DRIVER_H__ 33fe0778eSJarkko Sakkinen #define __ARCH_SGX_DRIVER_H__ 43fe0778eSJarkko Sakkinen 53fe0778eSJarkko Sakkinen #include <crypto/hash.h> 63fe0778eSJarkko Sakkinen #include <linux/kref.h> 73fe0778eSJarkko Sakkinen #include <linux/mmu_notifier.h> 83fe0778eSJarkko Sakkinen #include <linux/radix-tree.h> 93fe0778eSJarkko Sakkinen #include <linux/rwsem.h> 103fe0778eSJarkko Sakkinen #include <linux/sched.h> 113fe0778eSJarkko Sakkinen #include <linux/workqueue.h> 12888d2491SJarkko Sakkinen #include <uapi/asm/sgx.h> 133fe0778eSJarkko Sakkinen #include "sgx.h" 143fe0778eSJarkko Sakkinen 159d0c151bSJarkko Sakkinen #define SGX_EINIT_SPIN_COUNT 20 169d0c151bSJarkko Sakkinen #define SGX_EINIT_SLEEP_COUNT 50 179d0c151bSJarkko Sakkinen #define SGX_EINIT_SLEEP_TIME 20 189d0c151bSJarkko Sakkinen 199d0c151bSJarkko Sakkinen extern u64 sgx_attributes_reserved_mask; 209d0c151bSJarkko Sakkinen extern u64 sgx_xfrm_reserved_mask; 219d0c151bSJarkko Sakkinen extern u32 sgx_misc_reserved_mask; 229d0c151bSJarkko Sakkinen 23*c82c6186SJarkko Sakkinen extern const struct file_operations sgx_provision_fops; 24*c82c6186SJarkko Sakkinen 25888d2491SJarkko Sakkinen long sgx_ioctl(struct file *filep, unsigned int cmd, unsigned long arg); 26888d2491SJarkko Sakkinen 273fe0778eSJarkko Sakkinen int sgx_drv_init(void); 283fe0778eSJarkko Sakkinen 293fe0778eSJarkko Sakkinen #endif /* __ARCH_X86_SGX_DRIVER_H__ */ 30