]> git.sur5r.net Git - openocd/commit
cortex_a: Fix endianess issues in cortex_a8_*_apb_ab_memory
authorKamal Dasu <kdasu.kdev@gmail.com>
Thu, 24 Oct 2013 18:58:55 +0000 (14:58 -0400)
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>
Fri, 7 Mar 2014 18:53:35 +0000 (18:53 +0000)
commit7e1dfcbe2d45aac9d31e4d088064d4a16c347773
treeb8cf06a1e13c4becf80d518697dc233da1471857
parent42881f95ce6dec09ad317b59ad564a997a766d95
cortex_a: Fix endianess issues in cortex_a8_*_apb_ab_memory

Make the APB-AB memory read routines handle endianess order
when running on big endian host. cortex_a8_read_apb_ab_memory
is also called by cortex_a8_write_apb_ab_memory and was breaking
both APB-AB read and write functions. Also fixed bug in write
function in calculating the offset of end of buffer data. The
change aslo fixes the read issues with all combinations of
aligned unaligned memory access found by 'test_mem_access' cmd.

Tested with target "test_mem_access 4000", also size 1-9,
'mdb/h/w' 'mwb/h/w' cmds and equivalent gdb 'x' 'set' cmds.

Change-Id: Ia927c60c4837617f5342a9beb6fdab1f061855fe
Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
Reviewed-on: http://openocd.zylin.com/1781
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Tested-by: jenkins
src/target/cortex_a.c