5fa2a10b | 23-Jun-2024 |
Warner Losh <imp@bsdimp.com> |
bsd-user: Define TARGET_SIGSTACK_ALIGN and use it to round stack
Most (all?) targets require stacks to be properly aligned. Rather than a series of ifdefs in bsd-user/signal.h, instead use a mandito
bsd-user: Define TARGET_SIGSTACK_ALIGN and use it to round stack
Most (all?) targets require stacks to be properly aligned. Rather than a series of ifdefs in bsd-user/signal.h, instead use a manditory #define for all architectures.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
5b6828d1 | 19-Jun-2024 |
Jessica Clarke <jrtc27@jrtc27.com> |
bsd-user: Sync fork_start/fork_end with linux-user
This reorders some of the calls, deduplicates code between branches and, most importantly, fixes a double end_exclusive call in the parent that wil
bsd-user: Sync fork_start/fork_end with linux-user
This reorders some of the calls, deduplicates code between branches and, most importantly, fixes a double end_exclusive call in the parent that will cause exclusive_context_count to go negative.
Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com> Pull-Request: https://github.com/qemu-bsd-user/qemu-bsd-user/pull/52 Reviewed-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
e6e102b9 | 08-Dec-2022 |
Doug Rabson <dfr@rabson.org> |
bsd-user: Simplify the implementation of execve
This removes the logic which prepends the emulator to each call to execve and fexecve. This is not necessary with the existing imgact_binmisc support
bsd-user: Simplify the implementation of execve
This removes the logic which prepends the emulator to each call to execve and fexecve. This is not necessary with the existing imgact_binmisc support and it avoids the need to install the emulator binary into jail environments when using 'binmiscctl --pre-open'.
Signed-off-by: Doug Rabson <dfr@rabson.org> Reviewed-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Warner Losh <imp@bsdimp.com> Acked-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
ce6c541d | 07-Jul-2024 |
Stacey Son <sson@FreeBSD.org> |
bsd-user:Add AArch64 improvements and signal handling functions
Added get_ucontext_sigreturn function to check processor state ensuring current execution mode is EL0 and no flags indicating interrup
bsd-user:Add AArch64 improvements and signal handling functions
Added get_ucontext_sigreturn function to check processor state ensuring current execution mode is EL0 and no flags indicating interrupts or exceptions are set. Updated AArch64 code to use CF directly without reading/writing the entire processor state, improving efficiency. Changed FP data structures to use Int128 instead of __uint128_t, leveraging QEMU's generic mechanism for referencing this type.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Ajeet Singh <itachis@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240707191128.10509-9-itachis@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com>
show more ...
|
dadfc6d5 | 07-Jul-2024 |
Stacey Son <sson@FreeBSD.org> |
bsd-user:Add set_mcontext function for ARM AArch64
The function copies register values from the provided target_mcontext_t structure to the CPUARMState registers. Note:FP is unfinished upstream but
bsd-user:Add set_mcontext function for ARM AArch64
The function copies register values from the provided target_mcontext_t structure to the CPUARMState registers. Note:FP is unfinished upstream but will be a separate commit coming soon.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Ajeet Singh <itachis@FreeBSD.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240707191128.10509-8-itachis@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com>
show more ...
|
c88f44d8 | 07-Jul-2024 |
Warner Losh <imp@bsdimp.com> |
bsd-user:Add setup_sigframe_arch function for ARM AArch64
The function utilizes the `get_mcontext` function to retrieve the machine context for the current CPUARMState
Signed-off-by: Warner Losh <i
bsd-user:Add setup_sigframe_arch function for ARM AArch64
The function utilizes the `get_mcontext` function to retrieve the machine context for the current CPUARMState
Signed-off-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Ajeet Singh <itachis@FreeBSD.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240707191128.10509-7-itachis@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com>
show more ...
|
9959fae5 | 07-Jul-2024 |
Stacey Son <sson@FreeBSD.org> |
bsd-user:Add get_mcontext function for ARM AArch64
function to retrieve machine context,it populates the provided target_mcontext_t structure with information from the CPUARMState registers.
Signed
bsd-user:Add get_mcontext function for ARM AArch64
function to retrieve machine context,it populates the provided target_mcontext_t structure with information from the CPUARMState registers.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Ajeet Singh <itachis@FreeBSD.org> Co-authored-by: Kyle Evans <kevans@FreeBSD.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240707191128.10509-6-itachis@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com>
show more ...
|
7dba5e10 | 07-Jul-2024 |
Stacey Son <sson@FreeBSD.org> |
bsd-user:Add ARM AArch64 signal handling support
Added sigcode setup function for signal trampoline which initializes a sequence of instructions to handle signal returns and exits, copying this code
bsd-user:Add ARM AArch64 signal handling support
Added sigcode setup function for signal trampoline which initializes a sequence of instructions to handle signal returns and exits, copying this code to the target offset. Defined ARM AArch64 specific signal definitions including register indices and sizes, and introduced structures to represent general purpose registers, floating point registers, and machine context. Added function to set up signal handler arguments, populating register values in `CPUARMState` based on the provided signal, signal frame, signal action, and frame address.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Ajeet Singh <itachis@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Co-authored-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240707191128.10509-5-itachis@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com>
show more ...
|
1541d87d | 07-Jul-2024 |
Warner Losh <imp@bsdimp.com> |
bsd-user:Add ARM AArch64 support and capabilities
Added function to access rval2 by accessing the x1 register. Defined ARM AArch64 ELF parameters including mmap and dynamic load addresses. Introduce
bsd-user:Add ARM AArch64 support and capabilities
Added function to access rval2 by accessing the x1 register. Defined ARM AArch64 ELF parameters including mmap and dynamic load addresses. Introduced extensive hardware capability definitions and macros for retrieving hardware capability (hwcap) flags. Implemented function to retrieve ARM AArch64 hardware capabilities using the `GET_FEATURE_ID` macro. Added function to retrieve extended ARM AArch64 hardware capability flags.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Ajeet Singh <itachis@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Co-authored-by: Kyle Evans <kevans@FreeBSD.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240707191128.10509-4-itachis@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com>
show more ...
|
1acce771 | 07-Jul-2024 |
Stacey Son <sson@FreeBSD.org> |
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 stora
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>
show more ...
|
cb4c2590 | 06-Jun-2024 |
Warner Losh <imp@bsdimp.com> |
bsd-user: Catch up to run-time reserved_va math
Catch up to linux-user's 8f67b9c694d0, 13c13397556a, 2f7828b57293, and 95059f9c313a by Richard Henderson which made reserved_va a run-time calculation
bsd-user: Catch up to run-time reserved_va math
Catch up to linux-user's 8f67b9c694d0, 13c13397556a, 2f7828b57293, and 95059f9c313a by Richard Henderson which made reserved_va a run-time calculation, defaulting to nothing except in the case of 64-bit host 32-bit target. Also include the adjustment of the comment heading that work submitted in the same patch stream. Since this is a direct copy, squash it into one patch rather than follow the Linux evolution since breaking this down further at this point doesn't make sense for this "new code".
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
80196013 | 25-Apr-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
user: Declare get_task_state() once in 'accel/tcg/vcpu-state.h'
While each user emulation implentation defines its own TaskState structure, both use the same get_task_state() declaration, in particu
user: Declare get_task_state() once in 'accel/tcg/vcpu-state.h'
While each user emulation implentation defines its own TaskState structure, both use the same get_task_state() declaration, in particular in common code (such gdbstub). Declare the method once in "accel/tcg/vcpu-state.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240428221450.26460-10-philmd@linaro.org>
show more ...
|