You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

65 lines
2.3 KiB

  1. #ifndef ARM11_DBGTAP_H
  2. #define ARM11_DBGTAP_H
  3. #include "arm11.h"
  4. /* ARM11 internals */
  5. void arm11_setup_field(struct arm11_common *arm11, int num_bits,
  6. void *in_data, void *out_data, struct scan_field *field);
  7. void arm11_add_IR(struct arm11_common *arm11,
  8. uint8_t instr, tap_state_t state);
  9. int arm11_add_debug_SCAN_N(struct arm11_common *arm11,
  10. uint8_t chain, tap_state_t state);
  11. int arm11_read_DSCR(struct arm11_common *arm11);
  12. int arm11_write_DSCR(struct arm11_common *arm11, uint32_t dscr);
  13. int arm11_run_instr_data_prepare(struct arm11_common *arm11);
  14. int arm11_run_instr_data_finish(struct arm11_common *arm11);
  15. int arm11_run_instr_no_data1(struct arm11_common *arm11, uint32_t opcode);
  16. int arm11_run_instr_data_to_core(struct arm11_common *arm11,
  17. uint32_t opcode, uint32_t *data, size_t count);
  18. int arm11_run_instr_data_to_core_noack(struct arm11_common *arm11,
  19. uint32_t opcode, uint32_t *data, size_t count);
  20. int arm11_run_instr_data_to_core1(struct arm11_common *arm11,
  21. uint32_t opcode, uint32_t data);
  22. int arm11_run_instr_data_from_core(struct arm11_common *arm11,
  23. uint32_t opcode, uint32_t *data, size_t count);
  24. int arm11_run_instr_data_from_core_via_r0(struct arm11_common *arm11,
  25. uint32_t opcode, uint32_t *data);
  26. int arm11_run_instr_data_to_core_via_r0(struct arm11_common *arm11,
  27. uint32_t opcode, uint32_t data);
  28. void arm11_add_dr_scan_vc(struct jtag_tap *tap, int num_fields, struct scan_field *fields,
  29. tap_state_t state);
  30. /**
  31. * Used with arm11_sc7_run to make a list of read/write commands for
  32. * scan chain 7
  33. */
  34. struct arm11_sc7_action
  35. {
  36. bool write; /**< Access mode: true for write, false for read. */
  37. uint8_t address; /**< Register address mode. Use enum #arm11_sc7 */
  38. /**
  39. * If write then set this to value to be written. In read mode
  40. * this receives the read value when the function returns.
  41. */
  42. uint32_t value;
  43. };
  44. int arm11_sc7_run(struct arm11_common *arm11,
  45. struct arm11_sc7_action *actions, size_t count);
  46. /* Mid-level helper functions */
  47. int arm11_sc7_clear_vbw(struct arm11_common *arm11);
  48. int arm11_sc7_set_vcr(struct arm11_common *arm11, uint32_t value);
  49. int arm11_read_memory_word(struct arm11_common *arm11,
  50. uint32_t address, uint32_t *result);
  51. int arm11_dpm_init(struct arm11_common *arm11, uint32_t didr);
  52. int arm11_bpwp_flush(struct arm11_common *arm11);
  53. #endif // ARM11_DBGTAP_H