target/xtensa linux-user support
Hi Peter,
please pull the following series that adds linux-user support for target/xtensa.
There's a trivial merge conflict with linux-user pull request from Laurent Vivier.
Changes since v6 patch series:
- rebase to the current master.
The following changes since commit 026aaf47c02b79036feb830206cfebb2a726510d:
Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging (2018-03-13 16:26:44 +0000)
are available in the git repository at:
git://github.com/OSLL/qemu-xtensa.git tags/20180313-xtensa
for you to fetch changes up to be00d35eab124bb4e4e393ac2b0a451e065b7041:
MAINTAINERS: fix W: address for xtensa (2018-03-13 11:30:23 -0700)
----------------------------------------------------------------
target/xtensa linux-user support.
- small cleanup for xtensa registers dumping (-d cpu);
- add support for debugging linux-user process with xtensa-linux-gdb (as opposed to xtensa-elf-gdb), which can only access unprivileged registers;
- enable MTTCG for target/xtensa;
- cleanup in linux-user/mmap area making sure that it works correctly with limited 30-bit-wide user address space;
- import xtensa-specific definitions from the linux kernel, conditionalize user-only/softmmu-only code and add handlers for signals, exceptions, process/thread creation and core registers dumping.
----------------------------------------------------------------
Max Filippov (11):
target/xtensa: dump correct physical registers target/xtensa: mark register windows in the dump target/xtensa: use correct number of registers in gdbstub target/xtensa: support MTTCG
linux-user: fix mmap/munmap/mprotect/mremap/shmat
linux-user: fix assertion in shmdt
linux-user: fix target_mprotect/target_munmap error return values
linux-user: drop unused target_msync function target/xtensa: add linux-user support qemu-binfmt-conf.sh: add qemu-xtensa
MAINTAINERS: fix W: address for xtensa
MAINTAINERS | 2 +- configure | 1 + default-configs/xtensa-linux-user.mak | 1 + default-configs/xtensaeb-linux-user.mak | 1 + include/exec/cpu-all.h | 6 +- include/exec/cpu_ldst.h | 16 +- linux-user/elfload.c | 58 +++++ linux-user/main.c | 245 ++++++++++++++++++ linux-user/mmap.c | 43 ++-- linux-user/qemu.h | 1 - linux-user/signal.c | 256 ++++++++++++++++++- linux-user/syscall.c | 15 +- linux-user/syscall_defs.h | 65 ++++- linux-user/xtensa/syscall.h | 0 linux-user/xtensa/syscall_nr.h | 437 ++++++++++++++++++++++++++++++++ linux-user/xtensa/target_cpu.h | 22 ++ linux-user/xtensa/target_elf.h | 16 ++ linux-user/xtensa/target_signal.h | 28 ++ linux-user/xtensa/target_structs.h | 28 ++ linux-user/xtensa/target_syscall.h | 49 ++++ linux-user/xtensa/termbits.h | 328 ++++++++++++++++++++++++ scripts/qemu-binfmt-conf.sh | 12 +- target/xtensa/Makefile.objs | 3 +- target/xtensa/cpu.c | 26 +- target/xtensa/cpu.h | 60 +++-- target/xtensa/gdbstub.c | 14 +- target/xtensa/helper.c | 58 ++++- target/xtensa/helper.h | 4 + target/xtensa/op_helper.c | 50 +++- target/xtensa/overlay_tool.h | 11 +- target/xtensa/translate.c | 99 ++++++-- 31 files changed, 1840 insertions(+), 115 deletions(-) create mode 100644 default-configs/xtensa-linux-user.mak create mode 100644 default-configs/xtensaeb-linux-user.mak create mode 100644 linux-user/xtensa/syscall.h create mode 100644 linux-user/xtensa/syscall_nr.h create mode 100644 linux-user/xtensa/target_cpu.h create mode 100644 linux-user/xtensa/target_elf.h create mode 100644 linux-user/xtensa/target_signal.h create mode 100644 linux-user/xtensa/target_structs.h create mode 100644 linux-user/xtensa/target_syscall.h create mode 100644 linux-user/xtensa/termbits.h
Signature · 2 lines
Thanks. -- Max
Quoted 14 lines · Max Filippov
Hi Peter,
please pull the following series that adds linux-user support for target/xtensa.
There's a trivial merge conflict with linux-user pull request from Laurent Vivier.Changes since v6 patch series:
- rebase to the current master.The following changes since commit
026aaf47c02b79036feb830206cfebb2a726510d:Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging (2018-03-13 16:26:44 +0000)
Quoted 8 lines
are available in the git repository at:
git://github.com/OSLL/qemu-xtensa.gittags/20180313-xtensafor you to fetch changes up to
be00d35eab124bb4e4e393ac2b0a451e065b7041:
MAINTAINERS: fix W: address for xtensa (2018-03-13 11:30:23 -0700)
Hi. This fails to build on 32-bit:
In file included from /home/peter.maydell/qemu/include/exec/exec-all.h:41:0,
from /home/peter.maydell/qemu/target/xtensa/helper.c:30:/home/peter.maydell/qemu/target/xtensa/helper.c: In function 'xtensa_cpu_handle_mmu_fault':/home/peter.maydell/qemu/target/xtensa/helper.c:331:32: error: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'vaddr {aka long long unsigned int}' [-Werror=format=]
qemu_log_mask(CPU_LOG_INT, "%s: rw = %d, address = 0x%08lx, size = %d\n",
^
/home/peter.maydell/qemu/include/qemu/log.h:84:22: note: in definition
of macro 'qemu_log_mask'
qemu_log(FMT, ## __VA_ARGS__); \
^'vaddr' type is uint64_t, so you need PRIx64 here.
thanks
-- PMM