linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shakthi Kannan <shakstux@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: Re: mount PCI-express RAM memory as block device
Date: Fri, 7 Jan 2005 12:17:30 -0800 (PST)	[thread overview]
Message-ID: <20050107201730.40634.qmail@web54502.mail.yahoo.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0501071342290.21110@chaos.analogic.com>

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 

  reply	other threads:[~2005-01-07 20:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-07 18:36 mount PCI-express RAM memory as block device Shakthi Kannan
2005-01-07 18:53 ` linux-os
2005-01-07 20:17   ` Shakthi Kannan [this message]
2005-01-11 16:45     ` Shakthi Kannan
2005-01-07 19:00 ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050107201730.40634.qmail@web54502.mail.yahoo.com \
    --to=shakstux@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).