howto provide io memory to PCI card

Charles Brown charles.brown at
Tue Apr 27 18:07:36 UTC 2010


    Apologies for bothering you with this question.  If you know of a 
better place for me to ask such a question, please let me know.

    I'm trying to write a device driver under ubuntu for a PCI card, and 
exchange information with the card.

    The hardware engineer has configured the card to support BAR0 for 
data to the card, and linux allocates memory at kernel boot and I am 
able to write data from the driver to the card.

    For data coming from the card to the driver, the hardware engineer 
expects the driver to allocate IO memory when the driver loads, and to 
provide the physical address of that memory to the card - which the card 
will use with its address translation register to write data directly 
into the provided I/O memory.

   Using information from LDD3 I've been able to allocate IO memory, but 
I can't find any PCI/kernel functions that allow me to tell the kernel 
about this memory for the PCI card, and there's no way to tell the card 
about this memory, except through writing the physical address back into 
the IO memory associated to BAR0.

   Any insights would be very helpful.


This message is intended only for the addressee and may contain information that is company confidential or privileged.  Any technical data in this message may be exported only in accordance with the U.S. International Traffic in Arms Regulations (22 CFR Parts 120-130) or the Export Administration Regulations (15 CFR Parts 730-774). Unauthorized use is strictly prohibited and may be unlawful. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, you should not read, copy, disclose or otherwise use this message. If you have received this email in error, please delete it, and advise the sender immediately. 

More information about the kernel-team mailing list