summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/coco.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/coco.h')
-rw-r--r--arch/x86/include/asm/coco.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/arch/x86/include/asm/coco.h b/arch/x86/include/asm/coco.h
index eb08796002f3..e1dbf8df1b69 100644
--- a/arch/x86/include/asm/coco.h
+++ b/arch/x86/include/asm/coco.h
@@ -2,6 +2,7 @@
#ifndef _ASM_X86_COCO_H
#define _ASM_X86_COCO_H
+#include <asm/asm.h>
#include <asm/types.h>
enum cc_vendor {
@@ -12,28 +13,28 @@ enum cc_vendor {
#ifdef CONFIG_ARCH_HAS_CC_PLATFORM
extern enum cc_vendor cc_vendor;
+extern u64 cc_mask;
-static inline enum cc_vendor cc_get_vendor(void)
+static inline u64 cc_get_mask(void)
{
- return cc_vendor;
+ return cc_mask;
}
-static inline void cc_set_vendor(enum cc_vendor vendor)
+static inline void cc_set_mask(u64 mask)
{
- cc_vendor = vendor;
+ cc_mask = mask;
}
-void cc_set_mask(u64 mask);
u64 cc_mkenc(u64 val);
u64 cc_mkdec(u64 val);
+void cc_random_init(void);
#else
-static inline enum cc_vendor cc_get_vendor(void)
+#define cc_vendor (CC_VENDOR_NONE)
+static inline u64 cc_get_mask(void)
{
- return CC_VENDOR_NONE;
+ return 0;
}
-static inline void cc_set_vendor(enum cc_vendor vendor) { }
-
static inline u64 cc_mkenc(u64 val)
{
return val;
@@ -43,6 +44,7 @@ static inline u64 cc_mkdec(u64 val)
{
return val;
}
+static inline void cc_random_init(void) { }
#endif
#endif /* _ASM_X86_COCO_H */