You can solve this specific problem by using mmap() on file /dev/mem to map the desired portion of PCI memory space into your process's address space at the hard-coded address. To discovery the true addresses, read the BAR registers from the device's config space by using the lspci command or by looking at the config file in the device's directory under /sys/bus/pci/devices.
One solution
You can solve this specific problem by using mmap() on file /dev/mem to map the desired portion of PCI memory space into your process's address space at the hard-coded address. To discovery the true addresses, read the BAR registers from the device's config space by using the lspci command or by looking at the config file in the device's directory under /sys/bus/pci/devices.