1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright(c) 2016-20 Intel Corporation.
4  */
5 
6 #ifndef DEFINES_H
7 #define DEFINES_H
8 
9 #include <stdint.h>
10 
11 #define PAGE_SIZE 4096
12 #define PAGE_MASK (~(PAGE_SIZE - 1))
13 
14 #define __aligned(x) __attribute__((__aligned__(x)))
15 #define __packed __attribute__((packed))
16 
17 #include "../../../../arch/x86/include/asm/sgx.h"
18 #include "../../../../arch/x86/include/asm/enclu.h"
19 #include "../../../../arch/x86/include/uapi/asm/sgx.h"
20 
21 enum encl_op_type {
22 	ENCL_OP_PUT,
23 	ENCL_OP_GET,
24 };
25 
26 struct encl_op {
27 	uint64_t type;
28 	uint64_t buffer;
29 };
30 
31 #endif /* DEFINES_H */
32