diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-04-19 12:52:34 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-04-19 12:52:34 +0000 |
commit | 697e8762a99f4297ea2f3a1994450ab96f4e0600 (patch) | |
tree | fdf4144848923499e0be34ce361099f5f55bad0d /sys/arch/sgi | |
parent | b6cb614f0405d63793d9df68b964b36dcd50bb45 (diff) |
Add heuristics to tell IP27 and IP35 apart, as they will need to be handled
differently at times.
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r-- | sys/arch/sgi/sgi/machdep.c | 14 | ||||
-rw-r--r-- | sys/arch/sgi/xbow/xbow.c | 16 | ||||
-rw-r--r-- | sys/arch/sgi/xbow/xbridge.c | 3 |
3 files changed, 24 insertions, 9 deletions
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c index cdcf9d89c21..11d8a846a9b 100644 --- a/sys/arch/sgi/sgi/machdep.c +++ b/sys/arch/sgi/sgi/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.61 2008/12/30 05:33:17 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.62 2009/04/19 12:52:33 miod Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -245,6 +245,13 @@ mips_init(int argc, void *argv, caddr_t boot_esym) ip27_setup(); break; + + case SGI_O300: + bios_printf("Found SGI-IP35, setting up.\n"); + strlcpy(cpu_model, "SGI-Origin300 (IP35)", sizeof(cpu_model)); + ip27_setup(); + + break; #endif #if defined(TGT_OCTANE) @@ -444,9 +451,10 @@ mips_init(int argc, void *argv, caddr_t boot_esym) #if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000) /* - * If an IP27 system set up Node 0's HUB. + * If an IP27 or IP35 system set up Node 0's HUB. */ - if (sys_config.system_type == SGI_O200) { + if (sys_config.system_type == SGI_O200 || + sys_config.system_type == SGI_O300) { IP27_LHUB_S(PI_REGION_PRESENT, 1); IP27_LHUB_S(PI_CALIAS_SIZE, PI_CALIAS_SIZE_0); } diff --git a/sys/arch/sgi/xbow/xbow.c b/sys/arch/sgi/xbow/xbow.c index f0c9b4a1270..63d6b16019d 100644 --- a/sys/arch/sgi/xbow/xbow.c +++ b/sys/arch/sgi/xbow/xbow.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbow.c,v 1.4 2009/04/15 18:45:41 miod Exp $ */ +/* $OpenBSD: xbow.c,v 1.5 2009/04/19 12:52:33 miod Exp $ */ /* * Copyright (c) 2008, 2009 Miodrag Vallat. @@ -189,6 +189,7 @@ xbowmatch(struct device *parent, void *match, void *aux) { switch (sys_config.system_type) { case SGI_O200: + case SGI_O300: case SGI_OCTANE: return (1); default: @@ -301,9 +302,17 @@ xbowattach(struct device *parent, struct device *self, void *aux) (wid & WIDGET_ID_REV_MASK) >> WIDGET_ID_REV_SHIFT); /* + * Default value for the interrupt register. If this system + * has a Heart widget, the Heart code will take care of changing it. + */ + xbow_intr_widget_register = (1UL << 47) /* XIO I/O space */ | + ((paddr_t)IP27_RHUB_ADDR(nasid, HUB_IR_CHANGE) - + IP27_NODE_IO_BASE(nasid)) /* HUB register offset */; + + /* * If widget 0 reports itself as a bridge, this is not a * complete XBow, but only a limited topology. This is - * found on the Origin 200 (but probably not on the Origin 2000). + * found on at least the Origin 200. */ if (vendor == XBOW_VENDOR_SGI4 && product == XBOW_PRODUCT_SGI4_BRIDGE) { /* @@ -311,9 +320,6 @@ xbowattach(struct device *parent, struct device *self, void *aux) * bridge). */ xbow_intr_widget = 0x0a; - xbow_intr_widget_register = (1UL << 47) /* XIO I/O space */ | - ((paddr_t)IP27_RHUB_ADDR(nasid, HUB_IR_CHANGE) - - IP27_NODE_IO_BASE(nasid)) /* HUB register offset */; xbow_attach_widget(self, nasid, WIDGET_MIN, xbowsubmatch_pass2, xbowprint_pass2); diff --git a/sys/arch/sgi/xbow/xbridge.c b/sys/arch/sgi/xbow/xbridge.c index 2714a02a754..b729bf2c464 100644 --- a/sys/arch/sgi/xbow/xbridge.c +++ b/sys/arch/sgi/xbow/xbridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbridge.c,v 1.10 2009/04/18 19:26:33 miod Exp $ */ +/* $OpenBSD: xbridge.c,v 1.11 2009/04/19 12:52:33 miod Exp $ */ /* * Copyright (c) 2008 Miodrag Vallat. @@ -618,6 +618,7 @@ xbridge_intr_establish(void *cookie, pci_intr_handle_t ih, int level, break; default: case SGI_O200: + case SGI_O300: int_addr = 0x20000 | intrsrc | (nasid << 8); break; } |