summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2007-04-04 20:09:38 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2007-04-04 20:09:38 +0000
commit4cc7600449830051a437dd1adf605295cb2f35d8 (patch)
treebf2a3382e40a9c1dc5d72938e95ddb1271b51054 /sys/arch/sparc64
parentba84249e327ad09882f745e51b0a9f331cfe2675 (diff)
Correctly set the TSB size on pyro(4).
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/dev/iommu.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/arch/sparc64/dev/iommu.c b/sys/arch/sparc64/dev/iommu.c
index b4ea80e7204..46ffe82e534 100644
--- a/sys/arch/sparc64/dev/iommu.c
+++ b/sys/arch/sparc64/dev/iommu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iommu.c,v 1.45 2007/04/02 13:23:46 claudio Exp $ */
+/* $OpenBSD: iommu.c,v 1.46 2007/04/04 20:09:37 kettenis Exp $ */
/* $NetBSD: iommu.c,v 1.47 2002/02/08 20:03:45 eeh Exp $ */
/*
@@ -148,7 +148,7 @@ iommu_init(char *name, struct iommu_state *is, int tsbsize, u_int32_t iovabase)
* be hard-wired, so we read the start and size from the PROM and
* just use those values.
*/
- is->is_cr = (tsbsize << 16) | IOMMUCR_EN;
+ is->is_cr = IOMMUCR_EN;
is->is_tsbsize = tsbsize;
if (iovabase == (u_int32_t)-1) {
is->is_dvmabase = IOTSB_VSTART(is->is_tsbsize);
@@ -220,7 +220,16 @@ iommu_init(char *name, struct iommu_state *is, int tsbsize, u_int32_t iovabase)
M_DEVBUF, 0, 0, EX_NOWAIT);
/*
- * now actually start up the IOMMU
+ * Set the TSB size. The relevant bits were moved to the TSB
+ * base register in the PCIe host bridges.
+ */
+ if (strncmp(name, "pyro", 4) == 0)
+ is->is_ptsb |= is->is_tsbsize;
+ else
+ is->is_cr |= (is->is_tsbsize << 16);
+
+ /*
+ * Now actually start up the IOMMU.
*/
iommu_reset(is);
printf("\n");