ARM Technical Support Knowledge Articles

What is the nature of Big Endian mode in PL080?

Applies to: PL08x DMAC (DM & SM)


The 'Big Endianness' of PL080/081 is intended for byte transfer between big and little endian systems, such as networking systems. When BE is selected for a master interface in the DMACConfiguration register, it performs a byte swap on the data as it enters, or leaves, the DMAC. If you are using a single master for data transfer in BE mode then data will be byte swapped (to Little Endian) on reading and again (back to Big Endian) on writing. This is fine if both source and destination memory systems are BE.

If you are using both masters, say in a system converting BE to LE data, then the data will be byte swapped on reading from the BE system but not when writing to the LE system, and vice versa.

If you are using LLIs to perform scatter-gather operations then this can cause problems. If the LLI data is stored in a BE memory system it will be converted to LE on being read by the DMAC. This is because the data for the LLIs is being read from a BE memory system and then byte-swapped to LE before being stored in the internal LLI registers. Problems now arise because the source address, destination address, control information and next LLI address are now in a swapped endian format.

There are two ways round this:

  1. If you have to read the LLI information over the BE interface, then the LLI information must be stored in LE format so it's swapped to the correct (BE) format when read.
  2. If you can use both interfaces, then it would be better to read the data over a master interface that's configured for LE, even if it's from a BE memory system; that way the internal representations of the LLI data will be correct. Any data swapping will then be performed when writing to the other memory system over the second master interface, which will be configured for BE.

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential