aboutsummaryrefslogtreecommitdiff
path: root/bsd-user/aarch64/target_arch.h
diff options
context:
space:
mode:
authorStacey Son <sson@FreeBSD.org>2024-07-08 00:41:22 +0530
committerWarner Losh <imp@bsdimp.com>2024-07-23 10:50:54 -0600
commit1acce7718bd41a20d3db6323959fedf9c3675ebe (patch)
treeac0688e1e98a4b169d24d23b23e1fbec53c36200 /bsd-user/aarch64/target_arch.h
parent8cbb4fc12e1d10182cbab93f234510bc616594ca (diff)
downloadqemu-1acce7718bd41a20d3db6323959fedf9c3675ebe.zip
qemu-1acce7718bd41a20d3db6323959fedf9c3675ebe.tar.gz
qemu-1acce7718bd41a20d3db6323959fedf9c3675ebe.tar.bz2
bsd-user:Add AArch64 register handling and related functions
Added header file for managing CPU register states in FreeBSD user mode. Introduced prototypes for setting and getting thread-local storage (TLS). Implemented AArch64 sysarch() system call emulation and a printing function. Added function for setting up thread upcall to add thread support to BSD-USER. Initialized thread's register state during thread setup. Updated ARM AArch64 VM parameter definitions for bsd-user, including address spaces for FreeBSD/arm64 and a function for getting the stack pointer from CPU and setting a return value. Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Ajeet Singh <itachis@FreeBSD.org> Co-authored-by: Jessica Clarke <jrtc27@jrtc27.com> Co-authored-by: Sean Bruno <sbruno@freebsd.org> Co-authored-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240707191128.10509-3-itachis@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com>
Diffstat (limited to 'bsd-user/aarch64/target_arch.h')
-rw-r--r--bsd-user/aarch64/target_arch.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/bsd-user/aarch64/target_arch.h b/bsd-user/aarch64/target_arch.h
new file mode 100644
index 0000000..27f47de
--- /dev/null
+++ b/bsd-user/aarch64/target_arch.h
@@ -0,0 +1,28 @@
+/*
+ * ARM AArch64 specific prototypes for bsd-user
+ *
+ * Copyright (c) 2015 Stacey D. Son <sson at FreeBSD>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef TARGET_ARCH_H
+#define TARGET_ARCH_H
+
+#include "qemu.h"
+
+void target_cpu_set_tls(CPUARMState *env, target_ulong newtls);
+target_ulong target_cpu_get_tls(CPUARMState *env);
+
+#endif /* TARGET_ARCH_H */