mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: get PMU ucode cmd line args DMEM offset
Fetch DMEM size of PMU falcon using common Falcon interface to copy PMU ucode command lines args at top of PMU DMEM offset. Change needed to cleanup dependency between PMU and ACR JIRA NVGPU-1147 Change-Id: Ie0b1bcf0bdd1afb2c37c1a7d061dc9b03f9fc679 Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2012082 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
ecc27b3f8b
commit
a759ee0ec8
@@ -44,8 +44,6 @@
|
||||
#include "pmu_gm20b.h"
|
||||
#include "acr_gm20b.h"
|
||||
|
||||
#include <nvgpu/hw/gm20b/hw_pwr_gm20b.h>
|
||||
|
||||
typedef int (*gm20b_get_ucode_details)(struct gk20a *g,
|
||||
struct flcn_ucode_img *udata);
|
||||
|
||||
@@ -404,7 +402,6 @@ int gm20b_pmu_populate_loader_cfg(struct gk20a *g,
|
||||
void *lsfm, u32 *p_bl_gen_desc_size)
|
||||
{
|
||||
struct wpr_carveout_info wpr_inf;
|
||||
struct nvgpu_pmu *pmu = &g->pmu;
|
||||
struct lsfm_managed_ucode_img *p_lsfm =
|
||||
(struct lsfm_managed_ucode_img *)lsfm;
|
||||
struct flcn_ucode_img *p_img = &(p_lsfm->ucode_img);
|
||||
@@ -413,7 +410,6 @@ int gm20b_pmu_populate_loader_cfg(struct gk20a *g,
|
||||
struct pmu_ucode_desc *desc;
|
||||
u64 tmp;
|
||||
u32 addr_code, addr_data;
|
||||
u32 addr_args;
|
||||
|
||||
if (p_img->desc == NULL) {
|
||||
/*
|
||||
@@ -452,13 +448,6 @@ int gm20b_pmu_populate_loader_cfg(struct gk20a *g,
|
||||
desc->app_resident_data_offset);
|
||||
nvgpu_pmu_dbg(g, "bl start off %d\n", desc->bootloader_start_offset);
|
||||
|
||||
addr_args = ((pwr_falcon_hwcfg_dmem_size_v(
|
||||
gk20a_readl(g, pwr_falcon_hwcfg_r())))
|
||||
<< GK20A_PMU_DMEM_BLKSIZE2);
|
||||
addr_args -= g->ops.pmu_ver.get_pmu_cmdline_args_size(pmu);
|
||||
|
||||
nvgpu_pmu_dbg(g, "addr_args %x\n", addr_args);
|
||||
|
||||
/* Populate the loader_config state*/
|
||||
ldr_cfg->dma_idx = GK20A_PMU_DMAIDX_UCODE;
|
||||
ldr_cfg->code_dma_base = addr_code;
|
||||
@@ -474,10 +463,9 @@ int gm20b_pmu_populate_loader_cfg(struct gk20a *g,
|
||||
|
||||
/* Update the argc/argv members*/
|
||||
ldr_cfg->argc = 1;
|
||||
ldr_cfg->argv = addr_args;
|
||||
nvgpu_pmu_get_cmd_line_args_offset(g, &ldr_cfg->argv);
|
||||
|
||||
*p_bl_gen_desc_size = (u32)sizeof(struct loader_config);
|
||||
g->acr.pmu_args = addr_args;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user