File: main.h

package info (click to toggle)
pm3 1.1.13-11
  • links: PTS
  • area: main
  • in suites: potato
  • size: 174,164 kB
  • ctags: 133,819
  • sloc: ansic: 982,617; modula3: 548,483; cpp: 57,119; exp: 21,673; sh: 17,053; lisp: 13,693; makefile: 13,492; asm: 11,795; yacc: 8,575; sed: 1,100; objc: 476; csh: 254; awk: 223; pascal: 95; fortran: 5
file content (202 lines) | stat: -rw-r--r-- 5,371 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
/* @(#)main.h	5.19 93/07/30 16:39:56, Srini, AMD */
/******************************************************************************
 * Copyright 1991 Advanced Micro Devices, Inc.
 *
 * This software is the property of Advanced Micro Devices, Inc  (AMD)  which
 * specifically  grants the user the right to modify, use and distribute this
 * software provided this notice is not removed or altered.  All other rights
 * are reserved by AMD.
 *
 * AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
 * SOFTWARE.  IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
 * DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
 * USE OF THIS SOFTWARE.
 *
 * So that all may benefit from your experience, please report  any  problems
 * or  suggestions about this software to the 29K Technical Support Center at
 * 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131  in  the  UK,  or
 * 0031-11-1129 in Japan, toll free.  The direct dial number is 512-462-4118.
 *
 * Advanced Micro Devices, Inc.
 * 29K Support Products
 * Mail Stop 573
 * 5900 E. Ben White Blvd.
 * Austin, TX 78741
 * 800-292-9263
 *****************************************************************************
 *      Engineer: Srini Subramanian.
 *****************************************************************************
 * This header file declares the structures defined in main.c
 *****************************************************************************
 */

#ifndef	_MAIN_H_INCLUDED_
#define	_MAIN_H_INCLUDED_

#include  "types.h"

#define TRUE                 1
#define FALSE                0

#define MEM_STACK_SIZE 		0x6000
#define REG_STACK_SIZE 		0x2000

#define	MAXFILENAMELEN	   256

/* Define BIG and LITTLE endian */
#define BIG                  0
#define LITTLE               1

#define	MAX_SESSIONS	10


/*
** Structure for host configuration
*/


struct host_config_t {
   INT32  comm_interface;
   INT32  host_endian;
   INT32  target_endian;
   INT32  PC_port_base;
   INT32  PC_mem_seg;
   char  *comm_port;
   char  *baud_rate;
   char  *version;
   char  *date;
   };
typedef	struct	host_config_t 	HOST_CONFIG;
extern	HOST_CONFIG	host_config;

struct io_config_t {
   INT32  hif;
   INT32  io_control;
   INT32  cmd_ready;
   INT32  clear_to_send;
   INT32  target_running;
   INT32  cmd_file_io;
   INT32  log_mode;
   INT32  echo_mode;
   FILE   *cmd_file;
   char	  cmd_filename[MAXFILENAMELEN];
   FILE   *log_file;
   char	  log_filename[MAXFILENAMELEN];
   FILE   *echo_file;
   char   echo_filename[MAXFILENAMELEN];
   BYTE   io_toggle_char;
   };
typedef	struct	io_config_t	IO_CONFIG;
extern	IO_CONFIG	io_config;

struct	init_info_t {
          ADDR32   text_start;
          ADDR32   text_end;
          ADDR32   data_start;
          ADDR32   data_end;
          ADDR32   entry_point;
          UINT32    mem_stack_size;
          UINT32    reg_stack_size;
	  char	   *argstring;
};
typedef	struct	init_info_t	INIT_INFO;
extern	INIT_INFO	init_info;


struct  versions_etc_t {
          INT32    version;
	  INT32	   os_version;  /* os version is returned here */
	  char     tip_version[12];/*tip_version must not exceed 12 chars*/
	  char     tip_date[12]; /*tip_date must not exceed 12 chars*/
          INT32    max_msg_size;
          INT32    max_bkpts;
};
typedef	struct	versions_etc_t	VERSIONS_ETC;
extern	VERSIONS_ETC	versions_etc;

struct	target_config_t {
          ADDR32   I_mem_start;
          INT32    I_mem_size;
          ADDR32   D_mem_start;
          INT32    D_mem_size;
          ADDR32   ROM_start;
          INT32    ROM_size;
          UINT32    processor_id;
          UINT32    coprocessor;
          INT32    reserved;
};
typedef	struct	target_config_t	TARGET_CONFIG;
extern	TARGET_CONFIG	target_config;

struct	target_status_t {
	  INT32	   status;
          INT32    msgs_sent;
          INT32    msgs_received;
          INT32    errors;
          INT32    bkpts_hit;
          INT32    bkpts_free;
          INT32    traps;
          INT32    fills;
          INT32    spills;
          INT32    cycles;
          INT32    reserved;
};
typedef	struct	target_status_t	TARGET_STATUS;
extern	TARGET_STATUS	target_status;

/*
** Structure a 29K instruction and memory address
*/

struct instr_t {
          BYTE  op;
          BYTE  c;
          BYTE  a;
          BYTE  b;
          };

struct addr_29k_t {
   INT32  memory_space;
   ADDR32 address;
   };

/* The Monitor's stdin, stdout, stderr, at all times */
extern	int	MON_STDIN;
extern	int	MON_STDOUT;
extern	int	MON_STDERR;

/* Variables declared in main.c */
extern	int		QuietMode;
extern	char		*ProgramName;
extern	int		Session_ids[];
extern	int		NumberOfConnections;

/*
** Who controls the keyboard?
*/

#define TERM_29K            (INT32) 0
#define TERM_USER           (INT32) 1

/*
** Processor PRLs
*/

#define PROC_AM29000         0x00
#define PROC_AM29005         0x10
#define PROC_AM29050         0x20
#define PROC_AM29035         0x30
#define PROC_AM29030         0x40
#define PROC_AM29200         0x50
#define PROC_AM29205         0x58
#define	PROC_AM29240	     0x60

#define MESSAGES_ON        0
#define MESSAGES_OFF       1

/* Extern decalarations for global functions defined in main.c */

GLOBAL	void  fatal_error PARAMS((INT32));
GLOBAL	void  warning PARAMS((INT32));

#endif /* _MAIN_H_INCLUDED _ */