From 725a5eaa801098f5f59762a87b7200803e82551c Mon Sep 17 00:00:00 2001 From: smadhavan Date: Wed, 7 Apr 2021 14:07:26 +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. ACR ucode binaries are also renamed with "nv_" prefix to conform to release naming conventions. Bug 2672836 Change-Id: I48818f018f903c0d03642c12485d60e392121eb6 Signed-off-by: smadhavan Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2492587 (cherry picked from commit 5dacead521aaee1bd8a3b2e9db3e281c085038f7) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2597878 Reviewed-by: Mayur Poojary Reviewed-by: Deepak Nibade Reviewed-by: mobile promotions Tested-by: Mayur Poojary Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/gm20b/acr_gm20b.c | 8 ++++++-- drivers/gpu/nvgpu/include/nvgpu/acr/nvgpu_acr.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c index 4f684191..fe9cf93f 100644 --- a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2018, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2015-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"), @@ -1372,7 +1372,11 @@ static void gm20b_acr_default_sw_init(struct gk20a *g, struct hs_acr *hs_acr) /* ACR HS ucode type & f/w name*/ 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 = GM20B_HSBIN_ACR_PROD_UCODE; + } else { + hs_acr->acr_fw_name = GM20B_HSBIN_ACR_DBG_UCODE; + } /* bootlader interface used by ACR HS bootloader*/ hs_acr->ptr_bl_dmem_desc = &hs_acr->bl_dmem_desc; diff --git a/drivers/gpu/nvgpu/include/nvgpu/acr/nvgpu_acr.h b/drivers/gpu/nvgpu/include/nvgpu/acr/nvgpu_acr.h index 06d39595..cdb7bb86 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/acr/nvgpu_acr.h +++ b/drivers/gpu/nvgpu/include/nvgpu/acr/nvgpu_acr.h @@ -39,6 +39,8 @@ struct hs_acr; struct nvgpu_acr; #define HSBIN_ACR_BL_UCODE_IMAGE "pmu_bl.bin" +#define GM20B_HSBIN_ACR_PROD_UCODE "nv_acr_ucode_prod.bin" +#define GM20B_HSBIN_ACR_DBG_UCODE "nv_acr_ucode_dbg.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" -- cgit v1.2.2