J-Alves a46cca0397 feat(sptool): align SP uuids to byte words
The FF-A manifest UUIDs are parsed in a function to generate the
fragment for the tb fconf dts file.

The UUID must have exactly 4 little endian words so that the the regex
in the get_uuid function can convert into canonical format. This patch
adds an assertion to catch any malformed UUID.

Moreover, the bytes.fromhex() helper expects even number of bytes.
It is possible that the hex string representing the little endian
word could have odd number of characters. For example, 0x29a has 3
characters.

This patch improves the get_uuid function to inserts 0s to the left of
the parsed value (translating `29a` to `029a`), to make sure the
bytes.fromhex can create an array of 4 integers.

Signed-off-by: J-Alves <joao.alves@arm.com>
Co-authored-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
Change-Id: I5693d03ef79f6a69b817b25f625185a98f73d885
2026-01-06 16:55:11 -06:00
..
2025-11-05 09:39:33 +01:00