diff --git a/drivers/gpu/nvgpu/common/acr/acr.c b/drivers/gpu/nvgpu/common/acr/acr.c index bf68ed99f..101b1c892 100644 --- a/drivers/gpu/nvgpu/common/acr/acr.c +++ b/drivers/gpu/nvgpu/common/acr/acr.c @@ -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 diff --git a/drivers/gpu/nvgpu/common/acr/acr_priv.h b/drivers/gpu/nvgpu/common/acr/acr_priv.h index 1dda2005b..4fd9eefe9 100644 --- a/drivers/gpu/nvgpu/common/acr/acr_priv.h +++ b/drivers/gpu/nvgpu/common/acr/acr_priv.h @@ -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]; /* diff --git a/drivers/gpu/nvgpu/common/acr/acr_sw_ga10b.c b/drivers/gpu/nvgpu/common/acr/acr_sw_ga10b.c index b800ce274..5e56d1a3f 100644 --- a/drivers/gpu/nvgpu/common/acr/acr_sw_ga10b.c +++ b/drivers/gpu/nvgpu/common/acr/acr_sw_ga10b.c @@ -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; } - 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; + } } else #endif { @@ -121,8 +132,19 @@ static int ga10b_acr_patch_wpr_info_to_ucode(struct gk20a *g, goto end; } } 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; + } goto load; }