Userspace access to PCIe - SATA device memory BAR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a PCIe - SATA bridge device, and I would like to access the
I2C control registers in the PCI memory region (BAR5) - these use
just two addresses in the BAR. I have tried, in userspace, to mmap()
the /sys/bus/pci/devices/..../resource5 file and read from that, but
all I get is 0xFF in every byte.

I used pcimem (https://github.com/billfarrow/pcimem.git) to try to
read the BAR.

The device is already matched by the 'ahci' driver, and the attached
disks are visible and mountable. If I unbind the ahci driver to use
uio, I can of course no longer use the device as a SATA bridge.

In other PCI devices which are also matched by ahci, I can mmap and
read published BARs fine without unbinding the ahci driver.

What is the correct way to fiddle with the memory in the BARs of a
PCI device, while still letting the normal driver run the device?
I am not doing anything related to AHCI or SATA, just reading and
writing to the "side-channel" communication hardware.

Best regards,

John

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux