From 279f038b9e153e768a0bd1aefbafde70f29383ce Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Tue, 8 Feb 2022 16:47:35 +0100 Subject: [PATCH] lx_emul: shadow asm/cpufeature and asm/page_64 Issue #4450 --- .../spec/x86/lx_emul/shadow/asm/cpufeature.h | 11 ++++++++++ .../spec/x86/lx_emul/shadow/asm/page_64.h | 21 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 repos/dde_linux/src/include/spec/x86/lx_emul/shadow/asm/page_64.h diff --git a/repos/dde_linux/src/include/spec/x86/lx_emul/shadow/asm/cpufeature.h b/repos/dde_linux/src/include/spec/x86/lx_emul/shadow/asm/cpufeature.h index e20505fc4f..f74047e444 100644 --- a/repos/dde_linux/src/include/spec/x86/lx_emul/shadow/asm/cpufeature.h +++ b/repos/dde_linux/src/include/spec/x86/lx_emul/shadow/asm/cpufeature.h @@ -7,7 +7,18 @@ #ifndef _ASM__CPUFEATURE_H_ #define _ASM__CPUFEATURE_H_ +#include + +#if defined(__KERNEL__) && !defined(__ASSEMBLY__) + +#include +#include +#include + #define boot_cpu_has(bit) 0 #define static_cpu_has(bit) boot_cpu_has(bit) +#define cpu_has(value, bit) ( (void)value, 0 ) + +#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */ #endif diff --git a/repos/dde_linux/src/include/spec/x86/lx_emul/shadow/asm/page_64.h b/repos/dde_linux/src/include/spec/x86/lx_emul/shadow/asm/page_64.h new file mode 100644 index 0000000000..23c6b74e01 --- /dev/null +++ b/repos/dde_linux/src/include/spec/x86/lx_emul/shadow/asm/page_64.h @@ -0,0 +1,21 @@ +/* + * \brief Shadows Linux kernel asm/page_64.h + * \author Alexander Boettcher + * \date 2022-02-08 + */ + +/* + * Copyright (C) 2022 Genode Labs GmbH + * + * This file is distributed under the terms of the GNU General Public License + * version 2. + */ + +#ifndef __ASM_PAGE_64_H +#define __ASM_PAGE_64_H + +#define clear_page(page) __builtin_memset((page), 0, PAGE_SIZE) +void copy_page(void *to, void *from); + +#endif /* __ASM_PAGE_64_H */ +