aboutsummaryrefslogtreecommitdiff
path: root/src/target/mips32_pracc.h
diff options
context:
space:
mode:
authorSalvador Arroyo <sarroyofdez@yahoo.es>2013-12-03 23:25:20 +0100
committerFreddie Chopin <freddie.chopin@gmail.com>2014-05-09 20:40:31 +0000
commit6cadbadb3763101a495fddfedec52781a3ac6af7 (patch)
treed6dbea7cd20ab59fe81d9581fbb698322c45b301 /src/target/mips32_pracc.h
parentfcd7b90db6f6f81ace4e35fca8d124d0fb3a3685 (diff)
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 <sarroyofdez@yahoo.es> Reviewed-on: http://openocd.zylin.com/1827 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Diffstat (limited to 'src/target/mips32_pracc.h')
-rw-r--r--src/target/mips32_pracc.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/target/mips32_pracc.h b/src/target/mips32_pracc.h
index 921587cf..eab5f73e 100644
--- a/src/target/mips32_pracc.h
+++ b/src/target/mips32_pracc.h
@@ -67,8 +67,7 @@ int mips32_pracc_fastdata_xfer(struct mips_ejtag *ejtag_info, struct working_are
int mips32_pracc_read_regs(struct mips_ejtag *ejtag_info, uint32_t *regs);
int mips32_pracc_write_regs(struct mips_ejtag *ejtag_info, uint32_t *regs);
-int mips32_pracc_exec(struct mips_ejtag *ejtag_info, int code_len, const uint32_t *code,
- int num_param_out, uint32_t *param_out, int cycle);
+int mips32_pracc_exec(struct mips_ejtag *ejtag_info, struct pracc_queue_info *ctx, uint32_t *param_out);
/**
* \b mips32_cp0_read