summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-11-07 14:49:03 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-11-07 14:49:03 +0000
commit05ea5cfbae200015db0fc343bfb527229a3c9338 (patch)
tree64116af8425b2acc036d0f8115b708278e019dfe
parenta65d95c199b8526c9b856b7d22803089a87d2740 (diff)
Change sgi system identification from a single system type list, to a smaller
system type list (which really is the system family) and a subsystem type. No functional change yet.
-rw-r--r--sys/arch/mips64/include/archtype.h12
-rw-r--r--sys/arch/mips64/mips64/arcbios.c12
-rw-r--r--sys/arch/sgi/dev/dsrtc.c6
-rw-r--r--sys/arch/sgi/include/autoconf.h3
-rw-r--r--sys/arch/sgi/pci/ioc.c8
-rw-r--r--sys/arch/sgi/sgi/ip27.h8
-rw-r--r--sys/arch/sgi/sgi/ip27_machdep.c17
-rw-r--r--sys/arch/sgi/sgi/machdep.c10
-rw-r--r--sys/arch/sgi/sgi/mainbus.c6
-rw-r--r--sys/arch/sgi/sgi/sginode.c4
-rw-r--r--sys/arch/sgi/xbow/xbow.c8
-rw-r--r--sys/arch/sgi/xbow/xbridge.c6
-rw-r--r--sys/dev/pci/isp_pci.c6
13 files changed, 54 insertions, 52 deletions
diff --git a/sys/arch/mips64/include/archtype.h b/sys/arch/mips64/include/archtype.h
index 7898f297275..17afe639c8a 100644
--- a/sys/arch/mips64/include/archtype.h
+++ b/sys/arch/mips64/include/archtype.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: archtype.h,v 1.7 2009/08/06 21:11:38 miod Exp $ */
+/* $OpenBSD: archtype.h,v 1.8 2009/11/07 14:49:00 miod Exp $ */
/*
* Copyright (c) 1997-2004 Opsycon AB, Sweden (www.opsycon.se)
*
@@ -47,12 +47,10 @@
#define SGI_INDY 0x0015 /* Indy, Indigo2, Challenge S */
#define SGI_POWER10 0x0016 /* POWER Challenge R10k */
#define SGI_POWERI 0x0017 /* POWER Indigo2 */
-#define SGI_O2 0x0018 /* IP32 O2/Moosehead */
-#define SGI_O200 0x0019 /* IP27 Origin200, Onyx2/Speedo */
-#define SGI_O2000 0x001a /* IP27 Origin2000/Lego */
-#define SGI_OCTANE 0x001b /* IP30 Octane/Speedracer */
-#define SGI_O300 0x001c /* IP35 Origin300, Onyx3, Fuel */
-#define SGI_O3000 0x001d /* IP35 Origin350, Tezro */
+#define SGI_O2 0x0018 /* IP32 O2 */
+#define SGI_IP27 0x0019 /* IP27 Origin200/2000 */
+#define SGI_OCTANE 0x001a /* IP30 Octane */
+#define SGI_IP35 0x001b /* IP35 Origin3x0/3x00/Fuel/Tezro */
#define ALGOR_CLASS 0x0020 /* Algorithmics class */
#define ALGOR_P4032 0x0021 /* ALGORITHMICS P-4032 */
diff --git a/sys/arch/mips64/mips64/arcbios.c b/sys/arch/mips64/mips64/arcbios.c
index 52ced29d12f..b7da33882db 100644
--- a/sys/arch/mips64/mips64/arcbios.c
+++ b/sys/arch/mips64/mips64/arcbios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arcbios.c,v 1.22 2009/07/15 20:34:57 martynas Exp $ */
+/* $OpenBSD: arcbios.c,v 1.23 2009/11/07 14:49:01 miod Exp $ */
/*-
* Copyright (c) 1996 M. Warner Losh. All rights reserved.
* Copyright (c) 1996-2004 Opsycon AB. All rights reserved.
@@ -248,9 +248,7 @@ bios_configure_memory()
#endif
#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000)
- if ((sys_config.system_type == SGI_O200 ||
- sys_config.system_type == SGI_O300)) {
-
+ if (sys_config.system_type == SGI_IP27) {
/*
* For the lack of a better way to tell
* IP27 apart from IP35, look at the
@@ -264,7 +262,7 @@ bios_configure_memory()
seen_free = 1;
if (start >= 0x20) /* IP35 */
sys_config.system_type =
- SGI_O300;
+ SGI_IP35;
}
/*
@@ -287,7 +285,7 @@ bios_configure_memory()
if (type == FirmwarePermanent) {
descr = NULL; /* abort loop */
count = ((sys_config.system_type ==
- SGI_O200 ? 32 : 64) << (20 - 12)) -
+ SGI_IP27 ? 32 : 64) << (20 - 12)) -
start;
}
}
@@ -429,7 +427,7 @@ bios_get_system_type()
* If we find a kldir assume IP27 for now.
* We'll decide whether this is IP27 or IP35 later.
*/
- return SGI_O200;
+ return SGI_IP27;
}
#endif
}
diff --git a/sys/arch/sgi/dev/dsrtc.c b/sys/arch/sgi/dev/dsrtc.c
index fd681153c1d..7132df8e5fd 100644
--- a/sys/arch/sgi/dev/dsrtc.c
+++ b/sys/arch/sgi/dev/dsrtc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsrtc.c,v 1.10 2009/10/26 20:14:42 miod Exp $ */
+/* $OpenBSD: dsrtc.c,v 1.11 2009/11/07 14:49:01 miod Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -173,7 +173,7 @@ dsrtc_attach_ioc(struct device *parent, struct device *self, void *aux)
* For some reason, the base year differs between IP27
* and IP35.
*/
- sc->sc_yrbase = sys_config.system_type == SGI_O300 ?
+ sc->sc_yrbase = sys_config.system_type == SGI_IP35 ?
POSIX_BASE_YEAR - 2 : POSIX_BASE_YEAR;
/* mips64 clock code expects year relative to 1900 */
sc->sc_yrbase -= 1900;
@@ -214,7 +214,7 @@ dsrtc_attach_iof(struct device *parent, struct device *self, void *aux)
* For some reason, the base year differs between IP27
* and IP35.
*/
- sc->sc_yrbase = sys_config.system_type == SGI_O300 ?
+ sc->sc_yrbase = sys_config.system_type == SGI_IP35 ?
POSIX_BASE_YEAR - 2 : POSIX_BASE_YEAR;
/* mips64 clock code expects year relative to 1900 */
sc->sc_yrbase -= 1900;
diff --git a/sys/arch/sgi/include/autoconf.h b/sys/arch/sgi/include/autoconf.h
index a68295c3d4b..296da5be1a8 100644
--- a/sys/arch/sgi/include/autoconf.h
+++ b/sys/arch/sgi/include/autoconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.h,v 1.23 2009/10/30 08:13:57 syuu Exp $ */
+/* $OpenBSD: autoconf.h,v 1.24 2009/11/07 14:49:01 miod Exp $ */
/*
* Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -42,6 +42,7 @@
struct sys_rec {
int system_type;
+ int system_subtype; /* IP35 only */
struct cpuinfo {
u_int16_t type;
diff --git a/sys/arch/sgi/pci/ioc.c b/sys/arch/sgi/pci/ioc.c
index 6ee7bdc71e3..52e1fe1a9ff 100644
--- a/sys/arch/sgi/pci/ioc.c
+++ b/sys/arch/sgi/pci/ioc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioc.c,v 1.24 2009/11/02 17:20:47 miod Exp $ */
+/* $OpenBSD: ioc.c,v 1.25 2009/11/07 14:49:01 miod Exp $ */
/*
* Copyright (c) 2008 Joel Sing.
@@ -246,8 +246,8 @@ ioc_attach(struct device *parent, struct device *self, void *aux)
* very likely that we are the on-board IOC3 found
* on IP27 and IP35 systems.
*/
- if (sys_config.system_type == SGI_O200 ||
- sys_config.system_type == SGI_O300) {
+ if (sys_config.system_type == SGI_IP27 ||
+ sys_config.system_type == SGI_IP35) {
device_mask = (1 << IOCDEV_SERIAL_A) |
(1 << IOCDEV_SERIAL_B) | (1 << IOCDEV_LPT) |
(1 << IOCDEV_KBC) | (1 << IOCDEV_RTC) |
@@ -369,7 +369,7 @@ establish:
self->dv_xname, dual_irq ? "ethernet " : "");
goto unregister;
}
- printf("%s%s\n", dual_irq ? ", ethernet " : "",
+ printf("%s%s\n", dual_irq ? "; ethernet " : "",
pci_intr_string(sc->sc_pc, ih1));
/*
diff --git a/sys/arch/sgi/sgi/ip27.h b/sys/arch/sgi/sgi/ip27.h
index 73cecf6a167..64c30adb224 100644
--- a/sys/arch/sgi/sgi/ip27.h
+++ b/sys/arch/sgi/sgi/ip27.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip27.h,v 1.1 2009/05/28 18:02:43 miod Exp $ */
+/* $OpenBSD: ip27.h,v 1.2 2009/11/07 14:49:01 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
@@ -29,3 +29,9 @@
#define IP35_NMI_KREGS_BASE 0x9000
#define IP35_NMI_KREGS_SIZE 0x400 /* per CPU */
#define IP35_NMI_EFRAME_BASE 0xa000
+
+/* IP35 Brick types */
+
+#define IP35_O350 0x02
+#define IP35_FUEL 0x04
+#define IP35_O300 0x08
diff --git a/sys/arch/sgi/sgi/ip27_machdep.c b/sys/arch/sgi/sgi/ip27_machdep.c
index 88defab4590..db46cd5b749 100644
--- a/sys/arch/sgi/sgi/ip27_machdep.c
+++ b/sys/arch/sgi/sgi/ip27_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip27_machdep.c,v 1.32 2009/11/06 07:37:49 miod Exp $ */
+/* $OpenBSD: ip27_machdep.c,v 1.33 2009/11/07 14:49:01 miod Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
@@ -110,14 +110,13 @@ ip27_setup()
size_t gsz;
uint node;
uint64_t synergy0_0;
- int brick;
console_t *cons;
nmi_t *nmi;
uncached_base = PHYS_TO_XKPHYS_UNCACHED(0, SP_NC);
io_base = PHYS_TO_XKPHYS_UNCACHED(0, SP_IO);
- ip35 = sys_config.system_type == SGI_O300;
+ ip35 = sys_config.system_type == SGI_IP35;
if (ip35) {
/*
@@ -127,22 +126,22 @@ ip27_setup()
* Synergy0 register #0 is a 16 bits identification register.
*/
synergy0_0 = IP27_RHSPEC_L(0, HSPEC_SYNERGY(0, 0));
- brick = (synergy0_0 & 0xf000) >> 12;
- switch (brick) {
- case 0x02: /* Chimera */
+ sys_config.system_subtype = (synergy0_0 & 0xf000) >> 12;
+ switch (sys_config.system_subtype) {
+ case IP35_O350: /* Chimera */
hw_prod = "Origin 350";
break;
- case 0x04: /* Asterix */
+ case IP35_FUEL: /* Asterix */
hw_prod = "Fuel";
break;
- case 0x08: /* Speedo2 */
+ case IP35_O300: /* Speedo2 */
hw_prod = "Origin 300";
break;
default:
{
static char unknown_model[20];
snprintf(unknown_model, sizeof unknown_model,
- "Unknown IP35 type %x", brick);
+ "Unknown IP35 type %x", sys_config.system_subtype);
hw_prod = unknown_model;
}
break;
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c
index 840b50f8088..ff11e1c72e0 100644
--- a/sys/arch/sgi/sgi/machdep.c
+++ b/sys/arch/sgi/sgi/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.85 2009/10/16 00:15:49 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.86 2009/11/07 14:49:01 miod Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -222,14 +222,14 @@ mips_init(int argc, void *argv, caddr_t boot_esym)
#endif
#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000)
- case SGI_O200:
+ case SGI_IP27:
bios_printf("Found SGI-IP27, setting up.\n");
strlcpy(cpu_model, "IP27", sizeof(cpu_model));
ip27_setup();
break;
- case SGI_O300:
+ case SGI_IP35:
bios_printf("Found SGI-IP35, setting up.\n");
/* IP27 is intentional, we use the same kernel */
strlcpy(cpu_model, "IP27", sizeof(cpu_model));
@@ -416,8 +416,8 @@ mips_init(int argc, void *argv, caddr_t boot_esym)
break;
default:
case SGI_OCTANE:
- case SGI_O200:
- case SGI_O300:
+ case SGI_IP27:
+ case SGI_IP35:
cputype = MIPS_R10000;
break;
}
diff --git a/sys/arch/sgi/sgi/mainbus.c b/sys/arch/sgi/sgi/mainbus.c
index a66c1e256ca..ba41913085f 100644
--- a/sys/arch/sgi/sgi/mainbus.c
+++ b/sys/arch/sgi/sgi/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.5 2009/10/30 08:13:57 syuu Exp $ */
+/* $OpenBSD: mainbus.c,v 1.6 2009/11/07 14:49:01 miod Exp $ */
/*
* Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -74,8 +74,8 @@ mbattach(struct device *parent, struct device *self, void *aux)
*/
switch (sys_config.system_type) {
#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000)
- case SGI_O200:
- case SGI_O300:
+ case SGI_IP27:
+ case SGI_IP35:
ip27_autoconf(self);
return;
#endif
diff --git a/sys/arch/sgi/sgi/sginode.c b/sys/arch/sgi/sgi/sginode.c
index e95bf5f649f..45b13a21049 100644
--- a/sys/arch/sgi/sgi/sginode.c
+++ b/sys/arch/sgi/sgi/sginode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sginode.c,v 1.13 2009/10/31 12:26:36 sobrado Exp $ */
+/* $OpenBSD: sginode.c,v 1.14 2009/11/07 14:49:01 miod Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
*
@@ -198,7 +198,7 @@ kl_first_pass_comp(klinfo_t *comp, void *arg)
}
#endif
- if (sys_config.system_type == SGI_O200)
+ if (sys_config.system_type == SGI_IP27)
kl_add_memory_ip27(comp->nasid, memcomp_m->membnk_bnksz,
kl_n_mode ? MD_MEM_BANKS_N : MD_MEM_BANKS_M);
else
diff --git a/sys/arch/sgi/xbow/xbow.c b/sys/arch/sgi/xbow/xbow.c
index 44f2907a614..a184dab70f0 100644
--- a/sys/arch/sgi/xbow/xbow.c
+++ b/sys/arch/sgi/xbow/xbow.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xbow.c,v 1.22 2009/10/26 20:14:42 miod Exp $ */
+/* $OpenBSD: xbow.c,v 1.23 2009/11/07 14:49:02 miod Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
@@ -161,8 +161,8 @@ xbowmatch(struct device *parent, void *match, void *aux)
return (0);
switch (sys_config.system_type) {
- case SGI_O200:
- case SGI_O300:
+ case SGI_IP27:
+ case SGI_IP35:
case SGI_OCTANE:
return (1);
default:
@@ -307,7 +307,7 @@ xbowattach(struct device *parent, struct device *self, void *aux)
xbow_intr_widget_register =
(1UL << 47) /* XIO I/O space */ |
(nasid <<
- (sys_config.system_type == SGI_O300 ? 39 : 38)) |
+ (sys_config.system_type == SGI_IP35 ? 39 : 38)) |
((paddr_t)IP27_RHUB_ADDR(0, HUBPI_IR_CHANGE) -
IP27_NODE_IO_BASE(0)) /* HUB register offset */;
diff --git a/sys/arch/sgi/xbow/xbridge.c b/sys/arch/sgi/xbow/xbridge.c
index c86a51491f1..afb7751c679 100644
--- a/sys/arch/sgi/xbow/xbridge.c
+++ b/sys/arch/sgi/xbow/xbridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xbridge.c,v 1.58 2009/10/26 18:37:13 miod Exp $ */
+/* $OpenBSD: xbridge.c,v 1.59 2009/11/07 14:49:02 miod Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
@@ -2003,8 +2003,8 @@ xbridge_dmamem_alloc(bus_dma_tag_t t, bus_size_t size, bus_size_t alignment,
switch (sys_config.system_type) {
default:
#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000)
- case SGI_O200:
- case SGI_O300:
+ case SGI_IP27:
+ case SGI_IP35:
low = 0;
break;
#endif
diff --git a/sys/dev/pci/isp_pci.c b/sys/dev/pci/isp_pci.c
index 5d38e65cdac..208c6800820 100644
--- a/sys/dev/pci/isp_pci.c
+++ b/sys/dev/pci/isp_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isp_pci.c,v 1.52 2009/08/09 09:55:03 kettenis Exp $ */
+/* $OpenBSD: isp_pci.c,v 1.53 2009/11/07 14:49:02 miod Exp $ */
/* $FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.148 2007/06/26 23:08:57 mjacob Exp $*/
/*-
* Copyright (c) 1997-2006 by Matthew Jacob
@@ -501,8 +501,8 @@ isp_pci_attach(struct device *parent, struct device *self, void *aux)
* XXX other isp...
*/
if (sys_config.system_type == SGI_OCTANE ||
- sys_config.system_type == SGI_O200 ||
- sys_config.system_type == SGI_O300)
+ sys_config.system_type == SGI_IP27 ||
+ sys_config.system_type == SGI_IP35)
DEFAULT_IID(isp) = 0;
#endif