summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
diff options
context:
space:
mode:
authorVictor Zhao <Victor.Zhao@amd.com>2021-03-18 08:44:35 +0300
committerAlex Deucher <alexander.deucher@amd.com>2021-05-27 19:33:52 +0300
commitf1688bd69ec4b07eda1657ff953daebce7cfabf6 (patch)
tree6dd133a531185048f3884a4f799dad54244016ce /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
parentdd1d82c04e111b5a864638ede8965db2fe6d8653 (diff)
downloadlinux-f1688bd69ec4b07eda1657ff953daebce7cfabf6.tar.xz
drm/amd/amdgpu:save psp ring wptr to avoid attack
[Why] When some tools performing psp mailbox attack, the readback value of register can be a random value which may break psp. [How] Use a psp wptr cache machanism to aovid the change made by attack. v2: unify change and add detailed reason Signed-off-by: Victor Zhao <Victor.Zhao@amd.com> Signed-off-by: Jingwen Chen <Jingwen.Chen2@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
index 46a5328e00e0..60aa99a39a74 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
@@ -76,6 +76,7 @@ struct psp_ring
uint64_t ring_mem_mc_addr;
void *ring_mem_handle;
uint32_t ring_size;
+ uint32_t ring_wptr;
};
/* More registers may will be supported */