diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2012-05-25 11:31:05 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2012-05-25 11:31:05 +0000 |
commit | 0a4d4da82e5522669fbcb31401c3c4cb4ce0a3fc (patch) | |
tree | e9930fb3937cb028299f7434fc84b3b2b6089706 | |
parent | 901172262afa9f37f2f6ba043f387ecb39830288 (diff) |
Support for the POWER Indigo2 R10000 systems (IP28). Currently running with
ECC checking disabled, which allows the existing Indigo2 drivers to run
unmodified.
-rw-r--r-- | sys/arch/sgi/compile/.cvsignore | 2 | ||||
-rw-r--r-- | sys/arch/sgi/conf/GENERIC-IP28 | 92 | ||||
-rw-r--r-- | sys/arch/sgi/conf/RAMDISK-IP28 | 95 | ||||
-rw-r--r-- | sys/arch/sgi/gio/gio.c | 36 | ||||
-rw-r--r-- | sys/arch/sgi/localbus/imc.c | 26 | ||||
-rw-r--r-- | sys/arch/sgi/stand/boot/arcbios.c | 4 | ||||
-rw-r--r-- | sys/arch/sgi/stand/boot/boot.c | 3 | ||||
-rw-r--r-- | sys/arch/sgi/stand/boot/version | 8 |
8 files changed, 251 insertions, 15 deletions
diff --git a/sys/arch/sgi/compile/.cvsignore b/sys/arch/sgi/compile/.cvsignore index db6b8d0fedd..174a5271611 100644 --- a/sys/arch/sgi/compile/.cvsignore +++ b/sys/arch/sgi/compile/.cvsignore @@ -1,10 +1,12 @@ GENERIC-IP22 GENERIC-IP27 GENERIC-IP27.MP +GENERIC-IP28 GENERIC-IP30 GENERIC-IP30.MP GENERIC-IP32 RAMDISK-IP22 RAMDISK-IP27 +RAMDISK-IP28 RAMDISK-IP30 RAMDISK-IP32 diff --git a/sys/arch/sgi/conf/GENERIC-IP28 b/sys/arch/sgi/conf/GENERIC-IP28 new file mode 100644 index 00000000000..106b036eac0 --- /dev/null +++ b/sys/arch/sgi/conf/GENERIC-IP28 @@ -0,0 +1,92 @@ +# $OpenBSD: GENERIC-IP28,v 1.1 2012/05/25 11:31:04 miod Exp $ +# +# THIS KERNEL IS FOR POWER INDIGO2 R10000 (IP28) SYSTEMS ONLY. +# +# For further information on compiling OpenBSD kernels, see the config(8) +# man page. +# +# For further information on hardware support for this architecture, see +# the intro(4) man page. For further information about kernel options +# for this architecture, see the options(4) man page. For an explanation +# of each device driver in this file see the section 4 man page for the +# device. + +machine sgi mips64 +include "../../../conf/GENERIC" +maxusers 32 # Estimated number of users + +# Make options +makeoption LINK_ADDRESS="0xa800000020020000" + +option WSDISPLAY_COMPAT_RAWKBD # Provide raw scancodes; needed for X11 + +option EISAVERBOSE +option PCIVERBOSE +option USER_PCICONF # User-space PCI configuration + +# Define what targets to support +option TGT_INDIGO2 # Indigo2 +option ARCBIOS # mandatory +option CPU_R10000 # R10000 support + +config bsd swap generic + +# +# Definition of system +# +mainbus0 at root +cpu* at mainbus0 +clock0 at mainbus0 + +int0 at mainbus0 # Interrupt Controller +imc0 at mainbus0 # Memory Controller +gio0 at imc0 +eisa0 at imc0 + +hpc0 at gio? addr 0x1fb80000 +hpc1 at gio? addr 0x1fb00000 +hpc2 at gio? addr 0x1f980000 + +dsclock0 at hpc0 +sq* at hpc? # On-board Ethernet or E++ adapter +wdsc* at hpc? # On-board SCSI or GIO32 SCSI adapter +#haltwo* at hpc? # Audio +panel* at hpc? # front panel buttons +pckbc* at hpc? # keyboard and mouse + +zs0 at hpc0 +zstty* at zs0 # Serial ports + +pckbd* at pckbc? +wskbd* at pckbd? mux 1 +pms* at pckbc? +wsmouse* at pms? mux 0 + +grtwo* at gio? # Express (GR2/GR3) graphics +wsdisplay* at grtwo? +impact* at gio? # Impact graphics +wsdisplay* at impact? +newport* at gio? # XL graphics +wsdisplay* at newport? + +giopci* at gio? +pci* at giopci? + +#dc* at pci? # Phobos G100/G130/G160 Fast Ethernet +#lxtphy* at mii? # Level1 LXT970 PHYs +#ukphy* at mii? # "unknown" PHYs + +#audio* at haltwo? + +scsibus* at scsi? +sd* at scsibus? +st* at scsibus? +cd* at scsibus? +ch* at scsibus? +safte* at scsibus? +ses* at scsibus? +uk* at scsibus? + +pseudo-device crypto 1 +#pseudo-device hotplug 1 # devices hot plugging +pseudo-device wsmux 2 # Mouse and keyboard multiplexor diff --git a/sys/arch/sgi/conf/RAMDISK-IP28 b/sys/arch/sgi/conf/RAMDISK-IP28 new file mode 100644 index 00000000000..caf6b79c8d4 --- /dev/null +++ b/sys/arch/sgi/conf/RAMDISK-IP28 @@ -0,0 +1,95 @@ +# $OpenBSD: RAMDISK-IP28,v 1.1 2012/05/25 11:31:04 miod Exp $ +# +# THIS KERNEL IS FOR POWER INDIGO2 R10000 (IP28) SYSTEMS ONLY. + +machine sgi mips64 + +maxusers 4 +option TIMEZONE=0 # minutes west of GMT (for) +option DST=0 # use daylight savings rules + +# Make options +makeoption LINK_ADDRESS="0xa800000020020000" + +option DDB + +option EISAVERBOSE +option PCIVERBOSE + +# Filesystem options +option CD9660 # ISO 9660 + Rock Ridge file system +option FIFO # POSIX fifo support (in all filesystems) +option FFS # fast filesystem +#option MSDOSFS # Ability to read write MS-Dos filesystem +option NFSCLIENT # Sun NFS-compatible filesystem (client) + +# Networking options +option INET # IP + ICMP + TCP + UDP +option INET6 # IPv6 (needs INET) + +# RAMDISK stuff +option MINIROOTSIZE=10240 +option RAMDISK_HOOKS + +# Define what targets to support +option TGT_INDIGO2 # Indigo2 +option ARCBIOS # mandatory +option CPU_R10000 # R10000 support + +# Specify storage configuration using ramdisk +config bsd root on rd0a swap on rd0b + +# +# Definition of system +# +mainbus0 at root +cpu* at mainbus0 +clock0 at mainbus0 + +int0 at mainbus0 # Interrupt Controller +imc0 at mainbus0 # Memory Controller +gio0 at imc0 +eisa0 at imc0 + +hpc0 at gio? addr 0x1fb80000 +hpc1 at gio? addr 0x1fb00000 +hpc2 at gio? addr 0x1f980000 + +dsclock0 at hpc0 +sq* at hpc? # On-board Ethernet or E++ adapter +wdsc* at hpc? # On-board SCSI or GIO32 SCSI adapter +pckbc* at hpc? # keyboard and mouse + +zs0 at hpc0 +zstty* at zs0 # Serial ports + +pckbd* at pckbc? +wskbd* at pckbd? mux 1 +#pms* at pckbc? +#wsmouse* at pms? mux 0 + +grtwo* at gio? # Express (GR2/GR3) graphics +wsdisplay* at grtwo? +impact* at gio? # Impact graphics +wsdisplay* at impact? +newport* at gio? # XL graphics +wsdisplay* at newport? + +giopci* at gio? +pci* at giopci? + +scsibus* at scsi? +sd* at scsibus? +st* at scsibus? +cd* at scsibus? +#ch* at scsibus? +#uk* at scsibus? + +#### PSEUDO Devices +pseudo-device loop 1 # network loopback +pseudo-device bpfilter 1 # packet filter ports + +pseudo-device rd 1 # Ram disk. +pseudo-device bio 1 # ioctl multiplexing device + +option BOOT_CONFIG # add support for boot -c diff --git a/sys/arch/sgi/gio/gio.c b/sys/arch/sgi/gio/gio.c index 214bdad8bd5..a4220d41e56 100644 --- a/sys/arch/sgi/gio/gio.c +++ b/sys/arch/sgi/gio/gio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gio.c,v 1.10 2012/05/17 19:46:52 miod Exp $ */ +/* $OpenBSD: gio.c,v 1.11 2012/05/25 11:31:04 miod Exp $ */ /* $NetBSD: gio.c,v 1.32 2011/07/01 18:53:46 dyoung Exp $ */ /* @@ -202,12 +202,25 @@ gio_attach(struct device *parent, struct device *self, void *aux) struct gio_attach_args ga; uint32_t gfx[GIO_MAX_FB], id; uint i, j, ngfx; + int sys_type; printf("\n"); sc->sc_iot = iaa->iaa_st; sc->sc_dmat = iaa->iaa_dmat; + switch (sys_config.system_type) { + case SGI_IP20: + sys_type = SGI_IP20; + break; + default: + case SGI_IP22: + case SGI_IP26: + case SGI_IP28: + sys_type = SGI_IP22; + break; + } + ngfx = 0; memset(gfx, 0, sizeof(gfx)); @@ -223,11 +236,11 @@ gio_attach(struct device *parent, struct device *self, void *aux) * If only the ARCBios component tree would be so kind as to give * us the address of the frame buffer components... */ - if (sys_config.system_type != SGI_IP22 || + if (sys_type != SGI_IP22 || sys_config.system_subtype != IP22_CHALLS) { for (i = 0; gfx_bases[i].base != 0; i++) { /* skip slots that don't apply to us */ - if (gfx_bases[i].mach_type != sys_config.system_type) + if (gfx_bases[i].mach_type != sys_type) continue; if (gfx_bases[i].mach_subtype != -1 && @@ -279,7 +292,7 @@ gio_attach(struct device *parent, struct device *self, void *aux) int skip = 0; /* skip slots that don't apply to us */ - if (slot_bases[i].mach_type != sys_config.system_type) + if (slot_bases[i].mach_type != sys_type) continue; if (slot_bases[i].mach_subtype != -1 && @@ -523,6 +536,19 @@ giofb_cnprobe() struct gio_attach_args ga; uint32_t id; int i; + int sys_type; + + switch (sys_config.system_type) { + case SGI_IP20: + sys_type = SGI_IP20; + break; + default: + case SGI_IP22: + case SGI_IP26: + case SGI_IP28: + sys_type = SGI_IP22; + break; + } for (i = 0; gfx_bases[i].base != 0; i++) { if (giofb_consaddr != 0 && @@ -530,7 +556,7 @@ giofb_cnprobe() continue; /* skip bases that don't apply to us */ - if (gfx_bases[i].mach_type != sys_config.system_type) + if (gfx_bases[i].mach_type != sys_type) continue; if (gfx_bases[i].mach_subtype != -1 && diff --git a/sys/arch/sgi/localbus/imc.c b/sys/arch/sgi/localbus/imc.c index 58b2ec1475e..2526284582a 100644 --- a/sys/arch/sgi/localbus/imc.c +++ b/sys/arch/sgi/localbus/imc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imc.c,v 1.6 2012/04/18 10:56:54 miod Exp $ */ +/* $OpenBSD: imc.c,v 1.7 2012/05/25 11:31:04 miod Exp $ */ /* $NetBSD: imc.c,v 1.32 2011/07/01 18:53:46 dyoung Exp $ */ /* @@ -534,16 +534,30 @@ imc_attach(struct device *parent, struct device *self, void *aux) set_intr(INTPRI_BUSERR, CR_INT_4, imc_bus_error); /* - * Enable parity reporting on GIO/main memory transactions. + * Enable parity reporting on GIO/main memory transactions, except + * on systems with the ECC memory board (IP26 and IP28), where + * enabling parity interferes with regular operation and causes + * sticky false errors. + * * Disable parity checking on CPU bus transactions (as turning * it on seems to cause spurious bus errors), but enable parity * checking on CPU reads from main memory (note that this bit * has the opposite sense... Turning it on turns the checks off!). + * * Finally, turn on interrupt writes to the CPU from the MC. */ reg = imc_read(IMC_CPUCTRL0); reg &= ~IMC_CPUCTRL0_NCHKMEMPAR; - reg |= (IMC_CPUCTRL0_GPR | IMC_CPUCTRL0_MPR | IMC_CPUCTRL0_INTENA); + switch (sys_config.system_type) { + case SGI_IP26: + case SGI_IP28: + reg &= ~(IMC_CPUCTRL0_GPR | IMC_CPUCTRL0_MPR); + break; + default: + reg |= IMC_CPUCTRL0_GPR | IMC_CPUCTRL0_MPR; + break; + } + reg |= IMC_CPUCTRL0_INTENA; imc_write(IMC_CPUCTRL0, reg); /* Setup the MC write buffer depth */ @@ -858,9 +872,9 @@ imc_disable_sysad_parity(void) switch (sys_config.system_type) { case SGI_IP20: case SGI_IP22: + break; case SGI_IP26: case SGI_IP28: - break; default: return; } @@ -878,9 +892,9 @@ imc_enable_sysad_parity(void) switch (sys_config.system_type) { case SGI_IP20: case SGI_IP22: + break; case SGI_IP26: case SGI_IP28: - break; default: return; } @@ -899,9 +913,9 @@ imc_is_sysad_parity_enabled(void) switch (sys_config.system_type) { case SGI_IP20: case SGI_IP22: + break; case SGI_IP26: case SGI_IP28: - break; default: return 0; } diff --git a/sys/arch/sgi/stand/boot/arcbios.c b/sys/arch/sgi/stand/boot/arcbios.c index c86e70eab9f..5ca93270e03 100644 --- a/sys/arch/sgi/stand/boot/arcbios.c +++ b/sys/arch/sgi/stand/boot/arcbios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arcbios.c,v 1.16 2012/03/19 19:08:37 miod Exp $ */ +/* $OpenBSD: arcbios.c,v 1.17 2012/05/25 11:31:04 miod Exp $ */ /*- * Copyright (c) 1996 M. Warner Losh. All rights reserved. * Copyright (c) 1996-2004 Opsycon AB. All rights reserved. @@ -49,6 +49,8 @@ static const struct systypes { } sys_types[] = { { "SGI-IP20", 20 }, { "SGI-IP22", 22 }, + { "SGI-IP26", 26 }, + { "SGI-IP28", 28 }, { "SGI-IP30", 30 }, { "SGI-IP32", 32 } }; diff --git a/sys/arch/sgi/stand/boot/boot.c b/sys/arch/sgi/stand/boot/boot.c index 05f3703a7d4..5325a6e72cd 100644 --- a/sys/arch/sgi/stand/boot/boot.c +++ b/sys/arch/sgi/stand/boot/boot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: boot.c,v 1.20 2012/03/29 20:22:18 miod Exp $ */ +/* $OpenBSD: boot.c,v 1.21 2012/05/25 11:31:04 miod Exp $ */ /* * Copyright (c) 2004 Opsycon AB, www.opsycon.se. @@ -233,6 +233,7 @@ check_phdr(void *v) case 27: addr = 0xa800000000000000ULL >> 24; break; + case 28: case 30: addr = 0xa800000020000000ULL >> 24; break; diff --git a/sys/arch/sgi/stand/boot/version b/sys/arch/sgi/stand/boot/version index efd592b4433..a5ea550740d 100644 --- a/sys/arch/sgi/stand/boot/version +++ b/sys/arch/sgi/stand/boot/version @@ -1,4 +1,4 @@ -/* $OpenBSD: version,v 1.1 2012/03/29 20:22:18 miod Exp $ */ +/* $OpenBSD: version,v 1.2 2012/05/25 11:31:04 miod Exp $ */ /* Public domain. Come on, it can hardly be considered as code. */ #if 0 @@ -15,6 +15,10 @@ No version strings up to 2012 The old behaviour was to only accept filenames starting with "/", and thus always relative to OSLoadPartition. +1.2 + IP28 support. Also, no longer refuse to run on IP26 systems, they + will hopefully run at some point in the future. + #endif -static const char version[] = "1.1"; +static const char version[] = "1.2"; |