Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: add helper to verify ip discovery binary signature

To be used to check ip discovery binary signature

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Hawking Zhang and committed by
Alex Deucher
32f0e1a3 f6dcaf0c

+8
+8
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
··· 235 235 return !!(amdgpu_discovery_calculate_checksum(data, size) == expected); 236 236 } 237 237 238 + static inline bool amdgpu_discovery_verify_binary_signature(uint8_t *binary) 239 + { 240 + struct binary_header *bhdr; 241 + bhdr = (struct binary_header *)binary; 242 + 243 + return (le32_to_cpu(bhdr->binary_signature) == BINARY_SIGNATURE); 244 + } 245 + 238 246 static int amdgpu_discovery_init(struct amdgpu_device *adev) 239 247 { 240 248 struct table_info *info;