From d87030e73048073d4bf1dd52a461b1efc1f04867 Mon Sep 17 00:00:00 2001 From: smadhavan Date: Fri, 12 Feb 2021 11:37:42 +0530 Subject: nvgpu: gpu: adds support for ACR dbg/prod. ACR ucode is encrypted using different keys for prod/dbg boards. This change adds a check to select ACR ucode based on board type. Note: This support is added only for t19x. Bug 2350733 Bug 2672832 Bug 2672836 Bug 2674821 JIRA NVGPU-4001 (cherry picked from commit c19a0f0c26ab94f6bbf4380ab93e458b88589c82) Change-Id: I2febc2cbe869c06bca0adebd7723b0d6fc1d4b23 Signed-off-by: smadhavan Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2483968 Tested-by: Amulya Yarlagadda Tested-by: mobile promotions Reviewed-by: Amulya Yarlagadda Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/gv11b/acr_gv11b.c | 8 ++++++-- drivers/gpu/nvgpu/include/nvgpu/acr/nvgpu_acr.h | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/gv11b/acr_gv11b.c b/drivers/gpu/nvgpu/gv11b/acr_gv11b.c index de2502ce..876ea610 100644 --- a/drivers/gpu/nvgpu/gv11b/acr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/acr_gv11b.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2021, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -148,7 +148,11 @@ static void gv11b_acr_default_sw_init(struct gk20a *g, struct hs_acr *hs_acr) hs_bl->bl_fw_name = HSBIN_ACR_BL_UCODE_IMAGE; hs_acr->acr_type = ACR_DEFAULT; - hs_acr->acr_fw_name = HSBIN_ACR_UCODE_IMAGE; + if (!g->ops.pmu.is_debug_mode_enabled(g)) { + hs_acr->acr_fw_name = HSBIN_ACR_PROD_UCODE; + } else { + hs_acr->acr_fw_name = HSBIN_ACR_DBG_UCODE; + } hs_acr->ptr_bl_dmem_desc = &hs_acr->bl_dmem_desc_v1; hs_acr->bl_dmem_desc_size = sizeof(struct flcn_bl_dmem_desc_v1); diff --git a/drivers/gpu/nvgpu/include/nvgpu/acr/nvgpu_acr.h b/drivers/gpu/nvgpu/include/nvgpu/acr/nvgpu_acr.h index 7a0143e7..06d39595 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/acr/nvgpu_acr.h +++ b/drivers/gpu/nvgpu/include/nvgpu/acr/nvgpu_acr.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2021, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -40,6 +40,8 @@ struct nvgpu_acr; #define HSBIN_ACR_BL_UCODE_IMAGE "pmu_bl.bin" #define HSBIN_ACR_UCODE_IMAGE "acr_ucode.bin" +#define HSBIN_ACR_PROD_UCODE "acr_ucode_prod.bin" +#define HSBIN_ACR_DBG_UCODE "acr_ucode_dbg.bin" #define HSBIN_ACR_AHESASC_PROD_UCODE "acr_ahesasc_prod_ucode.bin" #define HSBIN_ACR_ASB_PROD_UCODE "acr_asb_prod_ucode.bin" #define HSBIN_ACR_AHESASC_DBG_UCODE "acr_ahesasc_dbg_ucode.bin" -- cgit v1.2.2