gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Segmentation Fault when trying to execute mrs x0, mpidr_el1

SS
siva sankar
Fri, Jul 1, 2022 8:01 PM

Hi All,

I am trying to run an executable in gem5 where the first instruction is
"mrs x0, mpidr_el1". As soon as I run it, it fails with the following
segmentation fault.

Below is the command and the error message:

./build/ARM/gem5.opt configs/example/se.py --cmd=temp.elf
**** REAL SIMULATION ****
build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0.  Starting
simulation...
build/ARM/arch/arm/utility.cc:154: warn: Trying to read MPIDR at EL0
gem5 has encountered a segmentation fault!

--- BEGIN LIBC BACKTRACE ---
./build/ARM/gem5.opt[0x1bdbc75]
./build/ARM/gem5.opt[0x1bf677d]
/lib64/libpthread.so.0(+0xf7e0)[0x7ffff76417e0]
./build/ARM/gem5.opt[0x77d4a7]
./build/ARM/gem5.opt[0x77ddf5]
./build/ARM/gem5.opt[0x63b6be]
./build/ARM/gem5.opt[0xe81cc8]
./build/ARM/gem5.opt[0x1602fe4]
./build/ARM/gem5.opt[0x1be7268]
./build/ARM/gem5.opt[0x1c0f859]
./build/ARM/gem5.opt[0x1c104ba]
./build/ARM/gem5.opt[0x1bcba40]
./build/ARM/gem5.opt[0x166a9a1]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyCFunction_Call+0x118)[0x7ffff78f1b48]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x84f5)[0x7ffff78c81f5]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0xa8)[0x7ffff78ef748]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x8037)[0x7ffff78c7d37]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x6fae0)[0x7ffff78beae0]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x604a)[0x7ffff78c5d4a]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0xa8)[0x7ffff78ef748]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x8037)[0x7ffff78c7d37]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyEval_EvalCodeEx+0x3e)[0x7ffff79dd23e]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyEval_EvalCode+0x1b)[0x7ffff79dd26b]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x18ade9)[0x7ffff79d9de9]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0xe9510)[0x7ffff7938510]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x604a)[0x7ffff78c5d4a]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x6fae0)[0x7ffff78beae0]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyVectorcall_Call+0x5c)[0x7ffff78f161c]
./build/ARM/gem5.opt[0x1bd5d71]
--- END LIBC BACKTRACE ---
Segmentation fault

Can someone help me understand/debug this or direct me on how to resolve
this?
It would be of great help.

--
Thanks and regards
Siva

Hi All, I am trying to run an executable in gem5 where the first instruction is "mrs x0, mpidr_el1". As soon as I run it, it fails with the following segmentation fault. Below is the command and the error message: ./build/ARM/gem5.opt configs/example/se.py --cmd=temp.elf **** REAL SIMULATION **** build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0. Starting simulation... build/ARM/arch/arm/utility.cc:154: warn: Trying to read MPIDR at EL0 gem5 has encountered a segmentation fault! --- BEGIN LIBC BACKTRACE --- ./build/ARM/gem5.opt[0x1bdbc75] ./build/ARM/gem5.opt[0x1bf677d] /lib64/libpthread.so.0(+0xf7e0)[0x7ffff76417e0] ./build/ARM/gem5.opt[0x77d4a7] ./build/ARM/gem5.opt[0x77ddf5] ./build/ARM/gem5.opt[0x63b6be] ./build/ARM/gem5.opt[0xe81cc8] ./build/ARM/gem5.opt[0x1602fe4] ./build/ARM/gem5.opt[0x1be7268] ./build/ARM/gem5.opt[0x1c0f859] ./build/ARM/gem5.opt[0x1c104ba] ./build/ARM/gem5.opt[0x1bcba40] ./build/ARM/gem5.opt[0x166a9a1] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyCFunction_Call+0x118)[0x7ffff78f1b48] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x84f5)[0x7ffff78c81f5] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0xa8)[0x7ffff78ef748] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x8037)[0x7ffff78c7d37] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x6fae0)[0x7ffff78beae0] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x604a)[0x7ffff78c5d4a] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0xa8)[0x7ffff78ef748] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x8037)[0x7ffff78c7d37] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyEval_EvalCodeEx+0x3e)[0x7ffff79dd23e] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyEval_EvalCode+0x1b)[0x7ffff79dd26b] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x18ade9)[0x7ffff79d9de9] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0xe9510)[0x7ffff7938510] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x604a)[0x7ffff78c5d4a] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x6fae0)[0x7ffff78beae0] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyVectorcall_Call+0x5c)[0x7ffff78f161c] ./build/ARM/gem5.opt[0x1bd5d71] --- END LIBC BACKTRACE --- Segmentation fault Can someone help me understand/debug this or direct me on how to resolve this? It would be of great help. -- Thanks and regards Siva
GT
Giacomo Travaglini
Mon, Jul 4, 2022 12:09 PM

