summaryrefslogtreecommitdiffstats
path: root/apps/common/monlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/common/monlib.h')
-rw-r--r--apps/common/monlib.h234
1 files changed, 117 insertions, 117 deletions
diff --git a/apps/common/monlib.h b/apps/common/monlib.h
index 10e37f4..b1765db 100644
--- a/apps/common/monlib.h
+++ b/apps/common/monlib.h
@@ -1,22 +1,22 @@
/* monlib.h:
- * This header file is used by both the monitor and the application that
- * may reside on top of the monitor.
- * General notice:
- * This code is part of a boot-monitor package developed as a generic base
- * platform for embedded system designs. As such, it is likely to be
- * distributed to various projects beyond the control of the original
- * author. Please notify the author of any enhancements made or bugs found
- * so that all may benefit from the changes. In addition, notification back
- * to the author will allow the new user to pick up changes that may have
- * been made by other users after this version of the code was distributed.
+ * This header file is used by both the monitor and the application that
+ * may reside on top of the monitor.
+ * General notice:
+ * This code is part of a boot-monitor package developed as a generic base
+ * platform for embedded system designs. As such, it is likely to be
+ * distributed to various projects beyond the control of the original
+ * author. Please notify the author of any enhancements made or bugs found
+ * so that all may benefit from the changes. In addition, notification back
+ * to the author will allow the new user to pick up changes that may have
+ * been made by other users after this version of the code was distributed.
*
- * Note1: the majority of this code was edited with 4-space tabs.
- * Note2: as more and more contributions are accepted, the term "author"
- * is becoming a mis-representation of credit.
+ * Note1: the majority of this code was edited with 4-space tabs.
+ * Note2: as more and more contributions are accepted, the term "author"
+ * is becoming a mis-representation of credit.
*
- * Original author: Ed Sutter
- * Email: esutter@lucent.com
- * Phone: 908-582-2351
+ * Original author: Ed Sutter
+ * Email: esutter@lucent.com
+ * Phone: 908-582-2351
*/
#ifndef _MONLIB_H_
#define _MONLIB_H_
@@ -30,7 +30,7 @@ extern "C" {
extern int monConnect(int (*monptr)(int,void *,void *,void *),
- void (*lock)(void),void (*unlock)(void));
+ void (*lock)(void),void (*unlock)(void));
extern void mon_getargv(int *argc,char ***argv);
extern void mon_intsrestore(unsigned long oldval);
extern void mon_appexit(int exit_value);
@@ -44,7 +44,7 @@ extern void mon_printmem(char *mem, int size, int ascii);
extern int mon_com(int cmd,void *arg1,void *arg2,void *arg3);
-extern int mon_timer(int cmd, void * arg);
+extern int mon_timer(int cmd, void *arg);
extern int mon_setenv(char *varname,char *value);
extern int mon_putchar(char c);
extern int mon_getchar(void);
@@ -71,13 +71,13 @@ extern int mon_getline(char *buffer,int max,int ledit);
extern int mon_decompress(char *src,int srcsize,char *dest);
extern int mon_heapextend(char *base,int size);
extern int mon_pcicfgwrite(int interface,int bus,int dev,int func,int reg,
- unsigned long val);
+ unsigned long val);
extern int mon_tfsadd(char *filename, char *info, char *flags,
- unsigned char *src, int size);
+ unsigned char *src, int size);
extern int mon_i2cwrite(int interface, int bigaddr, unsigned char *data,
- int len);
+ int len);
extern int mon_i2cread(int interface, int bigaddr, unsigned char *data,
- int len);
+ int len);
extern int mon_sendenetpkt(char *pkt, int len);
extern int mon_recvenetpkt(char *pkt, int len);
extern int mon_flashoverride(void *flashinfo, int get, int bank);
@@ -108,16 +108,16 @@ extern unsigned short mon_xcrc16(char *buffer,long length);
extern unsigned long mon_intsoff(void);
extern unsigned long mon_pcicfgread(int interface,int bus,int dev,
- int func,int reg);
+ int func,int reg);
extern unsigned long mon_pcictrl(int interface, int cmd,
- unsigned long arg1, unsigned long arg2);
+ unsigned long arg1, unsigned long arg2);
extern unsigned long mon_i2cctrl(int interface, int cmd,
- unsigned long arg1, unsigned long arg2);
+ unsigned long arg1, unsigned long arg2);
extern unsigned long mon_assignhandler(long hnum,
- unsigned long arg1,unsigned long arg2);
+ unsigned long arg1,unsigned long arg2);
extern struct tfshdr *mon_tfsnext(struct tfshdr *tfp);
extern struct tfshdr *mon_tfsstat(char *filename);
@@ -141,99 +141,99 @@ extern int mon_sprintf();
/* defines used by monConnect():
*/
-#define GETMONFUNC_PUTCHAR 1
-#define GETMONFUNC_GETCHAR 2
-#define GETMONFUNC_GOTACHAR 3
-#define GETMONFUNC_GETBYTES 4
-#define GETMONFUNC_PRINTF 5
-#define GETMONFUNC_CPRINTF 6
-#define GETMONFUNC_SPRINTF 7
-#define GETMONFUNC_RESTART 8
-#define GETMONFUNC_GETENV 9
-#define GETMONFUNC_SETENV 10
-#define GETMONFUNC_TFSINIT 11
-#define GETMONFUNC_TFSADD 12
-#define GETMONFUNC_TFSUNLINK 13
-#define GETMONFUNC_TFSRUN 14
-#define GETMONFUNC_TFSNEXT 15
-#define GETMONFUNC_TFSSTAT 16
-#define GETMONFUNC_TFSREAD 17
-#define GETMONFUNC_TFSWRITE 18
-#define GETMONFUNC_TFSOPEN 19
-#define GETMONFUNC_TFSCLOSE 20
-#define GETMONFUNC_TFSSEEK 21
-#define GETMONFUNC_TFSGETLINE 22
-#define GETMONFUNC_TFSIPMOD 23
-#define GETMONFUNC_TFSCTRL 24
-#define GETMONFUNC_ADDCOMMAND 25
-#define GETMONFUNC_DOCOMMAND 26
-#define GETMONFUNC_GETARGV 27
-#define GETMONFUNC_CRC16 28
-#define GETMONFUNC_CRC32 29
-#define GETMONFUNC_PIOGET 30 /* NA (removed as of 1.0) */
-#define GETMONFUNC_PIOSET 31 /* NA (removed as of 1.0) */
-#define GETMONFUNC_PIOCLR 32 /* NA (removed as of 1.0) */
-#define GETMONFUNC_INTSOFF 33
-#define GETMONFUNC_INTSRESTORE 34
-#define GETMONFUNC_APPEXIT 35
-#define GETMONFUNC_MALLOC 36
-#define GETMONFUNC_FREE 37
-#define GETMONFUNC_GETLINE 38
-#define GETMONFUNC_TFSFSTAT 39
-#define GETMONFUNC_TFSEOF 40
-#define GETMONFUNC_DECOMPRESS 41
-#define GETMONFUNC_TFSTRUNCATE 42
-#define GETMONFUNC_HEAPXTEND 43
-#define GETMONFUNC_PROFILER 44
-#define GETMONFUNC_TFSLINK 45
-#define GETMONFUNC_BBC 46
-#define GETMONFUNC_MEMTRACE 47
-#define GETMONFUNC_TFSTELL 48
-#define GETMONFUNC_VERSION 49
-#define GETMONFUNC_WARMSTART 50
-#define GETMONFUNC_PCICFGREAD 51
-#define GETMONFUNC_PCICFGWRITE 52
-#define GETMONFUNC_PCICONTROL 53
-#define GETMONFUNC_I2CREAD 54
-#define GETMONFUNC_I2CWRITE 55
-#define GETMONFUNC_I2CCONTROL 56
-#define GETMONFUNC_MONDELAY 57
-#define GETMONFUNC_GETENVP 58
-#define GETMONFUNC_REALLOC 59
-#define GETMONFUNC_SENDENETPKT 60
-#define GETMONFUNC_RECVENETPKT 61
-#define GETMONFUNC_GETSYM 62
-#define GETMONFUNC_PRINTPKT 63
-#define GETMONFUNC_FLASHWRITE 64
-#define GETMONFUNC_FLASHERASE 65
-#define GETMONFUNC_FLASHINFO 66
-#define GETMONFUNC_ASSIGNHDLR 67
-#define GETMONFUNC_WATCHDOG 68
-#define GETMONFUNC_PRINTMEM 69
-#define GETMONFUNC_PORTCMD 70
-#define GETMONFUNC_TIMEOFDAY 71
-#define GETMONFUNC_TIMER 72
-#define GETMONFUNC_FLASHOVRRD 73
-
-#define CACHEFTYPE_DFLUSH 200
-#define CACHEFTYPE_IINVALIDATE 201
-
-#define CHARFUNC_PUTCHAR 300
-#define CHARFUNC_GETCHAR 301
-#define CHARFUNC_GOTACHAR 302
-#define CHARFUNC_RAWMODEON 303
-#define CHARFUNC_RAWMODEOFF 304
-
-#define ASSIGNFUNC_GETUSERLEVEL 400
+#define GETMONFUNC_PUTCHAR 1
+#define GETMONFUNC_GETCHAR 2
+#define GETMONFUNC_GOTACHAR 3
+#define GETMONFUNC_GETBYTES 4
+#define GETMONFUNC_PRINTF 5
+#define GETMONFUNC_CPRINTF 6
+#define GETMONFUNC_SPRINTF 7
+#define GETMONFUNC_RESTART 8
+#define GETMONFUNC_GETENV 9
+#define GETMONFUNC_SETENV 10
+#define GETMONFUNC_TFSINIT 11
+#define GETMONFUNC_TFSADD 12
+#define GETMONFUNC_TFSUNLINK 13
+#define GETMONFUNC_TFSRUN 14
+#define GETMONFUNC_TFSNEXT 15
+#define GETMONFUNC_TFSSTAT 16
+#define GETMONFUNC_TFSREAD 17
+#define GETMONFUNC_TFSWRITE 18
+#define GETMONFUNC_TFSOPEN 19
+#define GETMONFUNC_TFSCLOSE 20
+#define GETMONFUNC_TFSSEEK 21
+#define GETMONFUNC_TFSGETLINE 22
+#define GETMONFUNC_TFSIPMOD 23
+#define GETMONFUNC_TFSCTRL 24
+#define GETMONFUNC_ADDCOMMAND 25
+#define GETMONFUNC_DOCOMMAND 26
+#define GETMONFUNC_GETARGV 27
+#define GETMONFUNC_CRC16 28
+#define GETMONFUNC_CRC32 29
+#define GETMONFUNC_PIOGET 30 /* NA (removed as of 1.0) */
+#define GETMONFUNC_PIOSET 31 /* NA (removed as of 1.0) */
+#define GETMONFUNC_PIOCLR 32 /* NA (removed as of 1.0) */
+#define GETMONFUNC_INTSOFF 33
+#define GETMONFUNC_INTSRESTORE 34
+#define GETMONFUNC_APPEXIT 35
+#define GETMONFUNC_MALLOC 36
+#define GETMONFUNC_FREE 37
+#define GETMONFUNC_GETLINE 38
+#define GETMONFUNC_TFSFSTAT 39
+#define GETMONFUNC_TFSEOF 40
+#define GETMONFUNC_DECOMPRESS 41
+#define GETMONFUNC_TFSTRUNCATE 42
+#define GETMONFUNC_HEAPXTEND 43
+#define GETMONFUNC_PROFILER 44
+#define GETMONFUNC_TFSLINK 45
+#define GETMONFUNC_BBC 46
+#define GETMONFUNC_MEMTRACE 47
+#define GETMONFUNC_TFSTELL 48
+#define GETMONFUNC_VERSION 49
+#define GETMONFUNC_WARMSTART 50
+#define GETMONFUNC_PCICFGREAD 51
+#define GETMONFUNC_PCICFGWRITE 52
+#define GETMONFUNC_PCICONTROL 53
+#define GETMONFUNC_I2CREAD 54
+#define GETMONFUNC_I2CWRITE 55
+#define GETMONFUNC_I2CCONTROL 56
+#define GETMONFUNC_MONDELAY 57
+#define GETMONFUNC_GETENVP 58
+#define GETMONFUNC_REALLOC 59
+#define GETMONFUNC_SENDENETPKT 60
+#define GETMONFUNC_RECVENETPKT 61
+#define GETMONFUNC_GETSYM 62
+#define GETMONFUNC_PRINTPKT 63
+#define GETMONFUNC_FLASHWRITE 64
+#define GETMONFUNC_FLASHERASE 65
+#define GETMONFUNC_FLASHINFO 66
+#define GETMONFUNC_ASSIGNHDLR 67
+#define GETMONFUNC_WATCHDOG 68
+#define GETMONFUNC_PRINTMEM 69
+#define GETMONFUNC_PORTCMD 70
+#define GETMONFUNC_TIMEOFDAY 71
+#define GETMONFUNC_TIMER 72
+#define GETMONFUNC_FLASHOVRRD 73
+
+#define CACHEFTYPE_DFLUSH 200
+#define CACHEFTYPE_IINVALIDATE 201
+
+#define CHARFUNC_PUTCHAR 300
+#define CHARFUNC_GETCHAR 301
+#define CHARFUNC_GOTACHAR 302
+#define CHARFUNC_RAWMODEON 303
+#define CHARFUNC_RAWMODEOFF 304
+
+#define ASSIGNFUNC_GETUSERLEVEL 400
/* Defines used by mon_warmstart():
*/
-#define WARMSTART_IOINIT 0x00000001
-#define WARMSTART_BSSINIT 0x00000002
-#define WARMSTART_RUNMONRC 0x00000004
-#define WARMSTART_MONHEADER 0x00000008
-#define WARMSTART_TFSAUTOBOOT 0x00000010
-#define WARMSTART_BOARDINFO 0x00000020
-#define WARMSTART_ALL 0xffffffff
+#define WARMSTART_IOINIT 0x00000001
+#define WARMSTART_BSSINIT 0x00000002
+#define WARMSTART_RUNMONRC 0x00000004
+#define WARMSTART_MONHEADER 0x00000008
+#define WARMSTART_TFSAUTOBOOT 0x00000010
+#define WARMSTART_BOARDINFO 0x00000020
+#define WARMSTART_ALL 0xffffffff
#endif