tests/amdgpu: Fix TMZ secure bounce test

Fix the TMZ secure bounce test, in that Bob's
buffer has to be created encrypted (with the
encrypted flag set), so that when we copy from
Alice's buffer, which is also encrypted, to Bob's
buffer, the copy can be successful and the data
actually copied.

This fixes the test and it no longer fails. Tested
on Sienna Cichlid.

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Aaron Liu <aaron.liu@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Reviewed-by: Alex Deucher <Alexander.Deucher@amd.com>
main
Luben Tuikov 2021-07-15 21:28:16 -04:00
parent 9cef5dee3c
commit 87a68fe9e4
1 changed files with 3 additions and 3 deletions

View File

@ -315,7 +315,7 @@ static void amdgpu_secure_bounce(void)
SECURE_BUFFER_SIZE,
page_size,
AMDGPU_GEM_DOMAIN_VRAM,
0 /* AMDGPU_GEM_CREATE_ENCRYPTED */,
AMDGPU_GEM_CREATE_ENCRYPTED,
&bob);
if (res) {
PRINT_ERROR(res);
@ -323,9 +323,9 @@ static void amdgpu_secure_bounce(void)
goto Out_free_Alice;
}
/* sDMA clear copy from Alice to Bob.
/* sDMA TMZ copy from Alice to Bob.
*/
amdgpu_bo_lcopy(&sb_ctx, &bob, &alice, SECURE_BUFFER_SIZE, 0);
amdgpu_bo_lcopy(&sb_ctx, &bob, &alice, SECURE_BUFFER_SIZE, 1);
/* Move Bob to the GTT domain.
*/