gpu: nvgpu: Use sw ops for BIOS

Some functions are not accessing hardware directly
but are being called using HAL ops: For example

.init = gv100_bios_init,
.preos_wait_for_halt = gv100_bios_preos_wait_for_halt,
.preos_reload_check = gv100_bios_preos_reload_check,
.devinit = gp106_bios_devinit,
.preos = gp106_bios_preos,
.verify_devinit = NULL,

This was being called as:
g->ops.bios.init(g)
g->ops.bios.preos_wait_for_halt(g)
g->ops.bios.preos_reload_check(g)
g->ops.bios.preos(g)
g->ops.bios.devinit(g)
g->ops.bios.verify_devinit(g)

Change the function access by using sw ops, like:
Create new function: nvgpu_bios_sw_init()
and based on hardware chip call the chip specific
bios sw init function: nvgpu_gv100_bios_sw_init()
and nvgpu_tu104_bios_sw_init()to assign the sw
ops

JIRA NVGPU-2071

Change-Id: Ibfcd9b225a7bc184737abdd94c2e54190fcd90a0
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2108526
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Divya Singhatwaria
2019-04-26 11:35:37 +05:30
committed by mobile promotions
parent cf2d37640d
commit 20fcf813dd
38 changed files with 669 additions and 521 deletions

View File

@@ -227,7 +227,8 @@ int nvgpu_pmu_perf_pstate_sw_setup(struct gk20a *g)
hdr = (struct vbios_pstate_header_6x *)
nvgpu_bios_get_perf_table_ptrs(g,
g->bios.perf_token, PERFORMANCE_TABLE);
nvgpu_bios_get_bit_token(g, NVGPU_BIOS_PERF_TOKEN),
PERFORMANCE_TABLE);
if (hdr == NULL) {
nvgpu_err(g, "performance table not found");