gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Attempted to execute unimplemented instruction 'msr' (inst 0xd51e4100)

I
IKRAM
Wed, Feb 1, 2023 10:19 AM

Hi

Below are commands and log info of the error mentioned in the subject line.

Info of workload is:

file demo.elf

demo.elf: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
statically linked, with debug_info, not stripped

build/ARM/gem5.opt configs/learning_gem5/part1/two_level.py

command line: build/ARM/gem5.opt configs/learning_gem5/part1/two_level.py
build/ARM/base/loader/elf_object.cc:355: warn: Ignoring empty loadable
segment 8
build/ARM/base/loader/elf_object.cc:355: warn: Ignoring empty loadable
segment 9
Global frequency set at 1000000000000 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file
and pdf.
build/ARM/mem/dram_interface.cc:690: warn: DRAM device capacity (8192
Mbytes) does not match the address range assigned (512 Mbytes)
build/ARM/base/loader/elf_object.cc:355: warn: Ignoring empty loadable
segment 8
build/ARM/base/loader/elf_object.cc:355: warn: Ignoring empty loadable
segment 9
build/ARM/arch/arm/linux/se_workload.cc:73: warn: Unknown operating system;
assuming Linux.
0: system.remote_gdb: listening for remote gdb on port 7000
Beginning simulation!
build/ARM/sim/simulate.cc:192: info: Entering event queue @ 0.  Starting
simulation...
build/ARM/arch/arm/faults.cc:822: panic: Attempted to execute unimplemented
instruction 'msr' (inst 0xd51e4100)
Memory Usage: 696836 KBytes
Program aborted at tick 454000
--- BEGIN LIBC BACKTRACE ---
build/ARM/gem5.opt(+0x2533ea0)[0x557444e3dea0]
build/ARM/gem5.opt(+0x25577ae)[0x557444e617ae]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14420)[0x7f584b3c9420]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f584a9a300b]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f584a982859]
build/ARM/gem5.opt(+0x71f415)[0x557443029415]
build/ARM/gem5.opt(+0x15caae0)[0x557443ed4ae0]
build/ARM/gem5.opt(+0x14cbc44)[0x557443dd5c44]
build/ARM/gem5.opt(+0x14c5778)[0x557443dcf778]
build/ARM/gem5.opt(+0x14c6530)[0x557443dd0530]
build/ARM/gem5.opt(+0x2546b15)[0x557444e50b15]
build/ARM/gem5.opt(+0x256d364)[0x557444e77364]
build/ARM/gem5.opt(+0x256d943)[0x557444e77943]
build/ARM/gem5.opt(+0x158a92e)[0x557443e9492e]
build/ARM/gem5.opt(+0x70f5f9)[0x5574430195f9]
/tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(PyCFunction_Call+0x149)[0x7f584b4b81e9]
/tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x683b)[0x7f584b544f1b]
/tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(+0x1485e0)[0x7f584b53c5e0]
/tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(+0x14a10a)[0x7f584b53e10a]
/tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x16be)[0x7f584b53fd9e]
/tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(+0x1485e0)[0x7f584b53c5e0]
/tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(PyEval_EvalCodeEx+0x6c)[0x7f584b53ca3c]
/tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(PyEval_EvalCode+0x3b)[0x7f584b53ca8b]
/tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(+0x1463ee)[0x7f584b53a3ee]
/tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(_PyCFunction_FastCallDict+0x229)[0x7f584b4b7f39]
/tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(+0x14a16c)[0x7f584b53e16c]
/tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x16be)[0x7f584b53fd9e]
/tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(+0x1485e0)[0x7f584b53c5e0]
/tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(PyEval_EvalCodeEx+0x6c)[0x7f584b53ca3c]
/tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(+0x9fac2)[0x7f584b493ac2]
/tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(PyObject_Call+0x56)[0x7f584b4603c6]
build/ARM/gem5.opt(+0x159478a)[0x557443e9e78a]
--- END LIBC BACKTRACE ---
Abort (core dumped)

