Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on designing a custom PCI-Express card.

I am trying to write a kernel module that will DMA my custom card.

Right now when I plug the card into Linux no valid PCI device shows up (meaning I probably have a error on my end, I know) however, If I halt the system at startup in the bootloader (uboot) I am able to directly access the card as I know in uboot the physical memory address that is mapped to my device.

Is there a way I can access the card in a simliar fashion on Linux?

share|improve this question

Is your card returning FFFFFFFF for device or vendor ID? You might still be able to access in U-Boot via the pci command but since that means no device present on a device scan, Linux would not pick it up. I could be very wrong about that (I presume this is an ARM platform since you mention U-Boot - maybe it works differently on different CPU architectures ...)

It's possible that Linux is reading the PCI bus incorrectly. Do other PCI devices than your custom one work? If not, check to make sure you are using the right kernel for your board or maybe need to look into your make menuconfig options more closely when building your kernel.

/dev/mem lets you directly access unmapped memory addresses. You can use tools like dd and such, though doing specific reads and writes to single addresses through bash is not going to be pleasant or easy. I'm unaware of a Linux tool that acts like a "monitor", directly reading and writing memory or a device (maybe gdb but it operates in userspace ...)

share|improve this answer
You also might be able to finagle something with the mtd driver. It would basically turn a block of memory into a device. – LawrenceC Jan 3 '14 at 21:40

Basic diagnostic information about PCI cards can be gleaned with lspci -vvv.

share|improve this answer
nothing shows up when i do lspci ... I think what confuses me the most is that I can talk to it in Uboot but not in linux... – Without me Its just Aweso Sep 1 '10 at 19:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .