- Jan 08, 2022
-
-
Warner Losh authored
Implement the system call dispatch. This implements all three kinds of system call: direct and the two indirect variants. It handles all the special cases for thumb as well. Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Kyle Evans <kevans@FreeBSD.org> Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
Implement EXCP_PREFETCH_ABORT AND EXCP_DATA_ABORT. Both of these data exceptions cause a SIGSEGV. Signed-off-by:
Kyle Evans <kevans@FreeBSD.org> Signed-off-by:
Olivier Houchard <cognet@ci0.org> Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
Implement EXCP_UDEF, EXCP_DEBUG, EXCP_INTERRUPT, EXCP_ATOMIC and EXCP_YIELD. The first two generate a signal to the emulated binary. EXCP_ATOMIC handles atomic operations. The remainder are fancy nops. Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Mikaël Urankar <mikael.urankar@gmail.com> Signed-off-by:
Kyle Evans <kevans@FreeBSD.org> Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
Add a boiler plate CPU loop that does nothing except return an error for all traps. Signed-off-by:
Sean Bruno <sbruno@FreeBSD.org> Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
Implement target_cpu_clone_regs to clone the resister state on a fork. Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
target_arch_cpu.h is for CPU loop definitions. Create the file and define target_cpu_init and target_cpu_reset for arm. Signed-off-by:
Olivier Houchard <cognet@ci0.org> Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
Target specific TLS routines to get and set the TLS values. Signed-off-by:
Kyle Evans <kevans@FreeBSD.org> Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
The preferred name for the 32-bit arm is now armv7. Update the name to reflect that. In addition, add Stacey's copyright to this file and update the include guards to the new convention. Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
As part of upstreaming, the include guards have been made more consistent. Update this file to use the new guards. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
Switch to the CPUArchState typedef and move target-provided prototypes to target_os_ucontext.h. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
Move the current inline functions into sigal.c. This will increate the flexibility of implementation in the future. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
Fill in target_mcontext match the FreeBSD mcontext_t structure. Also define the size correctly. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
In FreeBSD, sigcontext was retired in favor of ucontext/mcontext. Remove vestigial target_sigcontext. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
Move the (now stubbed out) inlines into bsd-user/i386/signal.c. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
Fill in target_mcontext_t to match the FreeBSD mcontex_t. Also tag the current size of mcontext and ucontext to enable size checking for i386. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
In FreeBSD, sigcontext was retired in favor of ucontext/mcontext. Remove vestigial target_sigcontext. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
Create a place-holder signal.c file for each of the architectures that are currently built. In the future, some code that's currently inlined in target_arch_signal.h will live here. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
FreeBSD has a MI ucontext structure that contains the MD mcontext machine state and other things that are machine independent. Create an include file for all the ucontext stuff. It needs to be included in the arch specific files after target_mcontext is defined. This is largely copied from sys/_ucontext.h with the comments about layout removed because we don't support ancient FreeBSD binaries. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Warner Losh authored
FreeBSD is dropping support for mips starting with FreeBSD 14. mips support has been removed from the bsd-user fork because updating it for new signal requirements will take too much time. Remove it here since it is a distraction. Signed-off-by:
Warner Losh <imp@bsdimp.com> Acked-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Dec 20, 2021
-
-
Richard Henderson authored
We have no need to reference bsd_user_ss outside of bsd-user. Go ahead and merge it directly into specific_ss. Reviewed-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
Move linux-user safe-syscall.S and safe-syscall-error.c to common-user so that bsd-user can also use it. Also move safe-syscall.h to include/user/. Since there is nothing here that is related to the guest, as opposed to the host, build it once. Reviewed-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
Pull the internal errno used by qemu internally its own header file, for use by safe-syscall.S. Reviewed-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
This value is fully internal to qemu, and so is not a TARGET define. We use this as an extra marker for both host and target errno. Reviewed-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Nov 03, 2021
-
-
Warner Losh authored
Until the signal support is merged from the bsd-user fork, we need stubs for cpu_loop_exit_sigsegv and cpu_loop_exit_sigbus to link. These call abort after logging a message. Since singals aren't supported here yet, this is sufficient. Signed-off-by:
Warner Losh <imp@bsdimp.com> Message-Id: <20211102225248.52999-2-imp@bsdimp.com> Tested-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Oct 18, 2021
-
-
Warner Losh authored
Create dummy signal queueing function so we can start to integrate other architectures (at the cost of signals remaining broken) to tame the dependency graph a bit and to bring in signals in a more controlled fashion. Log unimplemented events to it in the mean time. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org>
-
Warner Losh authored
To avoid a name clash with FreeBSD's sigqueue data structure in signalvar.h, rename sigqueue to qemu_sigqueue. This structure is currently defined, but unused. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org>
-
Warner Losh authored
do_freebsd_arch_sysarch() exists in $ARCH/target_arch_sysarch.h for x86. Call it from do_freebsd_sysarch() and remove the mostly duplicate version in syscall.c. Future changes will move it to os-sys.c and support other architectures. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org>
-
Warner Losh authored
Similar to the same function in linux-user: this stops all the current tasks. Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org>
-
Warner Losh authored
The 'used' field in TaskState is write only. Remove it from TaskState. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org>
-
Warner Losh authored
Some architectures publish AT_HWCAP2 as well as AT_HWCAP. Those architectures will define ELF_HWCAP2 in their target_arch_elf.h files for the value for this process. If it is defined, then publish it. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org>
-
Warner Losh authored
All architectures have a ELF_HWCAP, so remove the fallback ifdef. Place ELF_HWCAP in the same order as on native FreeBSD. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org>
-
Warner Losh authored
Move TARGET_MC_GET_CLEAR_RET to freebsd/target_os_signal.h since it's architecture agnostic on FreeBSD. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org>
-
Stacey Son authored
To emulate signals and interrupted system calls, we need to have the same mechanisms we have in the kernel, including these errno values. Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org>
-
Warner Losh authored
Make get_errno and is_error global so files other than syscall.c can use them. Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org>
-
Warner Losh authored
Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org>
-
Warner Losh authored
Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org>
-
Warner Losh authored
Signed-off-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org>
-
Warner Losh authored
To increase flexibility, only descend into *-user when that is configured. This allows *-user to selectively include directories based on the host OS which may not exist on all hosts. Adopt Paolo's suggestion of checking the configuration in the directories that know about the configuration. Message-Id: <20210926220103.1721355-2-f4bug@amsat.org> Message-Id: <20210926220103.1721355-3-f4bug@amsat.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Warner Losh <wlosh@bsdimp.com> Acked-by:
Paolo Bonzini <pbonzinni@redhat.com> Reviewed-by:
Kyle Evans <kevans@FreeBSD.org>
-