diff options
Diffstat (limited to 'kernel/bar_emulation.c')
| -rw-r--r-- | kernel/bar_emulation.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/kernel/bar_emulation.c b/kernel/bar_emulation.c index 685831a..e095d8b 100644 --- a/kernel/bar_emulation.c +++ b/kernel/bar_emulation.c @@ -269,15 +269,17 @@ int nv_vgpu_bar_emul_init(struct nv_vgpu_device *vgpu) /* * 0x100ce0 NV_PFB_PRI_MMU_LOCAL_MEMORY_RANGE - usable FB size. - * Encoded as fbSize = LOWER_MAG << (LOWER_SCALE + 20). Set to - * 256MB (matches our BAR1): mag=1, scale=8 -> 1 << 28. On real - * hardware VBIOS devinit programs this after GFW boot; the guest - * driver's kgspPopulateWprMeta reads it via kmemsysGetUsableFbSize - * and uses it to compute the FRTS offset (fbSize - reservedFromEnd). - * With it 0, the FRTS offset underflows and FWSEC verification - * fails with "WPR2 initialized at an unexpected location". + * Encoded as fbSize = LOWER_MAG << (LOWER_SCALE + 20) (LOWER_SCALE + * bits 3:0, LOWER_MAG bits 9:4; kmemsysReadUsableFbSize_GP102). + * Set to 512MB (mag=1, scale=9 -> 1 << 29): on real hardware VBIOS + * devinit programs this after GFW boot; the guest driver's + * kgspPopulateWprMeta reads it via kmemsysGetUsableFbSize and uses + * it to compute the FRTS offset (fbSize - reservedFromEnd). With it + * 0, the FRTS offset underflows and FWSEC verification fails with + * "WPR2 initialized at an unexpected location". Must stay in + * lockstep with GSCI fb_length/frtsOffset and wpr2_addr_lo. */ - *(u32 *)((u8 *)ctx->bar0_shadow + 0x100ce0) = 0x00000018; + *(u32 *)((u8 *)ctx->bar0_shadow + 0x100ce0) = 0x00000019; /* * NV_PCFG (BAR0+0x88000) - PCI config space mirror the driver reads |
