summaryrefslogtreecommitdiff
path: root/sys/arch/sgi
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r--sys/arch/sgi/conf/GENERIC-IP275
-rw-r--r--sys/arch/sgi/conf/RAMDISK-IP275
-rw-r--r--sys/arch/sgi/conf/files.sgi6
-rw-r--r--sys/arch/sgi/sgi/autoconf.c12
-rw-r--r--sys/arch/sgi/sgi/machdep.c12
-rw-r--r--sys/arch/sgi/sgi/mainbus.c4
-rw-r--r--sys/arch/sgi/xbow/xbow.c6
-rw-r--r--sys/arch/sgi/xbow/xbridge.c14
8 files changed, 31 insertions, 33 deletions
diff --git a/sys/arch/sgi/conf/GENERIC-IP27 b/sys/arch/sgi/conf/GENERIC-IP27
index 929deaa8551..4c2ddcbedee 100644
--- a/sys/arch/sgi/conf/GENERIC-IP27
+++ b/sys/arch/sgi/conf/GENERIC-IP27
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC-IP27,v 1.18 2009/11/01 19:17:56 miod Exp $
+# $OpenBSD: GENERIC-IP27,v 1.19 2009/11/07 18:56:55 miod Exp $
#
# THIS KERNEL IS FOR Origin, Onyx, Fuel, Tezro (IP27, IP35) SYSTEMS ONLY.
#
@@ -26,8 +26,7 @@ option USER_PCICONF # User-space PCI configuration
option USBVERBOSE
# Define what targets to support
-option TGT_ORIGIN200 # Origin 200/300, Onyx 2/3, Fuel
-option TGT_ORIGIN2000 # Origin 2000/3000, Tezro
+option TGT_ORIGIN # IP27/IP35
option TGT_COHERENT
# Specify storage configuration (it's a joke..)
diff --git a/sys/arch/sgi/conf/RAMDISK-IP27 b/sys/arch/sgi/conf/RAMDISK-IP27
index 95a58519250..66c5ae4c47d 100644
--- a/sys/arch/sgi/conf/RAMDISK-IP27
+++ b/sys/arch/sgi/conf/RAMDISK-IP27
@@ -1,4 +1,4 @@
-# $OpenBSD: RAMDISK-IP27,v 1.13 2009/11/01 19:17:56 miod Exp $
+# $OpenBSD: RAMDISK-IP27,v 1.14 2009/11/07 18:56:55 miod Exp $
#
# THIS KERNEL IS FOR Origin, Onyx, Fuel, Tezro (IP27, IP35) SYSTEMS ONLY.
@@ -34,8 +34,7 @@ option MINIROOTSIZE=8192
option RAMDISK_HOOKS
# Define what targets to support
-option TGT_ORIGIN200 # Origin 200/300, Onyx 2/3, Fuel
-option TGT_ORIGIN2000 # Origin 2000/3000, Tezro
+option TGT_ORIGIN # IP27/IP35
option TGT_COHERENT
# Specify storage configuration using ramdisk
diff --git a/sys/arch/sgi/conf/files.sgi b/sys/arch/sgi/conf/files.sgi
index 8afd0f245f3..a3a2461f72d 100644
--- a/sys/arch/sgi/conf/files.sgi
+++ b/sys/arch/sgi/conf/files.sgi
@@ -1,4 +1,4 @@
-# $OpenBSD: files.sgi,v 1.37 2009/11/01 19:17:56 miod Exp $
+# $OpenBSD: files.sgi,v 1.38 2009/11/07 18:56:55 miod Exp $
#
# maxpartitions must be first item in files.${ARCH}
#
@@ -13,13 +13,13 @@ file arch/sgi/sgi/autoconf.c
file arch/sgi/sgi/bus_dma.c
file arch/sgi/sgi/conf.c
file arch/sgi/sgi/disksubr.c disk
-file arch/sgi/sgi/ip27_machdep.c tgt_origin200 | tgt_origin2000
+file arch/sgi/sgi/ip27_machdep.c tgt_origin
file arch/sgi/sgi/ip30_machdep.c tgt_octane
file arch/sgi/sgi/ip32_machdep.c tgt_o2
file arch/sgi/sgi/machdep.c
file arch/sgi/sgi/mainbus.c
file arch/sgi/sgi/mutex.c
-file arch/sgi/sgi/sginode.c tgt_origin200 | tgt_origin2000
+file arch/sgi/sgi/sginode.c tgt_origin
file arch/sgi/sgi/wscons_machdep.c wsdisplay
# RAM disk for boot
diff --git a/sys/arch/sgi/sgi/autoconf.c b/sys/arch/sgi/sgi/autoconf.c
index 2c6c448c325..15c6c18a040 100644
--- a/sys/arch/sgi/sgi/autoconf.c
+++ b/sys/arch/sgi/sgi/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.26 2009/10/26 20:14:42 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.27 2009/11/07 18:56:55 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
*
@@ -157,7 +157,7 @@ static char bootpath_store[sizeof osloadpartition];
static char *bootpath_curpos;
static char *bootpath_lastpos;
static int bootpath_lastunit;
-#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000)
+#ifdef TGT_ORIGIN
static int dksc_ctrl, dksc_mode;
#endif
@@ -170,7 +170,7 @@ bootpath_init()
strlcpy(bootpath_store, osloadpartition, sizeof bootpath_store);
bootpath_curpos = bootpath_store;
-#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000)
+#ifdef TGT_ORIGIN
/*
* If this is the first time we're ever invoked,
* check for a dksc() syntax and rewrite it as
@@ -181,7 +181,7 @@ bootpath_init()
#endif
}
-#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000)
+#ifdef TGT_ORIGIN
/*
* Convert a `dksc()' bootpath into an ARC-friendly bootpath.
*/
@@ -377,7 +377,7 @@ device_register(struct device *dev, void *aux)
* we need to count scsi controllers, until we find ours.
*/
-#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000)
+#ifdef TGT_ORIGIN
if (dksc_mode) {
if (strcmp(cd->cd_name, "scsibus") == 0 &&
dev->dv_unit == dksc_ctrl)
@@ -391,7 +391,7 @@ device_register(struct device *dev, void *aux)
if (parent == lastparent)
goto found_advance;
-#if defined(TGT_O2)
+#ifdef TGT_O2
/*
* On O2, the pci(0) component may be omitted from
* the bootpath, in which case we fake the missing
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c
index ff11e1c72e0..2ffbcbd98f7 100644
--- a/sys/arch/sgi/sgi/machdep.c
+++ b/sys/arch/sgi/sgi/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.86 2009/11/07 14:49:01 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.87 2009/11/07 18:56:55 miod Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -57,7 +57,7 @@
#include <machine/autoconf.h>
#include <machine/memconf.h>
#include <machine/regnum.h>
-#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000)
+#ifdef TGT_ORIGIN
#include <machine/mnode.h>
#endif
@@ -213,7 +213,7 @@ mips_init(int argc, void *argv, caddr_t boot_esym)
*/
hw_vendor = "SGI";
switch (sys_config.system_type) {
-#if defined(TGT_O2)
+#ifdef TGT_O2
case SGI_O2:
bios_printf("Found SGI-IP32, setting up.\n");
strlcpy(cpu_model, "IP32", sizeof(cpu_model));
@@ -221,7 +221,7 @@ mips_init(int argc, void *argv, caddr_t boot_esym)
break;
#endif
-#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000)
+#ifdef TGT_ORIGIN
case SGI_IP27:
bios_printf("Found SGI-IP27, setting up.\n");
strlcpy(cpu_model, "IP27", sizeof(cpu_model));
@@ -238,7 +238,7 @@ mips_init(int argc, void *argv, caddr_t boot_esym)
break;
#endif
-#if defined(TGT_OCTANE)
+#ifdef TGT_OCTANE
case SGI_OCTANE:
bios_printf("Found SGI-IP30, setting up.\n");
strlcpy(cpu_model, "IP30", sizeof(cpu_model));
@@ -286,7 +286,7 @@ mips_init(int argc, void *argv, caddr_t boot_esym)
* Read platform-specific environment variables.
*/
switch (sys_config.system_type) {
-#if defined(TGT_O2)
+#ifdef TGT_O2
case SGI_O2:
/* Get Ethernet address from ARCBIOS. */
cp = Bios_GetEnvironmentVariable("eaddr");
diff --git a/sys/arch/sgi/sgi/mainbus.c b/sys/arch/sgi/sgi/mainbus.c
index ba41913085f..79f3a93d780 100644
--- a/sys/arch/sgi/sgi/mainbus.c
+++ b/sys/arch/sgi/sgi/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.6 2009/11/07 14:49:01 miod Exp $ */
+/* $OpenBSD: mainbus.c,v 1.7 2009/11/07 18:56:55 miod Exp $ */
/*
* Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -73,7 +73,7 @@ mbattach(struct device *parent, struct device *self, void *aux)
* code.
*/
switch (sys_config.system_type) {
-#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000)
+#ifdef TGT_ORIGIN
case SGI_IP27:
case SGI_IP35:
ip27_autoconf(self);
diff --git a/sys/arch/sgi/xbow/xbow.c b/sys/arch/sgi/xbow/xbow.c
index a184dab70f0..9b5a7c401fa 100644
--- a/sys/arch/sgi/xbow/xbow.c
+++ b/sys/arch/sgi/xbow/xbow.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xbow.c,v 1.23 2009/11/07 14:49:02 miod Exp $ */
+/* $OpenBSD: xbow.c,v 1.24 2009/11/07 18:56:55 miod Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
@@ -298,7 +298,7 @@ xbowattach(struct device *parent, struct device *self, void *aux)
case SGI_OCTANE:
klcfg.probe_order = xbow_probe_octane;
break;
-#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000)
+#ifdef TGT_ORIGIN
default:
/*
* Default value for the interrupt register.
@@ -394,7 +394,7 @@ xbow_attach_widget(struct device *self, int16_t nasid, int widget,
return 0;
}
-#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000)
+#ifdef TGT_ORIGIN
/*
* These two functions try to figure out the configuration of the XBow
diff --git a/sys/arch/sgi/xbow/xbridge.c b/sys/arch/sgi/xbow/xbridge.c
index afb7751c679..ea5280915cb 100644
--- a/sys/arch/sgi/xbow/xbridge.c
+++ b/sys/arch/sgi/xbow/xbridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xbridge.c,v 1.59 2009/11/07 14:49:02 miod Exp $ */
+/* $OpenBSD: xbridge.c,v 1.60 2009/11/07 18:56:55 miod Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
@@ -1326,7 +1326,7 @@ int
xbridge_space_map_mem(bus_space_tag_t t, bus_addr_t offs, bus_size_t size,
int flags, bus_space_handle_t *bshp)
{
-#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000) || defined(DIAGNOSTIC)
+#if defined(TGT_ORIGIN) || defined(DIAGNOSTIC)
struct xbpci_softc *xb = (struct xbpci_softc *)t->bus_private;
#endif
@@ -1336,7 +1336,7 @@ xbridge_space_map_mem(bus_space_tag_t t, bus_addr_t offs, bus_size_t size,
* mappings, because the large mapping is always available.
*/
-#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000)
+#ifdef TGT_ORIGIN
if (sys_config.system_type != SGI_OCTANE &&
(offs >> 24) == xb->xb_devio_skew)
return xbridge_space_map_devio(t, offs, size, flags, bshp);
@@ -1428,7 +1428,7 @@ int
xbridge_space_region_mem(bus_space_tag_t t, bus_space_handle_t bsh,
bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp)
{
-#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000) || defined(DIAGNOSTIC)
+#if defined(TGT_ORIGIN) || defined(DIAGNOSTIC)
struct xbpci_softc *xb = (struct xbpci_softc *)t->bus_private;
bus_addr_t bpa;
#endif
@@ -1439,7 +1439,7 @@ xbridge_space_region_mem(bus_space_tag_t t, bus_space_handle_t bsh,
* mappings, because the large mapping is always available.
*/
-#if defined(TGT_ORIGIN200) || defined(TGT_ORIGIN2000)
+#ifdef TGT_ORIGIN
if (sys_config.system_type != SGI_OCTANE) {
/*
* Note we can not use our own bus_base because it might not
@@ -2002,13 +2002,13 @@ 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)
+#ifdef TGT_ORIGIN
case SGI_IP27:
case SGI_IP35:
low = 0;
break;
#endif
-#if defined(TGT_OCTANE)
+#ifdef TGT_OCTANE
case SGI_OCTANE:
low = IP30_MEMORY_BASE;
break;