Hi, I’d recommend debugging your failure with GDB and a gem5.debug build

Kind Regards

Giacomo

From: siva sankar sankar.siva730@gmail.com
Date: Friday, 1 July 2022 at 21:03
To: gem5 users mailing list gem5-users@gem5.org
Subject: [gem5-users] Segmentation Fault when trying to execute mrs x0, mpidr_el1
Hi All,

I am trying to run an executable in gem5 where the first instruction is "mrs x0, mpidr_el1". As soon as I run it, it fails with the following segmentation fault.

Below is the command and the error message:

./build/ARM/gem5.opt configs/example/se.py --cmd=temp.elf
**** REAL SIMULATION ****
build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0.  Starting simulation...
build/ARM/arch/arm/utility.cc:154: warn: Trying to read MPIDR at EL0
gem5 has encountered a segmentation fault!

--- BEGIN LIBC BACKTRACE ---
./build/ARM/gem5.opt[0x1bdbc75]
./build/ARM/gem5.opt[0x1bf677d]
/lib64/libpthread.so.0(+0xf7e0)[0x7ffff76417e0]
./build/ARM/gem5.opt[0x77d4a7]
./build/ARM/gem5.opt[0x77ddf5]
./build/ARM/gem5.opt[0x63b6be]
./build/ARM/gem5.opt[0xe81cc8]
./build/ARM/gem5.opt[0x1602fe4]
./build/ARM/gem5.opt[0x1be7268]
./build/ARM/gem5.opt[0x1c0f859]
./build/ARM/gem5.opt[0x1c104ba]
./build/ARM/gem5.opt[0x1bcba40]
./build/ARM/gem5.opt[0x166a9a1]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyCFunction_Call+0x118)[0x7ffff78f1b48]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x84f5)[0x7ffff78c81f5]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0xa8)[0x7ffff78ef748]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x8037)[0x7ffff78c7d37]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x6fae0)[0x7ffff78beae0]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x604a)[0x7ffff78c5d4a]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0xa8)[0x7ffff78ef748]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x8037)[0x7ffff78c7d37]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyEval_EvalCodeEx+0x3e)[0x7ffff79dd23e]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyEval_EvalCode+0x1b)[0x7ffff79dd26b]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x18ade9)[0x7ffff79d9de9]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0xe9510)[0x7ffff7938510]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x604a)[0x7ffff78c5d4a]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x6fae0)[0x7ffff78beae0]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyVectorcall_Call+0x5c)[0x7ffff78f161c]
./build/ARM/gem5.opt[0x1bd5d71]
--- END LIBC BACKTRACE ---
Segmentation fault

Can someone help me understand/debug this or direct me on how to resolve this?
It would be of great help.

