1 /* $NetBSD: eeprom.h,v 1.2 2005/12/11 12:23:56 christos Exp $ */
4 * Copyright (c) 1996 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #ifndef _DEV_SUN_EEPROM_H_
33 #define _DEV_SUN_EEPROM_H_
36 * Structure/definitions for the Sun3/Sun4 EEPROM.
38 * This information is published in the Sun document:
39 * "PROM User's Manual", part number 800-1736010.
43 * Note that most places where the PROM stores a "true/false" flag,
44 * the true value is 0x12 and false is the usual zero. Such flags
45 * all take the values EE_TRUE or EE_FALSE so this file does not
46 * need to define so many value macros.
54 uint8_t eeTestArea
[4]; /* Factory Defined */
55 uint16_t eeWriteCount
[4]; /* || || */
56 uint8_t eeChecksum
[4]; /* || || */
57 uint32_t eeLastHwUpdate
; /* || || */
60 uint8_t eeInstalledMem
; /* Megabytes */
61 uint8_t eeMemTestSize
; /* || */
65 #define EE_SCR_1152X900 0x00
66 #define EE_SCR_1024X1024 0x12
67 #define EE_SCR_1600X1280 0x13
68 #define EE_SCR_1440X1440 0x14
70 uint8_t eeWatchDogDoesReset
; /* Watchdog timeout action:
72 * false: return to monitor
75 uint8_t eeBootDevStored
; /* Is the boot device stored:
76 * true: use stored device spec.
77 * false: use default (try all)
80 /* Stored boot device spec. i.e.: "sd(Ctlr,Unit,Part)" */
81 uint8_t eeBootDevName
[2]; /* xy,xd,sd,ie,le,st,xt,mt,... */
82 uint8_t eeBootDevCtlr
;
83 uint8_t eeBootDevUnit
;
84 uint8_t eeBootDevPart
;
87 uint8_t eeKeyboardType
; /* zero for sun keyboards */
90 uint8_t eeConsole
; /* What to use for the console */
91 #define EE_CONS_BW 0x00 /* - On-board B&W / keyboard */
92 #define EE_CONS_TTYA 0x10 /* - serial port A */
93 #define EE_CONS_TTYB 0x11 /* - serial port B */
94 #define EE_CONS_COLOR 0x12 /* - Color FB / keyboard */
95 #define EE_CONS_P4OPT 0x20 /* - Option board on P4 */
98 uint8_t eeCustomBanner
; /* Is there a custom banner:
99 * true: use text at 0x68
100 * false: use Sun banner
103 uint8_t eeKeyClick
; /* true/false */
106 /* Boot device with "Diag" switch in Diagnostic mode: */
107 uint8_t eeDiagDevName
[2];
108 uint8_t eeDiagDevCtlr
;
109 uint8_t eeDiagDevUnit
;
110 uint8_t eeDiagDevPart
;
112 /* Video white-on-black (not implemented) */
113 uint8_t eeWhiteOnBlack
; /* true/false */
116 char eeDiagPath
[40]; /* path name of diag program */
119 uint8_t eeTtyCols
; /* normally 80 (0x50) */
120 uint8_t eeTtyRows
; /* normally 34 (0x22) */
121 uint8_t ee_x52
[6]; /* unused */
124 /* Default parameters for tty A and tty B: */
126 uint8_t eetBaudSet
; /* Is the baud rate set?
127 * true: use values here
128 * false: use default (9600)
130 uint8_t eetBaudHi
; /* i.e. 96.. */
131 uint8_t eetBaudLo
; /* ..00 */
132 uint8_t eetNoRtsDtr
; /* true: disable H/W flow
133 * false: enable H/W flow */
135 } eeTtyDefA
, eeTtyDefB
;
138 char eeBannerString
[80]; /* see eeCustomBanner above */
141 uint16_t eeTestPattern
; /* must be 0xAA55 */
142 uint16_t ee_xBA
; /* unused */
145 /* Configuration data. Hopefully we don't need it. */
151 uint8_t eeAltKeyTable
; /* What Key table to use:
152 * 0x58: EEPROM tables
153 * else: PROM key tables
155 uint8_t eeKeyboardLocale
; /* extended keyboard type */
156 uint8_t eeKeyboardID
; /* for EEPROM key tables */
157 uint8_t eeCustomLogo
; /* true: use eeLogoBitmap */
160 uint8_t eeKeymapLC
[0x80];
161 uint8_t eeKeymapUC
[0x80];
164 uint8_t eeLogoBitmap
[64][8]; /* 64x64 bit custom logo */
167 uint8_t ee_x490
[2]; /* unused */
170 uint8_t ee_passwd_mode
; /* Only (ROM rev > 2.7.0)
171 * 0x5E = fully secure mode
172 * 0x01 = command secure mode
173 * Rest = non-secure mode
175 uint8_t ee_password
[8];
176 uint8_t ee_x49b
[0x500-0x49b]; /* unused */
179 uint8_t eeReserved
[0x100];
182 uint8_t eeROM_Area
[0x100];
185 /* "Unix area" (hah!) */
186 uint8_t ee_x700
[0xb]; /* unused */
188 uint8_t ee_diag_mode
; /* 3/80 diag switch:
190 * 0x12 = diagnostic mode
191 * Rest = full diagnostic boot
194 uint8_t ee_x70c
[0x7d8-0x70c]; /* unused */
197 uint8_t ee_80_IDPROM
[32]; /* 3/80 IDPROM */
199 uint8_t ee_80_CLOCK
[8]; /* 3/80 clock */
202 #endif /* _DEV_SUN_EEPROM_H_ */