Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Move common Sun3/Sun4 EEPROM definitions in to <dev/sun/eepr...



details:   https://anonhg.NetBSD.org/src/rev/f518321506b7
branches:  trunk
changeset: 582177:f518321506b7
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Jun 19 20:23:48 2005 +0000

description:
Move common Sun3/Sun4 EEPROM definitions in to <dev/sun/eeprom.h>

diffstat:

 distrib/sets/lists/comp/mi      |    3 +-
 sys/arch/sparc/include/eeprom.h |  181 +++++-----------------------------
 sys/arch/sun2/include/eeprom.h  |   15 +--
 sys/arch/sun3/include/eeprom.h  |  173 +-------------------------------
 sys/dev/sun/eeprom.h            |  209 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 249 insertions(+), 332 deletions(-)

diffs (truncated from 658 to 300 lines):

diff -r c92355bf3b48 -r f518321506b7 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Sun Jun 19 20:22:26 2005 +0000
+++ b/distrib/sets/lists/comp/mi        Sun Jun 19 20:23:48 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.795 2005/06/19 20:00:29 thorpej Exp $
+#      $NetBSD: mi,v 1.796 2005/06/19 20:23:48 thorpej Exp $
 ./etc/mtree/set.comp                           comp-sys-root
 ./usr/bin/addr2line                            comp-debug-bin          bfd
 ./usr/bin/ar                                   comp-util-bin           bfd
@@ -435,6 +435,7 @@
 ./usr/include/dev/scsipi/ss_mustek.h           comp-obsolete           obsolete
 ./usr/include/dev/scsipi/ssvar.h               comp-obsolete           obsolete
 ./usr/include/dev/sun/disklabel.h              comp-c-include
+./usr/include/dev/sun/eeprom.h                 comp-c-include
 ./usr/include/dev/sun/event_var.h              comp-obsolete           obsolete
 ./usr/include/dev/sun/fbio.h                   comp-c-include
 ./usr/include/dev/sun/idprom.h                 comp-c-include
diff -r c92355bf3b48 -r f518321506b7 sys/arch/sparc/include/eeprom.h
--- a/sys/arch/sparc/include/eeprom.h   Sun Jun 19 20:22:26 2005 +0000
+++ b/sys/arch/sparc/include/eeprom.h   Sun Jun 19 20:23:48 2005 +0000
@@ -1,9 +1,12 @@
-/*     $NetBSD: eeprom.h,v 1.5 2005/06/19 01:16:01 thorpej Exp $       */
+/*     $NetBSD: eeprom.h,v 1.6 2005/06/19 20:23:48 thorpej Exp $       */
 
-/*
- * Copyright (c) 1994 Gordon W. Ross
+/*-
+ * Copyright (c) 1996 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Gordon W. Ross.
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -12,160 +15,31 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the NetBSD
+ *     Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
  *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Structure/definitions for the Sun3/Sun4 EEPROM.
- *
- * This information is published in the Sun document:
- * "PROM User's Manual", part number 800-1736010.
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  */
 
