~canonical-hwe-team/hwe-next/+git/sof:correc

Last commit made on 2022-12-07
Get this branch:
git clone -b correc https://git.launchpad.net/~canonical-hwe-team/hwe-next/+git/sof

Branch merges

Branch information

Name:
correc
Repository:
lp:~canonical-hwe-team/hwe-next/+git/sof

Recent commits

1ed4f77... by Andy Ross <email address hidden>

ipc3: Check component type for stream commands

Not all ipc_comp_dev structs contain a comp_dev pointer, it's unioned
based on the "type" field. Since the object ID is part of an IPC
command and under the control of external software, and since there
can be valid non-stream components stored in the list, we need to
check this type before accessing the invalid data belonging to the
other union types.

Signed-off-by: Andy Ross <email address hidden>

3ae99d9... by Andy Ross <email address hidden>

zephyr/wrapper: Handle OOM correctly in rzalloc()

Fuzzing caught this function failing to handle a heap failure and crashing.

Signed-off-by: Andy Ross <email address hidden>

572a08e... by Andy Ross <email address hidden>

dma_trace: Add missing initialization check

It's possible to reach dma_trace_on() from IPC handlers based on host
state before DMA trace has been initialized (found this via fuzzing,
so the precise circumstances are a little opaque). When that happens,
the schedule_task() call ends up putting a delayed work queue item
into the Zephyr queue which has a NULL callback. This eventually
blows up later when the timeout expires.

Check for initialization state before doing anything.

Signed-off-by: Andy Ross <email address hidden>

be0fdda... by Andy Ross <email address hidden>

ipc3: Silence top-level IPC cmd formatting errors when fuzzing

Command format errors during fuzzing are reported for virtually all
commands, and the resulting flood of logging becomes a severe
performance penalty (i.e. we get a lot less fuzzing done per CPU
cycle).

Signed-off-by: Andy Ross <email address hidden>

c50eddc... by Andy Ross <email address hidden>

platform: Add Zephyr native_posix-based emulation environment

This extends the ideas in CONFIG_LIBRARY=y to implement SOF as an
application for the Zephyr native_posix architecture. These are host
x86 or x86_64 binaries that include a full OS build, which can be used
(via mocked drivers) for testing against host validation environments
like ASAN/MSAN.

The mechanism uses the existing "host" architecture used by
CONFIG_LIBRARY, but adds a new platform layer named "posix", populated
entirely with stubs.

No driver integration is provided in this patch. The resulting
executable builds correctly, but has no devices and won't do anything.

Signed-off-by: Andy Ross <email address hidden>

0542304... by Andy Ross <email address hidden>

zephyr: Not all builds are xtensa

Don't need the arch-specific cache header if we're building for native_posix

Signed-off-by: Andy Ross <email address hidden>

001bb8f... by Andy Ross <email address hidden>

zephyr/wrapper.c: Misc portability/correctness cleanups

This file needs the clk.h APIs, so include the header. Don't include
the Xtensa cache.h, as it's unused (and not supposed to be, zephyr.c
is portable code). Use the proper interrupt en/disable APIs instead
of the SOC-level calls they wrap.

Signed-off-by: Andy Ross <email address hidden>

3de98c7... by Andy Ross <email address hidden>

sof/trace/trace.h: Add missing Zephyr platform header

Can't use k_*() APIs without including kernel.h

Signed-off-by: Andy Ross <email address hidden>

b4025e5... by Andy Ross <email address hidden>

zephyr: Add missing kernel.h include

The timer.h header references k_cycle_get_64(), which is defined in
kernel.h. Was previously hidden by a transitive include somewhere.

Signed-off-by: Andy Ross <email address hidden>

c6ab5b0... by Andy Ross <email address hidden>

pipeline-graph.c: Needs clk.h

This was calling clk APIs without the header. Discovered when
native_posix exposed a previous transitive include.

Signed-off-by: Andy Ross <email address hidden>