Annotation of sys/arch/sparc64/include/eeprom.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: eeprom.h,v 1.4 2007/04/10 17:47:55 miod Exp $ */
2: /* $NetBSD: eeprom.h,v 1.2 1999/12/30 16:25:17 eeh Exp $ */
3:
4: /*
5: * Copyright (c) 1994 Gordon W. Ross
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:
31: /*
32: * Structure/definitions for the Sun3/Sun4 EEPROM.
33: *
34: * This information is published in the Sun document:
35: * "PROM User's Manual", part number 800-1736010.
36: */
37:
38:
39: /*
40: * Note that most places where the PROM stores a "true/false" flag,
41: * the true value is 0x12 and false is the usual zero. Such flags
42: * all take the values EE_TRUE or EE_FALSE so this file does not
43: * need to define so many value macros.
44: */
45: #define EE_TRUE 0x12
46: #define EE_FALSE 0
47:
48: struct eeprom {
49:
50: /* 0x00 */
51: u_char eeTestArea[4]; /* Factory Defined */
52: u_short eeWriteCount[4]; /* || || */
53: u_char eeChecksum[4]; /* || || */
54: u_int32_t eeLastHwUpdate; /* || || */
55:
56: /* 0x14 */
57: u_char eeInstalledMem; /* Megabytes */
58: u_char eeMemTestSize; /* || */
59:
60: /* 0x16 */
61: u_char eeScreenSize;
62: #define EE_SCR_1152X900 0x00
63: #define EE_SCR_1024X1024 0x12
64: #define EE_SCR_1600X1280 0x13
65: #define EE_SCR_1440X1440 0x14
66:
67: u_char eeWatchDogDoesReset; /* Watchdog timeout action:
68: * true: reset/reboot
69: * false: return to monitor
70: */
71: /* 0x18 */
72: u_char eeBootDevStored; /* Is the boot device stored:
73: * true: use stored device spec.
74: * false: use default (try all)
75: */
76: /* Stored boot device spec. i.e.: "sd(Ctlr,Unit,Part)" */
77: u_char eeBootDevName[2]; /* xy,xd,sd,ie,le,st,xt,mt,... */
78: u_char eeBootDevCtlr;
79: u_char eeBootDevUnit;
80: u_char eeBootDevPart;
81:
82: /* 0x1E */
83: u_char eeKeyboardType; /* zero for sun keyboards */
84: u_char eeConsole; /* What to use for the console */
85: #define EE_CONS_BW 0x00 /* - On-board B&W / keyboard */
86: #define EE_CONS_TTYA 0x10 /* - serial port A */
87: #define EE_CONS_TTYB 0x11 /* - serial port B */
88: #define EE_CONS_COLOR 0x12 /* - Color FB / keyboard */
89: #define EE_CONS_P4OPT 0x20 /* - Option board on P4 */
90:
91: /* 0x20 */
92: u_char eeCustomBanner; /* Is there a custom banner:
93: * true: use text at 0x68
94: * false: use Sun banner
95: */
96:
97: u_char eeKeyClick; /* true/false */
98:
99: /* Boot device with "Diag" switch in Diagnostic mode: */
100: u_char eeDiagDevName[2];
101: u_char eeDiagDevCtlr;
102: u_char eeDiagDevUnit;
103: u_char eeDiagDevPart;
104:
105: /* Video white-on-black (not implemented) */
106: u_char eeWhiteOnBlack; /* true/false */
107:
108: /* 0x28 */
109: char eeDiagPath[40]; /* path name of diag program */
110:
111: /* 0x50 */
112: u_char eeTtyCols; /* normally 80 */
113: u_char eeTtyRows; /* normally 34 */
114: u_char ee_x52[6]; /* unused */
115:
116: /* 0x58 */
117: /* Default parameters for tty A and tty B: */
118: struct eeTtyDef {
119: u_char eetBaudSet; /* Is the baud rate set?
120: * true: use values here
121: * false: use default (9600)
122: */
123: u_char eetBaudHi; /* i.e. 96.. */
124: u_char eetBaudLo; /* ..00 */
125: u_char eetNoRtsDtr; /* true: disable H/W flow
126: * false: enable H/W flow */
127: u_char eet_pad[4];
128: } eeTtyDefA, eeTtyDefB;
129:
130: /* 0x68 */
131: char eeBannerString[80]; /* see eeCustomBanner above */
132:
133: /* 0xB8 */
134: u_short eeTestPattern; /* must be 0xAA55 */
135: u_short ee_xBA; /* unused */
136:
137: /* 0xBC */
138: /* Configuration data. Hopefully we don't need it. */
139: struct eeConf {
140: u_char eecData[16];
141: } eeConf[12+1];
142:
143: /* 0x18c */
144: u_char eeAltKeyTable; /* What Key table to use:
145: * 0x58: EEPROM tables
146: * else: PROM key tables
147: */
148: u_char eeKeyboardLocale; /* extended keyboard type */
149: u_char eeKeyboardID; /* for EEPROM key tables */
150: u_char eeCustomLogo; /* true: use eeLogoBitmap */
151:
152: /* 0x190 */
153: u_char eeKeymapLC[0x80];
154: u_char eeKeymapUC[0x80];
155:
156: /* 0x290 */
157: u_char eeLogoBitmap[64][8]; /* 64x64 bit custom logo */
158:
159: /* 0x490 */
160: u_char ee_x490[0x500-0x490]; /* unused */
161:
162: /* Other stuff we don't care about... */
163: /* 0x500 */
164: u_char eeReserved[0x100];
165: /* 0x600 */
166: u_char eeROM_Area[0x100];
167: /* 0x700 */
168: u_char eeUnixArea[0x100];
169: };
170:
171: /*
172: * The size of the eeprom on machines with the old clock is 2k. However,
173: * on machines with the new clock (and the `eeprom' in the nvram area)
174: * there are only 2040 bytes available. (???). Since we really only
175: * care about the `diagnostic' area, we'll use its size when dealing
176: * with the eeprom in general.
177: */
178: #define EEPROM_SIZE 0x500
179:
180: #ifdef _KERNEL
181: extern char *eeprom_va;
182: int eeprom_uio(struct uio *);
183: #endif /* _KERNEL */
184:
CVSweb