consider big endian system architecture
Currently, some libspdm code uses *(uint64 *) for a buffer. It wont work for a big endian system.
We need use byte array access to reconstruct the uint64.
Also help avoid getting yelled at by Mr. Torvalds. https://lkml.org/lkml/2021/9/1/1175
11/15/2021 - approved. Also consider alignment issue - TBD in another issue.
I will check it.
Unless anyone objects we should require that endianness is determined at compile time via spdm_lib_config.h and that we default to little-endian (sorry IBM!). Something like
#define LIBSPDM_ENDIAN_LITTLE 0
#define LIBSPDM_ENDIAN_BIG 1
#define LIBSPDM_ENDIAN LIBSPDM_ENDIAN_LITTLE
Will defer to STABLE 0.2.
Since nobody has been asking for this I will close this issue for now. If someone needs libspdm to support big-endianness then they can file a new and fresher issue.