[Nouveau] Understanding BAR1 Offset to imem/VRAM PA Mapping

2021-10-01 Thread Joshua Bakita
Hello, I'm trying to understand how VRAM PAs are mapped to BAR1 offsets on Fermi+, but I'm having difficulty digging through the abstractions in nouveau. I spent the better part of yesterday digging through the nv50_instobj_*() functions, but I lost track of which page tables are being modified an

Re: [Nouveau] Understanding BAR1 Offset to imem/VRAM PA Mapping

2021-09-30 Thread Ilia Mirkin
Hi Joshua, It looks like you got most of the way there. The BARs (BAR1 and BAR3) are initialized by the code in nvkm/subdev/bar/gf100.c. As you can see, this sets up a vmm per BAR, whose (physical address >> 12) is written to 0x1704 / 0x1714. A vmm is basically a list of PDE's (and the PTE lists t

[Nouveau] Understanding BAR1 Offset to imem/VRAM PA Mapping

2021-09-29 Thread Joshua Bakita
Hello, I'm trying to understand how VRAM PAs are mapped to BAR1 offsets on Fermi+, but I'm having difficulty digging through the abstractions in nouveau. I spent the better part of yesterday digging through the nv50_instobj_*() functions, but I lost track of which page tables are being modified an