summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/coco.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 10:15:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 10:15:43 +0000
commit4a1c948bc688e5ab5e51d12d2f6dd6746e3ac2d9 (patch)
tree7ee50e6ccf13f75f02fd343cf90750cbd9950194 /arch/x86/include/asm/coco.h
parentReleasing progress-linux version 6.1.82-1~progress6.99u1. (diff)
downloadlinux-4a1c948bc688e5ab5e51d12d2f6dd6746e3ac2d9.tar.xz
linux-4a1c948bc688e5ab5e51d12d2f6dd6746e3ac2d9.zip
Merging upstream version 6.1.85.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'arch/x86/include/asm/coco.h')
-rw-r--r--arch/x86/include/asm/coco.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/x86/include/asm/coco.h b/arch/x86/include/asm/coco.h
index 3d98c3a60..1f97d00ad 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 {
@@ -11,12 +12,18 @@ enum cc_vendor {
CC_VENDOR_INTEL,
};
-void cc_set_vendor(enum cc_vendor v);
-void cc_set_mask(u64 mask);
+extern enum cc_vendor cc_vendor;
+extern u64 cc_mask;
#ifdef CONFIG_ARCH_HAS_CC_PLATFORM
+static inline void cc_set_mask(u64 mask)
+{
+ RIP_REL_REF(cc_mask) = mask;
+}
+
u64 cc_mkenc(u64 val);
u64 cc_mkdec(u64 val);
+void cc_random_init(void);
#else
static inline u64 cc_mkenc(u64 val)
{
@@ -27,6 +34,7 @@ static inline u64 cc_mkdec(u64 val)
{
return val;
}
+static inline void cc_random_init(void) { }
#endif
#endif /* _ASM_X86_COCO_H */