eeprom.h revision 1.1 1 1.1 thorpej /* $NetBSD: eeprom.h,v 1.1 2005/06/19 20:23:48 thorpej Exp $ */
2 1.1 thorpej
3 1.1 thorpej /*-
4 1.1 thorpej * Copyright (c) 1996 The NetBSD Foundation, Inc.
5 1.1 thorpej * All rights reserved.
6 1.1 thorpej *
7 1.1 thorpej * This code is derived from software contributed to The NetBSD Foundation
8 1.1 thorpej * by Gordon W. Ross.
9 1.1 thorpej *
10 1.1 thorpej * Redistribution and use in source and binary forms, with or without
11 1.1 thorpej * modification, are permitted provided that the following conditions
12 1.1 thorpej * are met:
13 1.1 thorpej * 1. Redistributions of source code must retain the above copyright
14 1.1 thorpej * notice, this list of conditions and the following disclaimer.
15 1.1 thorpej * 2. Redistributions in binary form must reproduce the above copyright
16 1.1 thorpej * notice, this list of conditions and the following disclaimer in the
17 1.1 thorpej * documentation and/or other materials provided with the distribution.
18 1.1 thorpej * 3. All advertising materials mentioning features or use of this software
19 1.1 thorpej * must display the following acknowledgement:
20 1.1 thorpej * This product includes software developed by the NetBSD
21 1.1 thorpej * Foundation, Inc. and its contributors.
22 1.1 thorpej * 4. Neither the name of The NetBSD Foundation nor the names of its
23 1.1 thorpej * contributors may be used to endorse or promote products derived
24 1.1 thorpej * from this software without specific prior written permission.
25 1.1 thorpej *
26 1.1 thorpej * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 1.1 thorpej * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 1.1 thorpej * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 1.1 thorpej * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 1.1 thorpej * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 1.1 thorpej * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 1.1 thorpej * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 1.1 thorpej * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 1.1 thorpej * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 1.1 thorpej * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 1.1 thorpej * POSSIBILITY OF SUCH DAMAGE.
37 1.1 thorpej */
38 1.1 thorpej
39 1.1 thorpej #ifndef _DEV_SUN_EEPROM_H_
40 1.1 thorpej #define _DEV_SUN_EEPROM_H_
41 1.1 thorpej
42 1.1 thorpej /*
43 1.1 thorpej * Structure/definitions for the Sun3/Sun4 EEPROM.
44 1.1 thorpej *
45 1.1 thorpej * This information is published in the Sun document:
46 1.1 thorpej * "PROM User's Manual", part number 800-1736010.
47 1.1 thorpej */
48 1.1 thorpej
49 1.1 thorpej /*
50 1.1 thorpej * Note that most places where the PROM stores a "true/false" flag,
51 1.1 thorpej * the true value is 0x12 and false is the usual zero. Such flags
52 1.1 thorpej * all take the values EE_TRUE or EE_FALSE so this file does not
53 1.1 thorpej * need to define so many value macros.
54 1.1 thorpej */
55 1.1 thorpej #define EE_TRUE 0x12
56 1.1 thorpej #define EE_FALSE 0
57 1.1 thorpej
58 1.1 thorpej struct eeprom {
59 1.1 thorpej
60 1.1 thorpej /* 0x00 */
61 1.1 thorpej uint8_t eeTestArea[4]; /* Factory Defined */
62 1.1 thorpej uint16_t eeWriteCount[4]; /* || || */
63 1.1 thorpej uint8_t eeChecksum[4]; /* || || */
64 1.1 thorpej uint32_t eeLastHwUpdate; /* || || */
65 1.1 thorpej
66 1.1 thorpej /* 0x14 */
67 1.1 thorpej uint8_t eeInstalledMem; /* Megabytes */
68 1.1 thorpej uint8_t eeMemTestSize; /* || */
69 1.1 thorpej
70 1.1 thorpej /* 0x16 */
71 1.1 thorpej uint8_t eeScreenSize;
72 1.1 thorpej #define EE_SCR_1152X900 0x00
73 1.1 thorpej #define EE_SCR_1024X1024 0x12
74 1.1 thorpej #define EE_SCR_1600X1280 0x13
75 1.1 thorpej #define EE_SCR_1440X1440 0x14
76 1.1 thorpej
77 1.1 thorpej uint8_t eeWatchDogDoesReset; /* Watchdog timeout action:
78 1.1 thorpej * true: reset/reboot
79 1.1 thorpej * false: return to monitor
80 1.1 thorpej */
81 1.1 thorpej /* 0x18 */
82 1.1 thorpej uint8_t eeBootDevStored; /* Is the boot device stored:
83 1.1 thorpej * true: use stored device spec.
84 1.1 thorpej * false: use default (try all)
85 1.1 thorpej */
86 1.1 thorpej /* 0x19 */
87 1.1 thorpej /* Stored boot device spec. i.e.: "sd(Ctlr,Unit,Part)" */
88 1.1 thorpej uint8_t eeBootDevName[2]; /* xy,xd,sd,ie,le,st,xt,mt,... */
89 1.1 thorpej uint8_t eeBootDevCtlr;
90 1.1 thorpej uint8_t eeBootDevUnit;
91 1.1 thorpej uint8_t eeBootDevPart;
92 1.1 thorpej
93 1.1 thorpej /* 0x1E */
94 1.1 thorpej uint8_t eeKeyboardType; /* zero for sun keyboards */
95 1.1 thorpej
96 1.1 thorpej /* 0x1F */
97 1.1 thorpej uint8_t eeConsole; /* What to use for the console */
98 1.1 thorpej #define EE_CONS_BW 0x00 /* - On-board B&W / keyboard */
99 1.1 thorpej #define EE_CONS_TTYA 0x10 /* - serial port A */
100 1.1 thorpej #define EE_CONS_TTYB 0x11 /* - serial port B */
101 1.1 thorpej #define EE_CONS_COLOR 0x12 /* - Color FB / keyboard */
102 1.1 thorpej #define EE_CONS_P4OPT 0x20 /* - Option board on P4 */
103 1.1 thorpej
104 1.1 thorpej /* 0x20 */
105 1.1 thorpej uint8_t eeCustomBanner; /* Is there a custom banner:
106 1.1 thorpej * true: use text at 0x68
107 1.1 thorpej * false: use Sun banner
108 1.1 thorpej */
109 1.1 thorpej
110 1.1 thorpej uint8_t eeKeyClick; /* true/false */
111 1.1 thorpej
112 1.1 thorpej /* 0x22 */
113 1.1 thorpej /* Boot device with "Diag" switch in Diagnostic mode: */
114 1.1 thorpej uint8_t eeDiagDevName[2];
115 1.1 thorpej uint8_t eeDiagDevCtlr;
116 1.1 thorpej uint8_t eeDiagDevUnit;
117 1.1 thorpej uint8_t eeDiagDevPart;
118 1.1 thorpej
119 1.1 thorpej /* Video white-on-black (not implemented) */
120 1.1 thorpej uint8_t eeWhiteOnBlack; /* true/false */
121 1.1 thorpej
122 1.1 thorpej /* 0x28 */
123 1.1 thorpej char eeDiagPath[40]; /* path name of diag program */
124 1.1 thorpej
125 1.1 thorpej /* 0x50 */
126 1.1 thorpej uint8_t eeTtyCols; /* normally 80 (0x50) */
127 1.1 thorpej uint8_t eeTtyRows; /* normally 34 (0x22) */
128 1.1 thorpej uint8_t ee_x52[6]; /* unused */
129 1.1 thorpej
130 1.1 thorpej /* 0x58 */
131 1.1 thorpej /* Default parameters for tty A and tty B: */
132 1.1 thorpej struct eeTtyDef {
133 1.1 thorpej uint8_t eetBaudSet; /* Is the baud rate set?
134 1.1 thorpej * true: use values here
135 1.1 thorpej * false: use default (9600)
136 1.1 thorpej */
137 1.1 thorpej uint8_t eetBaudHi; /* i.e. 96.. */
138 1.1 thorpej uint8_t eetBaudLo; /* ..00 */
139 1.1 thorpej uint8_t eetNoRtsDtr; /* true: disable H/W flow
140 1.1 thorpej * false: enable H/W flow */
141 1.1 thorpej uint8_t eet_pad[4];
142 1.1 thorpej } eeTtyDefA, eeTtyDefB;
143 1.1 thorpej
144 1.1 thorpej /* 0x68 */
145 1.1 thorpej char eeBannerString[80]; /* see eeCustomBanner above */
146 1.1 thorpej
147 1.1 thorpej /* 0xB8 */
148 1.1 thorpej uint16_t eeTestPattern; /* must be 0xAA55 */
149 1.1 thorpej uint16_t ee_xBA; /* unused */
150 1.1 thorpej
151 1.1 thorpej /* 0xBC */
152 1.1 thorpej /* Configuration data. Hopefully we don't need it. */
153 1.1 thorpej struct eeConf {
154 1.1 thorpej uint8_t eecData[16];
155 1.1 thorpej } eeConf[12+1];
156 1.1 thorpej
157 1.1 thorpej /* 0x18c */
158 1.1 thorpej uint8_t eeAltKeyTable; /* What Key table to use:
159 1.1 thorpej * 0x58: EEPROM tables
160 1.1 thorpej * else: PROM key tables
161 1.1 thorpej */
162 1.1 thorpej uint8_t eeKeyboardLocale; /* extended keyboard type */
163 1.1 thorpej uint8_t eeKeyboardID; /* for EEPROM key tables */
164 1.1 thorpej uint8_t eeCustomLogo; /* true: use eeLogoBitmap */
165 1.1 thorpej
166 1.1 thorpej /* 0x190 */
167 1.1 thorpej uint8_t eeKeymapLC[0x80];
168 1.1 thorpej uint8_t eeKeymapUC[0x80];
169 1.1 thorpej
170 1.1 thorpej /* 0x290 */
171 1.1 thorpej uint8_t eeLogoBitmap[64][8]; /* 64x64 bit custom logo */
172 1.1 thorpej
173 1.1 thorpej /* 0x490 */
174 1.1 thorpej uint8_t ee_x490[2]; /* unused */
175 1.1 thorpej
176 1.1 thorpej /* 0x492 */
177 1.1 thorpej uint8_t ee_passwd_mode; /* Only (ROM rev > 2.7.0)
178 1.1 thorpej * 0x5E = fully secure mode
179 1.1 thorpej * 0x01 = command secure mode
180 1.1 thorpej * Rest = non-secure mode
181 1.1 thorpej */
182 1.1 thorpej uint8_t ee_password[8];
183 1.1 thorpej uint8_t ee_x49b[0x500-0x49b]; /* unused */
184 1.1 thorpej
185 1.1 thorpej /* 0x500 */
186 1.1 thorpej uint8_t eeReserved[0x100];
187 1.1 thorpej
188 1.1 thorpej /* 0x600 */
189 1.1 thorpej uint8_t eeROM_Area[0x100];
190 1.1 thorpej
191 1.1 thorpej /* 0x700 */
192 1.1 thorpej /* "Unix area" (hah!) */
193 1.1 thorpej uint8_t ee_x700[0xb]; /* unused */
194 1.1 thorpej /* 0x70b */
195 1.1 thorpej uint8_t ee_diag_mode; /* 3/80 diag switch:
196 1.1 thorpej * 0x06 = normal boot
197 1.1 thorpej * 0x12 = diagnostic mode
198 1.1 thorpej * Rest = full diagnostic boot
199 1.1 thorpej */
200 1.1 thorpej /* 0x70c */
201 1.1 thorpej uint8_t ee_x70c[0x7d8-0x70c]; /* unused */
202 1.1 thorpej
203 1.1 thorpej /* 0x7d8 */
204 1.1 thorpej uint8_t ee_80_IDPROM[32]; /* 3/80 IDPROM */
205 1.1 thorpej /* 0x7f8 */
206 1.1 thorpej uint8_t ee_80_CLOCK[8]; /* 3/80 clock */
207 1.1 thorpej };
208 1.1 thorpej
209 1.1 thorpej #endif /* _DEV_SUN_EEPROM_H_ */
210