docker: Add debian-xtensa-cross image
RFC PATCH 1/1 docker: Add debian-xtensa-cross image
Xtensa cpu supported:
- dc232b
- dc233c
- csp
---
based on http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg06782.html
Max: Do we need to use the overlay configuration?
This image allow the build of your dc232b tests (using [1]):
$ make check-tcg ... CC vl.o CC qmp.o LINK xtensa-softmmu/qemu-system-xtensa BUILD debian-xtensa-cross BUILD TCG tests for xtensa-softmmu CHECK debian-xtensa-cross BUILD xtensa guest-tests with docker qemu:debian-xtensa-cross RUN TCG tests for xtensa-softmmu CHECK debian-xtensa-cross BUILD xtensa guest-tests with docker qemu:debian-xtensa-cross $ file xtensa-softmmu/tests/*tst xtensa-softmmu/tests/test_bi.tst: ELF 32-bit LSB executable, Tensilica Xtensa, version 1 (SYSV), statically linked, not stripped xtensa-softmmu/tests/test_break.tst: ELF 32-bit LSB executable, Tensilica Xtensa, version 1 (SYSV), statically linked, not stripped ... xtensa-softmmu/tests/test_timer.tst: ELF 32-bit LSB executable, Tensilica Xtensa, version 1 (SYSV), statically linked, not stripped xtensa-softmmu/tests/test_windowed.tst: ELF 32-bit LSB executable, Tensilica Xtensa, version 1 (SYSV), statically linked, not stripped
[1]: https://github.com/philmd/qemu/tree/testing/gcov-and-other-build-tweaks-v1c
.../dockerfiles/debian-xtensa-cross.docker | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/docker/dockerfiles/debian-xtensa-cross.docker
tests/docker/dockerfiles/debian-xtensa-cross.docker new file +31 -0
@@ -0,0 +1,31 @@ +# +# Docker cross-compiler target +# +# This docker target builds on the debian stretch base image, +# using a prebuilt toolchains for Xtensa cores from: +# https://github.com/foss-xtensa/toolchain/releases +# +FROM debian:stretch-slim + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata +RUN DEBIAN_FRONTEND=noninteractive eatmydata \ + apt-get install -y --no-install-recommends \ + bison \ + build-essential \ + ca-certificates \ + curl \ + flex \ + gettext \ + git \ + python-minimal + +ENV CPU_LIST csp dc232b dc233c +ENV TOOLCHAIN_RELEASE 2018.02 + +RUN for cpu in $CPU_LIST; do \ + curl -#SL http://github.com/foss-xtensa/toolchain/releases/download/$TOOLCHAIN_RELEASE/x86_64-$TOOLCHAIN_RELEASE-xtensa-$cpu-elf.tar.gz \ + | tar -xzC /opt; \ + done + +ENV PATH $PATH:/opt/$TOOLCHAIN_RELEASE/xtensa-dc232b-elf/bin:/opt/$TOOLCHAIN_RELEASE/xtensa-dc233c-elf/bin:/opt/$TOOLCHAIN_RELEASE/xtensa-csp-elf/bin
Signature · 1 line
2.18.0
Quoted 32 lines · Philippe Mathieu-Daudé
Xtensa cpu supported:
- dc232b
- dc233c
- cspSigned-off-by Philippe Mathieu-Daudé <[email protected]>---
based on http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg06782.htmlMax: Do we need to use the overlay configuration?
This image allow the build of your dc232b tests (using [1]):
$ make check-tcg ... CC vl.o CC qmp.o LINK xtensa-softmmu/qemu-system-xtensa BUILD debian-xtensa-cross BUILD TCG tests for xtensa-softmmu CHECK debian-xtensa-cross BUILD xtensa guest-tests with docker qemu:debian-xtensa-cross RUN TCG tests for xtensa-softmmu CHECK debian-xtensa-cross BUILD xtensa guest-tests with docker qemu:debian-xtensa-cross $ file xtensa-softmmu/tests/*tst xtensa-softmmu/tests/test_bi.tst: ELF 32-bit LSB executable, Tensilica Xtensa, version 1 (SYSV), statically linked, not stripped xtensa-softmmu/tests/test_break.tst: ELF 32-bit LSB executable, Tensilica Xtensa, version 1 (SYSV), statically linked, not stripped ... xtensa-softmmu/tests/test_timer.tst: ELF 32-bit LSB executable, Tensilica Xtensa, version 1 (SYSV), statically linked, not stripped xtensa-softmmu/tests/test_windowed.tst: ELF 32-bit LSB executable, Tensilica Xtensa, version 1 (SYSV), statically linked, not stripped
Max, some tests never end, is that normal?
$ make check-tcg ... CC vl.o CC qmp.o LINK xtensa-softmmu/qemu-system-xtensa BUILD debian-xtensa-cross BUILD TCG tests for xtensa-softmmu CHECK debian-xtensa-cross BUILD xtensa guest-tests with docker qemu:debian-xtensa-cross RUN TCG tests for xtensa-softmmu CHECK debian-xtensa-cross BUILD xtensa guest-tests with docker qemu:debian-xtensa-cross RUN tests for xtensa QEMU 2.12.50 monitor - type 'help' for more information (qemu) info registers PC=00007fff
LBEG=d0001b1c LEND=d0001b26 LCOUNT=00000000
SAR=00000000
LITBASE=00000000 SCOMPARE1=00000000 ACCLO=00000000
ACCHI=00000000
MR0=00000000 MR1=00000000 MR2=00000000
MR3=00000000
WINDOW_BASE=00000000 WINDOW_START=00000001 PTEVADDR=80000000
MMID=00000000
RASID=04030201 ITLBCFG=00000000 DTLBCFG=00000000
IBREAKENABLE=00000000
MEMCTL=00000000 DDR=00000000 IBREAKA0=00000000
IBREAKA1=00000000
DBREAKA0=00000000 DBREAKA1=00000000 DBREAKC0=00000000
DBREAKC1=00000000
CONFIGID0=c56307fe EPC1=000019f9 EPC2=00000000
EPC3=00000000
EPC4=00000000 EPC5=00000000 EPC6=00000000
EPC7=00000000
DEPC=d000128a EPS2=00000000 EPS3=00000000
EPS4=00000000
EPS5=00000000 EPS6=00000000 EPS7=00000000
CONFIGID1=0d40beef
EXCSAVE1=0004004f EXCSAVE2=00000000 EXCSAVE3=00000000
EXCSAVE4=00000000
EXCSAVE5=00000000 EXCSAVE6=00000000 EXCSAVE7=00000000
CPENABLE=00000000
INTSET=00000000 INTCLEAR=00000000 INTENABLE=00000000
PS=0004000f
VECBASE=d0000000 EXCCAUSE=00000018 DEBUGCAUSE=00000000
CCOUNT=00000000
PRID=00000000 ICOUNT=00000000 ICOUNTLEVEL=00000000
EXCVADDR=00400001
CCOMPARE0=00000000 CCOMPARE1=00000000 CCOMPARE2=00000000
MISC0=00000000
MISC1=00000000 MISC2=00000000 MISC3=00000000EXPSTATE=00000000 THREADPTR=00000000
A00=d000058d A01=00000018 A02=00007fff A03=00008000 A04=00000006 A05=00000000 A06=00000000 A07=00000000 A08=00000000 A09=00000000 A10=00000000 A11=00000000 A12=00000000 A13=00000000 A14=00000000 A15=00000000
AR00=d000058d AR01=00000018 AR02=00007fff AR03=00008000 <= AR04=00000006 AR05=00000000 AR06=00000000 AR07=00000000 AR08=00000000 AR09=00000000 AR10=00000000 AR11=00000000 AR12=00000000 AR13=00000000 AR14=00000000 AR15=00000000 AR16=00000000 AR17=00000000 AR18=00000000 AR19=00000000 AR20=00000000 AR21=00000000 AR22=00000000 AR23=00000000 AR24=00000000 AR25=00000000 AR26=00000000 AR27=00000000 AR28=00000000 AR29=00000000 AR30=00000000 AR31=00000000
# on another terminal: killall -9 qemu-system-xtensa make[2]: *** [/source/qemu/tests/tcg/xtensa/Makefile.system:76: run-test_mmu.tst] Killed make[1]: *** [/source/qemu/tests/tcg/Makefile.include:76: run-guest-tests] Error 2 make: *** [/source/qemu/tests/Makefile.include:946: run-tcg-tests-xtensa-softmmu] Error 2
This one works:
xtensa-softmmu/tests$ ../qemu-system-xtensa -M sim -cpu dc232b -nographic -semihosting -icount 6 -kernel test_mul32.tst -d in_asm QEMU 2.12.50 monitor - type 'help' for more information (qemu) ----------------
IN:0xfe000000: j 0xfe000008
----------------
IN:0xfe000008: l32r a2, 0xfe0000040xfe00000b: jx a2
----------------
IN:0xd0000404: movi.n a2, 10xd0000406: wsr.windowstart a2
----------------
IN:0xd0000409: movi.n a2, 00xd000040b: wsr.windowbase a2
----------------
IN:
0xd000040e: l32r a1, 0xd00003e8 0xd0000411: l32r a2, 0xd00003ec 0xd0000414: wsr.ps a2
----------------
IN:0xd0000417: isync0xd000041a: call0 0xd0000424
----------------
IN:
0xd0000424: l32r a2, 0xd00003f0 0xd0000427: mov.n a3, a2 0xd0000429: l32r a4, 0xd00003f4 0xd000042c: l32r a6, 0xd00003f8 0xd000042f: mull a5, a2, a4 0xd0000432: beq a5, a6, 0xd0000442
----------------
IN:
0xd0000442: nop.n 0xd0000444: mull a2, a2, a4 0xd0000447: beq a2, a6, 0xd0000458
----------------
IN:
0xd0000458: nop.n 0xd000045a: mull a3, a4, a3 0xd000045d: beq a3, a6, 0xd000046d
----------------
IN:
0xd000046d: nop.n 0xd000046f: l32r a2, 0xd00003ec 0xd0000472: wsr.ps a2
----------------
IN:
0xd0000475: isync 0xd0000478: l32r a2, 0xd00003fc 0xd000047b: l32i.n a3, a2, 0 0xd000047d: addi.n a3, a3, 1 0xd000047f: s32i.n a3, a2, 0 0xd0000481: l32r a2, 0xd00003ec 0xd0000484: wsr.ps a2
----------------
IN:
0xd0000487: isync 0xd000048a: l32r a0, 0xd00003fc 0xd000048d: l32i a2, a0, 0 0xd0000490: l32r a0, 0xd0000400 0xd0000493: sub a2, a2, a0 0xd0000496: movi a3, 0 0xd0000499: loopnez a2, 0xd00004a4
----------------
IN:
0xd000049c: l8ui a2, a0, 0 0xd000049f: or a3, a3, a2 0xd00004a2: addi.n a0, a0, 1
----------------
IN:
0xd00004a4: movi.n a2, 1 0xd00004a6: simcall 0xd00004a9: ill
exit(0) simcall
But this one for example never exit:
xtensa-softmmu/tests$ ../qemu-system-xtensa -M sim -cpu dc232b -nographic -semihosting -icount 6 -kernel ./test_mmu.tst -d in_asm
...
----------------
IN:0xd0001b0a: wdtlb a2, a3
----------------
IN:
0xd0001b0d: l32r a2, 0xd0000540 0xd0001b10: l32r a3, 0xd0000544 0xd0001b13: l32r a4, 0xd0000534 0xd0001b16: sub a4, a4, a3 0xd0001b19: loop a4, 0xd0001b26
----------------
IN:
0xd0001b1c: l8ui a5, a3, 0 0xd0001b1f: s8i a5, a2, 0 0xd0001b22: addi.n a2, a2, 1 0xd0001b24: addi.n a3, a3, 1
----------------
IN:
0xd0001b26: l32r a2, 0xd0000540 0xd0001b29: l32r a3, 0xd000053c 0xd0001b2c: jx a2
----------------
IN:0x00007fff: l32i a2, a3, 0
Quoted 26 lines
But this one for example never exit:
xtensa-softmmu/tests$ ../qemu-system-xtensa -M sim -cpu dc232b -nographic -semihosting -icount 6 -kernel ./test_mmu.tst -d
in_asm
...
----------------
IN:0xd0001b0a: wdtlb a2, a3----------------
IN:0xd0001b0d: l32r a2, 0xd0000540 0xd0001b10: l32r a3, 0xd0000544 0xd0001b13: l32r a4, 0xd0000534 0xd0001b16: sub a4, a4, a3 0xd0001b19: loop a4, 0xd0001b26----------------
IN:0xd0001b1c: l8ui a5, a3, 0 0xd0001b1f: s8i a5, a2, 0 0xd0001b22: addi.n a2, a2, 1 0xd0001b24: addi.n a3, a3, 1----------------
IN:
Quoted 8 lines
0xd0001b26: l32r a2, 0xd0000540 0xd0001b29: l32r a3, 0xd000053c 0xd0001b2c: jx a2----------------
IN:0x00007fff: l32i a2, a3, 0
Also it never quit (return to shell):
xtensa-softmmu/tests$ ../qemu-system-xtensa -M sim -cpu dc232b -nographic -semihosting -icount 6 -kernel ./test_mmu.tst QEMU 2.12.50 monitor - type 'help' for more information (qemu) q
HANG
(gdb) info threads
Id Target Id Frame
* 1 Thread 0x7fdfead6bf80 (LWP 1645) 0x00007fdfce6dc4ec infutex_wait_cancelable (private=<optimized out>, expected=0,
futex_word=0x55b9940ae288 <qemu_pause_cond+40>) at
../sysdeps/unix/sysv/linux/futex-internal.h:88
2 Thread 0x7fdfbfc79700 (LWP 1646) syscall () at../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
3 Thread 0x7fdfbf478700 (LWP 1647) 0x00007fdfce4016d6 in __GI_ppoll
(fds=0x7fdfb0000b20, nfds=1, timeout=<optimized out>,
timeout@entry=0x0, sigmask=sigmask@entry=0x0) at
../sysdeps/unix/sysv/linux/ppoll.c:39
4 Thread 0x7fdfbcc77700 (LWP 1648) qemu_spin_lock (spin=<optimized
out>) at /source/qemu/include/qemu/thread.h:111
(gdb) thread apply all bt
Thread 4 (Thread 0x7fdfbcc77700 (LWP 1648)):
#0 0x000055b993a62fe0 in qemu_spin_lock (spin=<optimized out>) at /source/qemu/include/qemu/thread.h:111
#1 0x000055b993a62fe0 in page_lock (pd=<optimized out>) at /source/qemu/accel/tcg/translate-all.c:655
#2 0x000055b993a62fe0 in page_lock_pair (ret_p1=ret_p1@entry=0x7fdfbcc74550, phys1=phys1@entry=100667391, ret_p2=ret_p2@entry=0x7fdfbcc74558, phys2=phys2@entry=100663296, alloc=alloc@entry=1) at /source/qemu/accel/tcg/translate-all.c:873 #3 0x000055b993a63643 in tb_link_page (phys_page2=100663296, phys_pc=100667391, tb=<optimized out>)
at /source/qemu/accel/tcg/translate-all.c:1602
#4 0x000055b993a63643 in tb_gen_code (cpu=cpu@entry=0x55b9943eb760, pc=pc@entry=32767, cs_base=cs_base@entry=0, flags=flags@entry=98304, cflags=cflags@entry=131072) at /source/qemu/accel/tcg/translate-all.c:1794 #5 0x000055b993a61937 in tb_find (cf_mask=131072, tb_exit=0, last_tb=0x0, cpu=0x18000) at /source/qemu/accel/tcg/cpu-exec.c:401 #6 0x000055b993a61937 in cpu_exec (cpu=cpu@entry=0x55b9943eb760) at /source/qemu/accel/tcg/cpu-exec.c:721
#7 0x000055b993a307a1 in tcg_cpu_exec (cpu=0x55b9943eb760) at /source/qemu/cpus.c:1362
#8 0x000055b993a307a1 in qemu_tcg_rr_cpu_thread_fn (arg=<optimized out>) at /source/qemu/cpus.c:1461
#9 0x00007fdfce6d65aa in start_thread (arg=0x7fdfbcc77700) at pthread_create.c:463
#10 0x00007fdfce40bcbf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 3 (Thread 0x7fdfbf478700 (LWP 1647)):
#0 0x00007fdfce4016d6 in __GI_ppoll (fds=0x7fdfb0000b20, nfds=1, timeout=<optimized out>, timeout@entry=0x0, sigmask=sigmask@entry=0x0)
at ../sysdeps/unix/sysv/linux/ppoll.c:39
#1 0x000055b993c33109 in ppoll (__ss=0x0, __timeout=0x0,
__nfds=<optimized out>, __fds=<optimized out>)
at /usr/include/x86_64-linux-gnu/bits/poll2.h:77
#2 0x000055b993c33109 in qemu_poll_ns (fds=<optimized out>,
nfds=<optimized out>, timeout=<optimized out>)
at /source/qemu/util/qemu-timer.c:322#3 0x000055b993c34dce in aio_poll (ctx=0x55b9943b35c0, blocking=blocking@entry=true) at /source/qemu/util/aio-posix.c:629 #4 0x000055b993a9897e in iothread_run (opaque=0x55b9943b3360) at /source/qemu/iothread.c:64
#5 0x00007fdfce6d65aa in start_thread (arg=0x7fdfbf478700) at pthread_create.c:463
#6 0x00007fdfce40bcbf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 2 (Thread 0x7fdfbfc79700 (LWP 1646)):
#0 0x00007fdfce4068f9 in syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1 0x000055b993c370eb in qemu_futex_wait (val=<optimized out>, f=<optimized out>) at /source/qemu/include/qemu/futex.h:29 #2 0x000055b993c370eb in qemu_event_wait (ev=ev@entry=0x55b9940e49c8 <rcu_call_ready_event>)
at /source/qemu/util/qemu-thread-posix.c:445
#3 0x000055b993c476a8 in call_rcu_thread (opaque=<optimized out>) at /source/qemu/util/rcu.c:261
#4 0x00007fdfce6d65aa in start_thread (arg=0x7fdfbfc79700) at pthread_create.c:463
#5 0x00007fdfce40bcbf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 1 (Thread 0x7fdfead6bf80 (LWP 1645)):
#0 0x00007fdfce6dc4ec in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55b9940ae288 <qemu_pause_cond+40>)
at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 0x00007fdfce6dc4ec in __pthread_cond_wait_common (abstime=0x0, mutex=0x55b9940ae2e0 <qemu_global_mutex>, cond=0x55b9940ae260 <qemu_pause_cond>) at pthread_cond_wait.c:502
#2 0x00007fdfce6dc4ec in __pthread_cond_wait (cond=cond@entry=0x55b9940ae260 <qemu_pause_cond>, mutex=mutex@entry=0x55b9940ae2e0 <qemu_global_mutex>) at pthread_cond_wait.c:655
#3 0x000055b993c36c9f in qemu_cond_wait_impl (cond=cond@entry=0x55b9940ae260 <qemu_pause_cond>, mutex=mutex@entry=0x55b9940ae2e0 <qemu_global_mutex>, file=file@entry=0x55b993c52bdb "/source/qemu/cpus.c", line=line@entry=1809)
at /source/qemu/util/qemu-thread-posix.c:164
#4 0x000055b993a30ce0 in pause_all_vcpus () at /source/qemu/cpus.c:1809 #5 0x000055b993a30d6a in do_vm_stop (state=RUN_STATE_SHUTDOWN, send_stop=<optimized out>) at /source/qemu/cpus.c:1010
#6 0x000055b9939ef579 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at /source/qemu/vl.c:4605
Quoted 2 lines · Philippe Mathieu-Daudé
On 06/23/2018 06:53 PM, Philippe Mathieu-Daudé wrote:
Max, some tests never end, is that normal?
No, you've just found and reported a bug. Thank you. Bisection points to the following commit:
commit 0b5c91f74f3c83a36f37740969df8c775c997e69
Author: Emilio G. Cota <[email protected]> Date: Wed Jul 26 20:22:51 2017 -0400
translate-all: use per-page locking in !user-mode
Bisection log:
git bisect start
# bad: [f28d0dfdce5754d80d2a5993fff2f5312b32cac1] tcg: fix --disable-tcg build breakage
git bisect bad f28d0dfdce5754d80d2a5993fff2f5312b32cac1
# good: [c74e62ee3e2dc2955e07d004c71badecb68a84eb] Merge remote-tracking branch 'remotes/rth/tags/cota-target-pull-request' into staging
git bisect good c74e62ee3e2dc2955e07d004c71badecb68a84eb
# good: [f67c9b693ae3d03305162623a043ba4067a3c00c] Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging git bisect good f67c9b693ae3d03305162623a043ba4067a3c00c
# good: [21f402093c5ee7363f5ba56916cd5c651b424fef] iommu: Add IOMMU index concept to IOMMU API
git bisect good 21f402093c5ee7363f5ba56916cd5c651b424fef
# good: [7a5d936b6fc0cf262db86af0df7999ac904f8495] docker: docker.py wrap StringIO import for python3
git bisect good 7a5d936b6fc0cf262db86af0df7999ac904f8495
# bad: [de44c044420d1139480fa50c2d5be19223391218] Merge remote-tracking branch 'remotes/stsquad/tags/pull-tcg-testing-revivial-210618-2' into staging git bisect bad de44c044420d1139480fa50c2d5be19223391218
# good: [7e97017e7db3c0ce552cf1a58df8bb97bde29c98] tests/tcg/Makefile:
update to be called from Makefile.target
git bisect good 7e97017e7db3c0ce552cf1a58df8bb97bde29c98
# bad: [33836a731562e3d07b3a83f26e81c6b1482d216c] Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180615' into staging
git bisect bad 33836a731562e3d07b3a83f26e81c6b1482d216c
# good: [45c73de594414904b0d6a7ade70fb4514d35f79c] translate-all: move tb_invalidate_phys_page_range up in the file
git bisect good 45c73de594414904b0d6a7ade70fb4514d35f79c
# bad: [194125e3ebd553acb02aaf3797a4f0387493fe94] translate-all:
protect TB jumps with a per-destination-TB lock
git bisect bad 194125e3ebd553acb02aaf3797a4f0387493fe94
# bad: [6d9abf85d538731ccff25fc29d7fa938115b1a80] translate-all: add page_locked assertions
git bisect bad 6d9abf85d538731ccff25fc29d7fa938115b1a80
# bad: [0b5c91f74f3c83a36f37740969df8c775c997e69] translate-all: use per-page locking in !user-mode
git bisect bad 0b5c91f74f3c83a36f37740969df8c775c997e69
# first bad commit: [0b5c91f74f3c83a36f37740969df8c775c997e69] translate-all: use per-page locking in !user-mode
Emilio, could you please take a look? The following test locks up QEMU:
qemu-system-xtensa -M sim -cpu dc232b -nographic -semihosting -icount 6 -kernel ./test_mmu.tst
test_mmu.tst binary may be found here:
http://jcmvbkbc.spb.ru/~dumb/tmp/201806232022/test_mmu.tst
Signature · 2 lines
Thanks. -- Max
Quoted 10 lines · Philippe Mathieu-Daudé
Xtensa cpu supported:
- dc232b
- dc233c
- cspSigned-off-by Philippe Mathieu-Daudé <[email protected]>---
based on http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg06782.htmlMax: Do we need to use the overlay configuration?
You'd need to use overlay if you'd build the toolchain. Prebuilt toolchains are already configured for specific processors. I didn't try to run it in docker, but it looks like you're doing the right thing,
especially that you see some tests passing.
Signature · 2 lines
Thanks. -- Max
Quoted 6 lines · Max Filippov
Quoted 5 lines · Philippe Mathieu-Daudé
Xtensa cpu supported:
- dc232b
- dc233c
- csp
Quoted 8 lines
Quoted 5 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
based on http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg06782.htmlMax: Do we need to use the overlay configuration?
You'd need to use overlay if you'd build the toolchain. Prebuilt toolchains are already configured for specific processors.
I now understand.
These 3 cpu toolchains are now handily accesible:
$ docker run --rm -it qemu:debian-xtensa-cross root@e0a99f962594:/# xtensa-<tab><tab> xtensa-csp-elf-addr2line xtensa-dc232b-elf-gcov-dump xtensa-csp-elf-ar xtensa-dc232b-elf-gcov-tool xtensa-csp-elf-as xtensa-dc232b-elf-gprof xtensa-csp-elf-c++filt xtensa-dc232b-elf-ld xtensa-csp-elf-cc xtensa-dc232b-elf-ld.bfd xtensa-csp-elf-cpp xtensa-dc232b-elf-nm xtensa-csp-elf-ct-ng.config xtensa-dc232b-elf-objcopy xtensa-csp-elf-elfedit xtensa-dc232b-elf-objdump xtensa-csp-elf-gcc xtensa-dc232b-elf-ranlib xtensa-csp-elf-gcc-7.3.0 xtensa-dc232b-elf-readelf xtensa-csp-elf-gcc-ar xtensa-dc232b-elf-size xtensa-csp-elf-gcc-nm xtensa-dc232b-elf-strings xtensa-csp-elf-gcc-ranlib xtensa-dc232b-elf-strip xtensa-csp-elf-gcov xtensa-dc233c-elf-addr2line xtensa-csp-elf-gcov-dump xtensa-dc233c-elf-ar xtensa-csp-elf-gcov-tool xtensa-dc233c-elf-as xtensa-csp-elf-gprof xtensa-dc233c-elf-c++filt xtensa-csp-elf-ld xtensa-dc233c-elf-cc xtensa-csp-elf-ld.bfd xtensa-dc233c-elf-cpp xtensa-csp-elf-nm xtensa-dc233c-elf-ct-ng.config xtensa-csp-elf-objcopy xtensa-dc233c-elf-elfedit xtensa-csp-elf-objdump xtensa-dc233c-elf-gcc xtensa-csp-elf-ranlib xtensa-dc233c-elf-gcc-7.3.0 xtensa-csp-elf-readelf xtensa-dc233c-elf-gcc-ar xtensa-csp-elf-size xtensa-dc233c-elf-gcc-nm xtensa-csp-elf-strings xtensa-dc233c-elf-gcc-ranlib xtensa-csp-elf-strip xtensa-dc233c-elf-gcov xtensa-dc232b-elf-addr2line xtensa-dc233c-elf-gcov-dump xtensa-dc232b-elf-ar xtensa-dc233c-elf-gcov-tool xtensa-dc232b-elf-as xtensa-dc233c-elf-gprof xtensa-dc232b-elf-c++filt xtensa-dc233c-elf-ld xtensa-dc232b-elf-cc xtensa-dc233c-elf-ld.bfd xtensa-dc232b-elf-cpp xtensa-dc233c-elf-nm xtensa-dc232b-elf-ct-ng.config xtensa-dc233c-elf-objcopy xtensa-dc232b-elf-elfedit xtensa-dc233c-elf-objdump xtensa-dc232b-elf-gcc xtensa-dc233c-elf-ranlib xtensa-dc232b-elf-gcc-7.3.0 xtensa-dc233c-elf-readelf xtensa-dc232b-elf-gcc-ar xtensa-dc233c-elf-size xtensa-dc232b-elf-gcc-nm xtensa-dc233c-elf-strings xtensa-dc232b-elf-gcc-ranlib xtensa-dc233c-elf-strip xtensa-dc232b-elf-gcov root@e0a99f962594:/# xtensa-
As you said, dc232b is well covered in QEMU and has tests.
I appreciate including the csp cpu because it is big-endian.
dc233c is less useful for testing (closer to the dc232b).
Quoted 5 lines
I didn't try to run it in docker, but it looks like you're doing the right thing,
especially that you see some tests passing.Reviewed-by Max Filippov <[email protected]>
Thanks!
Phil.
Quoted 1 line · Philippe Mathieu-Daudé
I appreciate including the csp cpu because it is big-endian.
csp is little endian. FSF was big endian, but the name no longer refers to a specific processor, so it is also not very useful. Perhaps I just need to add a well-defined big endian xtensa configuration to QEMU and publish the overlay and prebuilt toolchain for it.
Signature · 2 lines
Thanks. -- Max
Quoted 10 lines · Max Filippov
# first bad commit: [0b5c91f74f3c83a36f37740969df8c775c997e69] translate-all: use per-page locking in !user-modeEmilio, could you please take a look? The following test locks up QEMU:
qemu-system-xtensa -M sim -cpu dc232b -nographic -semihosting -icount 6 -kernel ./test_mmu.tst
test_mmu.tst binary may be found here:
http://jcmvbkbc.spb.ru/~dumb/tmp/201806232022/test_mmu.tst
Thanks for the test case.
I submitted a patch that fixes this for me--see this thread:
https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg07236.html
Emilio
Quoted 9 lines · Emilio G. Cota
Quoted 8 lines · Max Filippov
# first bad commit: [0b5c91f74f3c83a36f37740969df8c775c997e69] translate-all: use per-page locking in !user-modeEmilio, could you please take a look? The following test locks up QEMU:
qemu-system-xtensa -M sim -cpu dc232b -nographic -semihosting -icount 6 -kernel ./test_mmu.tst
Quoted 7 lines
Quoted 2 lines
test_mmu.tst binary may be found here:
http://jcmvbkbc.spb.ru/~dumb/tmp/201806232022/test_mmu.tstThanks for the test case.
I submitted a patch that fixes this for me--see this thread:
https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg07236.html
Thanks, this works :)
Alex nicer test output using:
tests/tcg/xtensa/Makefile.system
run-%.tst: %.tst
- $(SIM) $(SIMFLAGS) ./$<
+ $(SIM) -monitor null $(SIMFLAGS) ./$<
Quoted 24 lines · Philippe Mathieu-Daudé
Quoted 9 lines · Emilio G. Cota
Quoted 8 lines · Max Filippov
# first bad commit: [0b5c91f74f3c83a36f37740969df8c775c997e69] translate-all: use per-page locking in !user-modeEmilio, could you please take a look? The following test locks up QEMU:
qemu-system-xtensa -M sim -cpu dc232b -nographic -semihosting -icount 6 -kernel ./test_mmu.tst
Quoted 7 lines
Quoted 2 lines
test_mmu.tst binary may be found here:
http://jcmvbkbc.spb.ru/~dumb/tmp/201806232022/test_mmu.tstThanks for the test case.
I submitted a patch that fixes this for me--see this thread:
https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg07236.htmlThanks, this works :)
Alex nicer test output using:
tests/tcg/xtensa/Makefile.system
run-%.tst: %.tst
Review
Quoted 2 lines
(quoted diff) +1
-1- $(SIM) $(SIMFLAGS) ./$< + $(SIM) -monitor null $(SIMFLAGS) ./$<
This makefile is also usable with another simulator (xtensa ISS) which would not understand this option. Could it be added to the proper SIMFLAGS instead?
Signature · 2 lines
Thanks. -- Max
Quoted 24 lines · Max Filippov
Quoted 22 lines · Philippe Mathieu-Daudé
Quoted 9 lines · Emilio G. Cota
Quoted 8 lines · Max Filippov
# first bad commit: [0b5c91f74f3c83a36f37740969df8c775c997e69] translate-all: use per-page locking in !user-modeEmilio, could you please take a look? The following test locks up QEMU:
qemu-system-xtensa -M sim -cpu dc232b -nographic -semihosting -icount 6 -kernel ./test_mmu.tst
Quoted 7 lines
Quoted 2 lines
test_mmu.tst binary may be found here:
http://jcmvbkbc.spb.ru/~dumb/tmp/201806232022/test_mmu.tstThanks for the test case.
I submitted a patch that fixes this for me--see this thread:
https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg07236.htmlThanks, this works :)
Alex nicer test output using:
Quoted 7 lines
Review
Quoted 4 lines
tests/tcg/xtensa/Makefile.system
run-%.tst: %.tst(quoted diff) +1
-1- $(SIM) $(SIMFLAGS) ./$< + $(SIM) -monitor null $(SIMFLAGS) ./$<This makefile is also usable with another simulator (xtensa ISS) which would not understand this option. Could it be added to the proper SIMFLAGS instead?
OK, good to know.