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
This commit is contained in:
Ingo Weinhold 2010-06-15 00:09:51 +00:00
parent d6e307aed9
commit ce97aa1274

View File

@ -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);
}