mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel mailz <kernelmailz@googlemail.com>
To: linux-kernel@vger.kernel.org
Subject: linux PowerPC 85xx Address space query
Date: Wed, 24 Jun 2009 16:15:41 +0530	[thread overview]
Message-ID: <abe8a1fd0906240345y3e50e8bck59e7c8682c81713e@mail.gmail.com> (raw)
In-Reply-To: <abe8a1fd0906240341h2ed015a2pf83785efed8de1b5@mail.gmail.com>

Hi,

I am a newbie, trying to learn but have a few queries, nice if you could respond
For linux on 85xx systems...

(a) Kernel code runs in PR=0 AS=0 and PID=0, which user space
application run in PR=1 AS=0 and PID 1-255.
Is this correct.

(b) I am writing a small program where the application code opens
invokes a ioctl call and passes a buffer pointer ( say 0x10000 in user
space)
Now the driver code is using copy_from_user.
How this works internally ?

1. User code executes ioctl
2. interrupt goes to the kernel
3. ioctl handler in driver gets invoked
The buffer pointer still contains 0x10000.

How kernel code running in PR=0 accesses it and does the copy. I am
not able to see a address space switch in the asm code of
copy_tofrom_user.

Please respond

-TRX

           reply	other threads:[~2009-06-24 10:45 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <abe8a1fd0906240341h2ed015a2pf83785efed8de1b5@mail.gmail.com>]

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=abe8a1fd0906240345y3e50e8bck59e7c8682c81713e@mail.gmail.com \
    --to=kernelmailz@googlemail.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

all inboxes | Powered by JetHome®