diff options
author | Mahantesh Kumbar <mkumbar@nvidia.com> | 2018-09-19 02:53:05 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-09-25 06:43:45 -0400 |
commit | 4efdc362175c67f93d3546727c8825686619c1cb (patch) | |
tree | cbb723ed22c716d3ae554049a04660ac5fba0b56 /drivers/gpu/nvgpu/gv100 | |
parent | d6aa52b15f2c42aa557522d148b137584dcfb454 (diff) |
gpu: nvgpu: ACR load split feature support
-Added code to copy SEC2-RTOS ucode to non-wpr blob
as part of prepare ucode blob.
-Added code to setup & bootstrap GSP, as ACR-ASB needs
ucode to execute on GSP falcon.
-Defined LSF_FALCON_ID_GSPLITE for GSP falcon
-Defined HSBIN_ACR_AHESASC_DBG/PROD_UCODE &
HSBIN_ACR_ASB_DBG/PROD_UCODE to hold names
of ACR AHESASC/ASB ucodes.
-Added defines to hold name of SE2C RTOS ucodes
JIRA NVGPUT-134
Change-Id: I824afed41f785a4ca0fb393bd023db5396c7a399
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1790179
Reviewed-by: svc-misra-checker <svc-misra-checker@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>
Diffstat (limited to 'drivers/gpu/nvgpu/gv100')
-rw-r--r-- | drivers/gpu/nvgpu/gv100/gsp_gv100.c | 72 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/gsp_gv100.h | 3 |
2 files changed, 75 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv100/gsp_gv100.c b/drivers/gpu/nvgpu/gv100/gsp_gv100.c index 6ea7ab71..d6d01b7f 100644 --- a/drivers/gpu/nvgpu/gv100/gsp_gv100.c +++ b/drivers/gpu/nvgpu/gv100/gsp_gv100.c | |||
@@ -39,3 +39,75 @@ int gv100_gsp_reset(struct gk20a *g) | |||
39 | 39 | ||
40 | return 0; | 40 | return 0; |
41 | } | 41 | } |
42 | |||
43 | static int gsp_flcn_bl_bootstrap(struct gk20a *g, | ||
44 | struct nvgpu_falcon_bl_info *bl_info) | ||
45 | { | ||
46 | struct mm_gk20a *mm = &g->mm; | ||
47 | u32 data = 0; | ||
48 | u32 status = 0; | ||
49 | |||
50 | gk20a_writel(g, pgsp_falcon_itfen_r(), | ||
51 | gk20a_readl(g, pgsp_falcon_itfen_r()) | | ||
52 | pgsp_falcon_itfen_ctxen_enable_f()); | ||
53 | |||
54 | gk20a_writel(g, pgsp_falcon_nxtctx_r(), | ||
55 | pgsp_falcon_nxtctx_ctxptr_f( | ||
56 | nvgpu_inst_block_addr(g, &mm->pmu.inst_block) >> 12U) | | ||
57 | pgsp_falcon_nxtctx_ctxvalid_f(1) | | ||
58 | nvgpu_aperture_mask(g, &mm->pmu.inst_block, | ||
59 | pgsp_falcon_nxtctx_ctxtgt_sys_ncoh_f(), | ||
60 | pgsp_falcon_nxtctx_ctxtgt_sys_coh_f(), | ||
61 | pgsp_falcon_nxtctx_ctxtgt_fb_f())); | ||
62 | |||
63 | data = gk20a_readl(g, pgsp_falcon_debug1_r()); | ||
64 | data |= pgsp_falcon_debug1_ctxsw_mode_m(); | ||
65 | gk20a_writel(g, pgsp_falcon_debug1_r(), data); | ||
66 | |||
67 | data = gk20a_readl(g, pgsp_falcon_engctl_r()); | ||
68 | data |= pgsp_falcon_engctl_switch_context_true_f(); | ||
69 | gk20a_writel(g, pgsp_falcon_engctl_r(), data); | ||
70 | |||
71 | status = nvgpu_flcn_bl_bootstrap(&g->gsp_flcn, bl_info); | ||
72 | |||
73 | return status; | ||
74 | } | ||
75 | |||
76 | int gv100_gsp_setup_hw_and_bl_bootstrap(struct gk20a *g, | ||
77 | struct hs_acr *acr_desc, | ||
78 | struct nvgpu_falcon_bl_info *bl_info) | ||
79 | { | ||
80 | u32 data = 0; | ||
81 | int err = 0; | ||
82 | |||
83 | err = nvgpu_flcn_reset(&g->gsp_flcn); | ||
84 | if (err != 0) { | ||
85 | goto exit; | ||
86 | } | ||
87 | |||
88 | data = gk20a_readl(g, pgsp_fbif_ctl_r()); | ||
89 | data |= pgsp_fbif_ctl_allow_phys_no_ctx_allow_f(); | ||
90 | gk20a_writel(g, pgsp_fbif_ctl_r(), data); | ||
91 | |||
92 | /* setup apertures - virtual */ | ||
93 | gk20a_writel(g, pgsp_fbif_transcfg_r(GK20A_PMU_DMAIDX_UCODE), | ||
94 | pgsp_fbif_transcfg_mem_type_physical_f() | | ||
95 | pgsp_fbif_transcfg_target_local_fb_f()); | ||
96 | gk20a_writel(g, pgsp_fbif_transcfg_r(GK20A_PMU_DMAIDX_VIRT), | ||
97 | pgsp_fbif_transcfg_mem_type_virtual_f()); | ||
98 | /* setup apertures - physical */ | ||
99 | gk20a_writel(g, pgsp_fbif_transcfg_r(GK20A_PMU_DMAIDX_PHYS_VID), | ||
100 | pgsp_fbif_transcfg_mem_type_physical_f() | | ||
101 | pgsp_fbif_transcfg_target_local_fb_f()); | ||
102 | gk20a_writel(g, pgsp_fbif_transcfg_r(GK20A_PMU_DMAIDX_PHYS_SYS_COH), | ||
103 | pgsp_fbif_transcfg_mem_type_physical_f() | | ||
104 | pgsp_fbif_transcfg_target_coherent_sysmem_f()); | ||
105 | gk20a_writel(g, pgsp_fbif_transcfg_r(GK20A_PMU_DMAIDX_PHYS_SYS_NCOH), | ||
106 | pgsp_fbif_transcfg_mem_type_physical_f() | | ||
107 | pgsp_fbif_transcfg_target_noncoherent_sysmem_f()); | ||
108 | |||
109 | err = gsp_flcn_bl_bootstrap(g, bl_info); | ||
110 | |||
111 | exit: | ||
112 | return err; | ||
113 | } | ||
diff --git a/drivers/gpu/nvgpu/gv100/gsp_gv100.h b/drivers/gpu/nvgpu/gv100/gsp_gv100.h index a4363d73..71d4564e 100644 --- a/drivers/gpu/nvgpu/gv100/gsp_gv100.h +++ b/drivers/gpu/nvgpu/gv100/gsp_gv100.h | |||
@@ -24,5 +24,8 @@ | |||
24 | #define GSP_GV100_H | 24 | #define GSP_GV100_H |
25 | 25 | ||
26 | int gv100_gsp_reset(struct gk20a *g); | 26 | int gv100_gsp_reset(struct gk20a *g); |
27 | int gv100_gsp_setup_hw_and_bl_bootstrap(struct gk20a *g, | ||
28 | struct hs_acr *acr_desc, | ||
29 | struct nvgpu_falcon_bl_info *bl_info); | ||
27 | 30 | ||
28 | #endif /*GSP_GV100_H */ | 31 | #endif /*GSP_GV100_H */ |