gem5 with ARM

Gedare Bloom gedare at rtems.org
Tue May 23 14:22:21 UTC 2017


On Mon, May 22, 2017 at 7:53 PM, Joel Sherrill <joel at rtems.org> wrote:
>
>
> On May 22, 2017 6:43 PM, "Gedare Bloom" <gedare at rtems.org> wrote:
>
> On Mon, May 22, 2017 at 5:32 PM, Tanu Hari Dixit <tokencolour at gmail.com>
> wrote:
>> Hello all,
>> Thank you for creating
>> https://devel.rtems.org/wiki/Developer/Simulators/gem5 just in time. I
>> installed gem5 and scons build/ARM/gem5.opt ran to give the following
>> output at the end:
>> scons: done building targets.
>>
> This is work-in-progress. I had to write the timer hardware support in
> gem5 and fix some other small issues. You would need to apply patches
> currently under review by the gem5 developers, there are four patches
> available and you can get them by using the "Download" button on their
> Gerrit instance: https://gem5-review.googlesource.com/c/3264/
>
> But I found out that the basic support even for hello world is broken
> for RTEMS as of rtems.git/cd3d74793a4e2ec93cefdddb855d4536d44c7e64
>
>
> What happened in that patch which broke things? Is this a simulator or RTEMS
> bug?
>
I believe the problem is in the simulator. I have to debug more.

> If you roll back your rtems to before that commit you should be able
> to successfully run hello world with gem5 after applying those 4
> patches.
>
>> I ran the following, after this:
>> build/ARM/gem5.opt configs/example/fs.py
>>
>> --kernel=${HOME}/development/rtems/src/builds/realview_pbx_a9_qemu/arm-rtems4.12/c/realview_pbx_a9_qemu/testsuites/samples/hello/hello.exe
>> --mem-size=256MB --bare-metal --machine-type=RealView_PBX
>> --dtb-filename=None --enable-security-extensions
>> as instructed in the link.
>>
>> But it gave the following output:
>> Usage: fs.py [options]
>> fs.py: error: no such option: --enable-security-extensions
>>
>> I tried it without the option, and still found no luck;
>>
>> thd at thd-Inspiron-5537:~/gem5$ build/ARM/gem5.opt configs/example/fs.py
>>
>> --kernel=${HOME}/development/rtems/src/builds/realview_pbx_a9_qemu/arm-rtems4.12/c/realview_pbx_a9_qemu/testsuites/samples/hello/hello.exe
>> --mem-size=256MB --bare-metal --machine-type=RealView_PBX
>> --dtb-filename=None
>> gem5 Simulator System.  http://gem5.org
>> gem5 is copyrighted software; use the --copyright option for details.
>>
>> gem5 compiled Mar 16 2017 02:46:18
>> gem5 started May 23 2017 02:59:01
>> gem5 executing on thd-Inspiron-5537, pid 7719
>> command line: build/ARM/gem5.opt configs/example/fs.py
>>
>> --kernel=/home/thd/development/rtems/src/builds/realview_pbx_a9_qemu/arm-rtems4.12/c/realview_pbx_a9_qemu/testsuites/samples/hello/hello.exe
>> --mem-size=256MB --bare-metal --machine-type=RealView_PBX
>> --dtb-filename=None
>>
>> Global frequency set at 1000000000000 ticks per second
>> warn: DRAM device capacity (8192 Mbytes) does not match the address
>> range assigned (256 Mbytes)
>> info: kernel located at:
>>
>> /home/thd/development/rtems/src/builds/realview_pbx_a9_qemu/arm-rtems4.12/c/realview_pbx_a9_qemu/testsuites/samples/hello/hello.exe
>> Listening for system connection on port 5900
>> Listening for system connection on port 3456
>> 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 ****
>> warn: Existing EnergyCtrl, but no enabled DVFSHandler found.
>> info: Entering event queue @ 0.  Starting simulation...
>> warn:     instruction 'mcr bpiall' unimplemented
>> panic: Tried to write SCU at offset 0
>> Memory Usage: 660292 KBytes
>> Program aborted at tick 56000
>> --- BEGIN LIBC BACKTRACE ---
>> build/ARM/gem5.opt(_Z15print_backtracev+0x15)[0xc45c55]
>> build/ARM/gem5.opt(_Z12abortHandleri+0x36)[0xc55786]
>> /lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7f3b92e6c330]
>> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37)[0x7f3b916bdc37]
>> /lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7f3b916c1028]
>> build/ARM/gem5.opt(_ZN5A9SCU5writeEP6Packet+0x4e)[0xb39e8e]
>> build/ARM/gem5.opt(_ZN7PioPort10recvAtomicEP6Packet+0x66)[0xafd666]
>>
>> build/ARM/gem5.opt(_ZN12CoherentXBar10recvAtomicEP6Packets+0x3cf)[0x9c98ef]
>>
>> build/ARM/gem5.opt(_ZN15AtomicSimpleCPU8writeMemEPhjm5FlagsIjEPm+0x337)[0xe102c7]
>>
>> build/ARM/gem5.opt(_ZN17SimpleExecContext8writeMemEPhjm5FlagsIjEPm+0x21)[0xe1b181]
>>
>> build/ARM/gem5.opt(_Z14writeMemAtomicI11ExecContextjESt10shared_ptrI9FaultBaseEPT_PN5Trace10InstRecordERKT0_m5FlagsIjEPm+0x4b)[0x156653b]
>>
>> build/ARM/gem5.opt(_ZNK10ArmISAInst28STORE_IMM_AY_PN_SN_UN_WN_SZ47executeEP11ExecContextPN5Trace10InstRecordE+0x171)[0x1525461]
>> build/ARM/gem5.opt(_ZN15AtomicSimpleCPU4tickEv+0x277)[0xe0ed27]
>> build/ARM/gem5.opt(_ZN10EventQueue10serviceOneEv+0xb1)[0xc4dcc1]
>> build/ARM/gem5.opt(_Z9doSimLoopP10EventQueue+0x38)[0xc6fc38]
>> build/ARM/gem5.opt(_Z8simulatem+0x35b)[0xc7031b]
>> build/ARM/gem5.opt[0x965e7c]
>>
>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x45f7)[0x7f3b92a375b7]
>>
>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x80d)[0x7f3b92a39c3d]
>>
>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x48d8)[0x7f3b92a37898]
>>
>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x4b59)[0x7f3b92a37b19]
>>
>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x4b59)[0x7f3b92a37b19]
>>
>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x80d)[0x7f3b92a39c3d]
>>
>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCode+0x32)[0x7f3b92a39f22]
>>
>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x563e)[0x7f3b92a385fe]
>>
>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x80d)[0x7f3b92a39c3d]
>>
>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x48d8)[0x7f3b92a37898]
>>
>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x80d)[0x7f3b92a39c3d]
>>
>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCode+0x32)[0x7f3b92a39f22]
>>
>> /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyRun_StringFlags+0x79)[0x7f3b9294c529]
>> build/ARM/gem5.opt(_Z6m5MainiPPc+0x5f)[0xc54d1f]
>> build/ARM/gem5.opt(main+0x33)[0x8e3b53]
>> --- END LIBC BACKTRACE ---
>> Aborted (core dumped)
>>
>> Can you please help me with this? I can't figure out what is wrong.
>> I need to run the simulator for sparc64/usiii and
>> arm/realview_pbx_a9_qemu BSPs and eventually automate it with
>> rtems-tester (as part of GSoC, '17).
>>
>> Thank you,
>> Tanu Hari Dixit.
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
>



More information about the devel mailing list