13#include <sof/compiler_attributes.h>
41 if (tlv->
length %
sizeof(uint32_t) != 0)
44 return (
struct sof_tlv *)((
char *)(tlv) +
sizeof(*tlv) + tlv->
length);
57 tlv->
length =
sizeof(uint32_t);
92 const uint32_t end_addr = (uint32_t)
data + size;
94 while (tlv && (uint32_t)tlv < end_addr) {
114 if ((uintptr_t)tlv %
sizeof(uint32_t) != 0)
120 return (
void *)tlv->
value;
uint32_t data[]
Definition debug_stream_slot.h:2
#define __packed
Definition ext_manifest.h:43
static int memcpy_s(void *dest, size_t dest_size, const void *src, size_t count)
Definition string.h:38
uint32_t max_length
Definition tlv.h:30
uint32_t type
Definition tlv.h:29
Type–length–value struct.
Definition tlv.h:22
char value[]
Definition tlv.h:25
uint32_t type
Definition tlv.h:23
uint32_t length
Definition tlv.h:24
static void tlv_value_get(const void *data, uint32_t size, uint32_t type, void **value, uint32_t *length)
Searches a sequence of TLV structures for values of the specified type.
Definition tlv.h:85
static struct sof_tlv * tlv_next(const struct sof_tlv *tlv)
Allows to step through successive values in a sequence of TLV structures.
Definition tlv.h:39
static void tlv_value_set(struct sof_tlv *tlv, uint32_t type, uint32_t length, void *value)
Fills the TLV Structure (general purpose version).
Definition tlv.h:69
char value[]
Definition tlv.h:2
static void tlv_value_uint32_set(struct sof_tlv *tlv, uint32_t type, uint32_t value)
Fills the TLV Structure (version for 32-bit values).
Definition tlv.h:54
uint32_t type
Definition tlv.h:0
static void * tlv_value_ptr_get(struct sof_tlv *tlv, uint32_t type)
Retrieves pointer to the TLV Structure value of the specified type.
Definition tlv.h:112
uint32_t length
Definition tlv.h:1
#define __aligned(x)
Definition compiler_attributes.h:27