Skip to content

tegra: PCI Express support

Arnd Bergmann linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 3 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 3 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] [ARM] tegra: PCI Express support
Quoted 9 lines · On Sunday 19 September 2010 17:02:43 Russell King - ARM Linux wrote:

Eg, on DC21285 (footbridge) systems, the PCI IO window is at 0x7c000000 physical, mapped into 0xff000000 virtual. So __io(0x3f8) translates to 0xff0003f8 virtual, which hits 0x7c0003f8 physical, and 0x3f8 as an IO access on the PCI bus.

Things become a little more complicated when you have PCMCIA cards with separate IO regions, as on SA11x0 and PXA systems. These don't tend to have PCI, so we adopted there to have __io() do a 1:1 translation, and arrange for the "bus IO" address to be the actual virtual address.

Such a mapping sounds dangerous when you have device drivers trying to access legacy ISA ports. Most of them are disabled on ARM, but some drivers are hard to disable.

More importantly, having PCI I/O port numbers above 65536 will confuse code like /dev/ioport, which then causes NULL pointer accesses when accessed by a user application. Also, I would guess that it breaks if you have PCI or PCMCIA cards that decode more than 16 bits of I/O port addresses, because then the PCI I/O BAR gets set to a high number that is not actually accessible inside the I/O space window.

The way we solved this on powerpc was to define a range of the virtual address space as the I/O port window and map each bus's physical I/O port window into a section of the virtual window.

Arnd