Memory mapping PCI memory region to user space
Mark Chambers
markc at mail.com
Fri Mar 24 06:55:35 EST 2006
>
>>
>> PCI is actually endian-agnostic, so we're really 'fixing' the
>> Freescale PCI implementation with endian swapping.
>>
>
> Hi Mark,
>
> Its not agnostic, its little-endian.
>
Ok, I should be a little more specific. Yes, I/O space is
little endian, and any configuration registers and such are
little endian. But memory space is strictly 32 bit as far
as PCI is concerned. (forgetting 64 bit PCI for the moment)
The two lower bits of address are not used, and there
is no required correlation of byte enables to those missing
address bits.
So, the point is, Freescale swaps bytes between its internal
bus and PCI. Other processors (like TI DSPs) do not. I
don't know that one method is necessarily right, but the fact
that we have this discussion periodically suggests that
Freescale's method is not the best.
This might be an academic point, but I think it does help to
see the distinction. To talk to a device over PCI you must
know how both ends map their internal buss(es) to PCI,
and it's not directly a big/little endian issue.
Mark
More information about the Linuxppc-embedded
mailing list