e5e44263 | 04-Aug-2021 |
Warner Losh <imp@FreeBSD.org> |
bsd-user: define max args in terms of pages
For 32-bit platforms, pass in up to 256k of args. For 64-bit, bump that to 512k.
Signed-off-by: Kyle Evans <kevans@freebsd.org> Signed-off-by: Warner Los
bsd-user: define max args in terms of pages
For 32-bit platforms, pass in up to 256k of args. For 64-bit, bump that to 512k.
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 ...
|
a8fe6d5d | 03-Aug-2021 |
Warner Losh <imp@FreeBSD.org> |
bsd-user: pull in target_arch_thread.h update target_arch_elf.h
Update target_arch_elf.h to remove thread_init. Move its contents to target_arch_thread.h and rename to target_thread_init(). Update e
bsd-user: pull in target_arch_thread.h update target_arch_elf.h
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>
show more ...
|
031fe7af | 03-Aug-2021 |
Warner Losh <imp@FreeBSD.org> |
bsd-user: Move per-cpu code into target_arch_cpu.h
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> Sign
bsd-user: Move per-cpu code into target_arch_cpu.h
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>
show more ...
|
01a298a5 | 03-Aug-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user: save the path to the qemu emulator
Save the path to the qemu emulator. This will be used later when we have a more complete implementation of exec.
Signed-off-by: Stacey Son <sson@FreeBSD
bsd-user: save the path to the qemu emulator
Save the path to the qemu emulator. This will be used later when we have a more complete implementation of exec.
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>
show more ...
|
d1dc9ab3 | 27-Aug-2021 |
Warner Losh <imp@FreeBSD.org> |
bsd-user: Include host-os.h from main
Include host-os.h from main.c to pick up the default OS to emulate. Set that default in main().
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Wa
bsd-user: Include host-os.h from main
Include host-os.h from main.c to pick up the default OS to emulate. Set that default in main().
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 ...
|
cce7ae5c | 27-Aug-2021 |
Warner Losh <imp@FreeBSD.org> |
bsd-user: add host-os.h
Host OS specific bits for this implementation go in this file.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard
bsd-user: add host-os.h
Host OS specific bits for this implementation go in this file.
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 ...
|
d42df502 | 03-Aug-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user: assume pthreads and support of __thread
All compilers for some time have supported this. Follow linux-user and eliminate the #define THREAD and unconditionally insert __thread where needed
bsd-user: assume pthreads and support of __thread
All compilers for some time have supported this. Follow linux-user and eliminate the #define THREAD and unconditionally insert __thread where needed. Please insert: "(see 24cb36a61c6: "configure: Make NPTL non-optional")"
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
show more ...
|
b62f790c | 02-Aug-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user: elfload: simplify bswap a bit.
Reduce the number of ifdefs by always calling the swapping routine, but making them empty when swapping isn't needed.
Signed-off-by: Warner Losh <imp@bsdimp
bsd-user: elfload: simplify bswap a bit.
Reduce the number of ifdefs by always calling the swapping routine, but making them empty when swapping isn't needed.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
ffa03665 | 30-Apr-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user: remove a.out support
Remove still-born a.out support. The BSDs switched from a.out to ELF 20+ years ago. It's out of scope for bsd-user, and what little support there was would simply wind
bsd-user: remove a.out support
Remove still-born a.out support. The BSDs switched from a.out to ELF 20+ years ago. It's out of scope for bsd-user, and what little support there was would simply wind up at a not-implemented message. Simplify the whole mess by removing it entirely. Should future support be required, it would be better to start from scratch.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
show more ...
|
7ee09869 | 29-Apr-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user: Eliminate elf personality
The linux kernel supports a number of different ELF binaries. The Linux userland emulator inheritted some of that. And we inheritted it from there. However, for B
bsd-user: Eliminate elf personality
The linux kernel supports a number of different ELF binaries. The Linux userland emulator inheritted some of that. And we inheritted it from there. However, for BSD there's only one kind of ELF file supported per platform, so there's no need to cope with historical quirks. Simply the code as a result.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
1b50ff64 | 29-Apr-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user: implement path searching
Use the PATH to find the executable given a bare argument. We need to do this so we can implement mixing native and emulated binaries (e.g., execing a x86 native b
bsd-user: implement path searching
Use the PATH to find the executable given a bare argument. We need to do this so we can implement mixing native and emulated binaries (e.g., execing a x86 native binary from an emulated arm binary to optimize parts of the build). By finding the binary, we will know how to exec it.
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 ...
|
223005f0 | 29-Apr-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user: Fix calculation of size to allocate
It was incorrect to subtract off the size of an unsigned int here. In bsd-user fork, this change was made when moving the arch specific items to specif
bsd-user: Fix calculation of size to allocate
It was incorrect to subtract off the size of an unsigned int here. In bsd-user fork, this change was made when moving the arch specific items to specific files. The size in BSD that's available for the arguments does not need a return address subtracted from it.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
d37853f9 | 29-Apr-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user: pass the bsd_param into loader_exec
Pass the bsd_param into loader_exec, and adjust. We use it to track the inital stack allocation and to set stack, open files, and other state shared bet
bsd-user: pass the bsd_param into loader_exec
Pass the bsd_param into loader_exec, and adjust. We use it to track the inital stack allocation and to set stack, open files, and other state shared between bsdload.c and elfload.c
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
show more ...
|
66ef252f | 29-Apr-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user: move arch specific defines out of elfload.c
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.
bsd-user: move arch specific defines out of elfload.c
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>
show more ...
|
dd869a96 | 29-Apr-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user: Remove all non-x86 code from elfload.c
bsd-user only builds x86 at the moment. Remove all non x86 code from elfload.c. We'll move the x86 code to {i386,x86_64}/target_arch_elf.h and bring
bsd-user: Remove all non-x86 code from elfload.c
bsd-user only builds x86 at the moment. Remove all non x86 code from elfload.c. We'll move the x86 code to {i386,x86_64}/target_arch_elf.h and bring it that support code from the forked bsd-user when the time comes.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
b211b368 | 29-Apr-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user: add license to bsdload.c
Pull in the license statement at the top of the bsdload.c file from the bsd-user fork version of this file. No functional changes.
Signed-off-by: Warner Losh <imp
bsd-user: add license to bsdload.c
Pull in the license statement at the top of the bsdload.c file from the bsd-user fork version of this file. No functional changes.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
4c0a4fe6 | 05-Aug-2021 |
Warner Losh <imp@FreeBSD.org> |
bsd-user: Add Stacey's copyright to main.c
Add Stacey's updated copyright to main.c
Signed-off-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Stacey Son <sson@FreeBSD.org> Reviewed-by: Richard Hen
bsd-user: Add Stacey's copyright to main.c
Add Stacey's updated copyright to main.c
Signed-off-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Stacey Son <sson@FreeBSD.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
310df056 | 06-Aug-2021 |
Warner Losh <imp@FreeBSD.org> |
bsd-user: add copyright header to elfload.c
Add Stacey's copyright to elfload.c
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henders
bsd-user: add copyright header to elfload.c
Add Stacey's copyright to elfload.c
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 ...
|
fa79cde6 | 09-Mar-2021 |
Richard Henderson <richard.henderson@linaro.org> |
accel/tcg: Merge tcg_exec_init into tcg_init_machine
There is only one caller, and shortly we will need access to the MachineState, which tcg_init_machine already has.
Reviewed-by: Luis Pires <luis
accel/tcg: Merge tcg_exec_init into tcg_init_machine
There is only one caller, and shortly we will need access to the MachineState, which tcg_init_machine already has.
Reviewed-by: Luis Pires <luis.pires@eldorado.org.br> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|