[PATCH] katmai.dts: extend DMA ranges; add dma/sysace nodes

Yuri Tikhonov yur at emcraft.com
Fri Nov 14 15:45:13 EST 2008


 Hello Ben,

On Thursday, November 13, 2008 you wrote:

> On Thu, 2008-11-13 at 11:49 +0300, Yuri Tikhonov wrote:
>> Hello,
>> 
>> This patch extends DMA ranges for PCI(X) to 4GB, so that it could
>> work on Katmais with 4GB RAM installed.

> And where do you put MMIO ?

> The 32 bit part of the PCI space need to be split between MMIO and DMA.

 My understanding was that the dma-ranges property is responsible for 
setting up the inbound ranges of RAM's physical addresses, where PCI 
could DMA to/from. As regarding the outbound property, this patch 
doesn't change this, and there we have the PCI space split (2 GB of 
memory, and 64K of I/O spaces mapped from the 64-bit physical 
addresses into 32-bit PCI address space). Am I missing something ?

 With the default 2GB dma-ranges we just get the following on Katmai 
with 4GB of SDRAM installed:

...
PCIE0: Checking link...
PCIE0: Device detected, waiting for link...
PCIE0: link is up !
PCI host bridge /plb/pciex at d00000000 (primary) ranges:
 MEM 0x0000000e00000000..0x0000000e7fffffff -> 0x0000000080000000 
  IO 0x0000000f80000000..0x0000000f8000ffff -> 0x0000000000000000
/plb/pciex at d00000000: dma-ranges too small (size=80000000 total_memory=100000000)
PCIE1: Checking link...
PCIE1: Device detected, waiting for link...
PCIE1: link is up !
PCI host bridge /plb/pciex at d20000000 (primary) ranges:
 MEM 0x0000000e80000000..0x0000000effffffff -> 0x0000000080000000 
  IO 0x0000000f80010000..0x0000000f8001ffff -> 0x0000000000000000
/plb/pciex at d20000000: dma-ranges too small (size=80000000 total_memory=100000000)
PCIE2: Checking link...
PCIE2: Device detected, waiting for link...
PCIE2: link is up !
PCI host bridge /plb/pciex at d40000000 (primary) ranges:
 MEM 0x0000000f00000000..0x0000000f7fffffff -> 0x0000000080000000 
  IO 0x0000000f80020000..0x0000000f8002ffff -> 0x0000000000000000
/plb/pciex at d40000000: dma-ranges too small (size=80000000 total_memory=100000000)
PCI host bridge /plb/pci at c0ec00000 (primary) ranges:
 MEM 0x0000000d80000000..0x0000000dffffffff -> 0x0000000080000000 
  IO 0x0000000c08000000..0x0000000c0800ffff -> 0x0000000000000000
/plb/pci at c0ec00000: dma-ranges too small (size=80000000 total_memory=100000000)
...


> Ideally, for 64-bit capable DMA, device, we should create a second DMA
> range mapping the whole memory at something like 1T or so on PCI, and
> keep a smaller (ie. 2G) DMA range for 32-bit only devices backed with
> swiotlb.

> Cheers,
> Ben.

 Regards, Yuri

 --
 Yuri Tikhonov, Senior Software Engineer
 Emcraft Systems, www.emcraft.com




More information about the Linuxppc-dev mailing list