Hi to all,
I’m trying to write on a PCI DAQ card.
Using pci -v utility I’ve found that the base address is
0xe8102000 (higher than 1MB). I’ve made mmap_device_io()
that returns the same number (0xe8102000).
When I write (in8) and after read (out8) for testing I find
that the read value is always an all-ones configuration.
Using a lower address corresponding to another PCI device such as 0xE400, it works fine.
You prolly can choose from these two access methods:
Use the “PCI Mem Address”, map it with mmap_device_memory() and read/write with the memory pointer (use it like normal memory allocated by the process)
Or use the “PCI IO Address”, map it with mmap_device_io() and read/write with the in*()/out*() functions
I/O space is legacy or atleast legacy thinking. The MMU made the idea of hard partitioning obsolete decades ago. And even then the idea was questionable.