From: Pintu Agarwal <pintu.ping@gmail.com>
To: isa-dev@groups.riscv.org, linux-riscv@lists.infradead.org,
sw-dev@groups.riscv.org,
Gurucharan Kaur Saluja <gurucharankaurs@gmail.com>
Subject: riscv-tests-benchmarks tools not working on qemu linux
Date: Fri, 14 Dec 2018 19:50:31 +0530 [thread overview]
Message-ID: <CAOuPNLi-_R4+wpc834Ku2PkHcHgSydA2HT_s1aYsMeNRqpDg=w@mail.gmail.com> (raw)
Hi,
I am interested in using : RISCV/riscv-tools/riscv-tests/benchmarks
But I am failing to execute it on QEMU environment.
This is my environment:
RISCV: rv64imafdcsu
Linux version: 4.19.0-rc8-00001-gf0a7d18 (gcc version 8.2.0 (GCC))
Tool chain: riscv64-unknown-linux-gnu- 8.2.0
rootfs: busybear
Platform: riscv-qemu
Command:
qemu-system-riscv64 -nographic -machine virt -kernel
PK/riscv-pk/build/bbl -append "root=/dev/vda ro console=ttyS0,115200"
-drive file=busybear.bin,format=raw,id=hd0 -device
virtio-blk-device,drive=hd0 -m 1024M -smp 4
Building the tests:
#/riscv-tools/riscv-tests/benchmarks$ make
Note: We changed the tool chain to:
RISCV_PREFIX ?= riscv$(XLEN)-unknown-linux-gnu- (instead of unknown-elf)
All benchmarking programs compiled successfully and created program.riscv files.
Example: multiply.riscv
After this when we execute:
# spike multiply.riscv
We get this output:
mcycle = 24098
minstret = 24104
So, we assume this tool is working on spike.
But, when we try to execute the same on QEMU environment, it crashes
will illegal instruction:
root@(none):root# ./multiply.riscv
multiply.riscv[77]: unhandled signal 4 code 0x1 at 0x0000000080000040
in multiply.riscv[80000000+1000]
CPU: 0 PID: 77 Comm: multiply.riscv Not tainted
4.18.0-rc6-13938-g4060877-dirty #14
sepc: 0000000080000040 ra : 0000000000000000 sp : 0000000000000000
gp : 0000000000000000 tp : 0000000000000000 t0 : 000000000001e000
t1 : 0000000000000000 t2 : 0000000000000000 s0 : 0000000000000000
s1 : 0000000000000000 a0 : 0000000000000000 a1 : 0000000000000000
a2 : 0000000000000000 a3 : 0000000000000000 a4 : 0000000000000000
a5 : 0000000000000000 a6 : 0000000000000000 a7 : 0000000000000000
s2 : 0000000000000000 s3 : 0000000000000000 s4 : 0000000000000000
s5 : 0000000000000000 s6 : 0000000000000000 s7 : 0000000000000000
s8 : 0000000000000000 s9 : 0000000000000000 s10: 0000000000000000
s11: 0000000000000000 t3 : 0000000000000000 t4 : 0000000000000000
t5 : 0000000000000000 t6 : 0000000000000000
sstatus: 0000000000002020 sbadaddr: 000000003002a073 scause: 0000000000000002
Illegal instruction
So, we wanted to know how to make these tools works for normal Linux
in QEMU with riscv64-unknown-linux-gnu tool chain (without spike)?
Moreover, we want to make these tools works for qemu-arm linux as
well. Is it possible? What kind of modification will be required to
support it?
Or, is there separate tools for linux?
Or, is it possible to create a simple and common benchmarking tool
like: {Sorting, Multiply, Matrix Multiply, Tower of Hanoi, Factorial,
etc.} using normal C programming and system calls (if required)?
But, question is, how should I measure it?
Please help with some reference.
Thanks,
Pintu
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2018-12-14 14:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-14 14:20 Pintu Agarwal [this message]
2018-12-14 17:27 ` [sw-dev] riscv-tests-benchmarks tools not working on qemu linux Jim Wilson
2018-12-17 12:41 ` Pintu Agarwal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOuPNLi-_R4+wpc834Ku2PkHcHgSydA2HT_s1aYsMeNRqpDg=w@mail.gmail.com' \
--to=pintu.ping@gmail.com \
--cc=gurucharankaurs@gmail.com \
--cc=isa-dev@groups.riscv.org \
--cc=linux-riscv@lists.infradead.org \
--cc=sw-dev@groups.riscv.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).