gpu: nvgpu: move mailbox0 write to engine bl_bootstrap

Semantics of the engine bootloader bootstrap are to set falcon mailbox0
register to non-zero value and verify that it is cleared to ascertain
successful completion of bootstrap.
Read was done in the engine bl_bootstrap related functions. Hence move
the write as well to those functions.

JIRA NVGPU-1993

Change-Id: I6d04148fbf1d517f0af8b4cfc2ee144d38704647
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2034511
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sagar Kamble
2019-03-06 23:10:14 +05:30
committed by mobile promotions
parent 9f68fecb64
commit 45ee7baab1
5 changed files with 8 additions and 2 deletions

View File

@@ -656,8 +656,6 @@ int nvgpu_falcon_bl_bootstrap(struct nvgpu_falcon *flcn,
goto exit;
}
nvgpu_falcon_mailbox_write(flcn, FALCON_MAILBOX_0, 0xDEADA5A5U);
virt_addr = bl_info->bl_start_tag << 8;
err = nvgpu_falcon_bootstrap(flcn, virt_addr);

View File

@@ -374,6 +374,8 @@ static int gm20b_bl_bootstrap(struct gk20a *g,
pwr_pmu_new_instblk_target_sys_coh_f() :
pwr_pmu_new_instblk_target_sys_ncoh_f())) ;
nvgpu_falcon_mailbox_write(g->pmu.flcn, FALCON_MAILBOX_0, 0xDEADA5A5U);
return nvgpu_falcon_bl_bootstrap(g->pmu.flcn, bl_info);
}

View File

@@ -77,6 +77,8 @@ static int sec2_flcn_bl_bootstrap(struct gk20a *g,
data |= BIT32(3);
gk20a_writel(g, psec_falcon_engctl_r(), data);
nvgpu_falcon_mailbox_write(g->sec2.flcn, FALCON_MAILBOX_0, 0xDEADA5A5U);
err = nvgpu_falcon_bl_bootstrap(g->sec2.flcn, bl_info);
return err;

View File

@@ -68,6 +68,8 @@ static int gsp_flcn_bl_bootstrap(struct gk20a *g,
data |= pgsp_falcon_engctl_switch_context_true_f();
gk20a_writel(g, pgsp_falcon_engctl_r(), data);
nvgpu_falcon_mailbox_write(g->gsp_flcn, FALCON_MAILBOX_0, 0xDEADA5A5U);
status = nvgpu_falcon_bl_bootstrap(g->gsp_flcn, bl_info);
return status;

View File

@@ -202,6 +202,8 @@ static int tu104_sec2_flcn_bl_bootstrap(struct gk20a *g,
data |= (1U << 3U);
gk20a_writel(g, psec_falcon_engctl_r(), data);
nvgpu_falcon_mailbox_write(g->sec2.flcn, FALCON_MAILBOX_0, 0xDEADA5A5U);
return nvgpu_falcon_bl_bootstrap(g->sec2.flcn, bl_info);
}