libsel4camkes: Fix: Avoid unpredictable memory accesses by the DMA allocator.
libsel4camkes: Fix: Avoid unpredictable memory accesses by the DMA allocator.

Prior to this commit, the DMA allocator stored bookkeeping information in a
packed struct that it accessed through potentially unaligned pointers. This
access is legal from a C point of view and we typically configure systems to
enable unaligned memory accesses. However, the DMA bookkeeping is also stored
in-place, within the DMA pages themselves. These pages are mapped uncached.

If you read the fine print in the ARM ARM with respect to unaligned memory
accesses on ARMv7, you may note that unaligned, word-sized writes to strongly-
ordered memory when unaligned access is enabled are "UNPREDICTABLE."
By performing writes to the DMA bookkeeping hosted in uncached pages, we were
hitting exactly this case on our ARMv7 platforms.

This commit restructures the DMA bookkeeping to naturally pack the struct by
reordering its members. We should now be consistently performing aligned reads
and writes. The size of the bookkeeping has not been increased, but we have
incurred greater internal fragmentation leading to some inefficiencies. I think
this is the best we can do for now and no one is crying out for more DMA memory
so let's see how we go.

Closes JIRA CAMKES-366

smaccm/camkes-tool,agacek/camkes-tool,agacek/camkes-tool,smaccm/camkes-tool,agacek/camkes-tool,smaccm/camkes-tool,smaccm/camkes-tool