Sebastian Kuzminsky wrote: > On Wed June 25 2008 02:41:11 Martin Mares wrote: > > > Is there any interest in patches to libpci to provide read/write access > > > to the cards' BARs? > > > > Definitely yes. > > Cool! How about this for a plan: > > > I'll add a struct pci_bar with some fields to manage BAR access. > I'll add this to struct pci_dev, down in the section marked "Fields > used internally". struct pci_bar will have a type (mem or io), address, > and a void* to hold mmapped memory regions, plus whatever else turns out > to be relevant. I could leave type and address in pci_dev->base_addr > and mask them out of there as needed, if you prefer. Length of bar. Also it might be useful to specify offset and length of the access if you don't want to map the whole bar at once (e.g. because it's too big). Eike
Attachment:
signature.asc
Description: This is a digitally signed message part.