-
-/*
- * Note that most places where the PROM stores a "true/false" flag,
- * the true value is 0x12 and false is the usual zero.  Such flags
- * all take the values EE_TRUE or EE_FALSE so this file does not
- * need to define so many value macros.
- */
-#define        EE_TRUE 0x12
-#define        EE_FALSE   0
-
-struct eeprom {
-
-       /* 0x00 */
-       u_char  eeTestArea[4];          /* Factory Defined */
-       u_short eeWriteCount[4];        /*    ||      ||   */
-       u_char  eeChecksum[4];          /*    ||      ||   */
-       u_int32_t eeLastHwUpdate;       /*    ||      ||   */
-
-       /* 0x14 */
-       u_char  eeInstalledMem;         /* Megabytes */
-       u_char  eeMemTestSize;          /*     ||    */
-
-       /* 0x16 */
-       u_char  eeScreenSize;
-#define        EE_SCR_1152X900         0x00
-#define        EE_SCR_1024X1024        0x12
-#define EE_SCR_1600X1280       0x13
-#define EE_SCR_1440X1440       0x14
-
-       u_char  eeWatchDogDoesReset;    /* Watchdog timeout action:
-                                        * true:  reset/reboot
-                                        * false: return to monitor
-                                        */
-       /* 0x18 */
-       u_char  eeBootDevStored;        /* Is the boot device stored:
-                                        * true:  use stored device spec.
-                                        * false: use default (try all)
-                                        */
-       /* Stored boot device spec. i.e.: "sd(Ctlr,Unit,Part)" */
-       u_char  eeBootDevName[2];       /* xy,xd,sd,ie,le,st,xt,mt,...  */
-       u_char  eeBootDevCtlr;
-       u_char  eeBootDevUnit;
-       u_char  eeBootDevPart;
-
-       /* 0x1E */
-       u_char  eeKeyboardType;         /* zero for sun keyboards */
-       u_char  eeConsole;              /* What to use for the console  */
-#define        EE_CONS_BW              0x00    /* - On-board B&W / keyboard    */
-#define        EE_CONS_TTYA            0x10    /* - serial port A              */
-#define        EE_CONS_TTYB            0x11    /* - serial port B              */
-#define        EE_CONS_COLOR           0x12    /* - Color FB / keyboard        */
-#define        EE_CONS_P4OPT           0x20    /* - Option board on P4         */
-
-       /* 0x20 */
-       u_char  eeCustomBanner;         /* Is there a custom banner:
-                                        * true:  use text at 0x68
-                                        * false: use Sun banner
-                                        */
-
-       u_char  eeKeyClick;             /* true/false */
+#ifndef _MACHINE_EEPROM_H_
+#define        _MACHINE_EEPROM_H_
 
-       /* Boot device with "Diag" switch in Diagnostic mode: */
-       u_char  eeDiagDevName[2];
-       u_char  eeDiagDevCtlr;
-       u_char  eeDiagDevUnit;
-       u_char  eeDiagDevPart;
-
-       /* Video white-on-black (not implemented) */
-       u_char  eeWhiteOnBlack;         /* true/false */
-
-       /* 0x28 */
-       char    eeDiagPath[40];         /* path name of diag program    */
-
-       /* 0x50 */
-       u_char  eeTtyCols;              /* normally 80 */
-       u_char  eeTtyRows;              /* normally 34 */
-       u_char  ee_x52[6];              /* unused */
-
-       /* 0x58 */
-       /* Default parameters for tty A and tty B: */
-       struct  eeTtyDef {
-           u_char      eetBaudSet;     /* Is the baud rate set?
-                                        * true:  use values here
-                                        * false: use default (9600)
-                                        */
-           u_char      eetBaudHi;      /* i.e. 96..  */
-           u_char      eetBaudLo;      /*      ..00  */
-           u_char      eetNoRtsDtr;    /* true: disable H/W flow
-                                        * false: enable H/W flow */
-           u_char      eet_pad[4];
-       } eeTtyDefA, eeTtyDefB;
-
-       /* 0x68 */
-       char eeBannerString[80];        /* see eeCustomBanner above */
-
-       /* 0xB8 */
-       u_short eeTestPattern;          /* must be 0xAA55 */
-       u_short ee_xBA;                 /* unused */
-
-       /* 0xBC */
-       /* Configuration data.  Hopefully we don't need it. */
-       struct eeConf {
-           u_char      eecData[16];
-       } eeConf[12+1];
-
-       /* 0x18c */
-       u_char  eeAltKeyTable;          /* What Key table to use:
-                                        * 0x58: EEPROM tables
-                                        * else: PROM key tables
-                                        */
-       u_char  eeKeyboardLocale;       /* extended keyboard type */
-       u_char  eeKeyboardID;           /* for EEPROM key tables  */
-       u_char  eeCustomLogo;           /* true: use eeLogoBitmap */
-
-       /* 0x190 */
-       u_char  eeKeymapLC[0x80];
-       u_char  eeKeymapUC[0x80];
-
-       /* 0x290 */
-       u_char  eeLogoBitmap[64][8];    /* 64x64 bit custom logo */
-
-       /* 0x490 */
-       u_char  ee_x490[0x500-0x490];   /* unused */
-
-       /* Other stuff we don't care about... */
-       /* 0x500 */
-       u_char  eeReserved[0x100];
-       /* 0x600 */
-       u_char  eeROM_Area[0x100];
-       /* 0x700 */
-       u_char  eeUnixArea[0x100];
-};
+#include <dev/sun/eeprom.h>
 
 /*
  * The size of the eeprom on machines with the old clock is 2k.  However,
@@ -182,3 +56,4 @@
 #define DEV_EEPROM      11      /* minor device 11 is eeprom */
 #endif /* _KERNEL */
 
