aboutsummaryrefslogtreecommitdiff
path: root/include/lib/smccc.h
diff options
context:
space:
mode:
authorRoberto Vargas <roberto.vargas@arm.com>2018-04-26 13:36:53 +0100
committerRoberto Vargas <roberto.vargas@arm.com>2018-06-14 14:41:00 +0100
commit033648652f2d66abe2454a75ded891a47cb13446 (patch)
tree44f1cf0dbdc9601e539393015091c59027de8be3 /include/lib/smccc.h
parent74a44dca29be3e780ea50cf7a595883a399e7cfb (diff)
downloadtrusted-firmware-a-033648652f2d66abe2454a75ded891a47cb13446.tar.gz
Make TF UUID RFC 4122 compliant
RFC4122 defines that fields are stored in network order (big endian), but TF-A stores them in machine order (little endian by default in TF-A). We cannot change the future UUIDs that are already generated, but we can store all the bytes using arrays and modify fiptool to generate the UUIDs with the correct byte order. Change-Id: I97be2d3168d91f4dee7ccfafc533ea55ff33e46f Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
Diffstat (limited to 'include/lib/smccc.h')
-rw-r--r--include/lib/smccc.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/lib/smccc.h b/include/lib/smccc.h
index 660c1dbd28..cb722b0e2e 100644
--- a/include/lib/smccc.h
+++ b/include/lib/smccc.h
@@ -57,6 +57,7 @@
* does not equal SMC_UNK. This is to ensure that the caller won't mistake the
* returned UUID in x0 for an invalid SMC error return
*/
+#if !ERROR_DEPRECATED
#define DEFINE_SVC_UUID(_name, _tl, _tm, _th, _cl, _ch, \
_n0, _n1, _n2, _n3, _n4, _n5) \
CASSERT((uint32_t)(_tl) != (uint32_t) SMC_UNK, invalid_svc_uuid);\
@@ -64,6 +65,24 @@
_tl, _tm, _th, _cl, _ch, \
{ _n0, _n1, _n2, _n3, _n4, _n5 } \
}
+#endif
+
+
+#define DEFINE_SVC_UUID2(_name, _tl, _tm, _th, _cl, _ch, \
+ _n0, _n1, _n2, _n3, _n4, _n5) \
+ CASSERT((uint32_t)(_tl) != (uint32_t) SMC_UNK, invalid_svc_uuid);\
+ static const uuid_t _name = { \
+ {(_tl >> 24) & 0xFF, \
+ (_tl >> 16) & 0xFF, \
+ (_tl >> 8) & 0xFF, \
+ (_tl & 0xFF)}, \
+ {(_tm >> 8) & 0xFF, \
+ (_tm & 0xFF)}, \
+ {(_th >> 8) & 0xFF, \
+ (_th & 0xFF)}, \
+ _cl, _ch, \
+ { _n0, _n1, _n2, _n3, _n4, _n5 } \
+ }
#endif /*__ASSEMBLY__*/
#endif /* __SMCCC_H__ */