Skip to content

Commit feb5fb0

Browse files
rfvirgilbroonie
authored andcommitted
firmware: cs_dsp: Add KUnit testing of wmfw error cases
Add tests for various types of errors and illegal values in wmfw files. This covers buffer overflows as well as general unsupported field values. There are several sets of test cases to cover various different versions of the wmfw file format. V0 format was only used on the earlier ADSP2 devices. It does not have algorithm blocks. V1 format is used on all ADSP2 versions. It added algorithm blocks and firmware coefficient descriptor blocks. Strings are stored in fixed-length arrays. V2 format is used on all ADSP2 versions. It is similar to V1 but space for strings is variable-length with either an 8-bit or 16-bit length field. V3 format is used on Halo Core DSPs and is mostly identical to the V3 format. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241212143725.1381013-12-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent cd8c058 commit feb5fb0

2 files changed

Lines changed: 1348 additions & 0 deletions

File tree

drivers/firmware/cirrus/test/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ cs_dsp_test-objs := \
1515
cs_dsp_test_control_cache.o \
1616
cs_dsp_test_control_rw.o \
1717
cs_dsp_test_wmfw.o \
18+
cs_dsp_test_wmfw_error.o \
1819
cs_dsp_tests.o
1920

2021
obj-$(CONFIG_FW_CS_DSP_KUNIT_TEST_UTILS) += cs_dsp_test_utils.o

0 commit comments

Comments
 (0)