diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-11-07 14:49:03 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-11-07 14:49:03 +0000 |
commit | 05ea5cfbae200015db0fc343bfb527229a3c9338 (patch) | |
tree | 64116af8425b2acc036d0f8115b708278e019dfe /sys/arch/sgi | |
parent | a65d95c199b8526c9b856b7d22803089a87d2740 (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.
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r-- | sys/arch/sgi/dev/dsrtc.c | 6 | ||||
-rw-r--r-- | sys/arch/sgi/include/autoconf.h | 3 | ||||
-rw-r--r-- | sys/arch/sgi/pci/ioc.c | 8 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/ip27.h | 8 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/ip27_machdep.c | 17 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/machdep.c | 10 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/mainbus.c | 6 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/sginode.c | 4 | ||||
-rw-r--r-- | sys/arch/sgi/xbow/xbow.c | 8 | ||||
-rw-r--r-- | sys/arch/sgi/xbow/xbridge.c | 6 |
10 files changed, 41 insertions, 35 deletions
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 |