Re: mount PCI-express RAM memory as block device

From: Shakthi Kannan
Date: Tue Jan 11 2005 - 12:10:09 EST


Hi,

--- "Arnd Bergmann" <arnd@xxxxxxxx> wrote:
> You could use the MTD block driver with on the phram

> device by simply specifying the address/size of the
> memory as a module parameter. If you need
> autodetection, the easiest way to do that would be
> including the phram MTD driver in your pci device
> driver.

I studied the slram.c and rd.c device drivers. The
ramdisk driver that I had written earlier, similar to
the above, had worked fine. With respect to PCI
express, I had to modify just the memory tranfer
function. The memcpy functions translate to byte
access. But, PCI express is dword access. So, I wrote
my own memory copy to do long read/write using
readl(), writel(). The block device driver works fine.

Thanks,

K Shakthi

=====
-----------------------------------------------------
K Shakthi
Specsoft (Hexaware Technologies), ASIC Design Center
http://www.geocities.com/shakthimaan
-----------------------------------------------------



__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/