UUID API¶
Location: include/sof/lib/uuid.h
-
group
uuid_api
UUID API specification.
Defines
-
UUID_SIZE
¶ UUID is 16 bytes long.
-
UUID_NAME_MAX_LEN
¶ UUID name string max length in bytes, including null termination.
-
DECLARE_SOF_UUID
(entity_name, uuid_name, va, vb, vc, vd0, vd1, vd2, vd3, vd4, vd5, vd6, vd7)¶ Declares UUID (aaaaaaaa-bbbb-cccc-d0d1-d2d3d4d5d6d7) and name.
UUID value from variables declared with this macro are unaccessible in runtime code - UUID dictionary from ldc file is needed get UUID value.
- Parameters
entity_name
: Name of the object pinted by the software tools.uuid_name
: Uuid symbol name used with SOF_UUID().va
: aaaaaaaa value.vb
: bbbb value.vc
: cccc value.vd0
: d0 value (note how d0 and d1 are grouped in formatted uuid)vd1
: d1 value.vd2
: d2 value.vd3
: d3 value.vd4
: d4 value.vd5
: d5 value.vd6
: d6 value.vd7
: d7 value.
-
DECLARE_SOF_RT_UUID
(entity_name, uuid_name, va, vb, vc, vd0, vd1, vd2, vd3, vd4, vd5, vd6, vd7)¶ Declares runtime UUID (aaaaaaaa-bbbb-cccc-d0d1-d2d3d4d5d6d7) and name.
UUID value from variables declared with this macro are accessible in runtime code - to dereference use SOF_RT_UUID()
- Parameters
entity_name
: Name of the object pinted by the software tools.uuid_name
: Uuid symbol name used with SOF_UUID() and SOF_RT_UUID().va
: aaaaaaaa value.vb
: bbbb value.vc
: cccc value.vd0
: d0 value (note how d0 and d1 are grouped in formatted uuid)vd1
: d1 value.vd2
: d2 value.vd3
: d3 value.vd4
: d4 value.vd5
: d5 value.vd6
: d6 value.vd7
: d7 value.
-
SOF_UUID
(uuid_name)¶ Creates local unique 32-bit representation of UUID structure.
- Parameters
uuid_name
: UUID symbol name declared with DECLARE_SOF_UUID() or DECLARE_SOF_RT_UUID().
-
SOF_RT_UUID
(uuid_name)¶ Dereference unique 32-bit representation of UUID structure in runtime.
- Parameters
uuid_name
: UUID symbol name declared with DECLARE_SOF_RT_UUID().
-
struct
sof_uuid
¶ - #include <uuid.h>
UUID (Universally Unique IDentifier) structure.
Use DECLARE_SOF_UUID() to assigned UUID to the fw part (component implementation, dai implementation, …).
Use SOF_UUID() to store an address of declared UUID.
See existing implementation of components and dais for examples how to UUIDs are declared and assigned to the drivers to provide identification of the source for their log entries.
UUID for a new component may be generated with uuidgen Linux tool, part of the util-linux package.
-
struct
sof_uuid_entry
¶ - #include <uuid.h>
Connects UUID with component description.
Declaration of this structure should be done by DECLARE_SOF_UUID(), then declaration will be part of
.static_uuids
section andSMEX
tool use it duringldc
file creation.
-