]> www.infradead.org Git - users/jedix/linux-maple.git/commit
firmware: cs_dsp: Add KUnit testing of wmfw error cases
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Thu, 12 Dec 2024 14:37:24 +0000 (14:37 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 13 Dec 2024 13:14:47 +0000 (13:14 +0000)
commitfeb5fb0615f321ab514f4fbbab777f3591f7e4b5
tree47a9d0442c7e5cedc61515cc1f0cd94ac09df58e
parentcd8c058499b65e8605cd3c387bb1f76e2954870e
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>
drivers/firmware/cirrus/test/Makefile
drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c [new file with mode: 0644]