From b314fd06cf2e55c6cbdda753faeda0c453ee2629 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Tue, 11 Jun 2024 17:41:43 -0600 Subject: bsd-user: Hard wire aarch64 to be 4k pages only Only support 4k pages for aarch64 binaries. The variable page size stuff isn't working just yet, so put in this lessor-of-evils kludge until that is complete. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- target/arm/cpu-param.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'target') diff --git a/target/arm/cpu-param.h b/target/arm/cpu-param.h index 2d5f3aa312..fa6cae0e3a 100644 --- a/target/arm/cpu-param.h +++ b/target/arm/cpu-param.h @@ -21,9 +21,13 @@ #ifdef CONFIG_USER_ONLY # ifdef TARGET_AARCH64 # define TARGET_TAGGED_ADDRESSES +# ifdef __FreeBSD__ +# define TARGET_PAGE_BITS 12 +# else /* Allow user-only to vary page size from 4k */ # define TARGET_PAGE_BITS_VARY # define TARGET_PAGE_BITS_MIN 12 +# endif # else # define TARGET_PAGE_BITS 12 # endif -- cgit v1.2.3 From 1c687f65b4cd4af2bf4732fd327a4f63c8c33e30 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sun, 21 Jul 2024 16:29:03 -0600 Subject: bsd-user: Make compile for non-linux user-mode stuff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We include the files that define PR_MTE_TCF_SHIFT only on Linux, but use them unconditionally. Restrict its use to Linux-only. "It's ugly, but it's not actually wrong." Signed-off-by: Warner Losh Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/arm/gdbstub64.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'target') diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c index c8cef8cbc0..5221381cc8 100644 --- a/target/arm/gdbstub64.c +++ b/target/arm/gdbstub64.c @@ -404,6 +404,7 @@ int aarch64_gdb_get_tag_ctl_reg(CPUState *cs, GByteArray *buf, int reg) int aarch64_gdb_set_tag_ctl_reg(CPUState *cs, uint8_t *buf, int reg) { +#if defined(CONFIG_LINUX) ARMCPU *cpu = ARM_CPU(cs); CPUARMState *env = &cpu->env; @@ -425,6 +426,9 @@ int aarch64_gdb_set_tag_ctl_reg(CPUState *cs, uint8_t *buf, int reg) arm_set_mte_tcf0(env, tcf); return 1; +#else + return 0; +#endif } static void handle_q_memtag(GArray *params, void *user_ctx) -- cgit v1.2.3