mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: ls ucode decryption support
On T234 theCTXSW 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 - Only Signed ( Only for non-safety build, for safety LSPMU is NA) * CTXSW FECS/GPCCS - Encrypted and Signed (on both safety and non-safety build) ACR FW P4 Change : 32110924 JIRA NVGPU-7903 Change-Id: If447148c02b9cf310102cfb9c688eef402699409 Signed-off-by: Dinesh Kamalakannan <dineshka@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2822656 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
a92bca9772
commit
19f44e0421
@@ -162,6 +162,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
|
||||||
|
|||||||
@@ -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];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -102,8 +102,22 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 - Only Signed ( Only for non-safety build, for safety LSPMU is NA)
|
||||||
|
* CTXSW FECS/GPCCS - Encrypted and Signed (on both safety
|
||||||
|
* and non-safety build)
|
||||||
|
*/
|
||||||
|
if (!acr->is_lsf_encrypt_support) {
|
||||||
acr_sysmem_desc->nonwpr_ucode_blob_size =
|
acr_sysmem_desc->nonwpr_ucode_blob_size =
|
||||||
RECOVERY_UCODE_BLOB_SIZE;
|
RECOVERY_UCODE_BLOB_SIZE;
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@@ -121,8 +135,21 @@ static int ga10b_acr_patch_wpr_info_to_ucode(struct gk20a *g,
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
} else {
|
} 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 - Only Signed ( Only for non-safety build, for safety LSPMU is NA)
|
||||||
|
* CTXSW FECS/GPCCS - Encrypted and Signed (on both safety
|
||||||
|
* and non-safety build
|
||||||
|
*/
|
||||||
|
if (!acr->is_lsf_encrypt_support) {
|
||||||
acr_sysmem_desc->nonwpr_ucode_blob_size =
|
acr_sysmem_desc->nonwpr_ucode_blob_size =
|
||||||
RECOVERY_UCODE_BLOB_SIZE;
|
RECOVERY_UCODE_BLOB_SIZE;
|
||||||
|
}
|
||||||
goto load;
|
goto load;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user