Someone help me out with this error. Why is this occurring?

Thanks

  • Ikram
Hi Below are commands and log info of the error mentioned in the subject line. Info of workload is: >file demo.elf demo.elf: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, with debug_info, not stripped >build/ARM/gem5.opt configs/learning_gem5/part1/two_level.py command line: build/ARM/gem5.opt configs/learning_gem5/part1/two_level.py build/ARM/base/loader/elf_object.cc:355: warn: Ignoring empty loadable segment 8 build/ARM/base/loader/elf_object.cc:355: warn: Ignoring empty loadable segment 9 Global frequency set at 1000000000000 ticks per second warn: No dot file generated. Please install pydot to generate the dot file and pdf. build/ARM/mem/dram_interface.cc:690: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes) build/ARM/base/loader/elf_object.cc:355: warn: Ignoring empty loadable segment 8 build/ARM/base/loader/elf_object.cc:355: warn: Ignoring empty loadable segment 9 build/ARM/arch/arm/linux/se_workload.cc:73: warn: Unknown operating system; assuming Linux. 0: system.remote_gdb: listening for remote gdb on port 7000 Beginning simulation! build/ARM/sim/simulate.cc:192: info: Entering event queue @ 0. Starting simulation... build/ARM/arch/arm/faults.cc:822: panic: Attempted to execute unimplemented instruction 'msr' (inst 0xd51e4100) Memory Usage: 696836 KBytes Program aborted at tick 454000 --- BEGIN LIBC BACKTRACE --- build/ARM/gem5.opt(+0x2533ea0)[0x557444e3dea0] build/ARM/gem5.opt(+0x25577ae)[0x557444e617ae] /lib/x86_64-linux-gnu/libpthread.so.0(+0x14420)[0x7f584b3c9420] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f584a9a300b] /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f584a982859] build/ARM/gem5.opt(+0x71f415)[0x557443029415] build/ARM/gem5.opt(+0x15caae0)[0x557443ed4ae0] build/ARM/gem5.opt(+0x14cbc44)[0x557443dd5c44] build/ARM/gem5.opt(+0x14c5778)[0x557443dcf778] build/ARM/gem5.opt(+0x14c6530)[0x557443dd0530] build/ARM/gem5.opt(+0x2546b15)[0x557444e50b15] build/ARM/gem5.opt(+0x256d364)[0x557444e77364] build/ARM/gem5.opt(+0x256d943)[0x557444e77943] build/ARM/gem5.opt(+0x158a92e)[0x557443e9492e] build/ARM/gem5.opt(+0x70f5f9)[0x5574430195f9] /tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(PyCFunction_Call+0x149)[0x7f584b4b81e9] /tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x683b)[0x7f584b544f1b] /tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(+0x1485e0)[0x7f584b53c5e0] /tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(+0x14a10a)[0x7f584b53e10a] /tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x16be)[0x7f584b53fd9e] /tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(+0x1485e0)[0x7f584b53c5e0] /tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(PyEval_EvalCodeEx+0x6c)[0x7f584b53ca3c] /tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(PyEval_EvalCode+0x3b)[0x7f584b53ca8b] /tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(+0x1463ee)[0x7f584b53a3ee] /tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(_PyCFunction_FastCallDict+0x229)[0x7f584b4b7f39] /tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(+0x14a16c)[0x7f584b53e16c] /tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(_PyEval_EvalFrameDefault+0x16be)[0x7f584b53fd9e] /tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(+0x1485e0)[0x7f584b53c5e0] /tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(PyEval_EvalCodeEx+0x6c)[0x7f584b53ca3c] /tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(+0x9fac2)[0x7f584b493ac2] /tools/FOSS/python3/3.6.7/x86_64/lib/libpython3.6m.so.1.0(PyObject_Call+0x56)[0x7f584b4603c6] build/ARM/gem5.opt(+0x159478a)[0x557443e9e78a] --- END LIBC BACKTRACE --- Abort (core dumped) Someone help me out with this error. Why is this occurring? Thanks - Ikram
GT
Giacomo Travaglini
Wed, Feb 1, 2023 10:44 AM

