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