Make TFTF RFC 4122 compliant

This is a TFTF backport of a change that makes TF RFC 4122-compliant
by converting the stored format of UUIDs from machine order (little
endian) to network order (big endian).

This patch changes the data structure used to store the values in the
same way as in the related change in TF:
033648652f2d66abe2454a75ded891a47cb13446.

Signed-off-by: Oliver Swede <oli.swede@arm.com>
Change-Id: I052e570b80de61f87a049a08e347a2e5da7f841b
diff --git a/include/lib/libc/uuid.h b/include/lib/libc/uuid.h
index bdefb91..3a1699b 100644
--- a/include/lib/libc/uuid.h
+++ b/include/lib/libc/uuid.h
@@ -1,4 +1,6 @@
 /*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
  * Copyright (c) 2002 Marcel Moolenaar
  * All rights reserved.
  *
@@ -27,7 +29,7 @@
  */
 
 /*
- * Portions copyright (c) 2014, ARM Limited and Contributors.
+ * Portions copyright (c) 2014-2020, ARM Limited and Contributors.
  * All rights reserved.
  */
 
@@ -40,17 +42,10 @@
 /* Length of a node address (an IEEE 802 address). */
 #define	_UUID_NODE_LEN		6
 
-/*
- * See also:
- *      http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt
- *      http://www.opengroup.org/onlinepubs/009629399/apdxa.htm
- *
- * A DCE 1.1 compatible source representation of UUIDs.
- */
 struct uuid {
-	uint32_t	time_low;
-	uint16_t	time_mid;
-	uint16_t	time_hi_and_version;
+	uint8_t		time_low[4];
+	uint8_t		time_mid[2];
+	uint8_t		time_hi_and_version[2];
 	uint8_t		clock_seq_hi_and_reserved;
 	uint8_t		clock_seq_low;
 	uint8_t		node[_UUID_NODE_LEN];