Hi ikram,

On 01/02/2023 10:19, IKRAM via gem5-users wrote:
Hi

Below are commands and log info of the error mentioned in the subject line.

Info of workload is:

file demo.elf

demo.elf: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, with debug_info, not stripped

build/ARM/gem5.opt configs/learning_gem5/part1/two_level.py

command line: build/ARM/gem5.opt configs/learning_gem5/part1/two_level.py
build/ARM/base/loader/elf_object.cc:355: warn: Ignoring empty loadable segment 8
build/ARM/base/loader/elf_object.cc:355: warn: Ignoring empty loadable segment 9
Global frequency set at 1000000000000 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file and pdf.
build/ARM/mem/dram_interface.cc:690: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes)
build/ARM/base/loader/elf_object.cc:355: warn: Ignoring empty loadable segment 8
build/ARM/base/loader/elf_object.cc:355: warn: Ignoring empty loadable segment 9
build/ARM/arch/arm/linux/se_workload.cc:73: warn: Unknown operating system; assuming Linux.
0: system.remote_gdb: listening for remote gdb on port 7000
Beginning simulation!
build/ARM/sim/simulate.cc:192: info: Entering event queue @ 0.  Starting simulation...
build/ARM/arch/arm/faults.cc:822: panic: Attempted to execute unimplemented instruction 'msr' (inst 0xd51e4100)

As you can see here you are hitting a panic as you encountered a MSR instruction. This is a privileged instruction and usually you cannot execute it in SE mode (which runs in userspace). This is why simulation is throwing an undefined instruction exception.

You need to figure out why your binary is producing a privileged instruction. My bet is that you cross-compiled the application with a baremetal toolchain. You need to use a GNU/Linux one to produce a linux application.

See https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads

Kind Regards

Giacomo

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Hi ikram, On 01/02/2023 10:19, IKRAM via gem5-users wrote: Hi Below are commands and log info of the error mentioned in the subject line. Info of workload is: >file demo.elf demo.elf: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, with debug_info, not stripped >build/ARM/gem5.opt configs/learning_gem5/part1/two_level.py command line: build/ARM/gem5.opt configs/learning_gem5/part1/two_level.py build/ARM/base/loader/elf_object.cc:355: warn: Ignoring empty loadable segment 8 build/ARM/base/loader/elf_object.cc:355: warn: Ignoring empty loadable segment 9 Global frequency set at 1000000000000 ticks per second warn: No dot file generated. Please install pydot to generate the dot file and pdf. build/ARM/mem/dram_interface.cc:690: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes) build/ARM/base/loader/elf_object.cc:355: warn: Ignoring empty loadable segment 8 build/ARM/base/loader/elf_object.cc:355: warn: Ignoring empty loadable segment 9 build/ARM/arch/arm/linux/se_workload.cc:73: warn: Unknown operating system; assuming Linux. 0: system.remote_gdb: listening for remote gdb on port 7000 Beginning simulation! build/ARM/sim/simulate.cc:192: info: Entering event queue @ 0. Starting simulation... build/ARM/arch/arm/faults.cc:822: panic: Attempted to execute unimplemented instruction 'msr' (inst 0xd51e4100) As you can see here you are hitting a panic as you encountered a MSR instruction. This is a privileged instruction and usually you cannot execute it in SE mode (which runs in userspace). This is why simulation is throwing an undefined instruction exception. You need to figure out why your binary is producing a privileged instruction. My bet is that you cross-compiled the application with a baremetal toolchain. You need to use a GNU/Linux one to produce a linux application. See https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads Kind Regards Giacomo IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.