OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [or1ksim/] [debug/] [gdb.h] - Blame information for rev 1771

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 485 markom
/* config.h -- Simulator configuration header file
2 1748 jeremybenn
 
3 485 markom
   Copyright (C) 2001 Chris Ziomkowski, chris@asics.ws
4 1748 jeremybenn
   Copyright (C) 2008 Embecosm Limited
5 485 markom
 
6 1748 jeremybenn
   Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
7 485 markom
 
8 1748 jeremybenn
   This file is part of Or1ksim, the OpenRISC 1000 Architectural Simulator.
9 485 markom
 
10 1748 jeremybenn
   This program is free software; you can redistribute it and/or modify it
11
   under the terms of the GNU General Public License as published by the Free
12
   Software Foundation; either version 3 of the License, or (at your option)
13
   any later version.
14 485 markom
 
15 1748 jeremybenn
   This program is distributed in the hope that it will be useful, but WITHOUT
16
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
18
   more details.
19
 
20
   You should have received a copy of the GNU General Public License along
21
   with this program.  If not, see <http://www.gnu.org/licenses/>.  */
22
 
23
/* This program is commented throughout in a fashion suitable for processing
24
   with Doxygen. */
25
 
26
/* The data in here is copied from or1k-jtag.h in the GDB 6.8 port for
27
   OpenRISC 1000 */
28
 
29
 
30
#ifndef GDB__H
31
#define GDB__H
32
 
33
/*! Error codes for the OpenRISC 1000 JTAG debugging protocol */
34
enum or1k_jtag_errors  /* modified <chris@asics.ws> CZ 24/05/01 */
35 485 markom
{
36
  /* Codes > 0 are for system errors */
37
 
38 1748 jeremybenn
  ERR_NONE                           =   0,
39
  ERR_CRC                            =  -1,
40
  ERR_MEM                            =  -2,
41
  JTAG_PROXY_INVALID_COMMAND         =  -3,
42
  JTAG_PROXY_SERVER_TERMINATED       =  -4,
43
  JTAG_PROXY_NO_CONNECTION           =  -5,
44
  JTAG_PROXY_PROTOCOL_ERROR          =  -6,
45
  JTAG_PROXY_COMMAND_NOT_IMPLEMENTED =  -7,
46
  JTAG_PROXY_INVALID_CHAIN           =  -8,
47
  JTAG_PROXY_INVALID_ADDRESS         =  -9,
48
  JTAG_PROXY_ACCESS_EXCEPTION        = -10,     /* Write to ROM */
49
  JTAG_PROXY_INVALID_LENGTH          = -11,
50
  JTAG_PROXY_OUT_OF_MEMORY           = -12
51 485 markom
};
52
 
53 1748 jeremybenn
/*! The OR1K JTAG proxy protocol commands. */
54
enum or1k_jtag_proxy_protocol_commands {
55
  OR1K_JTAG_COMMAND_READ        = 1,
56
  OR1K_JTAG_COMMAND_WRITE       = 2,
57
  OR1K_JTAG_COMMAND_READ_BLOCK  = 3,
58
  OR1K_JTAG_COMMAND_WRITE_BLOCK = 4,
59
  OR1K_JTAG_COMMAND_CHAIN       = 5,
60
};
61 485 markom
 
62 1748 jeremybenn
/* Each transmit structure must begin with an integer which specifies the type
63
   of command. Information after this is variable. Make sure to have all
64
   information aligned properly. If we stick with 32 bit integers, it should
65
   be portable onto every platform. These structures will be transmitted
66
   across the network in network byte order. */
67 485 markom
 
68 1748 jeremybenn
struct jtr_read_message {
69
  uint32_t  command;
70
  uint32_t  length;
71
  uint32_t  address;
72
};
73 485 markom
 
74 1748 jeremybenn
struct jtr_write_message {
75
  uint32_t  command;
76
  uint32_t  length;
77
  uint32_t  address;
78
  uint32_t  data_h;
79
  uint32_t  data_l;
80
};
81 485 markom
 
82 1748 jeremybenn
struct jtr_read_block_message {
83
  uint32_t  command;
84
  uint32_t  length;
85
  uint32_t  address;
86
  int32_t   num_regs;
87
};
88 485 markom
 
89 1748 jeremybenn
struct jtr_write_block_message {
90
  uint32_t  command;
91
  uint32_t  length;
92
  uint32_t  address;
93
  int32_t   num_regs;
94
  uint32_t  data[1];
95
};
96 485 markom
 
97 1748 jeremybenn
struct jtr_chain_message {
98
  uint32_t  command;
99
  uint32_t  length;
100
  uint32_t  chain;
101
};
102 485 markom
 
103 1748 jeremybenn
/* The responses are messages specific, however convention states the first
104
   word should be an error code. Again, sticking with 32 bit integers should
105
   provide maximum portability. */
106 485 markom
 
107 1748 jeremybenn
struct jtr_failure_response {
108
  int32_t  status;
109
};
110 485 markom
 
111 1748 jeremybenn
struct jtr_read_response {
112
  int32_t   status;
113
  uint32_t  data_h;
114
  uint32_t  data_l;
115
};
116 485 markom
 
117 1748 jeremybenn
struct jtr_write_response {
118
  int32_t  status;
119
};
120 485 markom
 
121 1748 jeremybenn
struct jtr_read_block_response {
122
  int32_t   status;
123
  int32_t   num_regs;
124
  uint32_t  data[1];
125
};
126 485 markom
 
127 1748 jeremybenn
struct jtr_write_block_response {
128
  int32_t  status;
129
};
130 485 markom
 
131 1748 jeremybenn
struct jtr_chain_response {
132
  int32_t  status;
133
};
134
 
135
 
136
#endif  /* GDB__H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.