summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2004-09-15 21:32:44 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2004-09-15 21:32:44 +0000
commit377595e0047525240b848b107144d53a23cf0a18 (patch)
tree06824e19799d3036fa45edf8cca8315bbdc49503 /sys/arch
parent205031b22c7abf0f364d6f0d336530fd3b55c630 (diff)
add pcxu tlb handlers and cpu probing
add u2/uturn ioa driver in dumb mode now enable pcxu/pcxw support
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hppa/conf/GENERIC19
-rw-r--r--sys/arch/hppa/conf/RAMDISK49
-rw-r--r--sys/arch/hppa/conf/files.hppa52
-rw-r--r--sys/arch/hppa/dev/uturn.c108
-rw-r--r--sys/arch/hppa/hppa/locore.S79
-rw-r--r--sys/arch/hppa/hppa/machdep.c36
-rw-r--r--sys/arch/hppa/hppa/mainbus.c8
7 files changed, 282 insertions, 69 deletions
diff --git a/sys/arch/hppa/conf/GENERIC b/sys/arch/hppa/conf/GENERIC
index 786154d3983..a6c2d424576 100644
--- a/sys/arch/hppa/conf/GENERIC
+++ b/sys/arch/hppa/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.56 2004/08/19 08:13:05 mickey Exp $
+# $OpenBSD: GENERIC,v 1.57 2004/09/15 21:32:42 mickey Exp $
# Machine architecture; required by config(8)
machine hppa
@@ -11,9 +11,9 @@ option HP7100_CPU # PCXT
option HP7200_CPU # PCXT'
option HP7100LC_CPU # PCXL
option HP7300LC_CPU # PCXL2
-#option HP8000_CPU # PCXU (in 32bit mode)
-#option HP8200_CPU # PCXU2 (in 32bit mode)
-#option HP8500_CPU # PCXW (in 32bit mode)
+option HP8000_CPU # PCXU (in 32bit mode)
+option HP8200_CPU # PCXU2 (in 32bit mode)
+option HP8500_CPU # PCXW (in 32bit mode)
#option USE_HPT
option FPEMUL
@@ -37,16 +37,22 @@ cpu* at mainbus0 irq 31 # HP PA-RISC cpu
#fpu* at mainbus0 # HP PA-RISC fpu (iv N/A)
#pmu* at mainbus0 irq 29 # HP PA-RISC perfomance monitor unit
phantomas0 at mainbus0 # Phantom PseudoBC GSC+ Port
+uturn0 at mainbus0 # U2/UTurn Runway IOA
+uturn1 at mainbus0
lasi0 at mainbus0 offset 0x100000 irq 28 # LASI host adapter
lasi0 at mainbus0 offset 0xfd00000 irq 28 # LASI on C1[01]0, J2[01]0
-lasi0 at phantomas0 offset 0xfd00000 irq 28 # LASI on [ABC]*
+lasi0 at phantomas0 offset 0xfd00000 irq 28 # LASI on [AB]*
+lasi0 at uturn? offset 0xfd00000 irq 28 # LASI on [CJ]*
lasi1 at mainbus0 offset 0x500000 irq 27 # 712 GIO card
asp* at mainbus0 irq 28 # this one comes w/ Viper and LEDs
wax* at mainbus0 irq 24 # Wax may host EISA as well
mongoose* at mainbus0 irq 17 # EISA Bus Adapter (i82350 or TI???)
#vmeb* at mainbus0 irq ? # VME bus adapter
-dino* at phantomas? irq 26 # PCI bus bridge
+dino0 at phantomas? irq 26 # PCI bus bridge on [AB]*
+dino1 at phantomas? irq 25
+dino0 at uturn0 irq 26 # PCI bus bridge on [CJ]*
+dino1 at uturn1 irq 25
pci* at dino?
option PCIVERBOSE
#pckbc0 at dino? irq 9
@@ -124,6 +130,7 @@ sti0 at mainbus0 irq 11 # [H]CRX-{8,24,48}[Z] graphics
sti0 at phantomas0 irq 11 # builtin graphics on BC*
sti1 at mainbus0 irq 12
sti1 at phantomas0 irq 12
+#sti* at pci? # EG-PCI, FX*
#medusa* at mainbus? irq 4 # FDDI
#venus* at mainbus? irq 5 # ATM J2498A/J3420A
diff --git a/sys/arch/hppa/conf/RAMDISK b/sys/arch/hppa/conf/RAMDISK
index 5a755bbcc1b..41079f82b41 100644
--- a/sys/arch/hppa/conf/RAMDISK
+++ b/sys/arch/hppa/conf/RAMDISK
@@ -1,31 +1,31 @@
-# $OpenBSD: RAMDISK,v 1.36 2004/08/19 08:13:05 mickey Exp $
+# $OpenBSD: RAMDISK,v 1.37 2004/09/15 21:32:42 mickey Exp $
#
# Diskless kernel config
#
# Machine architecture; required by config(8)
-machine hppa
+machine hppa
-option DDB # in-kernel debugger
-option DIAGNOSTIC # internal consistency checks
+option DDB # in-kernel debugger
+option DIAGNOSTIC # internal consistency checks
-option FFS # UFS
-option NFSCLIENT # Network File System client
-option CD9660 # ISO 9660 + Rock Ridge file system
-option FDESC # /dev/fd
-option FIFO # FIFOs; RECOMMENDED
-option INET # IP + ICMP + TCP + UDP
-option INET6 # IPv6 (needs INET)
+option FFS # UFS
+option NFSCLIENT # Network File System client
+option CD9660 # ISO 9660 + Rock Ridge file system
+option FDESC # /dev/fd
+option FIFO # FIFOs; RECOMMENDED
+option INET # IP + ICMP + TCP + UDP
+option INET6 # IPv6 (needs INET)
# Support for various CPU types
-option HP7000_CPU # PCXS
-option HP7100_CPU # PCXT
-option HP7200_CPU # PCXT'
-option HP7100LC_CPU # PCXL
-option HP7300LC_CPU # PCXL2
-#option HP8000_CPU # PCXU (in 32bit mode)
-#option HP8200_CPU # PCXU2 (in 32bit mode)
-#option HP8500_CPU # PCXW (in 32bit mode)
+option HP7000_CPU # PCXS
+option HP7100_CPU # PCXT
+option HP7200_CPU # PCXT'
+option HP7100LC_CPU # PCXL
+option HP7300LC_CPU # PCXL2
+option HP8000_CPU # PCXU (in 32bit mode)
+option HP8200_CPU # PCXU2 (in 32bit mode)
+option HP8500_CPU # PCXW (in 32bit mode)
option FPEMUL
option USELEDS # blink 'em
@@ -51,16 +51,22 @@ cpu* at mainbus0 irq 31 # HP PA-RISC cpu
#fpu* at mainbus0 # HP PA-RISC fpu (iv N/A)
#pmu* at mainbus0 irq 29 # HP PA-RISC perfomance monitor unit
phantomas0 at mainbus0 # Phantom PseudoBC GSC+ Port
+uturn0 at mainbus0 # U2/UTurn Runway IOA
+uturn1 at mainbus0
lasi0 at mainbus0 offset 0x100000 irq 28 # LASI host adapter
lasi0 at mainbus0 offset 0xfd00000 irq 28 # LASI on C1[01]0, J2[01]0
-lasi0 at phantomas0 offset 0xfd00000 irq 28 # LASI on [ABC]*
+lasi0 at phantomas0 offset 0xfd00000 irq 28 # LASI on [AB]*
+lasi0 at uturn? offset 0xfd00000 irq 28 # LASI on [CJ]*
lasi1 at mainbus0 offset 0x500000 irq 27 # 712 GIO card
asp* at mainbus0 irq 28 # this one comes w/ Viper and LEDs
wax* at mainbus0 irq 24 # Wax may host EISA as well
mongoose* at mainbus0 irq 17 # EISA Bus Adapter (i82350 or TI???)
#vmeb* at mainbus0 irq ? # VME bus adapter
-dino* at phantomas? irq 26 # PCI bus bridge
+dino0 at phantomas? irq 26 # PCI bus bridge on [AB]*
+dino1 at phantomas? irq 25
+dino0 at uturn0 irq 26 # PCI bus bridge on [CJ]*
+dino1 at uturn1 irq 25
pci* at dino?
option PCIVERBOSE
#pckbc0 at dino? irq 9
@@ -138,6 +144,7 @@ sti0 at mainbus0 irq 11 # [H]CRX-{8,24,48}[Z] graphics
sti0 at phantomas0 irq 11 # builtin graphics on BC*
sti1 at mainbus0 irq 12
sti1 at phantomas0 irq 12
+#sti* at pci? # EG-PCI, FX*
#medusa* at mainbus? irq 4 # FDDI
#venus* at mainbus? irq 5 # ATM J2498A/J3420A
diff --git a/sys/arch/hppa/conf/files.hppa b/sys/arch/hppa/conf/files.hppa
index 8e11039ac9f..0b376374ab1 100644
--- a/sys/arch/hppa/conf/files.hppa
+++ b/sys/arch/hppa/conf/files.hppa
@@ -1,4 +1,4 @@
-# $OpenBSD: files.hppa,v 1.53 2004/08/19 08:13:05 mickey Exp $
+# $OpenBSD: files.hppa,v 1.54 2004/09/15 21:32:42 mickey Exp $
#
# hppa-specific configuration info
@@ -81,64 +81,67 @@ define gscbus { }
# Mainbus
#
-define mainbus {[offset = -1], [irq = -1]}
-device mainbus
+define gedoens {[offset = -1], [irq = -1]}
+device mainbus: gedoens
attach mainbus at root
file arch/hppa/hppa/mainbus.c mainbus
device pdc
-attach pdc at mainbus
+attach pdc at gedoens
file arch/hppa/dev/pdc.c pdc
device power
-attach power at mainbus
+attach power at gedoens
file arch/hppa/dev/power.c power needs-flag
device mem
-attach mem at mainbus
+attach mem at gedoens
file arch/hppa/dev/mem.c mem
device cpu
-attach cpu at mainbus
+attach cpu at gedoens
file arch/hppa/dev/cpu.c cpu
device fpu
-attach fpu at mainbus
+attach fpu at gedoens
file arch/hppa/dev/fpu.c fpu
# Phantom PseudoBC GSC+ Port
-define phantomas {[offset = -1], [irq = -1]}
-device phantomas
-attach phantomas at mainbus
+device phantomas: gedoens
+attach phantomas at gedoens
file arch/hppa/dev/phantomas.c phantomas
+# U2/Uturn, Runway to GSC Bus bridge & IOA.
+device uturn: gedoens
+attach uturn at gedoens
+file arch/hppa/dev/uturn.c uturn
+
# 1FT1-0002, 1FU2-0002
# as goes w/ 7100LC, 7300LC, 7200, 8000, 8200, 8500
device lasi: gscbus
-attach lasi at mainbus with lasi_mainbus
-attach lasi at phantomas with lasi_phantomas
+attach lasi at gedoens
file arch/hppa/dev/lasi.c lasi
# all the older systems
device asp: gscbus
-attach asp at mainbus
+attach asp at gedoens
file arch/hppa/dev/asp.c asp
# 1FT4-0001, ASIC used on gecko cards
device wax: gscbus, isabus, eisabus
-attach wax at mainbus
+attach wax at gedoens
file arch/hppa/dev/wax.c wax
device mongoose: isabus, eisabus
-attach mongoose at mainbus
+attach mongoose at gedoens
file arch/hppa/dev/mongoose.c mongoose
define dinobus {[offset = -1], [irq = -1]}
-# Dino, GSC to PCI bridge. Includes ps/2, serial, and flying toaster interfaces
+# Dino, GSC-PCI bridge. Includes ps/2, cereal and a flying toaster interfaces
# Cujo is a 64-bit data path Dino
device dino: pcibus, dinobus
-attach dino at phantomas
+attach dino at gedoens
file arch/hppa/dev/dino.c dino
attach com at dinobus with com_dino
@@ -147,21 +150,18 @@ file arch/hppa/dev/com_dino.c com_dino
# EPIC, Excalibur PCI Interface Chip. Integrated IOA
# SAGA is a 64-bit data path EPIC
#device epic: pcibus
-#attach epic at mainbus
+#attach epic at gedoens
#file arch/hppa/dev/epic.c epic
# Astro, integrated Runway to Ropes bridge, Memory controller, and IOA.
# Elroy, Ropes to PCI Bridge. Supports 4X PCI and dual address cycle.
-# U2/Uturn, Runway to GSC Bus bridge & IOA.
-
-attach sti at mainbus with sti_sgc
-attach sti at phantomas with sti_phantom
-file arch/hppa/dev/sti_sgc.c sti_sgc | sti_phantom
+attach sti at gedoens with sti_gedoens
+file arch/hppa/dev/sti_sgc.c sti_gedoens
-#attach siop at mainbus with siop_sgc
-#file arch/hppa/dev/siop_sgc.c siop_sgc
+attach siop at gedoens with siop_sgc
+file arch/hppa/dev/siop_sgc.c siop_sgc
###
diff --git a/sys/arch/hppa/dev/uturn.c b/sys/arch/hppa/dev/uturn.c
new file mode 100644
index 00000000000..ac89be105e8
--- /dev/null
+++ b/sys/arch/hppa/dev/uturn.c
@@ -0,0 +1,108 @@
+/* $OpenBSD: uturn.c,v 1.1 2004/09/15 21:32:43 mickey Exp $ */
+
+/*
+ * Copyright (c) 2004 Michael Shalayeff
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* TODO IOA programming */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/device.h>
+#include <sys/reboot.h>
+
+#include <machine/iomod.h>
+#include <machine/autoconf.h>
+
+#include <hppa/dev/cpudevs.h>
+
+struct uturn_regs {
+ u_int64_t resv0[2];
+ u_int64_t status; /* 0x10: */
+ u_int64_t resv1[5];
+ u_int64_t debug; /* 0x40: */
+};
+
+struct uturn_softc {
+ struct device sc_dv;
+
+ struct uturn_regs volatile *sc_regs;
+};
+
+int uturnmatch(struct device *, void *, void *);
+void uturnattach(struct device *, struct device *, void *);
+
+struct cfattach uturn_ca = {
+ sizeof(struct uturn_softc), uturnmatch, uturnattach
+};
+
+struct cfdriver uturn_cd = {
+ NULL, "uturn", DV_DULL
+};
+
+int
+uturnmatch(parent, cfdata, aux)
+ struct device *parent;
+ void *cfdata;
+ void *aux;
+{
+ struct confargs *ca = aux;
+ /* struct cfdata *cf = cfdata; */
+
+ /* there will be only one */
+ if (ca->ca_type.iodc_type != HPPA_TYPE_IOA ||
+ ca->ca_type.iodc_sv_model != HPPA_IOA_UTURN)
+ return 0;
+
+ return 1;
+}
+
+void
+uturnattach(parent, self, aux)
+ struct device *parent;
+ struct device *self;
+ void *aux;
+{
+ struct confargs *ca = aux, nca;
+ struct uturn_softc *sc = (struct uturn_softc *)self;
+ bus_space_handle_t ioh;
+
+ if (bus_space_map(ca->ca_iot, ca->ca_hpa, IOMOD_HPASIZE, 0, &ioh)) {
+ printf(": can't map IO space\n");
+ return;
+ }
+ sc->sc_regs = (struct uturn_regs *)ca->ca_hpa;
+
+ printf(": %s rev %d\n",
+ ca->ca_type.iodc_revision < 0x10? "U2" : "UTurn",
+ ca->ca_type.iodc_revision & 0xf);
+
+ /* keep it real */
+ ((struct iomod *)ioh)->io_control = 0x80;
+
+ nca = *ca; /* clone from us */
+ nca.ca_hpamask = HPPA_IOSPACE;
+ pdc_scanbus(self, &nca, MAXMODBUS, 0);
+}
diff --git a/sys/arch/hppa/hppa/locore.S b/sys/arch/hppa/hppa/locore.S
index 41a61d393b3..d0405bc1a9a 100644
--- a/sys/arch/hppa/hppa/locore.S
+++ b/sys/arch/hppa/hppa/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.139 2004/09/15 00:25:43 mickey Exp $ */
+/* $OpenBSD: locore.S,v 1.140 2004/09/15 21:32:43 mickey Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -897,7 +897,7 @@ $syscall_end
ldi num, r1 ! \
b __CONCAT($name,_t)+8 ! \
b __CONCAT($name,_s)+12 ! \
- nop /*b __CONCAT($name,_u)+16 */
+ b __CONCAT($name,_u)+16
#define ITLBPRE \
mfctl pcoq,r9 ! \
@@ -1307,7 +1307,7 @@ $dtlbna_t
dep r8, 30, 15, r25 /* mix0r the pid from the sid */! \
dep r0, 31, 12, r17 /* needed ? */ ! \
addi 2, r25, r25 ! \
- extru r17, 24, 25, r17 ! \
+ extru r17, 24, 25, r17 /* tlbbtop(r17) */ ! \
sync
.align 32
@@ -1404,6 +1404,60 @@ $dtlb_done_l
nop
#endif /* HP7100LC_CPU */
+#if defined(HP8000_CPU) || defined(HP8200_CPU) || defined(HP8500_CPU)
+ .level 2.0
+
+ /* xlate 32bit->64bit pte */
+#define TLB_PCX2PCXU \
+ extrw,u r25, 14, 13, r16 ! \
+ depdi 0, 31, 32, r17 ! \
+ /* fix io mappings */ ! \
+ extrd,s r17, 42, 4, r1 ! \
+ addi,<> 1, r1, r0 ! \
+ depdi -1, 38, 32, r17 ! \
+ /* fix prom mappings */ ! \
+ extrd,s r17, 46, 8, r1 ! \
+ addi,<> 0x10, r1, r0 ! \
+ depdi 0, 42, 8, r17 ! \
+ /* weak ordering, dyn bp */ ! \
+ depwi 1, 31, 2, r16 ! \
+ depdi 0, 44, 30, r25 ! \
+ depd r16, 14, 15, r25
+
+$tlbd_u
+ TLB_STATS_PRE(tlbd)
+ TLB_PULL_L(1)
+ TLB_PCX2PCXU
+ idtlbt r17, r25
+ TLB_STATS_AFT(tlbd)
+ rfir
+ nop
+
+$itlb_u
+$itlbna_u
+ TLB_STATS_PRE(itlb)
+ TLB_PULL_L(0)
+ extru,= r25, 5, 1, r0 /* gate needs a kernel pid */
+ depi 0, 30, 15, r25
+ TLB_PCX2PCXU
+ iitlbt r17, r25
+ TLB_STATS_AFT(itlb)
+ rfir
+ nop
+
+$dtlbna_u
+$dtlb_u
+ TLB_STATS_PRE(dtlb)
+ TLB_PULL_L(0)
+ TLB_PCX2PCXU
+ idtlbt r17, r25
+ TLB_STATS_AFT(dtlb)
+ rfir
+ nop
+
+ .level 1.1
+#endif /* HP8000_CPU */
+
.export $tlb_missend, entry
$tlb_missend
@@ -1833,6 +1887,25 @@ EXIT(desidhash_l)
#endif /* HP7100LC_CPU */
+#if defined(HP8000_CPU) || defined(HP8200_CPU) || defined(HP8500_CPU)
+LEAF_ENTRY(desidhash_u)
+ bv r0(rp)
+ nop
+EXIT(desidhash_u)
+
+LEAF_ENTRY(ibtlb_u)
+ /* TODO insert a locked large tlb entry */
+ bv 0(rp)
+ nop
+EXIT(ibtlb_u)
+
+LEAF_ENTRY(pbtlb_u)
+ /* TODO purge a locked tlb entry */
+ bv 0(rp)
+ nop
+EXIT(pbtlb_u)
+#endif /* HP8000_CPU */
+
/*
* High Priority Machine Check Interrupt
*/
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index aa0768ee496..4dd68f4c8e2 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.134 2004/09/14 23:39:32 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.135 2004/09/15 21:32:43 mickey Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
@@ -196,6 +196,7 @@ extern const u_int itlb_x[], itlbna_x[], dtlb_x[], dtlbna_x[], tlbd_x[];
extern const u_int itlb_s[], itlbna_s[], dtlb_s[], dtlbna_s[], tlbd_s[];
extern const u_int itlb_t[], itlbna_t[], dtlb_t[], dtlbna_t[], tlbd_t[];
extern const u_int itlb_l[], itlbna_l[], dtlb_l[], dtlbna_l[], tlbd_l[];
+extern const u_int itlb_u[], itlbna_u[], dtlb_u[], dtlbna_u[], tlbd_u[];
int iibtlb_s(int i, pa_space_t sp, vaddr_t va, paddr_t pa,
vsize_t sz, u_int prot);
int idbtlb_s(int i, pa_space_t sp, vaddr_t va, paddr_t pa,
@@ -204,15 +205,20 @@ int ibtlb_t(int i, pa_space_t sp, vaddr_t va, paddr_t pa,
vsize_t sz, u_int prot);
int ibtlb_l(int i, pa_space_t sp, vaddr_t va, paddr_t pa,
vsize_t sz, u_int prot);
+int ibtlb_u(int i, pa_space_t sp, vaddr_t va, paddr_t pa,
+ vsize_t sz, u_int prot);
int ibtlb_g(int i, pa_space_t sp, vaddr_t va, paddr_t pa,
vsize_t sz, u_int prot);
int pbtlb_g(int i);
+int pbtlb_u(int i);
int hpti_l(vaddr_t, vsize_t);
+int hpti_u(vaddr_t, vsize_t);
int hpti_g(vaddr_t, vsize_t);
int desidhash_x(void);
int desidhash_s(void);
int desidhash_t(void);
int desidhash_l(void);
+int desidhash_u(void);
int desidhash_g(void);
const struct hppa_cpu_typed {
char name[8];
@@ -248,16 +254,16 @@ const struct hppa_cpu_typed {
0, desidhash_l, ibtlb_g, NULL, pbtlb_g, hpti_g},
#endif
#ifdef HP8000_CPU
- { "PCXU", hpcxu, HPPA_CPU_PCXU, HPPA_FTRS_W32B|HPPA_FTRS_BTLBU,
- 4, desidhash_g, ibtlb_g, NULL, pbtlb_g, hpti_g},
+ { "PCXU", hpcxu, HPPA_CPU_PCXU, HPPA_FTRS_W32B,
+ 4, desidhash_g, ibtlb_u, NULL, pbtlb_g },
#endif
#ifdef HP8200_CPU
- { "PCXU+", hpcxu2,HPPA_CPU_PCXUP, HPPA_FTRS_W32B|HPPA_FTRS_BTLBU,
- 4, desidhash_g, ibtlb_g, NULL, pbtlb_g, hpti_g},
+ { "PCXU+", hpcxu2,HPPA_CPU_PCXUP, HPPA_FTRS_W32B,
+ 4, desidhash_g, ibtlb_u, NULL, pbtlb_u },
#endif
#ifdef HP8500_CPU
- { "PCXW", hpcxw, HPPA_CPU_PCXW, HPPA_FTRS_W32B|HPPA_FTRS_BTLBU,
- 4, desidhash_g, ibtlb_g, NULL, pbtlb_g, hpti_g},
+ { "PCXW", hpcxw, HPPA_CPU_PCXW, HPPA_FTRS_W32B,
+ 4, desidhash_g, ibtlb_u, NULL, pbtlb_u },
#endif
{ "", 0 }
};
@@ -477,10 +483,15 @@ cpuid()
printf("WARNING: PDC_COPROC error %d\n", error);
cpu_fpuena = 0;
} else {
- printf("pdc_coproc: 0x%x, 0x%x\n", pdc_coproc.ccr_enable,
- pdc_coproc.ccr_present);
+ printf("pdc_coproc: 0x%x, 0x%x; model %x rev %x\n",
+ pdc_coproc.ccr_enable, pdc_coproc.ccr_present,
+ pdc_coproc.fpu_model, pdc_coproc.fpu_revision);
fpu_enable = pdc_coproc.ccr_enable & CCR_MASK;
cpu_fpuena = 1;
+
+ /* a kludge to detect PCXW */
+ if (pdc_coproc.fpu_model == HPPA_FPU_PCXW)
+ cpu_type = HPPA_CPU_PCXW;
}
/* BTLB params */
@@ -561,6 +572,13 @@ cpuid()
trap_ep_T_ITLBMISSNA[0] = trap_ep_T_ITLBMISSNA[p->patch];
}
+ /* force strong ordering for now */
+ if (p->features & HPPA_FTRS_W32B) {
+ extern register_t kpsw; /* intr.c */
+
+ kpsw |= PSL_O;
+ }
+
{
const char *p, *q;
char buf[32];
diff --git a/sys/arch/hppa/hppa/mainbus.c b/sys/arch/hppa/hppa/mainbus.c
index 2a2f215bfff..a83bc43898b 100644
--- a/sys/arch/hppa/hppa/mainbus.c
+++ b/sys/arch/hppa/hppa/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.57 2004/09/15 20:11:29 mickey Exp $ */
+/* $OpenBSD: mainbus.c,v 1.58 2004/09/15 21:32:43 mickey Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -1015,10 +1015,10 @@ mbattach(parent, self, aux)
panic("mbattach: cannot map mainbus IO space");
/*
- * Local-Broadcast the HPA to all modules on the bus
+ * Local-Broadcast the HPA to all modules on this bus
*/
- ((struct iomod *)(pdc_hpa.hpa & HPPA_FLEX_MASK))[FPA_IOMOD].io_flex =
- (void *)((pdc_hpa.hpa & HPPA_FLEX_MASK) | DMA_ENABLE);
+ ((struct iomod *)LBCAST_ADDR)->io_flex =
+ (void *)((pdc_hpa.hpa & HPPA_FLEX_MASK) | DMA_ENABLE);
sc->sc_hpa = pdc_hpa.hpa;