All of lore.kernel.org
 help / color / mirror / Atom feed
From: "jerry" <jerry.nguyen@serialsystem.com.sg>
To: "Dan Malek" <dan@mvista.com>
Cc: <linuxppc-embedded@lists.linuxppc.org>
Subject: Re: how to get the physival address
Date: Thu, 5 Apr 2001 14:28:11 +0800	[thread overview]
Message-ID: <002001c0bd99$96c03a00$de0fa8c0@mystore> (raw)
In-Reply-To: 3ACC0989.4BAA6CB9@mvista.com


Yes, if I use kmalloc is OK, either __pa or virt_to_phys will return the
physical address.

But it does not work  for  defined variable (it was defined in driver so it
should be in kernel space, isn't it?). I  wonder  which memory space, this
variable belong to?

Thank in advances
Jerry

- Original Message -----
From: "Dan Malek" <dan@mvista.com>
To: "jerry" <jerry.nguyen@serialsystem.com.sg>
Cc: <linuxppc-embedded@lists.linuxppc.org>
Sent: Thursday, April 05, 2001 1:58 PM
Subject: Re: how to get the physival address


> jerry wrote:
>
>
> > I try to print out:  buffer_array = 0xC4056220
>
> To get an address like this, you must be loading the
> driver as a module.  There are a variety of opinions about
> how to do this, like using kmalloc() to dynamically allocate
> the space after the module is loaded.  In the linuxppc_2_5
> kernel from FSM Labs are some VM modifications I have started.
> The virt_to_phys() is appropriate to use on the MPC8xx for this
> sort of thing, and you can even do consistent_alloc() if you want
> cache inhibited pages.  In older kernels, there are no functions
> that will provide this for you (well, you can trudge through the
> page tables, get the PTE and convert it yourself, but that sucks :-).
>
>
> -- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2001-04-05  6:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-04  0:57 gdb load address and KERNELLOAD Wang Yong
2001-04-04  2:05 ` Dan Malek
2001-04-04  6:42   ` Wolfgang Denk
2001-04-04 15:30     ` Dan Malek
2001-04-04 15:54       ` Wolfgang Denk
2001-04-05  4:13         ` how to get the physival address jerry
2001-04-05  5:58           ` Dan Malek
2001-04-05  6:28             ` jerry [this message]
2001-04-05  6:30               ` Dan Malek
2001-04-05  9:16             ` Gabriel Paubert
  -- strict thread matches above, loose matches on Subject: below --
2001-04-05 16:58 Hua Ji

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='002001c0bd99$96c03a00$de0fa8c0@mystore' \
    --to=jerry.nguyen@serialsystem.com.sg \
    --cc=dan@mvista.com \
    --cc=linuxppc-embedded@lists.linuxppc.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.