tests/amdgpu: add atomic_mem cp_packet to verify the secure buffer
Secure buffer is only able to be read with trusted ip block. So we need use GFX ip to read it back instead of CPU. Steps: 1. use write_data packet to write 0xdeadbeaf to secure buffer, 2. use atmoic_mem packet and ATOMIC_CMPSWAP_RTN_32 opcode to compare the cmp_data(0xdeadbeaf) to the written data which has been encrypted. If the result is equal, then overwrite the src_data(0x12345678) to the secure buffer and return directly. Otherwise loop again until gfx timeout and the secure buffer data unchanged. 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> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Loading
Please register or sign in to comment