mesa-drm/tests/amdgpu
Aaron Liu 38c44cccdc tests/amdgpu: add atomic dma command to verify the secure buffer (v2)
DMA's atomic behavir is unlike GFX,If the comparing data is not
equal to destination data,
For GFX, loop again till gfx timeout(system hang).
For DMA, loop again till timer expired and then send interrupt.
So testcase can't use interrupt mechanism.
We take another way to verify. When the comparing data is not
equal to destination data, overwrite the source data to the destination
buffer. Otherwise, original destination data unchanged.
So if the bo_cpu data is overwritten, the result is passed.

Steps:
1. use linear write packet to write 0xdeadbeaf to secure buffer,
2. use atmoic packet and ATOMIC_CMPSWAP_RTN_32 opcode to compare
the cmp_data(0xdeadbeaf) to the written data which has been encrypted.

v2: add the case of (dest_data != cmp_data).

Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-10-15 13:46:34 -04:00
..
.editorconfig amdgpu: Symlink .editorconfig to tests/amdgpu 2018-01-18 10:12:37 +01:00
amdgpu_test.c tests/amdgpu: add security test suite (v2) 2020-10-15 13:45:41 -04:00
amdgpu_test.h tests/amdgpu: add device handle as input param for exec_cs_helper and write_linear_helper (v4) 2020-10-15 13:46:11 -04:00
basic_tests.c tests/amdgpu: add atomic dma command to verify the secure buffer (v2) 2020-10-15 13:46:34 -04:00
bo_tests.c test/amdgpu: don't free unused bo handle 2019-10-15 13:18:12 +02:00
cs_tests.c tests/amdgpu: disable unsupported test cases for Arcturus 2020-10-15 13:45:27 -04:00
deadlock_tests.c tests/amdgpu: disable unsupported test cases for Arcturus 2020-10-15 13:45:27 -04:00
decode_messages.h tests/amdgpu: clear the extension flag 2020-06-18 10:08:23 -04:00
frame.h tests/amdgpu: add uvd encode unit tests 2017-08-16 16:16:50 -04:00
meson.build tests/amdgpu: add security test suite (v2) 2020-10-15 13:45:41 -04:00
ras_tests.c tests/amdgpu: Fix buffer overflow (v3) 2020-01-08 13:21:40 -05:00
security_tests.c tests/amdgpu: add test to submit a gfx command with secure context 2020-10-15 13:46:29 -04:00
syncobj_tests.c tests/amdgpu: Fix various warnings (v2) 2020-01-08 13:18:50 -05:00
uvd_enc_tests.c meson,configure: include config.h automatically 2018-03-20 18:19:26 +00:00
uve_ib.h tests/amdgpu: fix uvd enc data corruption issue 2017-10-06 09:40:06 -04:00
vce_ib.h tests/amdgpu: add vce mv tests support and sets 2018-04-06 09:35:14 -04:00
vce_tests.c tests/amdgpu: disable unsupported test cases for Arcturus 2020-10-15 13:45:27 -04:00
vcn_tests.c tests/amdgpu/vcn: add Arcturus decode test support 2020-10-15 13:45:17 -04:00
vm_tests.c tests/amdgpu: disable unsupported test cases for Arcturus 2020-10-15 13:45:27 -04:00