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:
mpoojary
2024-08-09 14:51:12 +00:00
committed by mobile promotions
parent 632d5fbc32
commit 3de579438e
3 changed files with 26 additions and 2 deletions

View File

@@ -148,6 +148,7 @@ int nvgpu_acr_init(struct gk20a *g)
nvgpu_gv11b_acr_sw_init(g, g->acr); nvgpu_gv11b_acr_sw_init(g, g->acr);
break; break;
case NVGPU_GPUID_GA10B: case NVGPU_GPUID_GA10B:
g->acr->is_lsf_encrypt_support = true;
nvgpu_ga10b_acr_sw_init(g, g->acr); nvgpu_ga10b_acr_sw_init(g, g->acr);
break; break;
#ifdef CONFIG_NVGPU_DGPU #ifdef CONFIG_NVGPU_DGPU

View File

@@ -136,6 +136,7 @@ struct nvgpu_acr {
/* LSF properties */ /* LSF properties */
u64 lsf_enable_mask; u64 lsf_enable_mask;
bool is_lsf_encrypt_support;
struct acr_lsf_config lsf[FALCON_ID_END]; struct acr_lsf_config lsf[FALCON_ID_END];
/* /*

View File

@@ -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"); nvgpu_err(g, "invalid mem acr_falcon2_sysmem_desc");
return -EINVAL; return -EINVAL;
} }
acr_sysmem_desc->nonwpr_ucode_blob_size = /*
* 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; RECOVERY_UCODE_BLOB_SIZE;
}
} else } else
#endif #endif
{ {
@@ -121,8 +132,19 @@ static int ga10b_acr_patch_wpr_info_to_ucode(struct gk20a *g,
goto end; goto end;
} }
} else { } else {
acr_sysmem_desc->nonwpr_ucode_blob_size = /*
* 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; RECOVERY_UCODE_BLOB_SIZE;
}
goto load; goto load;
} }