+#endif /* _MACHINE_EEPROM_H_ */
diff -r c92355bf3b48 -r f518321506b7 sys/arch/sun2/include/eeprom.h
--- a/sys/arch/sun2/include/eeprom.h    Sun Jun 19 20:22:26 2005 +0000
+++ b/sys/arch/sun2/include/eeprom.h    Sun Jun 19 20:23:48 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: eeprom.h,v 1.1 2001/04/06 13:13:03 fredette Exp $      */
+/*     $NetBSD: eeprom.h,v 1.2 2005/06/19 20:23:48 thorpej Exp $       */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -44,19 +44,12 @@
  * wants to use this header file.  To keep that code clean, we fake as
  * much as we need to, but always say that we couldn't map the EEPROM.  
  */
-struct eeprom {
-       u_char  eeScreenSize;
-#define        EE_SCR_1152X900         0x00
-#define        EE_SCR_1024X1024        0x12
-#define EE_SCR_1600X1280       0x13
-#define EE_SCR_1440X1440       0x14
-       u_char  eeTtyCols;
-       u_char  eeTtyRows;
-};
+
+#include <dev/sun/eeprom.h>
 
 #ifdef _KERNEL
 #define eeprom_va NULL
 #endif
 
-#endif /* _MACHINE_EEPROM_H */
+#endif /* _MACHINE_EEPROM_H */
 
diff -r c92355bf3b48 -r f518321506b7 sys/arch/sun3/include/eeprom.h
--- a/sys/arch/sun3/include/eeprom.h    Sun Jun 19 20:22:26 2005 +0000
+++ b/sys/arch/sun3/include/eeprom.h    Sun Jun 19 20:23:48 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: eeprom.h,v 1.15 2005/01/22 15:36:10 chs Exp $  */
+/*     $NetBSD: eeprom.h,v 1.16 2005/06/19 20:23:48 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -36,175 +36,14 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-/*
- * Structure/definitions for the Sun3 EEPROM.
- *
- * This information is published in the Sun document:
- * "PROM User's Manual", part number 800-1736010.
- */
-
-
-/*
- * Note that most places where the PROM stores a "true/false" flag,
- * the true value is 0x12 and false is the usual zero.  Such flags
- * all take the values EE_TRUE or EE_FALSE so this file does not
- * need to define so many value macros.
- */
-#define        EE_TRUE 0x12
-#define        EE_FALSE   0
-
-struct eeprom {
-
-       /* 0x00 */
-       u_char  eeTestArea[4];          /* Factory Defined */
-       u_short eeWriteCount[4];        /*    ||      ||   */
-       u_char  eeChecksum[4];          /*    ||      ||   */
-       time_t  eeLastHwUpdate;         /*    ||      ||   */
-
-       /* 0x14 */
-       u_char  eeInstalledMem;         /* Megabytes */
-       u_char  eeMemTestSize;          /*     ||    */
-
-       /* 0x16 */
-       u_char  eeScreenSize;
-#define        EE_SCR_1152X900         0x00



Home | Main Index | Thread Index | Old Index