Move common Sun ID PROM definitions into <dev/sun/idprom.h>.
This commit is contained in:
parent
19abf3be02
commit
15adcb96b8
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: mi,v 1.794 2005/06/18 21:25:14 peter Exp $
|
||||
# $NetBSD: mi,v 1.795 2005/06/19 20:00:29 thorpej Exp $
|
||||
./etc/mtree/set.comp comp-sys-root
|
||||
./usr/bin/addr2line comp-debug-bin bfd
|
||||
./usr/bin/ar comp-util-bin bfd
|
||||
|
@ -437,6 +437,7 @@
|
|||
./usr/include/dev/sun/disklabel.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
|
||||
./usr/include/dev/sun/kbd_reg.h comp-c-include
|
||||
./usr/include/dev/sun/kbd_tables.h comp-obsolete obsolete
|
||||
./usr/include/dev/sun/kbd_xlate.h comp-obsolete obsolete
|
||||
|
|
|
@ -1,60 +1,3 @@
|
|||
/* $NetBSD: idprom.h,v 1.7 2001/12/04 00:05:05 darrenr Exp $ */
|
||||
/* $NetBSD: idprom.h,v 1.8 2005/06/19 20:00:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 Adam Glass
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 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. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Adam Glass.
|
||||
* 4. The name of the Author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY Adam Glass ``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 REGENTS 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.
|
||||
*/
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_sparc_arch.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ID prom format. The ``host id'' is set up by taking the machine
|
||||
* ID as the top byte and the hostid field as the remaining three.
|
||||
* The id_xxx0 field appears to contain some other number. The id_xxx1
|
||||
* contains a bunch of 00's and a5's on my machines, suggesting it is
|
||||
* not actually used. The checksum seems to include them, however.
|
||||
*/
|
||||
struct idprom {
|
||||
u_char id_format; /* format identifier (= 1) */
|
||||
u_char id_machine; /* machine type (see param.h) */
|
||||
u_char id_ether[6]; /* ethernet address */
|
||||
int id_date; /* date of manufacture */
|
||||
u_char id_hostid[3]; /* ``host id'' bytes */
|
||||
u_char id_checksum; /* xor of everything else */
|
||||
char id_undef[16]; /* undefined */
|
||||
};
|
||||
|
||||
#define ID_SUN4_100 0x22
|
||||
#define ID_SUN4_200 0x21
|
||||
#define ID_SUN4_300 0x23
|
||||
#define ID_SUN4_400 0x24
|
||||
|
||||
#define IDPROM_VERSION 1
|
||||
#include <dev/sun/idprom.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu.c,v 1.191 2005/06/16 04:17:49 briggs Exp $ */
|
||||
/* $NetBSD: cpu.c,v 1.192 2005/06/19 20:00:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996
|
||||
|
@ -52,7 +52,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.191 2005/06/16 04:17:49 briggs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.192 2005/06/19 20:00:28 thorpej Exp $");
|
||||
|
||||
#include "opt_multiprocessor.h"
|
||||
#include "opt_lockdebug.h"
|
||||
|
@ -1140,7 +1140,7 @@ cpumatch_sun4(sc, mp, node)
|
|||
{
|
||||
struct idprom *idp = prom_getidprom();
|
||||
|
||||
switch (idp->id_machine) {
|
||||
switch (idp->idp_machtype) {
|
||||
case ID_SUN4_100:
|
||||
sc->cpu_type = CPUTYP_4_100;
|
||||
sc->classlvl = 100;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: promlib.c,v 1.35 2005/05/31 00:55:45 christos Exp $ */
|
||||
/* $NetBSD: promlib.c,v 1.36 2005/06/19 20:00:28 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -42,7 +42,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: promlib.c,v 1.35 2005/05/31 00:55:45 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: promlib.c,v 1.36 2005/06/19 20:00:28 thorpej Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_sparc_arch.h"
|
||||
|
@ -960,7 +960,7 @@ prom_getidprom(void)
|
|||
u_long h;
|
||||
u_char *dst;
|
||||
|
||||
if (idprom.id_format != 0)
|
||||
if (idprom.idp_format != 0)
|
||||
/* Already got it */
|
||||
return (&idprom);
|
||||
|
||||
|
@ -995,10 +995,10 @@ prom_getidprom(void)
|
|||
}
|
||||
|
||||
/* Establish hostid */
|
||||
h = (u_int)idprom.id_machine << 24;
|
||||
h |= idprom.id_hostid[0] << 16;
|
||||
h |= idprom.id_hostid[1] << 8;
|
||||
h |= idprom.id_hostid[2];
|
||||
h = (u_int)idprom.idp_machtype << 24;
|
||||
h |= idprom.idp_serialnum[0] << 16;
|
||||
h |= idprom.idp_serialnum[1] << 8;
|
||||
h |= idprom.idp_serialnum[2];
|
||||
hostid = h;
|
||||
|
||||
return (&idprom);
|
||||
|
@ -1048,7 +1048,7 @@ void prom_getether(node, cp)
|
|||
|
||||
/* Fall back on the machine's global ethernet address */
|
||||
read_idprom:
|
||||
memcpy(cp, idp->id_ether, 6);
|
||||
memcpy(cp, idp->idp_etheraddr, 6);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mmu.c,v 1.5 2005/01/23 17:04:26 pk Exp $ */
|
||||
/* $NetBSD: mmu.c,v 1.6 2005/06/19 20:00:28 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -68,7 +68,7 @@ int mmu_init(void)
|
|||
if (CPU_ISSUN4) {
|
||||
/* Find out if we're on a 3-lvl sun4 MMU. */
|
||||
struct idprom *idp = prom_getidprom();
|
||||
if (idp->id_machine == ID_SUN4_400)
|
||||
if (idp->idp_machtype == ID_SUN4_400)
|
||||
sun4_mmu3l = 1;
|
||||
}
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zs_any.c,v 1.11 2005/01/22 15:36:09 chs Exp $ */
|
||||
/* $NetBSD: zs_any.c,v 1.12 2005/06/19 20:00:28 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -45,7 +45,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: zs_any.c,v 1.11 2005/01/22 15:36:09 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: zs_any.c,v 1.12 2005/06/19 20:00:28 thorpej Exp $");
|
||||
|
||||
#include "opt_kgdb.h"
|
||||
|
||||
|
@ -198,7 +198,7 @@ zs_find_prom(int unit)
|
|||
/*
|
||||
* The physical address of zs0 is model-dependent.
|
||||
*/
|
||||
zs0_phys = (cpu_machine_id == SUN2_MACH_120 ? 0x002000 : 0x7f2000);
|
||||
zs0_phys = (cpu_machine_id == ID_SUN2_120 ? 0x002000 : 0x7f2000);
|
||||
if (sun68k_find_prom_map(zs0_phys, PMAP_OBIO, sizeof(struct zsdevice),
|
||||
&bh))
|
||||
return (NULL);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dvma.h,v 1.4 2003/04/02 07:53:56 thorpej Exp $ */
|
||||
/* $NetBSD: dvma.h,v 1.5 2005/06/19 20:00:28 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -59,7 +59,7 @@
|
|||
#define DVMA_MAP_BASE 0x00F00000
|
||||
#define DVMA_MAP_SIZE_120 0x00040000
|
||||
#define DVMA_MAP_SIZE_50 0x000F8000
|
||||
#define DVMA_MAP_SIZE (cpu_machine_id == SUN2_MACH_120 ? DVMA_MAP_SIZE_120 : DVMA_MAP_SIZE_50)
|
||||
#define DVMA_MAP_SIZE (cpu_machine_id == ID_SUN2_120 ? DVMA_MAP_SIZE_120 : DVMA_MAP_SIZE_50)
|
||||
#define DVMA_MAP_AVAIL (DVMA_MAP_SIZE-PAGE_SIZE)
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: locore2.c,v 1.13 2005/06/03 22:02:30 tsutsui Exp $ */
|
||||
/* $NetBSD: locore2.c,v 1.14 2005/06/19 20:00:28 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.13 2005/06/03 22:02:30 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.14 2005/06/19 20:00:28 thorpej Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
|
@ -233,14 +233,14 @@ _verify_hardware(void)
|
|||
cpu_machine_id = machtype;
|
||||
switch (cpu_machine_id) {
|
||||
|
||||
case SUN2_MACH_120 :
|
||||
case ID_SUN2_120 :
|
||||
cpu_match++;
|
||||
cpu_string = "{120,170}";
|
||||
delay_divisor = 205; /* 10 MHz */
|
||||
cpu_has_multibus = TRUE;
|
||||
break;
|
||||
|
||||
case SUN2_MACH_50 :
|
||||
case ID_SUN2_50 :
|
||||
cpu_match++;
|
||||
cpu_string = "50";
|
||||
delay_divisor = 205; /* 10 MHz */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bw2.c,v 1.26 2005/01/22 15:36:09 chs Exp $ */
|
||||
/* $NetBSD: bw2.c,v 1.27 2005/06/19 20:00:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -47,7 +47,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: bw2.c,v 1.26 2005/01/22 15:36:09 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: bw2.c,v 1.27 2005/06/19 20:00:28 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -249,7 +249,7 @@ bw2attach(struct device *parent, struct device *self, void *args)
|
|||
/* Guess based on machine ID. */
|
||||
switch (cpu_machine_id) {
|
||||
#ifdef _SUN3_
|
||||
case SUN3_MACH_60:
|
||||
case ID_SUN3_60:
|
||||
/*
|
||||
* Only the model 60 can have hi-res.
|
||||
* Look at the "resolution" jumper.
|
||||
|
@ -259,7 +259,7 @@ bw2attach(struct device *parent, struct device *self, void *args)
|
|||
goto high_res;
|
||||
break;
|
||||
|
||||
case SUN3_MACH_260:
|
||||
case ID_SUN3_260:
|
||||
/* The Sun3/260 is ALWAYS high-resolution! */
|
||||
/* fall through */
|
||||
high_res:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: eeprom.c,v 1.26 2005/01/22 15:36:09 chs Exp $ */
|
||||
/* $NetBSD: eeprom.c,v 1.27 2005/06/19 20:00:28 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -45,7 +45,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: eeprom.c,v 1.26 2005/01/22 15:36:09 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: eeprom.c,v 1.27 2005/06/19 20:00:28 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -122,7 +122,7 @@ eeprom_attach(struct device *parent, struct device *self, void *args)
|
|||
* Reduce ee_size and clear the last part of the
|
||||
* soft copy. Note: ee_update obeys ee_size.
|
||||
*/
|
||||
if (cpu_machine_id == SUN3X_MACH_80)
|
||||
if (cpu_machine_id == ID_SUN3X_80)
|
||||
ee_size -= 40;
|
||||
|
||||
/* Do only byte access in the EEPROM. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: memerr.c,v 1.18 2005/06/03 15:04:21 tsutsui Exp $ */
|
||||
/* $NetBSD: memerr.c,v 1.19 2005/06/19 20:00:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: memerr.c,v 1.18 2005/06/03 15:04:21 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: memerr.c,v 1.19 2005/06/19 20:00:28 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -112,9 +112,9 @@ memerr_attach(struct device *parent, struct device *self, void *args)
|
|||
* Which type of memory subsystem do we have?
|
||||
*/
|
||||
switch (cpu_machine_id) {
|
||||
case SUN3_MACH_160: /* XXX: correct? */
|
||||
case SUN3_MACH_260:
|
||||
case SUN3X_MACH_470:
|
||||
case ID_SUN3_160: /* XXX: correct? */
|
||||
case ID_SUN3_260:
|
||||
case ID_SUN3X_470:
|
||||
sc->sc_type = ME_ECC;
|
||||
sc->sc_typename = "ECC";
|
||||
sc->sc_csrbits = ME_ECC_STR;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: idprom.h,v 1.19 2005/01/22 15:36:10 chs Exp $ */
|
||||
/* $NetBSD: idprom.h,v 1.20 2005/06/19 20:00:28 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -36,49 +36,10 @@
|
|||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* structure/definitions for the 32 byte id prom found in all suns.
|
||||
*/
|
||||
#ifndef _MACHINE_IDPROM_H
|
||||
#define _MACHINE_IDPROM_H
|
||||
|
||||
struct idprom {
|
||||
unsigned char idp_format;
|
||||
unsigned char idp_machtype;
|
||||
unsigned char idp_etheraddr[6];
|
||||
long idp_date;
|
||||
unsigned char idp_serialnum[3];
|
||||
unsigned char idp_checksum;
|
||||
/* Note: The rest is excluded from the checksum! */
|
||||
unsigned char idp_reserved[16];
|
||||
};
|
||||
|
||||
#define IDPROM_VERSION 1
|
||||
#define IDPROM_SIZE (sizeof(struct idprom))
|
||||
#define IDPROM_CKSUM_SIZE 16
|
||||
|
||||
/* values for cpu_machine_id */
|
||||
|
||||
/* High nibble identifies the architecture. */
|
||||
#define IDM_ARCH_MASK 0xf0
|
||||
#define IDM_ARCH_SUN2 0x00
|
||||
#define IDM_ARCH_SUN3 0x10
|
||||
#define IDM_ARCH_SUN4 0x20
|
||||
#define IDM_ARCH_SUN3X 0x40
|
||||
#define IDM_ARCH_SUN4C 0x50
|
||||
#define IDM_ARCH_SUN4M 0x70
|
||||
|
||||
/* Low nibble identifies the implementation. */
|
||||
#define IDM_IMPL_MASK 0x0f
|
||||
|
||||
/* Values of idp_machtype we might see (m68k only). */
|
||||
#define SUN3_MACH_160 0x11 /* Carrera */
|
||||
#define SUN3_MACH_50 0x12 /* M25 */
|
||||
#define SUN3_MACH_260 0x13 /* Sirius */
|
||||
#define SUN3_MACH_110 0x14 /* Prism */
|
||||
#define SUN3_MACH_60 0x17 /* Sun3F */
|
||||
#define SUN3_MACH_E 0x18 /* Sun3E */
|
||||
|
||||
#define SUN3X_MACH_470 0x41 /* Pegasus */
|
||||
#define SUN3X_MACH_80 0x42 /* Hydra */
|
||||
#include <dev/sun/idprom.h>
|
||||
|
||||
#if defined(_KERNEL) || defined(_STANDALONE)
|
||||
|
||||
|
@ -89,3 +50,5 @@ void idprom_etheraddr(u_char *);
|
|||
void idprom_init(void);
|
||||
|
||||
#endif /* _KERNEL || _STANDALONE */
|
||||
|
||||
#endif /* !_MACHINE_IDPROM_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: leds.c,v 1.8 2005/01/22 15:36:10 chs Exp $ */
|
||||
/* $NetBSD: leds.c,v 1.9 2005/06/19 20:00:28 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -45,7 +45,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: leds.c,v 1.8 2005/01/22 15:36:10 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: leds.c,v 1.9 2005/06/19 20:00:28 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -97,7 +97,7 @@ leds_init(void)
|
|||
|
||||
#ifdef _SUN3X_
|
||||
diagreg = obio_find_mapping(OBIO_DIAGREG, 1);
|
||||
if (cpu_machine_id == SUN3X_MACH_80)
|
||||
if (cpu_machine_id == ID_SUN3X_80)
|
||||
ledpat.patlen = 1;
|
||||
#endif /* SUN3X */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: locore2.c,v 1.85 2005/06/03 15:04:21 tsutsui Exp $ */
|
||||
/* $NetBSD: locore2.c,v 1.86 2005/06/19 20:00:28 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.85 2005/06/03 15:04:21 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.86 2005/06/19 20:00:28 thorpej Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
|
@ -162,7 +162,7 @@ _save_symtab(void)
|
|||
* then just ignore the symbols.
|
||||
*/
|
||||
|
||||
if ((cpu_machine_id == SUN3_MACH_50) &&
|
||||
if ((cpu_machine_id == ID_SUN3_50) &&
|
||||
((vaddr_t)maxsym > (KERNBASE + OBMEM_BW50_ADDR - USPACE))) {
|
||||
mon_printf("_save_symtab: too large for 3/50");
|
||||
return;
|
||||
|
@ -251,33 +251,33 @@ _verify_hardware(void)
|
|||
cpu_machine_id = machtype;
|
||||
switch (cpu_machine_id) {
|
||||
|
||||
case SUN3_MACH_50 :
|
||||
case ID_SUN3_50 :
|
||||
cpu_match++;
|
||||
cpu_string = "50";
|
||||
delay_divisor = 128; /* 16 MHz */
|
||||
break;
|
||||
|
||||
case SUN3_MACH_60 :
|
||||
case ID_SUN3_60 :
|
||||
cpu_match++;
|
||||
cpu_string = "60";
|
||||
delay_divisor = 102; /* 20 MHz */
|
||||
break;
|
||||
|
||||
case SUN3_MACH_110:
|
||||
case ID_SUN3_110:
|
||||
cpu_match++;
|
||||
cpu_string = "110";
|
||||
delay_divisor = 120; /* 17 MHz */
|
||||
cpu_has_vme = TRUE;
|
||||
break;
|
||||
|
||||
case SUN3_MACH_160:
|
||||
case ID_SUN3_160:
|
||||
cpu_match++;
|
||||
cpu_string = "160";
|
||||
delay_divisor = 120; /* 17 MHz */
|
||||
cpu_has_vme = TRUE;
|
||||
break;
|
||||
|
||||
case SUN3_MACH_260:
|
||||
case ID_SUN3_260:
|
||||
cpu_match++;
|
||||
cpu_string = "260";
|
||||
delay_divisor = 82; /* 25 MHz */
|
||||
|
@ -287,7 +287,7 @@ _verify_hardware(void)
|
|||
#endif
|
||||
break;
|
||||
|
||||
case SUN3_MACH_E :
|
||||
case ID_SUN3_E :
|
||||
cpu_match++;
|
||||
cpu_string = "E";
|
||||
delay_divisor = 102; /* 20 MHz XXX: Correct? */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmap.c,v 1.147 2005/05/29 15:57:01 chs Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.148 2005/06/19 20:00:28 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -87,7 +87,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.147 2005/05/29 15:57:01 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.148 2005/06/19 20:00:28 thorpej Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_pmap_debug.h"
|
||||
|
@ -1556,7 +1556,7 @@ pmap_bootstrap(vaddr_t nextva)
|
|||
* On the Sun3/50, the video frame buffer is located at
|
||||
* physical addres 1MB so we must step over it.
|
||||
*/
|
||||
if (cpu_machine_id == SUN3_MACH_50) {
|
||||
if (cpu_machine_id == ID_SUN3_50) {
|
||||
hole_start = m68k_trunc_page(OBMEM_BW50_ADDR);
|
||||
hole_size = m68k_round_page(OBMEM_BW2_SIZE);
|
||||
if (avail_start > hole_start) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: clock.c,v 1.28 2005/01/22 15:36:10 chs Exp $ */
|
||||
/* $NetBSD: clock.c,v 1.29 2005/06/19 20:00:29 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1990, 1993
|
||||
|
@ -95,7 +95,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.28 2005/01/22 15:36:10 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.29 2005/06/19 20:00:29 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -176,7 +176,7 @@ oclock_match(struct device *parent, struct cfdata *cf, void *args)
|
|||
* The 3/80 can not probe the Intersil absent,
|
||||
* but it never has one, so "just say no."
|
||||
*/
|
||||
if (cpu_machine_id == SUN3X_MACH_80)
|
||||
if (cpu_machine_id == ID_SUN3X_80)
|
||||
return (0);
|
||||
|
||||
/* OK, really probe for the Intersil. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.100 2005/06/03 15:04:21 tsutsui Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.101 2005/06/19 20:00:29 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
|
@ -75,7 +75,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.100 2005/06/03 15:04:21 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.101 2005/06/19 20:00:29 thorpej Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
|
@ -361,13 +361,13 @@ identifycpu(void)
|
|||
cpu_machine_id = machtype;
|
||||
switch (cpu_machine_id) {
|
||||
|
||||
case SUN3X_MACH_80:
|
||||
case ID_SUN3X_80:
|
||||
cpu_string = "80"; /* Hydra */
|
||||
delay_divisor = 102; /* 20 MHz */
|
||||
cpu_has_vme = FALSE;
|
||||
break;
|
||||
|
||||
case SUN3X_MACH_470:
|
||||
case ID_SUN3X_470:
|
||||
cpu_string = "470"; /* Pegasus */
|
||||
delay_divisor = 62; /* 33 MHz */
|
||||
cpu_has_vme = TRUE;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: idprom.h,v 1.2 2005/01/22 15:36:11 chs Exp $ */
|
||||
/* $NetBSD: idprom.h,v 1.3 2005/06/19 20:00:29 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -39,51 +39,7 @@
|
|||
#ifndef _MACHINE_IDPROM_H
|
||||
#define _MACHINE_IDPROM_H
|
||||
|
||||
/*
|
||||
* structure/definitions for the 32 byte id prom found in all suns.
|
||||
*/
|
||||
|
||||
struct idprom {
|
||||
unsigned char idp_format;
|
||||
unsigned char idp_machtype;
|
||||
unsigned char idp_etheraddr[6];
|
||||
long idp_date;
|
||||
unsigned char idp_serialnum[3];
|
||||
unsigned char idp_checksum;
|
||||
/* Note: The rest is excluded from the checksum! */
|
||||
unsigned char idp_reserved[16];
|
||||
};
|
||||
|
||||
#define IDPROM_VERSION 1
|
||||
#define IDPROM_SIZE (sizeof(struct idprom))
|
||||
#define IDPROM_CKSUM_SIZE 16
|
||||
|
||||
/* values for cpu_machine_id */
|
||||
|
||||
/* High nibble identifies the architecture. */
|
||||
#define IDM_ARCH_MASK 0xf0
|
||||
#define IDM_ARCH_SUN2 0x00
|
||||
#define IDM_ARCH_SUN3 0x10
|
||||
#define IDM_ARCH_SUN4 0x20
|
||||
#define IDM_ARCH_SUN3X 0x40
|
||||
#define IDM_ARCH_SUN4C 0x50
|
||||
#define IDM_ARCH_SUN4M 0x70
|
||||
|
||||
/* Low nibble identifies the implementation. */
|
||||
#define IDM_IMPL_MASK 0x0f
|
||||
|
||||
/* Values of idp_machtype we might see (m68k only). */
|
||||
#define SUN2_MACH_120 0x01 /* Sun2 Multibus */
|
||||
#define SUN2_MACH_50 0x02 /* Sun2 VME */
|
||||
#define SUN3_MACH_160 0x11 /* Carrera */
|
||||
#define SUN3_MACH_50 0x12 /* M25 */
|
||||
#define SUN3_MACH_260 0x13 /* Sirius */
|
||||
#define SUN3_MACH_110 0x14 /* Prism */
|
||||
#define SUN3_MACH_60 0x17 /* Sun3F */
|
||||
#define SUN3_MACH_E 0x18 /* Sun3E */
|
||||
|
||||
#define SUN3X_MACH_470 0x41 /* Pegasus */
|
||||
#define SUN3X_MACH_80 0x42 /* Hydra */
|
||||
#include <dev/sun/idprom.h>
|
||||
|
||||
#if defined(_KERNEL) || defined(_STANDALONE)
|
||||
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
/* $NetBSD: idprom.h,v 1.1 2005/06/19 20:00:28 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Adam Glass.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 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. 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 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.
|
||||
*/
|
||||
|
||||
#ifndef _DEV_SUN_IDPROM_H_
|
||||
#define _DEV_SUN_IDPROM_H_
|
||||
|
||||
/*
|
||||
* structure/definitions for the 32 byte id prom found in all suns.
|
||||
*/
|
||||
|
||||
struct idprom {
|
||||
uint8_t idp_format; /* format identifier (== 1) */
|
||||
uint8_t idp_machtype; /* machine type */
|
||||
uint8_t idp_etheraddr[6]; /* Ethernet address */
|
||||
uint32_t idp_date; /* date of manufacture */
|
||||
uint8_t idp_serialnum[3]; /* serial number / host ID */
|
||||
uint8_t idp_checksum; /* xor of everything else */
|
||||
/* Note: The rest is excluded from the checksum! */
|
||||
uint8_t idp_reserved[16];
|
||||
};
|
||||
|
||||
#define IDPROM_VERSION 1
|
||||
#define IDPROM_SIZE (sizeof(struct idprom))
|
||||
#define IDPROM_CKSUM_SIZE 16
|
||||
|
||||
/* High nibble identifies the architecture. */
|
||||
#define IDM_ARCH_MASK 0xf0
|
||||
#define IDM_ARCH_SUN2 0x00
|
||||
#define IDM_ARCH_SUN3 0x10
|
||||
#define IDM_ARCH_SUN4 0x20
|
||||
#define IDM_ARCH_SUN3X 0x40
|
||||
#define IDM_ARCH_SUN4C 0x50
|
||||
#define IDM_ARCH_SUN4M 0x70
|
||||
|
||||
/* Low nibble identifies the implementation. */
|
||||
#define IDM_IMPL_MASK 0x0f
|
||||
|
||||
/* Values of idp_machtype we might see. */
|
||||
#define ID_SUN2_120 0x01 /* Sun2 Multibus */
|
||||
#define ID_SUN2_50 0x02 /* Sun2 VME */
|
||||
|
||||
#define ID_SUN3_160 0x11 /* Carrera */
|
||||
#define ID_SUN3_50 0x12 /* M25 */
|
||||
#define ID_SUN3_260 0x13 /* Sirius */
|
||||
#define ID_SUN3_110 0x14 /* Prism */
|
||||
#define ID_SUN3_60 0x17 /* Sun3F */
|
||||
#define ID_SUN3_E 0x18 /* Sun3E */
|
||||
|
||||
#define ID_SUN3X_470 0x41 /* Pegasus */
|
||||
#define ID_SUN3X_80 0x42 /* Hydra */
|
||||
|
||||
#define ID_SUN4_100 0x22 /* Sun 4/100 */
|
||||
#define ID_SUN4_200 0x21 /* Sun 4/200 */
|
||||
#define ID_SUN4_300 0x23 /* Sun 4/300 */
|
||||
#define ID_SUN4_400 0x24 /* Sun 4/400 */
|
||||
|
||||
#if defined(_KERNEL) || defined(_STANDALONE)
|
||||
|
||||
extern struct idprom identity_prom;
|
||||
extern u_char cpu_machine_id;
|
||||
|
||||
void idprom_etheraddr(u_char *);
|
||||
void idprom_init(void);
|
||||
|
||||
#endif /* _KERNEL || _STANDALONE */
|
||||
|
||||
#endif /* ! _DEV_SUN_IDPROM_H_ */
|
Loading…
Reference in New Issue