From: Warner Losh
The following changes since commit a61c30b8c8c3c8619847cfaa289233cc696f5689:
Merge remote-tracking branch 'remotes/mjt/tags/patch-fetch' into staging
(2021-09-07 10:15:48 +0100)
are available in the Git repository at:
https://gitlab.com/bsdimp/qemu.git tags/pull-bsd-user
From: Warner Losh
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
Reviewed-by: Richard Henderson
---
bsd-user/elfloa
From: Warner Losh
Update the reserved base based on what platform we're on, as well as the
start of the mmap range. Update routines that find va ranges to interact
with the reserved ranges as well as properly align the mapping (this is
especially important for targets whose page size does not mat
From: Warner Losh
Factor out load_elf_sections and is_target_elf_binary out of
load_elf_interp.
Signed-off-by: Mikaël Urankar
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
Reviewed-by: Kyle Evans
---
bsd-user/elfload.c | 344 +
1 file chang
From: Warner Losh
Add a stubbed-out version of the bsd-user fork's core dump support. This
allows elfload.c to be almost the same between what's upstream and
what's in qemu-project upstream w/o the burden of reviewing the core
dump support.
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
From: Warner Losh
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
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/i386/ta
From: Warner Losh
Implement the internlock in fork_start() and fork_end() to properly cope
with atomic operations and to safely keep state for parent and child
processes.
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/main.c | 24
From: Warner Losh
Signed-off-by: Warner Losh
Acked-by: Richard Henderson
Reviewed-by: Kyle Evans
---
bsd-user/main.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 71fd9d5aba..768f4ee41e 100644
--- a/bsd-user/main.
From: Warner Losh
Update the debugging code for new features and different targets.
Signed-off-by: Mikaël Urankar
Signed-off-by: Sean Bruno
Signed-off-by: Kyle Evans
Signed-off-by: Warner Losh
Acked-by: Richard Henderson
Reviewed-by: Kyle Evans
---
bsd-user/mmap.c | 55 +++
From: Warner Losh
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
Signed-off-by: Warner Losh
Acked-by: Richard Henderson
Reviewed-by: Kyle E
From: Warner Losh
This file evolved over the years to capture the user/kernel interfaces,
including those that changed over time.
Signed-off-by: Stacey Son
Signed-off-by: Michal Meloun
Signed-off-by: Warner Losh
Acked-by: Richard Henderson
Reviewed-by: Kyle Evans
---
bsd-user/freebsd/targe
From: Colin Percival
Previously it was impossible to emulate a program with a file name
different from its argv[0]. With this change, you can run
qemu -0 fakename realname args
which runs the program "realname" with an argv of "fakename args".
Signed-off-by: Colin Percival
Signed-off-by: W
From: Warner Losh
Copy --seed implementation (translated from linux-user's newer command
line scheme to the older one bsd-user still uses). Initialize the
randomness with the glib if a specific seed is specified or use the
qcrypto library if not.
Signed-off-by: Warner Losh
Reviewed-by: Richard
From: Warner Losh
Various style fixes to elfload.c that were too painful to make earlier
in this series.
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/elfload.c | 208 ++---
1 file changed, 104 insertions(+), 104 deletions(-)
d
From: Warner Losh
Rewrite target definnitions to interface with the FreeBSD system calls.
This covers basic types (time_t, iovec, umtx_time, timespec, timeval,
rusage, rwusage) and basic defines (mmap, rusage). Also included are
FreeBSD version-specific variations.
Signed-off-by: Stacey Son
Sig
From: Warner Losh
Target specific values for vm parameters and details.
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/freebsd/target_os_vmparam.h | 38 ++
bsd-user/i386/target_arch_vmparam.h | 46 ++
From: Warner Losh
LOW_ELF_STACK doesn't exist on FreeBSD and likely never will. Remove it.
Likewise, remove an #if 0 block that's not useful
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/elfload.c | 20
1 file changed, 20 deletions(-)
diff --git
From: Warner Losh
Include more header files to match bsd-user fork.
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/qemu.h | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
index 5e4cbb40d4..55d71130bb 100644
---
From: Warner Losh
Move OS-dependent defines into target_os_elf.h. Move the architectural
dependent stuff into target_arch_elf.h. Adjust elfload.c to use
target_create_elf_tables instead of create_elf_tables.
Signed-off-by: Warner Losh
Signed-off-by: Stacey Son
Signed-off-by: Kyle Evans
Signed
From: Warner Losh
Move all of the stack initialization into target_os_stack.h. Each BSD
sets up processes a little differently.
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/freebsd/target_os_stack.h | 181 +
bsd-
From: Warner Losh
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
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/i386/target_arch_sigtra
From: Warner Losh
Host OS specific bits for this implementation go in this file.
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/freebsd/host-os.h | 23 +++
bsd-user/netbsd/host-os.h | 23 +++
bsd-user/
From: Warner Losh
Move cpu_loop() into target_cpu_loop(), and put that in
target_arch_cpu.h for each architecture.
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/i386/target_arch_cpu.c | 1 +
bsd-user/i386/target_arch_cpu.h | 209 ++
From: Warner Losh
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
i
From: Warner Losh
For 32-bit platforms, pass in up to 256k of args. For 64-bit, bump that
to 512k.
Signed-off-by: Kyle Evans
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/qemu.h | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/bsd-
From: Warner Losh
Eliminate the x86 specific stack stuff in favor of more generic control
over the process size:
target_maxtsiz max text size
target_dfldsiz initial data size limit
target_maxdsiz max data size
target_dflssiz initial stack size limit
target_maxssiz max sta
From: Warner Losh
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. Simpl
From: Warner Losh
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
Reviewed-by: Richard Henderson
---
bsd-user/elfload.c | 97 ++
1 file changed, 47 inse
From: Warner Losh
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
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/freebsd/host-os.h | 2 ++
bsd-user/main.c| 4 +++-
bsd-user/netbsd/h
From: Warner Losh
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
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/i386/target_arch.h | 31 +
bsd-user/i386/target_
From: Warner Losh
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 requ
From: Warner Losh
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/bsdload.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/bsd-user/bsdload.c b/bsd-user/bsdload.c
index 6aefc7a28b..5b3c061a45 100644
--- a/bsd-user/bsdload.c
+++ b/bsd-user/bsdload.c
@@ -19,8 +19,6 @
From: Warner Losh
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 i
From: Warner Losh
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
Signed-off-by: Warner Losh
Acked-by: Richard Henderson
Reviewed-by: Kyle Evans
---
bsd-user/main.c | 21 +
bsd-use
From: Warner Losh
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
Reviewed-by: Richard Henderson
--
From: Warner Losh
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
Reviewed-by: Richard Henderson
---
bsd-user/elfloa
From: Warner Losh
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
Reviewed-by: Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé
From: Warner Losh
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
Reviewed-by: Richard Henders
From: Warner Losh
These are broken here and in the bsd-user fork. They won't be fixed as
FreeBSD has dropped support for sparc. If people wish to support this in
other BSDs, you're better off starting over than starting from these
files.
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
From: Warner Losh
Add Stacey's updated copyright to main.c
Signed-off-by: Warner Losh
Signed-off-by: Stacey Son
Reviewed-by: Richard Henderson
---
bsd-user/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 38185da111..39c4a0f
From: Warner Losh
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/bsdload.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bsd-user/bsdload.c b/bsd-user/bsdload.c
index 0ade58b9e2..ec71c5e923 100644
--- a/bsd-user/bsdload.c
+++ b/bsd-user/bsdload
From: Warner Losh
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
From: Warner Losh
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
Reviewed-by: Richard Henderson
---
bsd-user/bsdload.c | 17 -
1 file changed, 16 insertions(+), 1 del
From: Warner Losh
Add Stacey's copyright to elfload.c
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/elfload.c | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c
ind
From: Warner Losh
The following changes since commit f214d8e0150766c31172e16ef4b17674f549d852:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210826'
into staging (2021-08-26 18:03:57 +0100)
are available in the Git repository at:
https://gitlab.com/bsdimp/qemu.git
From: Warner Losh
Factor out load_elf_sections and is_target_elf_binary out of
load_elf_interp.
Signed-off-by: Mikaël Urankar
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
---
bsd-user/elfload.c | 344 +
1 file changed, 158 insertions(+), 18
From: Warner Losh
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
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/i386/ta
From: Colin Percival
Previously it was impossible to emulate a program with a file name
different from its argv[0]. With this change, you can run
qemu -0 fakename realname args
which runs the program "realname" with an argv of "fakename args".
Signed-off-by: Colin Percival
Signed-off-by: W
From: Warner Losh
Move all of the stack initialization into target_os_stack.h. Each BSD
sets up processes a little differently.
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/freebsd/target_os_stack.h | 181 +
bsd-
From: Warner Losh
Target specific values for vm parameters and details.
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/freebsd/target_os_vmparam.h | 38 ++
bsd-user/i386/target_arch_vmparam.h | 46 ++
From: Warner Losh
Update the reserved base based on what platform we're on, as well as the
start of the mmap range. Update routines that find va ranges to interact
with the reserved ranges as well as properly align the mapping (this is
especially important for targets whose page size does not mat
From: Warner Losh
Various style fixes to elfload.c that were too painful to make earlier
in this series.
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/elfload.c | 208 ++---
1 file changed, 104 insertions(+), 104 deletions(-)
d
From: Warner Losh
Signed-off-by: Warner Losh
Acked-by: Richard Henderson
---
bsd-user/main.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 50c8fdc1e2..1de86ae493 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@
From: Warner Losh
For 32-bit platforms, pass in up to 256k of args. For 64-bit, bump that
to 512k.
Signed-off-by: Kyle Evans
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/qemu.h | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/bsd-
From: Warner Losh
Implement the internlock in fork_start() and fork_end() to properly cope
with atomic operations and to safely keep state for parent and child
processes.
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/main.c | 24
From: Warner Losh
Update the debugging code for new features and different targets.
Signed-off-by: Mikaël Urankar
Signed-off-by: Sean Bruno
Signed-off-by: Kyle Evans
Signed-off-by: Warner Losh
Acked-by: Richard Henderson
---
bsd-user/mmap.c | 55 ++--
From: Warner Losh
Add a stubbed-out version of the bsd-user fork's core dump support. This
allows elfload.c to be almost the same between what's upstream and
what's in qemu-project upstream w/o the burden of reviewing the core
dump support.
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
From: Warner Losh
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
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/i386/target_arch.h | 31 +
bsd-user/i386/target_
From: Warner Losh
Move OS-dependent defines into target_os_elf.h. Move the architectural
dependent stuff into target_arch_elf.h. Adjust elfload.c to use
target_create_elf_tables instead of create_elf_tables.
Signed-off-by: Warner Losh
Signed-off-by: Stacey Son
Signed-off-by: Kyle Evans
Signed
From: Warner Losh
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
i
From: Warner Losh
This file evolved over the years to capture the user/kernel interfaces,
including those that changed over time.
Signed-off-by: Stacey Son
Signed-off-by: Michal Meloun
Signed-off-by: Warner Losh
Acked-by: Richard Henderson
---
bsd-user/freebsd/target_os_user.h | 427 +++
From: Warner Losh
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
Signed-off-by: Warner Losh
Acked-by: Richard Henderson
---
bsd-user/main.c | 21 +
bsd-user/qemu.h | 1 +
2 files
From: Warner Losh
Rewrite target definnitions to interface with the FreeBSD system calls.
This covers basic types (time_t, iovec, umtx_time, timespec, timeval,
rusage, rwusage) and basic defines (mmap, rusage). Also included are
FreeBSD version-specific variations.
Signed-off-by: Stacey Son
Sig
From: Warner Losh
Copy --seed implementation (translated from linux-user's newer command
line scheme to the older one bsd-user still uses). Initialize the
randomness with the glibc if a specific seed is specified or use the
qcrypto library if not.
Signed-off-by: Warner Losh
---
bsd-user/main.c
From: Warner Losh
Eliminate the x86 specific stack stuff in favor of more generic control
over the process size:
target_maxtsiz max text size
target_dfldsiz initial data size limit
target_maxdsiz max data size
target_dflssiz initial stack size limit
target_maxssiz max sta
From: Warner Losh
Include more header files to match bsd-user fork.
Signed-off-by: Warner Losh
---
bsd-user/qemu.h | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
index 5e4cbb40d4..55d71130bb 100644
--- a/bsd-user/qemu.h
+++ b/bsd-use
From: Warner Losh
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
Reviewed-by: Richard Henders
From: Warner Losh
cpu_model and cpu_type will be used future commits, so move them from
main() scoped to file scoped.
Signed-off-by: Warner Losh
Acked-by: Richard Henderson
---
bsd-user/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bsd-user/main.c b/bsd-user/m
From: Warner Losh
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/bsdload.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/bsd-user/bsdload.c b/bsd-user/bsdload.c
index 6aefc7a28b..5b3c061a45 100644
--- a/bsd-user/bsdload.c
+++ b/bsd-user/bsdload.c
@@ -19,8 +19,6 @
From: Warner Losh
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
Reviewed-by: Richard Henderson
---
bsd-user/elfload.c | 97 ++
1 file changed, 47 inse
From: Warner Losh
LOW_ELF_STACK doesn't exist on FreeBSD and likely never will. Remove it.
Likewise, remove an #if 0 block that's not useful
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/elfload.c | 20
1 file changed, 20 deletions(-)
diff --git
From: Warner Losh
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 requ
From: Warner Losh
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
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/freebsd/host-os.h | 2 ++
bsd-user/main.c| 4 +++-
bsd-user/netbsd/h
From: Warner Losh
Host OS specific bits for this implementation go in this file.
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/freebsd/host-os.h | 23 +++
bsd-user/netbsd/host-os.h | 23 +++
bsd-user/
From: Warner Losh
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. Simpl
From: Warner Losh
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
Signed-off-by: Warner Losh
Acked-by: Richard Henderson
---
bsd-user/freeb
From: Warner Losh
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 i
From: Warner Losh
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
Reviewed-by: Richard Henderson
---
bsd-user/elfloa
From: Warner Losh
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
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/i386/target_arch_sigtra
From: Warner Losh
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
From: Warner Losh
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
Reviewed-by: Richard Henderson
---
bsd-user/bsdload.c | 17 -
1 file changed, 16 insertions(+), 1 del
From: Warner Losh
Move cpu_loop() into target_cpu_loop(), and put that in
target_arch_cpu.h for each architecture.
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
---
bsd-user/i386/target_arch_cpu.c | 1 +
bsd-user/i386/target_arch_cpu.h | 209
bsd-user/main.c
From: Warner Losh
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
Reviewed-by: Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé
From: Warner Losh
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/bsdload.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bsd-user/bsdload.c b/bsd-user/bsdload.c
index 0ade58b9e2..ec71c5e923 100644
--- a/bsd-user/bsdload.c
+++ b/bsd-user/bsdload
From: Warner Losh
Add Stacey's copyright to elfload.c
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/elfload.c | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c
ind
From: Warner Losh
These are broken here and in the bsd-user fork. They won't be fixed as
FreeBSD has dropped support for sparc. If people wish to support this in
other BSDs, you're better off starting over than starting from these
files.
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
From: Warner Losh
This series of patches gets me to the point that I can run "Hello World" on i386
and x86_64. This is for static binaries only, that are relatively small, but
it's better than the 100% instant mmap failre that is the current state of all
things bsd-user in upstream qemu. Future p
From: Warner Losh
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
Reviewed-by: Richard Henderson
--
From: Warner Losh
Add Stacey's updated copyright to main.c
Signed-off-by: Warner Losh
Signed-off-by: Stacey Son
Reviewed-by: Richard Henderson
---
bsd-user/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 38185da111..39c4a0f
From: Warner Losh
Signed-off-by: Warner Losh
Acked-by: Richard Henderson
---
bsd-user/main.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 57669ad7b7..d60a0a7ee2 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@
From: Warner Losh
LOW_ELF_STACK doesn't exist on FreeBSD and likely never will. Remove it.
Likewise, remove an #if 0 block that's not useful
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/elfload.c | 20
1 file changed, 20 deletions(-)
diff --git
From: Warner Losh
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
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/i386/ta
From: Warner Losh
Update the debugging code for new features and different targets.
Signed-off-by: Mikaël Urankar
Signed-off-by: Sean Bruno
Signed-off-by: Kyle Evans
Signed-off-by: Warner Losh
Acked-by: Richard Henderson
---
bsd-user/mmap.c | 45
From: Warner Losh
cpu_model and cpu_type will be used future commits, so move them from
main() scoped to file scoped.
Signed-off-by: Warner Losh
Acked-by: Richard Henderson
---
bsd-user/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bsd-user/main.c b/bsd-user/m
From: Colin Percival
Previously it was impossible to emulate a program with a file name
different from its argv[0]. With this change, you can run
qemu -0 fakename realname args
which runs the program "realname" with an argv of "fakename args".
Signed-off-by: Colin Percival
Signed-off-by: W
From: Warner Losh
Move OS-dependent defines into target_os_elf.h. Move the architectural
dependent stuff into target_arch_elf.h. Adjust elfload.c to use
target_create_elf_tables instead of create_elf_tables.
Signed-off-by: Warner Losh
Signed-off-by: Stacey Son
Signed-off-by: Kyle Evans
Signed
From: Warner Losh
Factor out load_elf_sections and is_target_elf_binary out of
load_elf_interp.
Signed-off-by: Mikaël Urankar
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
---
bsd-user/elfload.c | 350 +
1 file changed, 164 insertions(+), 18
From: Warner Losh
For 32-bit platforms, pass in up to 256k of args. For 64-bit, bump that
to 512k.
Signed-off-by: Kyle Evans
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
bsd-user/qemu.h | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/bsd-
From: Warner Losh
Rewrite target definnitions to interface with the FreeBSD system calls.
This covers basic types (time_t, iovec, umtx_time, timespec, timeval,
rusage, rwusage) and basic defines (mmap, rusage). Also included are
FreeBSD version-specific variations.
Signed-off-by: Stacey Son
Sig
From: Warner Losh
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
i
1 - 100 of 217 matches
Mail list logo