commonlib: add endian related accessor functions

This commit adds read/write functions for both big and
little endian interpretations. Additionally there are
variants that allow an offset to be provided into the
source buffer.

TEST=Wrote test harness for functions.  Also booted ARM QEMU
     through end of payload.

Change-Id: If44c4d489f0dab86a73b73580c039e364c7e517d
Signed-off-by: Aaron Durbin <>
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <>
1 file changed