* 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:
parent
24309cde24
commit
6a76b51960
@ -449,9 +449,11 @@ channel_init(device_node *node, void **_channelCookie)
|
|||||||
TRACE("mmio_addr %p\n", (void *)controller->mmio_addr);
|
TRACE("mmio_addr %p\n", (void *)controller->mmio_addr);
|
||||||
|
|
||||||
// PRDT must be contiguous, dword-aligned and must not cross 64K boundary
|
// 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);
|
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,
|
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) {
|
if (channel->prd_area < B_OK) {
|
||||||
TRACE("creating prd_area failed\n");
|
TRACE("creating prd_area failed\n");
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -454,9 +454,11 @@ channel_init(device_node *node, void **_channelCookie)
|
|||||||
TRACE("mmio_addr %p\n", (void *)controller->mmio_addr);
|
TRACE("mmio_addr %p\n", (void *)controller->mmio_addr);
|
||||||
|
|
||||||
// PRDT must be contiguous, dword-aligned and must not cross 64K boundary
|
// 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);
|
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,
|
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) {
|
if (channel->prd_area < B_OK) {
|
||||||
TRACE("creating prd_area failed\n");
|
TRACE("creating prd_area failed\n");
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -405,9 +405,11 @@ ata_adapter_init_channel(device_node *node,
|
|||||||
TRACE("PCI-ATA: bus master base %#x\n", channel->bus_master_base);
|
TRACE("PCI-ATA: bus master base %#x\n", channel->bus_master_base);
|
||||||
|
|
||||||
// PRDT must be contiguous, dword-aligned and must not cross 64K boundary
|
// 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);
|
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,
|
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) {
|
if (channel->prd_area < B_OK) {
|
||||||
res = channel->prd_area;
|
res = channel->prd_area;
|
||||||
goto err2;
|
goto err2;
|
||||||
|
@ -393,9 +393,11 @@ ide_adapter_init_channel(device_node *node,
|
|||||||
TRACE("PCI-IDE: bus master base %#x\n", channel->bus_master_base);
|
TRACE("PCI-IDE: bus master base %#x\n", channel->bus_master_base);
|
||||||
|
|
||||||
// PRDT must be contiguous, dword-aligned and must not cross 64K boundary
|
// 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);
|
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,
|
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) {
|
if (channel->prd_area < B_OK) {
|
||||||
res = channel->prd_area;
|
res = channel->prd_area;
|
||||||
goto err2;
|
goto err2;
|
||||||
|
Loading…
Reference in New Issue
Block a user