aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-07-25 09:53:57 +1000
committerRichard Henderson <richard.henderson@linaro.org>2024-07-25 09:53:57 +1000
commit029e13a8a56a2931e7c24c0db52ae7256b932cb0 (patch)
treecc99f8010af47daa4b77e889c7b7c7314d358a0f /target
parent9726687f2fdfe7ae4a3014d78c2b2f639f75e303 (diff)
parentec018b76798e1196882ebcbf3df15e6d86ac9d7c (diff)
Merge tag 'bsd-user-for-9.1-pull-request' of gitlab.com:bsdimp/qemu into staging
bsd-user: Misc changes for 9.1 (I hope) V2: Add missing bsd-user/aarch64/target.h This patch series includes two main sets of patches. To make it simple to review, I've included the changes from my student which the later changes depend on. I've included a change from Jessica and Doug as well. I've reviewed them, but more eyes never hurt. I've also included a number of 'touch up' patches needed either to get the aarch64 building, or to implmement suggestions from prior review cycles. The main one is what's charitably described as a kludge: force aarch64 to use 4k pages. The qemu-project (and blitz branch) hasn't had the necessary changes to bsd-user needed to support variable page size. Sorry this is so late... Live has conspired to delay me. # -----BEGIN PGP SIGNATURE----- # Comment: GPGTools - https://gpgtools.org # # iQIzBAABCgAdFiEEIDX4lLAKo898zeG3bBzRKH2wEQAFAmahejwACgkQbBzRKH2w # EQCXuQ/+Pj1Izmox/y9X1trn1T8KC7JdMtimdLiGMaS4C6+gcThXJkIB4l9ZStbV # 7rI540mpqVf0KSRLYwc2/ATyhYU7Ffsz02WPn7Xn/NvmmITp4kjw9Z0gd7C7mPVq # fS8DJbTyFQDy5dO8FUKLaTfnlYQe+NCnL421t9wFkIrlEepFygRaBaJN5yWVoC+0 # 1Ob6dG+JEV5BmNguMufvvI3S7nEFEnSBGpNqW3ljrRHAZjdNhv8d9GBYbj1laR1r # HQ6r5+u4ZmKCuUbchS0jxGkug0DjuQC7iq+rQ/7fhLYLChkPZ4P2RxNv8ibzKjEV # wlTy5LaM+WZNzKWdcHfDFMomeSnnUkOOfAMipMney2jedEjTIwCFDnP4zCAuG83V # RbdXWfleP1rDto3AQ765pFneqm3+su2Dh4TKaTSnq6gd1eORJ2IL8dubCfcVwZCy # TofemXPWh0HX3kwlD9IB9rqplQZFL78TkQ47btftxinHCLCQOOHRDPVG0IahQPjo # pgK4yVH7WA7pWV2Xbo4ngG3sX5U1TyBCbfkkAwhq+P3gjnU8zxonx8Tk/qLeEDdH # KEypi/pkGFQKZY0wc/y4XM+XQh6E1l8gMaQ4gJWK1qlyVtUKM1BiNQ2lweohYzC8 # p6WAfBQLPpzY4mDWfJMF6DsgObLwWmYbgKzuOtHgST1D/Ebk3Zo= # =RPuN # -----END PGP SIGNATURE----- # gpg: Signature made Thu 25 Jul 2024 08:03:40 AM AEST # gpg: using RSA key 2035F894B00AA3CF7CCDE1B76C1CD1287DB01100 # gpg: Good signature from "Warner Losh <wlosh@netflix.com>" [unknown] # gpg: aka "Warner Losh <imp@bsdimp.com>" [unknown] # gpg: aka "Warner Losh <imp@freebsd.org>" [unknown] # gpg: aka "Warner Losh <imp@village.org>" [unknown] # gpg: aka "Warner Losh <wlosh@bsdimp.com>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 2035 F894 B00A A3CF 7CCD E1B7 6C1C D128 7DB0 1100 * tag 'bsd-user-for-9.1-pull-request' of gitlab.com:bsdimp/qemu: bsd-user: Add target.h for aarch64. bsd-user: Add aarch64 build to tree bsd-user: Make compile for non-linux user-mode stuff bsd-user: Define TARGET_SIGSTACK_ALIGN and use it to round stack bsd-user: Sync fork_start/fork_end with linux-user bsd-user: Hard wire aarch64 to be 4k pages only bsd-user: Simplify the implementation of execve bsd-user:Add AArch64 improvements and signal handling functions bsd-user:Add set_mcontext function for ARM AArch64 bsd-user:Add setup_sigframe_arch function for ARM AArch64 bsd-user:Add get_mcontext function for ARM AArch64 bsd-user:Add ARM AArch64 signal handling support bsd-user:Add ARM AArch64 support and capabilities bsd-user:Add AArch64 register handling and related functions bsd-user:Add CPU initialization and management functions Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target')
-rw-r--r--target/arm/cpu-param.h4
-rw-r--r--target/arm/gdbstub64.c4
2 files changed, 8 insertions, 0 deletions
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
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)