summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2010-05-20 05:46:54 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2010-05-20 05:46:54 +0000
commit8e8a3aa9fdc8d4ea4020b62c37dfb292cd25f942 (patch)
treed2f9d5dd6a31e9ac8391b37ec6ad797d54b887cb /sys/arch
parent758c571d3045f51579c1d61a5a7deaca9e09e51d (diff)
Force max physical memory allocation for bus_dmamem_alloc() to be 4gig
for now. When we get bouncebuffers/decent iommu this can be revised to either fall back (bouncebuffers) or just grab any memory (iommu), but for now it is one less thing to worry about for turning bigmem back on. ok kettenis@ and beck@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/bus_dma.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/bus_dma.c b/sys/arch/amd64/amd64/bus_dma.c
index 415664738bb..c4fca4afe72 100644
--- a/sys/arch/amd64/amd64/bus_dma.c
+++ b/sys/arch/amd64/amd64/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.31 2010/04/08 00:55:25 oga Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.32 2010/05/20 05:46:53 oga Exp $ */
/* $NetBSD: bus_dma.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */
/*-
@@ -418,8 +418,14 @@ _bus_dmamem_alloc(bus_dma_tag_t t, bus_size_t size, bus_size_t alignment,
int flags)
{
+ /*
+ * XXX in the presence of decent (working) iommus and bouncebuffers
+ * we can then fallback this allocation to a range of { 0, -1 }.
+ * However for now we err on the side of caution and allocate dma
+ * memory under the 4gig boundary.
+ */
return (_bus_dmamem_alloc_range(t, size, alignment, boundary,
- segs, nsegs, rsegs, flags, (paddr_t)0, (paddr_t)-1));
+ segs, nsegs, rsegs, flags, (paddr_t)0, (paddr_t)0xffffffff));
}
/*