Sound Open Firmware
Loading...
Searching...
No Matches
UUID API

UUID API specification. More...

Data Structures

struct  sof_uuid
 UUID (Universally Unique IDentifier) structure. More...
struct  sof_uuid_entry
 Connects UUID with component description. More...

Macros

#define UUID_SIZE   16
 UUID is 16 bytes long.
#define UUID_NAME_MAX_LEN   32
 UUID name string max length in bytes, including null termination.
#define _UUID_INIT(va, vb, vc, d0, d1, d2, d3, d4, d5, d6, d7)
#define _UUID(uuid_name)
#define _RT_UUID(uuid_name)
#define _DEF_UUID(entity_name, uuid_name, initializer)
#define SOF_DEFINE_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.
#define SOF_REG_UUID(name)
 Get UUID value sourced from the fixed SOF registry.
#define SOF_DEFINE_REG_UUID(name)
 Defines UUID sourced from the fixed SOF registry.
#define SOF_UUID(uuid_name)
 Creates local unique 32-bit representation of UUID structure.
#define SOF_RT_UUID(uuid_name)
 Dereference unique 32-bit representation of UUID structure in runtime.

Variables

struct sof_uuid __packed

Detailed Description

UUID API specification.

Macro Definition Documentation

◆ _DEF_UUID

#define _DEF_UUID ( entity_name,
uuid_name,
initializer )
Value:
__section(".static_uuids") \
static const struct sof_uuid_entry uuid_name ## _ldc \
= { .id = initializer, .name = entity_name }; \
const struct sof_uuid uuid_name = initializer
Connects UUID with component description.
Definition uuid.h:77
UUID (Universally Unique IDentifier) structure.
Definition uuid.h:60
#define __section(x)
Definition compiler_attributes.h:31

◆ _RT_UUID

#define _RT_UUID ( uuid_name)
Value:
(&(uuid_name))

◆ _UUID

#define _UUID ( uuid_name)
Value:
(&(uuid_name ## _ldc))

◆ _UUID_INIT

#define _UUID_INIT ( va,
vb,
vc,
d0,
d1,
d2,
d3,
d4,
d5,
d6,
d7 )
Value:
{ va, vb, vc, { d0, d1, d2, d3, d4, d5, d6, d7 } }

◆ SOF_DEFINE_REG_UUID

#define SOF_DEFINE_REG_UUID ( name)
Value:
_DEF_UUID(#name, name##_uuid, SOF_REG_UUID(name))
#define _DEF_UUID(entity_name, uuid_name, initializer)
Definition uuid.h:103
#define SOF_REG_UUID(name)
Get UUID value sourced from the fixed SOF registry.
Definition uuid.h:141

Defines UUID sourced from the fixed SOF registry.

As for SOF_DEFINE_UUID(), but the ID value is sourced by name from the uuid-registry.txt file distributed with the source tree. The string name field will be identical with the name passed (which is passed as a symbol!), runtime symbol (e.g. the "uuid_name" argument to SOF_DEFINE_UUID()) will be the same, postfixed with a "_uuid".

Parameters
nameName of the UUID, must match an entry in uuid-registry.txt

◆ SOF_DEFINE_UUID

#define SOF_DEFINE_UUID ( entity_name,
uuid_name,
va,
vb,
vc,
vd0,
vd1,
vd2,
vd3,
vd4,
vd5,
vd6,
vd7 )
Value:
_DEF_UUID(entity_name, uuid_name, \
_UUID_INIT(va, vb, vc, vd0, vd1, vd2, vd3, vd4, vd5, vd6, vd7))
#define _UUID_INIT(va, vb, vc, d0, d1, d2, d3, d4, d5, d6, d7)
Definition uuid.h:67

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_nameName of the object pinted by the software tools.
uuid_nameUuid symbol name used with SOF_UUID() and SOF_RT_UUID().
vaaaaaaaaa value.
vbbbbb value.
vccccc value.
vd0d0 value (note how d0 and d1 are grouped in formatted uuid)
vd1d1 value.
vd2d2 value.
vd3d3 value.
vd4d4 value.
vd5d5 value.
vd6d6 value.
vd7d7 value.

◆ SOF_REG_UUID

#define SOF_REG_UUID ( name)
Value:
_UUIDREG_##name

Get UUID value sourced from the fixed SOF registry.

The ID value is sourced by name from the uuid-registry.txt file distributed with the source tree.

Parameters
nameName of the UUID, must match an entry in uuid-registry.txt

◆ SOF_RT_UUID

#define SOF_RT_UUID ( uuid_name)
Value:
_RT_UUID(uuid_name)
#define _RT_UUID(uuid_name)
Definition uuid.h:102

Dereference unique 32-bit representation of UUID structure in runtime.

Parameters
uuid_nameUUID symbol name declared with DECLARE_SOF_RT_UUID().

◆ SOF_UUID

#define SOF_UUID ( uuid_name)
Value:
_UUID(uuid_name)
#define _UUID(uuid_name)
Definition uuid.h:101

Creates local unique 32-bit representation of UUID structure.

In Zephyr builds, this has the same address as the result of SOF_RT_UUID, but has type of "struct sof_uuid *" and not "struct sof_uid_record *"

Parameters
uuid_nameUUID symbol name declared with DECLARE_SOF_UUID() or DECLARE_SOF_RT_UUID().

◆ UUID_NAME_MAX_LEN

#define UUID_NAME_MAX_LEN   32

UUID name string max length in bytes, including null termination.

◆ UUID_SIZE

#define UUID_SIZE   16

UUID is 16 bytes long.

Variable Documentation

◆ __packed

struct sof_uuid __packed