From 6cadbadb3763101a495fddfedec52781a3ac6af7 Mon Sep 17 00:00:00 2001 From: Salvador Arroyo Date: Tue, 3 Dec 2013 23:25:20 +0100 Subject: mips32: new code for pracc exec This is only the basic code proposed for mips32_pracc_exec() function. It checks every pracc address against the expected address when reading (instruction fetch). The code expects to start at PRACC_TEXT and any subsequent read address is obtained by adding 4 to the previous one. After shifting out all the instructions the code executes a final check. It checks now for the first pass trough PRACC_TEXT and shift out only NOP instructions. A mips core does not need an additional NOP and after the first check it exits if there is no store access pending. After shifting out one NOP the core must be reading at pracc text or the code exits with error. The code continues shifting out NOPs until all store accesses have been performed. After shifting out 10 NOPs it exits with error. No assumption is made about the number of store instruction shifted out or the ordering of the store accesses. It only checks that the number of store accesses is the same as the number of store instructions at dmseg after execution. mips32_pracc_read_ctrl_addr() and mips32_pracc_finish() are added to simpify a bit the code. Fields pa_ctrl and pa_addr are added in ejtag_info for storing values of pracc control and address. Change-Id: If6322d5c8cbeadcd4acd3972c0f72c8490f53c34 Signed-off-by: Salvador Arroyo Reviewed-on: http://openocd.zylin.com/1827 Tested-by: jenkins Reviewed-by: Freddie Chopin --- src/target/mips_ejtag.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/target/mips_ejtag.h') diff --git a/src/target/mips_ejtag.h b/src/target/mips_ejtag.h index db20e9d0..ead0876d 100644 --- a/src/target/mips_ejtag.h +++ b/src/target/mips_ejtag.h @@ -164,6 +164,8 @@ struct mips_ejtag { uint32_t reg9; unsigned scan_delay; int mode; + uint32_t pa_ctrl; + uint32_t pa_addr; unsigned int ejtag_version; /* Memory-Mapped Registers. This addresses are not same on different -- cgit v1.2.3-18-g5258