summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev/iommureg.h
diff options
context:
space:
mode:
authorHenric Jungheim <henric@cvs.openbsd.org>2003-03-06 08:26:09 +0000
committerHenric Jungheim <henric@cvs.openbsd.org>2003-03-06 08:26:09 +0000
commitefca87016057d41201643e65d1f1c5d44716db0b (patch)
tree0a757cfc249bf077773a2182e04fd490183c3e6c /sys/arch/sparc64/dev/iommureg.h
parent6216a22d89b680747bfb42b651aed1076b9dbf92 (diff)
The existing IOMMU code had a rounding problem that was most noticeable
on faster systems under heavy network load. This replaces some of the unreadable iommu functions with something a little less dense and a lot less crash prone. The bus_dma function pointer/cookie handling was broken. Change them to work like the stacked bus_space drivers (where "work" is the key word). Tested my many (thanks). ok jason@ deraadt@
Diffstat (limited to 'sys/arch/sparc64/dev/iommureg.h')
-rw-r--r--sys/arch/sparc64/dev/iommureg.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/sparc64/dev/iommureg.h b/sys/arch/sparc64/dev/iommureg.h
index a03d49ab378..66d1df1fa4a 100644
--- a/sys/arch/sparc64/dev/iommureg.h
+++ b/sys/arch/sparc64/dev/iommureg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: iommureg.h,v 1.5 2003/02/17 01:29:20 henric Exp $ */
+/* $OpenBSD: iommureg.h,v 1.6 2003/03/06 08:26:08 henric Exp $ */
/* $NetBSD: iommureg.h,v 1.6 2001/07/20 00:07:13 eeh Exp $ */
/*
@@ -97,9 +97,11 @@ struct iommu_strbuf {
#define IOTTE_8K 0x0000000000000000LL
#define IOTTE_STREAM 0x1000000000000000LL /* Is page streamable? */
#define IOTTE_LOCAL 0x0800000000000000LL /* Accesses to same bus segment? */
-#define IOTTE_PAMASK 0x000001ffffffe000LL /* Let's assume this is correct */
+#define IOTTE_PAMASK 0x000007ffffffe000LL /* Let's assume this is correct (bits 42..12) */
#define IOTTE_C 0x0000000000000010LL /* Accesses to cacheable space */
#define IOTTE_W 0x0000000000000002LL /* Writeable */
+#define IOTTE_SOFTWARE 0x0000000000001f80LL /* For software use (bits 12..7) */
+
/*
* On sun4u each bus controller has a separate IOMMU. The IOMMU has