+enum xscale_trace_entry_type {
+ XSCALE_TRACE_MESSAGE = 0x0,
+ XSCALE_TRACE_ADDRESS = 0x1,
+};
+
+struct xscale_trace_entry {
+ uint8_t data;
+ enum xscale_trace_entry_type type;
+};
+
+struct xscale_trace_data {
+ struct xscale_trace_entry *entries;
+ int depth;
+ uint32_t chkpt0;
+ uint32_t chkpt1;
+ uint32_t last_instruction;
+ unsigned int num_checkpoints;
+ struct xscale_trace_data *next;
+};
+
+enum trace_mode {
+ XSCALE_TRACE_DISABLED,
+ XSCALE_TRACE_FILL,
+ XSCALE_TRACE_WRAP
+};
+
+struct xscale_trace {
+ struct image *image; /* source for target opcodes */
+ struct xscale_trace_data *data; /* linked list of collected trace data */
+ int buffer_fill; /* maximum number of trace runs to read */
+ int fill_counter; /* running count during trace collection */
+ enum trace_mode mode;
+ enum arm_state core_state; /* current core state (ARM, Thumb) */
+};
+
+struct xscale_common {
+ /* armv4/5 common stuff */
+ struct arm arm;
+