>> >> When I was testing the Yosemite board as the host, I found >> that I could set the endian flag on the mmapped page, which >> then made the PCI device registers read as 32-bit quantities >> read back with the same layout under both x86 and PPC >> hosts. > > Hmm, I guess I would handle this like how the reset of the kernel > handle is with the io routines handling the swapping. Not sure if > there is any advantage to using the endian flag. I guess if you have > something you are treating as just memory there would be. > >> So, if someone planned on using that 'feature', that would >> be a reason for writing your own mmap() implementation. >> I didn't see any option in the sysfs file for setting that >> page flag (but, I didn't look around in other sysfs files). > > There isn't a sysfs flag for the endianness page attribute since > thats a PPC book-e specific feature. We could possible expand things > to support it but, I've been trying to actively avoid using the 'E' bit. >
Framebuffer applications could care about this. Also, on the MPC8247 (maybe others, but I know about this one) you can make the PCI space big- or little-endian. Seems to me this is really not an endian issue but a PCI implementation issue. PCI is actually endian-agnostic, so we're really 'fixing' the Freescale PCI implementation with endian swapping. Mark Chambers
