diff options
Diffstat (limited to 'kernel/bar_emulation.c')
| -rw-r--r-- | kernel/bar_emulation.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/bar_emulation.c b/kernel/bar_emulation.c index 3448b8c..1229a77 100644 --- a/kernel/bar_emulation.c +++ b/kernel/bar_emulation.c @@ -309,6 +309,22 @@ int nv_vgpu_bar_emul_init(struct nv_vgpu_device *vgpu) *(u32 *)((u8 *)ctx->bar0_shadow + 0xC08084) = 0x00000103; *(u32 *)((u8 *)ctx->bar0_shadow + 0xC08088) = 0x01030000; + /* TEMP EXPERIMENT: poison the candidate mirror windows with the + * Gen3 x16 link-caps value in every dword, to locate where the + * driver's gpuReadBusConfigReg(0x84) actually lands. Ranges are + * chosen to avoid real emulated registers (the CPU intr tree starts + * at 0xB81000). */ + { + u32 off; + + for (off = 0x88000; off < 0x89000; off += 4) + *(u32 *)((u8 *)ctx->bar0_shadow + off) = 0x00000103; + for (off = 0xB80000; off < 0xB80F00; off += 4) + *(u32 *)((u8 *)ctx->bar0_shadow + off) = 0x00000103; + for (off = 0xC08000; off < 0xC08F00; off += 4) + *(u32 *)((u8 *)ctx->bar0_shadow + off) = 0x00000103; + } + /* * Serve a valid VBIOS at the PROM window (BAR0+0x300000). * |
