From ce97aa1274f6fa8b16fd05d0749c3d4fd85af88a Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Tue, 15 Jun 2010 00:09:51 +0000 Subject: [PATCH] DMAResource::Init(): Also evaluate the device node's B_DMA_LOW_ADDRESS and B_DMA_HIGH_ADDRESS attributes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37143 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/device_manager/dma_resources.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/system/kernel/device_manager/dma_resources.cpp b/src/system/kernel/device_manager/dma_resources.cpp index fac4a27a4a..8fbf8a72f4 100644 --- a/src/system/kernel/device_manager/dma_resources.cpp +++ b/src/system/kernel/device_manager/dma_resources.cpp @@ -136,6 +136,17 @@ DMAResource::Init(device_node* node, generic_size_t blockSize, B_DMA_MAX_SEGMENT_COUNT, &value, true) == B_OK) restrictions.max_segment_count = value; + uint64 value64; + if (gDeviceManagerModule.get_attr_uint64(node, + B_DMA_LOW_ADDRESS, &value64, true) == B_OK) { + restrictions.low_address = value64; + } + + if (gDeviceManagerModule.get_attr_uint64(node, + B_DMA_HIGH_ADDRESS, &value64, true) == B_OK) { + restrictions.high_address = value64; + } + return Init(restrictions, blockSize, bufferCount, bounceBufferCount); }