Enable CPU access to VRAM (NV40 family) through PCIe BAR1

Hi,

I have a side project that requires me to try to enable CPU (ARM64 based) access into VRAM of some of the older models of Nvidia graphic cards (e.g., GeFroce 7600, one of the NV40 family) through PCIe BAR1 (256 MB size) with some bare metal code.

Note I’m doing this on an ARM64 platform with some custom bootloader and therefore I have no x86 BIOs or UEFI. Initially I thought with these older models of PCIe based Nvidia graphic card would power up with VRAM exposed by BAR1 by default, but it does not seem to be the case. For example, I have the bare metal code successfully done the PCIe enumeration and can access all the MMIO registers through BAR0. But when I access BAR1, I always read back zeros. It looks like I need to use some of the MMIO registers to configure something to enable the access to VRAM through BAR1?

Any advice will be highly appreciated!