* Force 32 bit physical addresses.

* Added TODO about apparently ignored 64 KB boundary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37218 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2010-06-21 23:21:07 +00:00
parent 24309cde24
commit 6a76b51960
4 changed files with 12 additions and 4 deletions

View File

@ -449,9 +449,11 @@ channel_init(device_node *node, void **_channelCookie)
TRACE("mmio_addr %p\n", (void *)controller->mmio_addr);
// PRDT must be contiguous, dword-aligned and must not cross 64K boundary
// TODO: Where's the handling for the 64 K boundary? create_area_etc() can be
// used.
prdtSize = (ATA_ADAPTER_MAX_SG_COUNT * sizeof(prd_entry) + (B_PAGE_SIZE - 1)) & ~(B_PAGE_SIZE - 1);
channel->prd_area = create_area("prd", (void **)&channel->prdt,
B_ANY_KERNEL_ADDRESS, prdtSize, B_CONTIGUOUS, 0);
B_ANY_KERNEL_ADDRESS, prdtSize, B_32_BIT_MEMORY, 0);
if (channel->prd_area < B_OK) {
TRACE("creating prd_area failed\n");
goto err;

View File

@ -454,9 +454,11 @@ channel_init(device_node *node, void **_channelCookie)
TRACE("mmio_addr %p\n", (void *)controller->mmio_addr);
// PRDT must be contiguous, dword-aligned and must not cross 64K boundary
// TODO: Where's the handling for the 64 K boundary? create_area_etc() can be
// used.
prdtSize = (IDE_ADAPTER_MAX_SG_COUNT * sizeof(prd_entry) + (B_PAGE_SIZE - 1)) & ~(B_PAGE_SIZE - 1);
channel->prd_area = create_area("prd", (void **)&channel->prdt,
B_ANY_KERNEL_ADDRESS, prdtSize, B_CONTIGUOUS, 0);
B_ANY_KERNEL_ADDRESS, prdtSize, B_32_BIT_MEMORY, 0);
if (channel->prd_area < B_OK) {
TRACE("creating prd_area failed\n");
goto err;

View File

@ -405,9 +405,11 @@ ata_adapter_init_channel(device_node *node,
TRACE("PCI-ATA: bus master base %#x\n", channel->bus_master_base);
// PRDT must be contiguous, dword-aligned and must not cross 64K boundary
// TODO: Where's the handling for the 64 K boundary? create_area_etc() can be
// used.
prdt_size = (ATA_ADAPTER_MAX_SG_COUNT * sizeof( prd_entry ) + (B_PAGE_SIZE - 1)) & ~(B_PAGE_SIZE - 1);
channel->prd_area = create_area("prd", (void **)&channel->prdt, B_ANY_KERNEL_ADDRESS,
prdt_size, B_CONTIGUOUS, 0);
prdt_size, B_32_BIT_MEMORY, 0);
if (channel->prd_area < B_OK) {
res = channel->prd_area;
goto err2;

View File

@ -393,9 +393,11 @@ ide_adapter_init_channel(device_node *node,
TRACE("PCI-IDE: bus master base %#x\n", channel->bus_master_base);
// PRDT must be contiguous, dword-aligned and must not cross 64K boundary
// TODO: Where's the handling for the 64 K boundary? create_area_etc() can be
// used.
prdt_size = (IDE_ADAPTER_MAX_SG_COUNT * sizeof( prd_entry ) + (B_PAGE_SIZE - 1)) & ~(B_PAGE_SIZE - 1);
channel->prd_area = create_area("prd", (void **)&channel->prdt, B_ANY_KERNEL_ADDRESS,
prdt_size, B_CONTIGUOUS, 0);
prdt_size, B_32_BIT_MEMORY, 0);
if (channel->prd_area < B_OK) {
res = channel->prd_area;
goto err2;