mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: Add lsf encrypt check for ACR blob prep
Add lsf encrypt flag check for ACR blob preparation NVGPU will pass the same previous blob during recovery sequence instead of 0 blob size, if any of ucode image is encrypted. BUG 4617207 Bug 4786365 Change-Id: I7a76cc426dda90930e8b7eded9656af9f2eb952a Signed-off-by: mpoojary <mpoojary@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3191453 Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
632d5fbc32
commit
3de579438e
@@ -148,6 +148,7 @@ int nvgpu_acr_init(struct gk20a *g)
|
||||
nvgpu_gv11b_acr_sw_init(g, g->acr);
|
||||
break;
|
||||
case NVGPU_GPUID_GA10B:
|
||||
g->acr->is_lsf_encrypt_support = true;
|
||||
nvgpu_ga10b_acr_sw_init(g, g->acr);
|
||||
break;
|
||||
#ifdef CONFIG_NVGPU_DGPU
|
||||
|
||||
@@ -136,6 +136,7 @@ struct nvgpu_acr {
|
||||
|
||||
/* LSF properties */
|
||||
u64 lsf_enable_mask;
|
||||
bool is_lsf_encrypt_support;
|
||||
struct acr_lsf_config lsf[FALCON_ID_END];
|
||||
|
||||
/*
|
||||
|
||||
@@ -102,8 +102,19 @@ static int ga10b_acr_patch_wpr_info_to_ucode(struct gk20a *g,
|
||||
nvgpu_err(g, "invalid mem acr_falcon2_sysmem_desc");
|
||||
return -EINVAL;
|
||||
}
|
||||
/*
|
||||
* In T234 the CTXSW LS ucodes are encrypted. ACR will perform the
|
||||
* decryption and the decrypted content will be written back
|
||||
* into the same WPR location. So on recovery with LSPMU absence
|
||||
* and on warm boot case, to perform the authentication , the ucode
|
||||
* blob needs to be copied into the WPR from sysmem always.
|
||||
* Below are the LS ucodes authentication type
|
||||
* LSPMU - Encrypted and Signed
|
||||
*/
|
||||
if (!acr->is_lsf_encrypt_support) {
|
||||
acr_sysmem_desc->nonwpr_ucode_blob_size =
|
||||
RECOVERY_UCODE_BLOB_SIZE;
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
@@ -121,8 +132,19 @@ static int ga10b_acr_patch_wpr_info_to_ucode(struct gk20a *g,
|
||||
goto end;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* In T234 the CTXSW LS ucodes are encrypted. ACR will perform the
|
||||
* decryption and the decrypted content will be written back
|
||||
* into the same WPR location. So on recovery with LSPMU absence
|
||||
* and on warm boot case, to perform the authentication , the ucode
|
||||
* blob needs to be copied into the WPR from sysmem always.
|
||||
* Below are the LS ucodes authentication type
|
||||
* LSPMU - Encrypted and Signed
|
||||
*/
|
||||
if (!acr->is_lsf_encrypt_support) {
|
||||
acr_sysmem_desc->nonwpr_ucode_blob_size =
|
||||
RECOVERY_UCODE_BLOB_SIZE;
|
||||
}
|
||||
goto load;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user