Files
sw_openocd/src/target
Antonio Borneo a56b729191 arm7_9_common: fix host endianness bug in arm7_9_full_context()
The original code passes to ->read_core_regs() and to
->read_xpsr() the pointer to the little-endian buffer reg.value.
This is incorrect because the two functions above require a
pointer to uint32_t, since they already run the conversion with
arm_le_to_h_u32() in the jtag callback.
This causes a mismatch on big-endian host and the registers get
read with the incorrect endianness.

Use an intermediate buffer to read the registers as uint32_t and
to track the destination reg.value pointer, then copy the value in
reg.value after the call to jtag_execute_queue().

Tested with qemu-armeb and an OpenOCD built through buildroot
configured for cortex-a7 big-endian.

Note that if jtag_execute_queue() fails, the openocd register
cache is not updated, so the already modified flags 'valid' and
'dirty' are incorrect. This part should be moved after the call to
jtag_execute_queue() too.

Change-Id: Iba70d964ffbb74bf0860bfd9d299f218e3bc65bf
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5943
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2020-12-05 23:18:29 +00:00
..
2018-01-16 09:05:41 +00:00
2020-09-05 17:12:39 +01:00
2016-05-24 22:30:55 +01:00
2018-04-10 09:13:02 +01:00
2020-07-08 22:07:38 +01:00
2020-07-08 22:07:38 +01:00
2020-03-12 10:11:19 +00:00
2016-05-24 22:30:55 +01:00
2020-12-02 23:15:52 +00:00
2020-07-08 22:08:08 +01:00
2018-12-12 08:47:44 +00:00
2018-12-12 08:47:44 +00:00
2018-12-12 08:47:44 +00:00
2016-05-24 22:30:55 +01:00
2020-11-07 20:52:00 +00:00
2020-12-02 23:15:52 +00:00
2020-12-02 23:15:52 +00:00
2019-11-28 16:59:15 +00:00
2020-07-08 22:08:08 +01:00
2019-11-28 16:59:15 +00:00
2017-05-08 18:04:56 +01:00
2020-10-30 22:00:49 +00:00
2020-02-15 15:36:56 +00:00
2020-12-02 23:15:52 +00:00
2020-12-02 23:15:52 +00:00
2020-11-04 17:39:17 +00:00
2016-05-24 22:30:55 +01:00
2016-05-24 22:30:55 +01:00