--
Thanks and regards
Siva
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, I’d recommend debugging your failure with GDB and a gem5.debug build Kind Regards Giacomo From: siva sankar <sankar.siva730@gmail.com> Date: Friday, 1 July 2022 at 21:03 To: gem5 users mailing list <gem5-users@gem5.org> Subject: [gem5-users] Segmentation Fault when trying to execute mrs x0, mpidr_el1 Hi All, I am trying to run an executable in gem5 where the first instruction is "mrs x0, mpidr_el1". As soon as I run it, it fails with the following segmentation fault. Below is the command and the error message: ./build/ARM/gem5.opt configs/example/se.py --cmd=temp.elf **** REAL SIMULATION **** build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0. Starting simulation... build/ARM/arch/arm/utility.cc:154: warn: Trying to read MPIDR at EL0 gem5 has encountered a segmentation fault! --- BEGIN LIBC BACKTRACE --- ./build/ARM/gem5.opt[0x1bdbc75] ./build/ARM/gem5.opt[0x1bf677d] /lib64/libpthread.so.0(+0xf7e0)[0x7ffff76417e0] ./build/ARM/gem5.opt[0x77d4a7] ./build/ARM/gem5.opt[0x77ddf5] ./build/ARM/gem5.opt[0x63b6be] ./build/ARM/gem5.opt[0xe81cc8] ./build/ARM/gem5.opt[0x1602fe4] ./build/ARM/gem5.opt[0x1be7268] ./build/ARM/gem5.opt[0x1c0f859] ./build/ARM/gem5.opt[0x1c104ba] ./build/ARM/gem5.opt[0x1bcba40] ./build/ARM/gem5.opt[0x166a9a1] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyCFunction_Call+0x118)[0x7ffff78f1b48] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x84f5)[0x7ffff78c81f5] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0xa8)[0x7ffff78ef748] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x8037)[0x7ffff78c7d37] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x6fae0)[0x7ffff78beae0] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x604a)[0x7ffff78c5d4a] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0xa8)[0x7ffff78ef748] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x8037)[0x7ffff78c7d37] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyEval_EvalCodeEx+0x3e)[0x7ffff79dd23e] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyEval_EvalCode+0x1b)[0x7ffff79dd26b] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x18ade9)[0x7ffff79d9de9] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0xe9510)[0x7ffff7938510] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x604a)[0x7ffff78c5d4a] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x6fae0)[0x7ffff78beae0] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyVectorcall_Call+0x5c)[0x7ffff78f161c] ./build/ARM/gem5.opt[0x1bd5d71] --- END LIBC BACKTRACE --- Segmentation fault Can someone help me understand/debug this or direct me on how to resolve this? It would be of great help. -- Thanks and regards Siva 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.
RC
Richard Cooper
Tue, Jul 5, 2022 9:03 AM

Hi Siva,

An SE simulation implicitly runs at EL0, and reading MPIDR_EL1 is undefined at EL0 (unless FEAT_IDST is implemented, which is not currently the case in gem5).
It looks like gem5 is segfaulting instead of failing more gracefully in this case, but in general you won’t be able to read MPIDR_EL1 from SE mode.
You would probably need to run a baremetal simulation to use MPIDR_EL1, and make the access from EL1 or above.

Best regards,

Richard.

From: siva sankar sankar.siva730@gmail.com
Sent: 01 July 2022 21:02
To: gem5 users mailing list gem5-users@gem5.org
Subject: [gem5-users] Segmentation Fault when trying to execute mrs x0, mpidr_el1

Hi All,

I am trying to run an executable in gem5 where the first instruction is "mrs x0, mpidr_el1". As soon as I run it, it fails with the following segmentation fault.

Below is the command and the error message:

./build/ARM/gem5.opt configs/example/se.py --cmd=temp.elf
**** REAL SIMULATION ****
build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0.  Starting simulation...
build/ARM/arch/arm/utility.cc:154: warn: Trying to read MPIDR at EL0
gem5 has encountered a segmentation fault!

--- BEGIN LIBC BACKTRACE ---
./build/ARM/gem5.opt[0x1bdbc75]
./build/ARM/gem5.opt[0x1bf677d]
/lib64/libpthread.so.0(+0xf7e0)[0x7ffff76417e0]
./build/ARM/gem5.opt[0x77d4a7]
./build/ARM/gem5.opt[0x77ddf5]
./build/ARM/gem5.opt[0x63b6be]
./build/ARM/gem5.opt[0xe81cc8]
./build/ARM/gem5.opt[0x1602fe4]
./build/ARM/gem5.opt[0x1be7268]
./build/ARM/gem5.opt[0x1c0f859]
./build/ARM/gem5.opt[0x1c104ba]
./build/ARM/gem5.opt[0x1bcba40]
./build/ARM/gem5.opt[0x166a9a1]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyCFunction_Call+0x118)[0x7ffff78f1b48]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x84f5)[0x7ffff78c81f5]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0xa8)[0x7ffff78ef748]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x8037)[0x7ffff78c7d37]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x6fae0)[0x7ffff78beae0]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x604a)[0x7ffff78c5d4a]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0xa8)[0x7ffff78ef748]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x8037)[0x7ffff78c7d37]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyEval_EvalCodeEx+0x3e)[0x7ffff79dd23e]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyEval_EvalCode+0x1b)[0x7ffff79dd26b]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x18ade9)[0x7ffff79d9de9]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0xe9510)[0x7ffff7938510]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x604a)[0x7ffff78c5d4a]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x6fae0)[0x7ffff78beae0]
/home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyVectorcall_Call+0x5c)[0x7ffff78f161c]
./build/ARM/gem5.opt[0x1bd5d71]
--- END LIBC BACKTRACE ---
Segmentation fault

