mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
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>
This commit is contained in:
parent
cd8c058499
commit
feb5fb0615
|
|
@ -15,6 +15,7 @@ cs_dsp_test-objs := \
|
|||
cs_dsp_test_control_cache.o \
|
||||
cs_dsp_test_control_rw.o \
|
||||
cs_dsp_test_wmfw.o \
|
||||
cs_dsp_test_wmfw_error.o \
|
||||
cs_dsp_tests.o
|
||||
|
||||
obj-$(CONFIG_FW_CS_DSP_KUNIT_TEST_UTILS) += cs_dsp_test_utils.o
|
||||
|
|
|
|||
1347
drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c
Normal file
1347
drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user