riscv-openocd/src
Antonio Borneo 190176a6bc target: aarch64: access reg ELR_EL2 only in EL2 and EL3
The register ELR_EL2 is accessible and it's content is relevant
only when the target is in EL2 or EL3.
Virtualization SW in EL1 can also access it, but this either
triggers a trap to EL2 or returns ELR_EL1. Debugger should not mix
the real ELR_EL2 with the virtual register.

Without this patch, an error:
	Error: Opcode 0xd53c4020, DSCR.ERR=1, DSCR.EL=1
is triggered by GDB register window or through GDB command
	x/p $ELR_EL2
or through OpenOCD command
	reg ELR_EL2

Detect the EL and return error if the register cannot be accessed.

Change-Id: Idf02b42a7339df83260c1e44ceabbb05fbf392b9
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8271
Tested-by: jenkins
2024-06-23 09:29:04 +00:00
..
flash fix GCC's `-Wcalloc-transposed-args` warning 2024-06-15 14:11:16 +00:00
helper src/helper/startup: fix syntax errors 2024-06-08 08:44:18 +00:00
jtag pld/intel: remove idcodes from intel.c 2024-06-15 14:25:05 +00:00
pld pld/intel: remove idcodes from intel.c 2024-06-15 14:25:05 +00:00
rtos openocd: drop include of target_type.h 2024-05-26 09:57:51 +00:00
rtt rtt/tcl: Fix line indentation 2023-11-18 11:38:27 +00:00
server gdb_server: do not start multiple instances on "pipe" 2024-06-08 08:51:20 +00:00
svf svf: make command 'svf' syntax consistent 2023-03-25 18:09:06 +00:00
target target: aarch64: access reg ELR_EL2 only in EL2 and EL3 2024-06-23 09:29:04 +00:00
transport transport: rewrite command 'transport select' as COMMAND_HANDLER 2023-03-25 18:09:47 +00:00
xsvf openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
Makefile.am openocd: build: add SPDX tag 2022-07-23 13:06:38 +00:00
hello.c hello: include hello.h 2023-05-18 10:13:41 +00:00
hello.h openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
main.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
openocd.c openocd: rewrite command 'version' as COMMAND_HANDLER 2023-03-25 18:10:54 +00:00
openocd.h openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00