Accessing Ram on PCI card
Hi,
I have a pci card that has some amount of ram and flash memory on it. I have found the bar address range for the memory.
I want to transfer a file to that memory and read from that memory.
Any pointers(in terms of sample code) how can i do that?
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150601/b1ec934f/attachment.html
Quoted 3 lines · Robert Clove
Hi,
I have a pci card that has some amount of ram and flash memory on it.
What kind of card?
Quoted 2 lines
I have found the bar address range for the memory.
I want to transfer a file to that memory and read from that memory.
PCI card memory are not usually set up as a filesystem, how can you copy a file to it?
Quoted 1 line
Any pointers(in terms of sample code) how can i do that?
Why do you want to do this? What exactly are you trying to solve here?
greg k-h
Hi I have a PCI based card which have few RAM on it. I have to copy the text file to RAM and read it too.
Actually i want my pci device to be exposed as block device and then mount file system on it.
Quoted 10 lines · Greg KH
Quoted 3 lines · Robert Clove
Hi,
I have a pci card that has some amount of ram and flash memory on it.
What kind of card?
Quoted 2 lines
I have found the bar address range for the memory.
I want to transfer a file to that memory and read from that memory.
Quoted 9 lines
PCI card memory are not usually set up as a filesystem, how can you copy a file to it?
Quoted 1 line
Any pointers(in terms of sample code) how can i do that?
Why do you want to do this? What exactly are you trying to solve here?
greg k-h
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150603/7edec0fb/attachment.html
Quoted 1 line · Robert Clove
Hi I have a PCI based card which have few RAM on it.
You said that before :)
You didn't answer the question of "what kind of PCI card is this?"
Quoted 1 line
I have to copy the text file to RAM and read it too.
Who is telling you you "have to"?
Quoted 2 lines
Actually i want my pci device to be exposed as block device and then mount file system on it.
Then use it as a block device. Note, you need a special type of PCI card to be able to do this, as well as a special kernel driver for that PCI card to make it work properly.
But without any knowledge of what type of PCI card you have, it's a bit hard to give you anymore help, sorry.
greg k-h
Actually it is a PCI based NIC card having a NIC port and some RAM on it.
Quoted 15 lines · Greg KH
Quoted 1 line · Robert Clove
Hi I have a PCI based card which have few RAM on it.
You said that before :)
You didn't answer the question of "what kind of PCI card is this?"
Quoted 1 line
I have to copy the text file to RAM and read it too.
Who is telling you you "have to"?
Quoted 1 line
Actually i want my pci device to be exposed as block device and then
mount file
Quoted 1 line
system on it.
Quoted 9 lines
Then use it as a block device. Note, you need a special type of PCI card to be able to do this, as well as a special kernel driver for that PCI card to make it work properly.
But without any knowledge of what type of PCI card you have, it's a bit hard to give you anymore help, sorry.
greg k-h
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150604/d888cf1c/attachment.html
Quoted 1 line · Robert Clove
Actually it is a PCI based NIC card having a NIC port and some RAM on it.
A NIC card is not designed to hold a filesystem. If you wish to change this, you are going to have to write a kernel driver that talks to that card and exposes a block interface to userspace.
Best of luck!
greg k-h
That is what i have to do.
Quoted 11 lines · Greg KH
Quoted 1 line · Robert Clove
Actually it is a PCI based NIC card having a NIC port and some RAM on it.
A NIC card is not designed to hold a filesystem. If you wish to change this, you are going to have to write a kernel driver that talks to that card and exposes a block interface to userspace.
Best of luck!
greg k-h
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150604/56796019/attachment.html