diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2015-01-03 20:44:24 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2015-01-03 20:44:24 +0000 |
commit | 1b79adb1878fe2d59763453c4e8b9eeec9b9f549 (patch) | |
tree | 3e345bffcff0d21f13a618fcf8cae699d30a6f7e /sys/arch | |
parent | 70813a115d9ebeab7bfeae4a76ea77300efaabd9 (diff) |
Some bowels of the bus_dma code assume it is ok to perform bitwise operations
with the base address of the window, which only works if its size is smaller
than the address it begins at.
Until these assumptions are carefully fixed, revert r1.9, and go back to using
only one direct map window.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/alpha/pci/tsp_dma.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/arch/alpha/pci/tsp_dma.c b/sys/arch/alpha/pci/tsp_dma.c index 819a3c710ee..15387376ef0 100644 --- a/sys/arch/alpha/pci/tsp_dma.c +++ b/sys/arch/alpha/pci/tsp_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tsp_dma.c,v 1.11 2014/06/14 23:11:20 jmatthew Exp $ */ +/* $OpenBSD: tsp_dma.c,v 1.12 2015/01/03 20:44:23 miod Exp $ */ /* $NetBSD: tsp_dma.c,v 1.1 1999/06/29 06:46:47 ross Exp $ */ /*- @@ -112,8 +112,7 @@ tsp_dma_init(struct device *tsp, struct tsp_config *pcp) { 0x00800000, 0x00700000, 0x00000000, WSBA_ENA | WSBA_SG }, /* 0-1GB at 2GB direct */ { 0x80000000, 0x3ff00000, 0x00000000, WSBA_ENA }, - /* 1-2GB at 3GB direct */ - { 0xC0000000, 0x3ff00000, 0x40000000, WSBA_ENA }, + { 0, 0, 0 }, { 0, 0, 0 } }; @@ -144,11 +143,7 @@ tsp_dma_init(struct device *tsp, struct tsp_config *pcp) t = &pcp->pc_dmat_direct; t->_cookie = pcp; t->_wbase = dwbase = WSBA_ADDR(pccsr->tsp_wsba[1].tsg_r); - t->_wsize = dwlen = WSM_LEN(pccsr->tsp_wsm[1].tsg_r) + - WSM_LEN(pccsr->tsp_wsm[2].tsg_r); - KDASSERT(WSBA_ADDR(pccsr->tsp_wsba[2].tsg_r) == - WSBA_ADDR(pccsr->tsp_wsba[1].tsg_r) + - WSM_LEN(pccsr->tsp_wsm[1].tsg_r)); + t->_wsize = dwlen = WSM_LEN(pccsr->tsp_wsm[1].tsg_r); t->_next_window = &pcp->pc_dmat_sgmap; t->_boundary = 0; t->_sgmap = NULL; |