From 2dfa74c831d74f38ee5dd04cb802c5ec7326462d Mon Sep 17 00:00:00 2001 From: mkumbar Date: Tue, 9 Jun 2020 11:06:12 +0530 Subject: [PATCH] gpu: nvgpu: ACR interface update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FALCON_ID_END is used in ACR lsf_ucode_desc interface to allocate space for dependency map but now more number of FALCON’s supported which will cause wrong allocation for dependency map, so required to have its definition. JIRA NVGPU-5462 Change-Id: Idaaa24ea1d2767a0b4ef44b1376239f945e39912 Signed-off-by: mkumbar Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2357747 Reviewed-by: automaticguardword Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Deepak Nibade Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/acr/nvgpu_acr_interface.h | 7 ++++++- drivers/gpu/nvgpu/include/nvgpu/falcon.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/common/acr/nvgpu_acr_interface.h b/drivers/gpu/nvgpu/common/acr/nvgpu_acr_interface.h index 4159aa902..3178202d0 100644 --- a/drivers/gpu/nvgpu/common/acr/nvgpu_acr_interface.h +++ b/drivers/gpu/nvgpu/common/acr/nvgpu_acr_interface.h @@ -199,6 +199,11 @@ struct lsf_wpr_header { * @ingroup NVGPURM_BLOB_CONSTRUCT */ /** @{*/ +/** + * Size in entries of the ucode descriptor's dependency map. + */ +#define LSF_FALCON_DEPMAP_SIZE (11U) + /** * Code/data signature details of LS falcon */ @@ -239,7 +244,7 @@ struct lsf_ucode_desc { * packed dependency map used to compute the DM hashes on the code and * data. */ - u8 dep_map[FALCON_ID_END * 2 * 4]; + u8 dep_map[LSF_FALCON_DEPMAP_SIZE * 2 * 4]; /** Message used to derive key */ u8 kdf[16]; }; diff --git a/drivers/gpu/nvgpu/include/nvgpu/falcon.h b/drivers/gpu/nvgpu/include/nvgpu/falcon.h index d938fb227..096117dba 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/falcon.h +++ b/drivers/gpu/nvgpu/include/nvgpu/falcon.h @@ -130,7 +130,7 @@ #define FALCON_ID_SEC2 (7U) /** Falcon ID for MINION engine */ #define FALCON_ID_MINION (10U) -#define FALCON_ID_END (11U) +#define FALCON_ID_END (15U) #define FALCON_ID_INVALID 0xFFFFFFFFU #define FALCON_MAILBOX_0 0x0U