647afdf1 | 31-Jan-2022 |
Warner Losh <imp@bsdimp.com> |
bsd-user: introduce target.h
Create target.h. This file is intended to be simple and describe basic things about the architecture. If something is a basic feature of the architecture, it belongs her
bsd-user: introduce target.h
Create target.h. This file is intended to be simple and describe basic things about the architecture. If something is a basic feature of the architecture, it belongs here. Should we need something that's per-BSD there will be a target-os.h that will live in the per-bsd directories.
Define regpairs_aligned to reflect whether or not registers are 'paired' for 64-bit arguments or not. This will be false for all 64-bit targets, and will be true on those architectures that pair (currently just armv7 and powerpc on FreeBSD 14.x).
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Kyle Evans <kevans@FreeBSD.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
f1f22450 | 30-Jan-2022 |
Warner Losh <imp@bsdimp.com> |
bsd-user/arm/target_arch_thread.h: Assume a FreeBSD target
Since we can't run on anything else, assume for the moment that this is a FreeBSD target. In the future, we'll need to handle this properly
bsd-user/arm/target_arch_thread.h: Assume a FreeBSD target
Since we can't run on anything else, assume for the moment that this is a FreeBSD target. In the future, we'll need to handle this properly via some include file in bsd-user/*bsd/arm/mumble.h. There's a number of other diffs that would be needed to make things work on OtherBSD, so it doesn't make sense to preseve this one detail today.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Kyle Evans <kevans@FreeBSD.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
67ccbe79 | 08-Jan-2022 |
Warner Losh <imp@bsdimp.com> |
bsd-user/arm/target_arch_cpu.h: Implement data faults
Update for the richer set of data faults that are now possible. Copied largely from linux-user/arm/cpu_loop.c, with minor typo fixes.
Signed-of
bsd-user/arm/target_arch_cpu.h: Implement data faults
Update for the richer set of data faults that are now possible. Copied largely from linux-user/arm/cpu_loop.c, with minor typo fixes.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
5e02ded1 | 08-Jan-2022 |
Warner Losh <imp@bsdimp.com> |
bsd-user/arm/target_arch_cpu.h: Use force_sig_fault for EXCP_UDEF
Use force_sig_fault to implement unknown opcode. This just uninlines that function, so simplify things by using it. Fold in EXCP_NOC
bsd-user/arm/target_arch_cpu.h: Use force_sig_fault for EXCP_UDEF
Use force_sig_fault to implement unknown opcode. This just uninlines that function, so simplify things by using it. Fold in EXCP_NOCP and EXCP_INVSTATE, as is done in linux-user. Make a note about slight differences with FreeBSD in case any of them turn out to be important later.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
c0b93df3 | 08-Jan-2022 |
Warner Losh <imp@bsdimp.com> |
bsd-user/arm/target_arch_cpu.h: Correct code pointer
The code has moved in FreeBSD since the emulator was started, update the comment to reflect that change.
Signed-off-by: Warner Losh <imp@bsdimp.
bsd-user/arm/target_arch_cpu.h: Correct code pointer
The code has moved in FreeBSD since the emulator was started, update the comment to reflect that change.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
a3ed97ce | 08-Jan-2022 |
Warner Losh <imp@bsdimp.com> |
bsd-user/arm/arget_arch_cpu.h: Move EXCP_DEBUG and EXCP_BKPT together
Implement EXCP_DEBUG and EXCP_BKPT the same, as is done in linux-user. The prior adjustment of register 15 isn't needed, so remo
bsd-user/arm/arget_arch_cpu.h: Move EXCP_DEBUG and EXCP_BKPT together
Implement EXCP_DEBUG and EXCP_BKPT the same, as is done in linux-user. The prior adjustment of register 15 isn't needed, so remove that. Remove a redunant comment (that code in FreeBSD never handled break points). It's unclear why BKPT was an alias for system calls, but FreeBSD doesn't do that today.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
c0d2691c | 08-Jan-2022 |
Warner Losh <imp@bsdimp.com> |
bsd-user/arm/target_arch_cpu.h: Move EXCP_ATOMIC to match linux-user
Move the EXCP_ATOMIC case to match linux-user/arm/cpu_loop.c:cpu_loop ordering.
Signed-off-by: Warner Losh <imp@bsdimp.com> Revi
bsd-user/arm/target_arch_cpu.h: Move EXCP_ATOMIC to match linux-user
Move the EXCP_ATOMIC case to match linux-user/arm/cpu_loop.c:cpu_loop ordering.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
7f96d0a9 | 24-Jan-2022 |
Warner Losh <imp@bsdimp.com> |
bsd-user/arm/signal.c: get_mcontext should zero vfp data
FreeBSD's get_mcontext doesn't return any vfp data. Instead, it zeros out the vfp feilds (and all the spare fields). Impelement this behavior
bsd-user/arm/signal.c: get_mcontext should zero vfp data
FreeBSD's get_mcontext doesn't return any vfp data. Instead, it zeros out the vfp feilds (and all the spare fields). Impelement this behavior. We're still missing the sysarch(ARM_GET_VFPCONTEXT) syscall, though.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
3ac34cc9 | 23-Sep-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user/arm/signal.c: arm get_ucontext_sigreturn
Update ucontext to implement sigreturn.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richa
bsd-user/arm/signal.c: arm get_ucontext_sigreturn
Update ucontext to implement sigreturn.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
d6d4509a | 23-Sep-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user/arm/signal.c: arm set_mcontext
Move the machine context to the CPU state.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Kyle Evans <kevans@FreeBSD.org> Signed-off-by: Warner
bsd-user/arm/signal.c: arm set_mcontext
Move the machine context to the CPU state.
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: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
38ce1471 | 23-Sep-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user/arm/signal.c: arm get_mcontext
Get the machine context from the CPU state.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Kyle Evans <kevans@FreeBSD.org> Signed-off-by: Warner
bsd-user/arm/signal.c: arm get_mcontext
Get the machine context from the CPU state.
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: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
781be866 | 23-Sep-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user/arm/signal.c: arm set_sigtramp_args
Implement set_sigtramp_args to setup the arguments to the sigtramp calls.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@b
bsd-user/arm/signal.c: arm set_sigtramp_args
Implement set_sigtramp_args to setup the arguments to the sigtramp calls.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
2cb1e643 | 04-Nov-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user/arm/target_arch_signal.h: Define size of *context_t
Define the native sizes of mcontext_t and ucontext_t so that the tests in target_os_ucontext.h ensure the size of arm's version of these
bsd-user/arm/target_arch_signal.h: Define size of *context_t
Define the native sizes of mcontext_t and ucontext_t so that the tests in target_os_ucontext.h ensure the size of arm's version of these structures is correct.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
03fd4028 | 23-Sep-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user/arm/target_arch_signal.h: arm machine context and trapframe for signals
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Kyle Evans <kevans@FreeBSD.org> Signed-off-by: Warner Los
bsd-user/arm/target_arch_signal.h: arm machine context and trapframe for signals
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: Richard Henderson <richard.henderson@linaro.org>
show more ...
|