diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-19 21:37:50 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-19 21:37:50 +0000 |
commit | f620586e2cb1b72ce963a37be3d78dc4cde97359 (patch) | |
tree | 12e88306650f1a855ca3bd848982de32e5529d21 /sys/arch/sgi | |
parent | b9721c272fdafa69ae8dde540ba28b38d58c30ec (diff) |
Use MACE ISA constants instead of magic values.
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r-- | sys/arch/sgi/localbus/macebus.c | 5 | ||||
-rw-r--r-- | sys/arch/sgi/localbus/macebus.h | 3 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/machdep.c | 6 |
3 files changed, 8 insertions, 6 deletions
diff --git a/sys/arch/sgi/localbus/macebus.c b/sys/arch/sgi/localbus/macebus.c index 252bd282614..e6be4c817b0 100644 --- a/sys/arch/sgi/localbus/macebus.c +++ b/sys/arch/sgi/localbus/macebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: macebus.c,v 1.13 2005/08/14 11:02:32 miod Exp $ */ +/* $OpenBSD: macebus.c,v 1.14 2005/12/19 21:37:47 miod Exp $ */ /* * Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se) @@ -367,7 +367,8 @@ mace_space_map(bus_space_tag_t t, bus_addr_t offs, bus_size_t size, bpa = t->bus_base + offs; /* Handle special mapping separately */ - if ((bpa >= 0x1f380000 && (bpa+size) <= 0x1f3a0000) ) { + if (bpa >= (MACEBUS_BASE + MACE_ISAX_OFFS) && + (bpa + size) < (MACEBUS_BASE + MACE_ISAX_OFFS + MACE_ISAX_SIZE)) { *bshp = PHYS_TO_KSEG1(bpa); return 0; } diff --git a/sys/arch/sgi/localbus/macebus.h b/sys/arch/sgi/localbus/macebus.h index 6490b775574..249465c287f 100644 --- a/sys/arch/sgi/localbus/macebus.h +++ b/sys/arch/sgi/localbus/macebus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: macebus.h,v 1.6 2005/01/24 20:44:37 kettenis Exp $ */ +/* $OpenBSD: macebus.h,v 1.7 2005/12/19 21:37:48 miod Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.com). @@ -45,6 +45,7 @@ #define MACE_VOUT_OFFS 0x00200000 #define MACE_IO_OFFS 0x00300000 #define MACE_ISAX_OFFS 0x00380000 +#define MACE_ISAX_SIZE 0x00020000 /* * PCI control registers (relative MACE_PCI_OFFS) diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c index c61d70dea41..a8cf9f54281 100644 --- a/sys/arch/sgi/sgi/machdep.c +++ b/sys/arch/sgi/sgi/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.25 2005/12/12 20:58:49 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.26 2005/12/19 21:37:49 miod Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -217,8 +217,8 @@ bios_printf("SR=%08x\n", getsr()); /* leave this in for now. need to see sr */ case SGI_O2: bios_printf("Found SGI-IP32, setting up.\n"); strlcpy(cpu_model, "SGI-O2 (IP32)", sizeof(cpu_model)); - sys_config.cons_ioaddr[0] = 0x00390000; /*XXX*/ - sys_config.cons_ioaddr[1] = 0x00398000; /*XXX*/ + sys_config.cons_ioaddr[0] = MACE_ISA_SER1_OFFS; + sys_config.cons_ioaddr[1] = MACE_ISA_SER2_OFFS; sys_config.cons_baudclk = 1843200; /*XXX*/ sys_config.cons_iot = &macebus_tag; sys_config.local.bus_base = 0x0; /*XXX*/ |