How to access PCI memory mapped location from user space?

From: Mark Linn (mark.linn_at_gmail.com)
Date: 09/24/05


Date: 24 Sep 2005 14:52:41 -0700

Hi,

I am relatively new to linux user space programming. I have a PCI
device which has memory mapped register sets. The driver works fine on
an intel Pentium M. I can access the registers in the driver through
PCI BAR0. Now I am writing a user space diagnostic program for the PCI
device, I can access the PCI BAR0 value, how can I convert it into user
space virtual address so that I can read the registers from the user
space?

Your advice and help is greatly appreciated !!

thanks

Mark



Relevant Pages

  • 2.6.15-rc5-mm2 does not boot on AMD64 with sata_sil
    ... Using ACPI for IRQ routing ... Uniform CD-ROM driver Revision: 3.20 ... Using ACPI for SMP configuration information Allocating PCI resources starting at e2000000 Checking aperture... ... Real Time Clock Driver v1.12 hw_random: AMD768 system management I/O registers at 0x8000. ...
    (Linux-Kernel)
  • kernel problem
    ... Scanning 0 areas for low memory corruption ... Allocating PCI resources starting at bff00000 ... Performance Events: AMD PMU driver. ... generic registers: 4 ...
    (Linux-Kernel)
  • kernel problem
    ... Allocating PCI resources starting at bff00000 ... Performance Events: AMD PMU driver. ... generic registers: 4 ... USB 2.0 'Enhanced' Host Controller Driver ...
    (Linux-Kernel)
  • kernel problem
    ... Allocating PCI resources starting at bff00000 ... Performance Events: AMD PMU driver. ... generic registers: 4 ... USB 2.0 'Enhanced' Host Controller Driver ...
    (Linux-Kernel)
  • libata - wrong IDE cable detection with dvd burner
    ... ACPI: ... Allocating PCI resources starting at 88000000 ... Generic PHY: Registered new driver ... Internal registers self-test: passed. ...
    (Linux-Kernel)