It is possible to make it appear that memory is organized in little-endian format, even though it is maintained by a microprocessor that is inherently big-endian, such as the PowerPC processor. This effect is desirable, for example, when Windows NT runs on a PCI-based Power Macintosh computer, because Windows NT requires memory to appear to be little-endian. It can be achieved by changing addresses without altering the layout of data in memory, a technique called address swizzling.
For example, refer to the DMA descriptor values initialized by the code shown in Listing A-1. Little-endian software expects the descriptor to be arranged in memory as shown in Figure A-9.
Figure A-9 Little-endian descriptor in memory
A big-endian processor can maintain the memory image shown in Figure A-9 by addressing it with big-endian byte lane assignments, as shown in Figure A-10. If a little-endian processor were maintaining the same image, it would assign byte lanes as shown in Figure A-5.
Figure A-10 Little-endian descriptor with big-endian addresses
Within fields, the byte ordering of the data image shown in Figure A-10 is correct, but the data addresses have been swizzled. For example, the field aDescr.C that is stored in byte lane 0 in the little-endian format shown in Figure A-5 is now stored in byte lane 7 in Figure A-10.
Address swizzling is one technique by which the PowerPC processor provides little-endian addressing support. It is described more fully in Little-Endian Processing Mode.