aboutsummaryrefslogtreecommitdiff
path: root/bsd-user/i386
AgeCommit message (Collapse)AuthorFilesLines
2022-01-07bsd-user/target_os_signal.h: Move signal prototypes to target_os_ucontext.hWarner Losh1-9/+0
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>
2022-01-07bsd-user/i386: Move the inlines into signal.cWarner Losh2-36/+63
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>
2022-01-07bsd-user/i386/target_arch_signal.h: Update mcontext_t to match FreeBSDWarner Losh1-0/+46
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>
2022-01-07bsd-user/i386/target_arch_signal.h: use new target_os_ucontext.hWarner Losh1-8/+1
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2022-01-07bsd-user/i386/target_arch_signal.h: Remove target_sigcontextWarner Losh1-4/+0
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>
2022-01-07bsd-user: create a per-arch signal.c fileWarner Losh1-0/+1
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>
2021-10-18bsd-user: move TARGET_MC_GET_CLEAR_RET to target_os_signal.hWarner Losh1-2/+0
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>
2021-10-18bsd-user: TARGET_RESET define is unused, remove itWarner Losh1-2/+0
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>
2021-09-14user: Remove cpu_get_pic_interrupt() stubsPhilippe Mathieu-Daudé1-5/+0
cpu_get_pic_interrupt() is now unreachable from user-mode, delete the unnecessary stubs. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210911165434.531552-25-f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2021-09-10bsd-user: Add target_arch_reg to describe a target's register setWarner Losh1-0/+82
target_reg_t is the normal register. target_fpreg_t is the floating point registers. target_copy_regs copies the registers out of CPU context for things like core dumps. Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2021-09-10bsd-user: Add architecture specific signal tramp codeWarner Losh1-0/+29
Add a stubbed out version of setup_sigtramp. This is not yet used for x86, but is used for other architectures. This will be connected in future commits. Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2021-09-10bsd-user: *BSD specific siginfo defintionsWarner Losh1-0/+94
Add FreeBSD, NetBSD and OpenBSD values for the various signal info types and defines to decode different signals to discover more information about the specific signal types. Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Acked-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
2021-09-10bsd-user: Create target specific vmparam.hWarner Losh1-0/+46
Target specific values for vm parameters and details. Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2021-09-10bsd-user: pull in target_arch_thread.h update target_arch_elf.hWarner Losh2-49/+50
Update target_arch_elf.h to remove thread_init. Move its contents to target_arch_thread.h and rename to target_thread_init(). Update elfload.c to call it. Create thread_os_thread.h to hold the os specific parts of the thread and threat manipulation routines. Currently, it just includes target_arch_thread.h. target_arch_thread.h contains the at the moment unused target_thread_set_upcall which will be used in the future when creating actual thread (i386 has this stubbed, but other architectures in the bsd-user tree have real ones). FreeBSD doesn't do AT_HWCAP, so remove that code. Linux does, and this code came from there. These changes are all interrelated and could be brokend down, but seem to represent a reviewable changeset since most of the change is boiler plate. Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
2021-09-10bsd-user: Move per-cpu code into target_arch_cpu.hWarner Losh2-0/+210
Move cpu_loop() into target_cpu_loop(), and put that in target_arch_cpu.h for each architecture. Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2021-09-10bsd-user: start to move target CPU functions to target_arch*Warner Losh2-0/+106
Move the CPU functions into target_arch_cpu.c that are unique to each CPU. These are defined in target_arch.h. Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2021-09-10bsd-user: move arch specific defines out of elfload.cWarner Losh1-0/+81
Move the architecture specific defines to target_arch_elf.h and delete them from elfload.c. Only retain ifdefs appropriate for i386 and x86_64. Add the copyright/license comments, and guard ifdefs. Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2021-05-11bsd-user: remove target_signal.h, it's unusedWarner Losh1-20/+0
Remove the target_signal.h file. None of its contents are currently used and the bsd-user fork doesn't use them (so this reduces the diffs there). Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Warner Losh <imp@bsdimp.com>
2021-01-11bsd-user: move strace OS/arch dependent code to host/arch dirsStacey Son2-0/+96
This change moves host OS and arch dependent code for the sysarch system call related to the -strace functionality into the appropriate host OS and target arch directories. Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Sean Bruno <sburno@FreeBSD.org> [ imp integrated minor build fixes from sbruno ] Signed-off-by: Warner Losh <imp@FreeBSD.org> Message-Id: <20201218205451.10559-4-imp@freebsd.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
2016-07-12Clean up decorations and whitespace around header guardsMarkus Armbruster1-1/+1
Cleaned up with scripts/clean-header-guards.pl. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
2016-02-25build: [bsd-user] Rename "syscall.h" to "target_syscall.h" in target directoriesLluís Vilanova1-0/+4
This fixes double-definitions in bsd-user builds when using the UST tracing backend (which indirectly includes the system's "syscall.h"). Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2009-10-18bsd-user: FreeBSD updateJuergen Lock1-0/+14
basic FreeBSD sysarch(2) handling fixed syscall errno return Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-04-11BSD user: initial support for i386 and x86_64 targetsblueswir12-0/+167
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7084 c046a42c-6fe2-441c-8c8c-71466251a162