xref: /linux/arch/x86/include/asm/coco.h (revision c435bce6af9b2a277662698875a689c389358f17)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_COCO_H
3 #define _ASM_X86_COCO_H
4 
5 #include <asm/types.h>
6 
7 enum cc_vendor {
8 	CC_VENDOR_NONE,
9 	CC_VENDOR_AMD,
10 	CC_VENDOR_INTEL,
11 };
12 
13 #ifdef CONFIG_ARCH_HAS_CC_PLATFORM
14 extern enum cc_vendor cc_vendor;
15 void cc_set_mask(u64 mask);
16 u64 cc_mkenc(u64 val);
17 u64 cc_mkdec(u64 val);
18 #else
19 #define cc_vendor (CC_VENDOR_NONE)
20 
21 static inline u64 cc_mkenc(u64 val)
22 {
23 	return val;
24 }
25 
26 static inline u64 cc_mkdec(u64 val)
27 {
28 	return val;
29 }
30 #endif
31 
32 #endif /* _ASM_X86_COCO_H */
33