Hello, I am having a problem running MIPS binaries I generated on MIPS implementation of gem5. The problem may not be necessarily caused by gem5 since I am also making use of qemu or gcc. Etiher way, I would appreciate some help. Here is what I did:
I compiled gem5.opt for MIPS, modified some configuration files (including se.py, CacheConfig.py, CpuConfig.py) and ran the provided hello world binary successfully. Then I installed the Debian wheezy image provided here <https://people.debian.org/~aurel32/qemu/mipsel/> on qemu to have a MIPS machine for compiling my own programs. I compiled and ran the hello world program on qemu successfully. However, when I copied the binary to the host machine and ran it on gem5, the simulator aborted with this message: gem5.opt: build/MIPS/cpu/o3/cpu.cc:877: void FullO3CPU<Impl>::removeThread(ThreadID) [with Impl = O3CPUImpl; ThreadID = short int]: Assertion `iew.ldstQueue.getCount(tid) == 0' failed. Running file command on the hello world binary provided with gem5 gave the following output: ELF 32-bit LSB executable, MIPS, *MIPS-I version 1 (SYSV)*, statically linked, for GNU/Linux 2.4.3, not stripped For the binary I created on qemu, I got the following output: ELF 32-bit LSB executable, MIPS, *MIPS-II version 1*, statically linked, for GNU/Linux 2.6.26, BuildID[sha1]=a8d4edac71e5018a8ffb3a1a4788737e52e54f5d, not stripped Based on above outputs, I am guessing that the one I compiled causes gem5 to crash because it uses MIPS-II instruction set instead of MIPS-I. What I don't understand is how I ended up getting an executable for MIPS-II, because I compiled the program using the command gcc -static -march=mips1 hello.c. I got the same result when I used -march=r2000 option for gcc (according to Wikipedia R2000 implements MIPS-I ISA). I am not sure if it has anything to do with the hardware I picked for emulation on qemu (Malta board). Here is the qemu command I used, just in case: qemu-system-mipsel -nographic -M malta -kernel vmlinux-3.2.0-4-4kc-malta -hda debian_wheezy_mipsel_standard.qcow2 -append "root=/dev/sda1 console=ttyS0" -m 256 My ultimate goal is to compile Spec 2006 benchmarks for MIPS and run them on gem5. Any help is appreciated. Thanks.
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
