Annotation of sys/arch/mvme88k/include/prom.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: prom.h,v 1.16 2006/05/16 22:51:28 miod Exp $ */
2: /*
3: * Copyright (c) 1998 Steve Murphree, Jr.
4: * Copyright (c) 1996 Nivas Madhur
5: * Copyright (c) 1995 Theo de Raadt
6: * All rights reserved.
7: *
8: * Redistribution and use in source and binary forms, with or without
9: * modification, are permitted provided that the following conditions
10: * are met:
11: * 1. Redistributions of source code must retain the above copyright
12: * notice, this list of conditions and the following disclaimer.
13: * 2. Redistributions in binary form must reproduce the above copyright
14: * notice, this list of conditions and the following disclaimer in the
15: * documentation and/or other materials provided with the distribution.
16: * 3. The name of the author may not be used to endorse or promote products
17: * derived from this software without specific prior written permission.
18: *
19: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29: */
30: #ifndef __MACHINE_PROM_H__
31: #define __MACHINE_PROM_H__
32:
33: /* BUG trap vector */
34: #define MVMEPROM_VECTOR 496
35:
36: #define MVMEPROM_INCHR 0x00
37: #define MVMEPROM_INSTAT 0x01
38: #define MVMEPROM_INLN 0x02
39: #define MVMEPROM_READSTR 0x03
40: #define MVMEPROM_READLN 0x04
41: #define MVMEPROM_DSKRD 0x10
42: #define MVMEPROM_DSKWR 0x11
43: #define MVMEPROM_DSKCFIG 0x12
44: #define MVMEPROM_DSKFMT 0x14
45: #define MVMEPROM_DSKCTRL 0x15
46: #define MVMEPROM_NETFOPEN 0x1b
47: #define MVMEPROM_NETFREAD 0x1c
48: #define MVMEPROM_NETCTRL 0x1d
49: #define MVMEPROM_OUTCHR 0x20
50: #define MVMEPROM_OUTSTR 0x21
51: #define MVMEPROM_OUTSTRCRLF 0x22
52: #define MVMEPROM_WRITE 0x23
53: #define MVMEPROM_WRITELN 0x24
54: #define MVMEPROM_OUTCRLF 0x26
55: #define MVMEPROM_DELAY 0x43
56: #define MVMEPROM_RTC_RD 0x53
57: #define MVMEPROM_EXIT 0x63
58: #define MVMEPROM_GETBRDID 0x70
59: #define MVMEPROM_ENVIRON 0x71
60: #define MVMEPROM_FORKMPU 0x100
61:
62: #define NETCTRLCMD_GETETHER 1
63:
64: #define ENVIRONCMD_WRITE 1
65: #define ENVIRONCMD_READ 2
66: #define ENVIRONTYPE_EOL 0
67: #define ENVIRONTYPE_START 1
68: #define ENVIRONTYPE_DISKBOOT 2
69: #define ENVIRONTYPE_ROMBOOT 3
70: #define ENVIRONTYPE_NETBOOT 4
71: #define ENVIRONTYPE_MEMSIZE 5
72:
73: #define FORKMPU_NOT_IDLE -1
74: #define FORKMPU_BAD_ADDRESS -2
75: #define FORKMPU_NO_MPU -3
76:
77: #ifndef LOCORE
78: struct mvmeprom_netctrl {
79: u_char ctrl;
80: u_char dev;
81: u_short status;
82: u_long cmd;
83: u_long addr;
84: u_long len;
85: u_long flags;
86: };
87:
88: struct mvmeprom_netfopen {
89: u_char ctrl;
90: u_char dev;
91: u_short status;
92: char filename[64];
93: };
94:
95: struct mvmeprom_netfread {
96: u_char ctrl;
97: u_char dev;
98: u_short status;
99: u_long addr;
100: u_short bytes;
101: u_short blk;
102: u_long timeout;
103: };
104:
105: struct prom_environ_hdr {
106: u_char type;
107: u_char len;
108: };
109:
110: struct mvmeprom_brdid {
111: u_long eye_catcher;
112: u_char rev;
113: u_char month;
114: u_char day;
115: u_char year;
116: u_short size;
117: u_short rsv1;
118: u_short model;
119: u_char suffix[2];
120: u_short options;
121: u_char family;
122: u_char cpu;
123: u_short ctrlun;
124: u_short devlun;
125: u_short devtype;
126: u_short devnum;
127: u_long bug;
128: u_char version[4];
129: u_char serial[12]; /* SBC serial number */
130: u_char id[16]; /* SBC id */
131: u_char pwa[16]; /* printed wiring assembly number */
132: u_char speed[4]; /* cpu speed */
133: u_char etheraddr[6]; /* mac address, all zero if no ether */
134: u_char fill[2];
135: u_char scsiid[2]; /* local SCSI id */
136: u_char sysid[8]; /* system id - nothing on mvme187 */
137: u_char brd1_pwb[8]; /* memory board 1 pwb */
138: u_char brd1_serial[8]; /* memory board 1 serial */
139: u_char brd2_pwb[8]; /* memory board 2 pwb */
140: u_char brd2_serial[8]; /* memory board 2 serial */
141: u_char reserved[153];
142: u_char cksum[1];
143: };
144:
145: struct mvmeprom_time {
146: u_char year_BCD;
147: u_char month_BCD;
148: u_char day_BCD;
149: u_char wday_BCD;
150: u_char hour_BCD;
151: u_char min_BCD;
152: u_char sec_BCD;
153: u_char cal_BCD;
154: };
155:
156: struct mvmeprom_dskio {
157: u_char ctrl_lun;
158: u_char dev_lun;
159: u_short status;
160: void *pbuffer;
161: u_long blk_num;
162: u_short blk_cnt;
163: u_char flag;
164: #define BUG_FILE_MARK 0x80
165: #define IGNORE_FILENUM 0x02
166: #define END_OF_FILE 0x01
167: u_char addr_mod;
168: };
169: #define MVMEPROM_BLOCK_SIZE 256
170:
171: extern unsigned long bugvec[2], sysbugvec[2]; /* BUG trap vector copies */
172:
173: #endif /* _LOCORE */
174:
175: #ifndef RB_NOSYM
176: #define RB_NOSYM 0x4000
177: #endif
178: #endif /* __MACHINE_PROM_H__ */
CVSweb