PCI bus operations and driver design

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Dwight Holman (dwight.holman.SPAM_at_xtra.co.nz)
Date: 10/04/04


Date: Tue, 05 Oct 2004 10:07:43 +1300

Yes, this is another question from a newbie :-)

I have been investigating an issue relating to our 'working' PCI
device driver (part of the product developed by my company). This NT
device driver uses memory mapped IO to read/write to DPRAM on a PCI card.

The existing code assumes that such writes to this memory (over the
PCI bus) will always succeed.

Coming from a background including lots of things *other* than writing
device drivers, I am suspicious that this assumption may not be the
case... and that writes may sometimes fail.

So, is it possible for a write to memory mapped DPRAM to occasionally
fail?

Can anybody out there share their experience of the possible failure
scenarios when performing such operations over a PCI bus?

What strategies are required to ensure that writes to such memory
(over a PCI bus) occur reliably?

I guess the answer is 'it depends', so ok... Lets assume that we must
either succeed in writing the memory, or know clearly that the
operation failed.

To me the simple (intuitive) answer is that after writing the memory,
the driver should read it back to verify the operation worked.

Thanks,

-- 
Dwight
Analyst/Developer
Take out the .SPAM to find the truth


Relevant Pages

  • Re: Writing Video Memories
    ... > I was told that when writing data into video memories, for instance, ... If you want to utilize the whole bandwidth of AGP or PCI you can only do ... memory (of course it would when the memory area is covered by write-back ...
    (comp.lang.asm.x86)
  • Re: PCI bus operations and driver design
    ... > device driver uses memory mapped IO to read/write to DPRAM on a PCI card. ... but on most platforms these failures are catastrophic and global and not ...
    (microsoft.public.development.device.drivers)
  • Re: PCI Driver - Read/Write to Base Address
    ... I get this message in the kernel log: ... register, reading PCI memory, and writing PCI memory code out of the ... After the device driver ...
    (comp.os.linux.development.system)
  • Re: Persuading PCI memory writes to write as a burst
    ... then writing a few resulting chunks of memory (each ... encourage PCI bridgeto do write combining. ... The PCI card has BAR0 declaring memory with prefetch (but, sadly, not fast ... posted writes in the same application + device driver setup. ...
    (microsoft.public.development.device.drivers)
  • mmap
    ... I'm developing a PCI card, which supports the memory read and write PCI ... In my application, which communicates with the device driver, I think I ... how does the bar1 value from the mmap function get ...
    (comp.os.linux.development.system)