Can someone help me understand/debug this or direct me on how to resolve this?
It would be of great help.

--
Thanks and regards
Siva
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 Siva, An SE simulation implicitly runs at EL0, and reading MPIDR_EL1 is undefined at EL0 (unless FEAT_IDST is implemented, which is not currently the case in gem5). It looks like gem5 is segfaulting instead of failing more gracefully in this case, but in general you won’t be able to read MPIDR_EL1 from SE mode. You would probably need to run a baremetal simulation to use MPIDR_EL1, and make the access from EL1 or above. Best regards, Richard. From: siva sankar <sankar.siva730@gmail.com> Sent: 01 July 2022 21:02 To: gem5 users mailing list <gem5-users@gem5.org> Subject: [gem5-users] Segmentation Fault when trying to execute mrs x0, mpidr_el1 Hi All, I am trying to run an executable in gem5 where the first instruction is "mrs x0, mpidr_el1". As soon as I run it, it fails with the following segmentation fault. Below is the command and the error message: ./build/ARM/gem5.opt configs/example/se.py --cmd=temp.elf **** REAL SIMULATION **** build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0. Starting simulation... build/ARM/arch/arm/utility.cc:154: warn: Trying to read MPIDR at EL0 gem5 has encountered a segmentation fault! --- BEGIN LIBC BACKTRACE --- ./build/ARM/gem5.opt[0x1bdbc75] ./build/ARM/gem5.opt[0x1bf677d] /lib64/libpthread.so.0(+0xf7e0)[0x7ffff76417e0] ./build/ARM/gem5.opt[0x77d4a7] ./build/ARM/gem5.opt[0x77ddf5] ./build/ARM/gem5.opt[0x63b6be] ./build/ARM/gem5.opt[0xe81cc8] ./build/ARM/gem5.opt[0x1602fe4] ./build/ARM/gem5.opt[0x1be7268] ./build/ARM/gem5.opt[0x1c0f859] ./build/ARM/gem5.opt[0x1c104ba] ./build/ARM/gem5.opt[0x1bcba40] ./build/ARM/gem5.opt[0x166a9a1] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyCFunction_Call+0x118)[0x7ffff78f1b48] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x84f5)[0x7ffff78c81f5] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0xa8)[0x7ffff78ef748] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x8037)[0x7ffff78c7d37] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x6fae0)[0x7ffff78beae0] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x604a)[0x7ffff78c5d4a] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0xa8)[0x7ffff78ef748] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x8037)[0x7ffff78c7d37] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0xa7a)[0x7ffff79dd08a] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyEval_EvalCodeEx+0x3e)[0x7ffff79dd23e] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyEval_EvalCode+0x1b)[0x7ffff79dd26b] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x18ade9)[0x7ffff79d9de9] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0xe9510)[0x7ffff7938510] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x604a)[0x7ffff78c5d4a] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(+0x6fae0)[0x7ffff78beae0] /home/utils/Python/3.8/3.8.10-20210517/lib/libpython3.8.so.1.0(PyVectorcall_Call+0x5c)[0x7ffff78f161c] ./build/ARM/gem5.opt[0x1bd5d71] --- END LIBC BACKTRACE --- Segmentation fault Can someone help me understand/debug this or direct me on how to resolve this? It would be of great help. -- Thanks and regards Siva 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.