Messages in this thread | | | Date | Fri, 7 Jan 2005 12:17:30 -0800 (PST) | From | Shakthi Kannan <> | Subject | Re: mount PCI-express RAM memory as block device |
| |
Hi,
Thanks for your replies Dick Johnson and Arnd Bergmann.
--- linux-os <linux-os@chaos.analogic.com> wrote: > From your explanation, it looks like the > BASE_ADDRESS is not > the device's on-board memory, but instead, its > control > registers, i.e., a simple implementation bug.
The BASE_ADDRESS is a physical address (0xfe8f0000) that points to the RAM memory on the PCI card, which I tried to remap so that the kernel can address it using memcpy.
Initially, I wrote a pci driver (character driver interface) to test memory read/write operations to this physical address (after ioremap) using readl/writel. This worked fine.
--- linux-os <linux-os@chaos.analogic.com> wrote: > When you ioremap() in the kernel, you get a cookie > that you can use (in the kernel) to copy data to and > from the device. > This doesn't allow a user to copy data directly. > Instead, in your read() and write() routines, you use > the appropriate copy_to/from_user() routines.
This being a block driver I only define block_device_operations. How would I declare and use the file_operations read(), write() routines?
> If the device is not a block device, then you will > have to mount it through the loop device. If it is a > block device, you can mount it directly after > initialization.
Which is where it fails.
--- Arnd Bergmann <arnd@arndb.de> wrote: > If you are completely stuck on 2.4.22, it might be > easier to > use the old slram driver instead of phram, but > generally you > should try to hack on a modern kernel level like > 2.6.10 anyway.
I shall test it with the 2.6.10 kernel.
Thanks again,
K Shakthi
__________________________________ Do you Yahoo!? The all-new My Yahoo! - What will yours do? http://my.yahoo.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |