Hi Pierre I tried changing the compiler to the oldest version I could find which was 4.7 but the problem still persists. I don't know about clang yet but I'm trying that now as I'm not really a fan of hacks. Is there anything else that can be done to alleviate the problem? Is there a way we can specify the kernel version in gem5 without having to manually edit source files?
Thanks Ayman ________________________________ From: gem5-users <gem5-users-boun...@gem5.org> on behalf of Pierre-Yves Péneau <pierre-yves.pen...@lirmm.fr> Sent: 07 February 2017 15:03 To: gem5-users@gem5.org Subject: Re: [gem5-users] ARM simulation, kernel to old Hi Ayman, I think the minimum Linux version supported is embedded in the binary at compile time and checked at the beginning of the program. I believe it's the normal way and it's not related to gem5. But, when it's used in SE mode, gem5 emulates a Linux version to your process. The default version for 32 bits application is Linux-3.0. Finally, a binary compiled with gcc-5.4 isn't compatible with Linux-3.0. The former is too recent and the latter is too old. That's why you see this message. I also have this error when compiling on Ubuntu 16.04 or Debian Wheezy. My workaround is to compile with an older compiler like arm-linux-gnueabi-gcc-4.9. Maybe clang does not have this kind of issue ? Another (dirty) workaround is to edit the Linux version that gem5 emulates in src/arch/arm/linux/process.cc:72 and rebuild gem5. I hope that helps. On 02/07/2017 03:38 PM, Moussa, Ayman wrote: > I've compiled a C program for ARM on Linux Ubuntu 16.04 using > > > arm-linux-gnueabi-gcc -o MM1.ARM -O3 -static -g -Wall MM1.c > > > file MM1.ARM > MM1.ARM: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically > linked, for GNU/Linux 3.2.0, > BuildID[sha1]=b6582e1073682d41eb5262ad5393cebb8578e05d, not stripped > > uname -a > Linux 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 > x86_64 x86_64 GNU/Linux > > arm-linux-gnueabi-gcc --version > arm-linux-gnueabi-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 > > And tried to run a simulation > > build/ARM/gem5.opt configs/example/se.py ../MM1.ARM > > And then the following output is produced: > > gem5 Simulator System. http://gem5.org > gem5 is copyrighted software; use the --copyright option for details. > > gem5 compiled Jan 9 2017 14:04:12 > gem5 started Feb 7 2017 13:54:14 > gem5 executing on matrix01.doc.ic.ac.uk, pid 1076665 > command line: build/ARM/gem5.opt configs/example/se.py ../MM1.ARM > > Error: script doesn't take any positional arguments > matrix01% build/ARM/gem5.opt configs/example/se.py -c ../MM1.ARM -o "2" > gem5 Simulator System. http://gem5.org > gem5 is copyrighted software; use the --copyright option for details. > > gem5 compiled Jan 9 2017 14:04:12 > gem5 started Feb 7 2017 13:54:29 > gem5 executing on matrix01.doc.ic.ac.uk, pid 1076778 > command line: build/ARM/gem5.opt configs/example/se.py -c ../MM1.ARM -o 2 > > Global frequency set at 1000000000000 ticks per second > warn: DRAM device capacity (8192 Mbytes) does not match the address range > assigned (512 Mbytes) > 0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000 > warn: ClockedObject: More than one power state change request encountered > within the same simulation tick > **** REAL SIMULATION **** > info: Entering event queue @ 0. Starting simulation... > FATAL: kernel too old > warn: ignoring syscall rt_sigprocmask(1, ...) > (further warnings will be suppressed) > panic: Page table fault when accessing virtual address 0xfffffba8 > @ tick 622500 > [invoke:build/ARM/sim/faults.cc, line 69] > Memory Usage: 666340 KBytes > Program aborted at tick 622500 > --- BEGIN LIBC BACKTRACE --- > build/ARM/gem5.opt(_Z15print_backtracev+0x28)[0xff8178] > build/ARM/gem5.opt(_Z12abortHandleri+0x46)[0x10140f6] > /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7ff7651a8390] > /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7ff763ecf428] > /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7ff763ed102a] > build/ARM/gem5.opt(_Z15__exit_epilogueiPKcS0_iS0_+0x440)[0xf386c0] > build/ARM/gem5.opt(_Z14__exit_messageIImEEvPKciS1_S1_iS1_DpRKT_+0x10b)[0x92c99b] > build/ARM/gem5.opt(_ZN21GenericPageTableFault6invokeEP13ThreadContextRK14RefCountingPtrI10StaticInstE+0x3b)[0x1061dfb] > build/ARM/gem5.opt(_ZN13BaseSimpleCPU9advancePCERKSt10shared_ptrI9FaultBaseE+0x104)[0xa78544] > build/ARM/gem5.opt(_ZN15AtomicSimpleCPU4tickEv+0x3e0)[0xa6ece0] > build/ARM/gem5.opt(_ZN10EventQueue10serviceOneEv+0xb1)[0x1005651] > build/ARM/gem5.opt(_Z9doSimLoopP10EventQueue+0x50)[0x102fe20] > build/ARM/gem5.opt(_Z8simulatem+0x203)[0x10303f3] > build/ARM/gem5.opt[0xfa2f72] > /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7852)[0x7ff765472552] > /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x85c)[0x7ff76559c01c] > /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x6ffd)[0x7ff765471cfd] > /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7124)[0x7ff765471e24] > /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7124)[0x7ff765471e24] > /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x85c)[0x7ff76559c01c] > /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCode+0x19)[0x7ff76546ab89] > /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x613b)[0x7ff765470e3b] > /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x85c)[0x7ff76559c01c] > /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x6ffd)[0x7ff765471cfd] > /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x85c)[0x7ff76559c01c] > /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCode+0x19)[0x7ff76546ab89] > /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyRun_StringFlags+0x76)[0x7ff7654d8166] > build/ARM/gem5.opt(_Z6m5MainiPPc+0x6f)[0x10138ff] > build/ARM/gem5.opt(main+0x33)[0x8b12a3] > /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7ff763eba830] > build/ARM/gem5.opt(_start+0x29)[0x902109] > --- END LIBC BACKTRACE --- > Abort > > Why does this happen? > I've read a few old threads about compiling a newer version of the kernel for > gem5 but I don't understand what this means; what does the linux kernel have > to do with gem5? Do i need to compile a separate kernel for every > architecture (x86, ARM ...) ? > > > Thanks > > > > _______________________________________________ > gem5-users mailing list > gem5-users@gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users > -- +-------------------------------------------------------------+ | Pierre-Yves Péneau - PhD student | first.last at lirmm.fr | | LIRMM / CNRS - SYSMIC team | + 33 4 67 41 86 33 | | Building 4 Office H2.2 | http://walafc0.org | walafc0's homepage<http://walafc0.org/> walafc0.org Who am I ? I am a CNRS PhD candidate at the LIRMM in Montpellier. I am in the ADAC [1, 2] research group, under the supervision of Abdoulaye Gamatié and Gilles ... +-------------------------------------------------------------+
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users