gpu: nvgpu: add compatible VBIOS version for PG189

Compatible VBIOS version for PG189 is .5A, but it must still boot
with VBIOS .18 and higher.

Added a vbios_compatible_version field in platform descriptor.

Do not boot if VBIOS version is < vbios_min_version.
Otherwise, warn if VBIOS version is not vbios_compatible_version.

Bug 2500899

Change-Id: Ib6be2d1da96221def7784c28f362b904ce770231
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2079527
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Thomas Fleury
2019-03-22 14:39:49 -07:00
committed by mobile promotions
parent 434931799a
commit c5f8edd8bf
5 changed files with 19 additions and 1 deletions

View File

@@ -249,6 +249,14 @@ int gp106_bios_init(struct gk20a *g)
nvgpu_info(g, "VBIOS version %08x", g->bios.vbios_version);
}
if ((g->vbios_compatible_version != 0U) &&
(g->bios.vbios_version != g->vbios_compatible_version)) {
nvgpu_err(g, "VBIOS version %08x is not officially supported.",
g->bios.vbios_version);
nvgpu_err(g, "Update to VBIOS %08x, or use at your own risks.",
g->vbios_compatible_version);
}
nvgpu_log_fn(g, "done");
if (g->ops.bios.devinit != NULL) {

View File

@@ -2092,6 +2092,7 @@ struct gk20a {
/* The minimum VBIOS version supported */
u32 vbios_min_version;
u32 vbios_compatible_version;
/* memory training sequence and mclk switch scripts */
u32 mem_config_idx;

View File

@@ -212,6 +212,7 @@ static void nvgpu_init_vbios_vars(struct gk20a *g)
nvgpu_set_enabled(g, NVGPU_PMU_RUN_PREOS, platform->run_preos);
g->vbios_min_version = platform->vbios_min_version;
g->vbios_compatible_version = platform->vbios_compatible_version;
}
static void nvgpu_init_ltc_vars(struct gk20a *g)

View File

@@ -286,6 +286,7 @@ static struct gk20a_platform nvgpu_pci_device[] = {
.honors_aperture = true,
.dma_mask = DMA_BIT_MASK(40),
.vbios_min_version = 0x90041800,
.vbios_compatible_version = 0x90045A00,
.hardcode_sw_threshold = false,
.has_syncpoints = true,
},

View File

@@ -274,9 +274,16 @@ struct gk20a_platform {
*/
u64 dma_mask;
/* minimum supported VBIOS version */
/* minimum supported VBIOS version.
* nvgpu driver is not loaded if VBIOS < min VBIOS version
*/
u32 vbios_min_version;
/* blessed VBIOS version
* if defined, a warning is given if VBIOS differs.
*/
u32 vbios_compatible_version;
/* true if we run preos microcode on this board */
bool run_preos;