public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Deepak Saxena <dsaxena@plexity.net>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: jgarzik@pobox.net, linux-kernel@vger.kernel.org
Subject: Re: [RFC] RNG rewrite...
Date: Sat, 15 Oct 2005 17:53:41 -0700	[thread overview]
Message-ID: <20051016005341.GB5946@plexity.net> (raw)
In-Reply-To: <4350DCB1.7010201@pobox.com>

On Oct 15 2005, at 06:40, Jeff Garzik was caught saying:
> Deepak Saxena wrote:
> >rewrite the damn thing to use the device model and have a rng
> >device class with individual drivers for each RNG model, including
> >IXP4xx. I'll keep the miscdev interface around but will add a
> >new interface under /sys/class/rng that the userspace tools 
> >can transition to. Is this OK with folks?
> 
> How does the hardware export RNG functionality?  CPU insn?  Magic memory 
> address?  Can it be done 100% in userspace?

It's a magic regsiter we just read/write and could be done in userspace.
I also took a look at MPC85xx and it has the same sort of interface but
also has an error interrupt capability. On second thought a class
interface is overkill b/c there will only be one RNG per system, so
I can just do something like watchdogs where we have a bunch of simple
drivers exposing the same interface. We could do it in user space but
then we have separate RNG implementations for  x86 and !x86 and I'd
rather not see that. Can we move the x86 code out to userspace and
just let the daemon eat the numbers directly from HW? We can mmap() 
PCI devices, but I don't know enough about x86 to say whether msr 
instructions can execute out of userspace (or if we want them to...).

~Deepak

-- 
Deepak Saxena - dsaxena@plexity.net - http://www.plexity.net

When law and duty are one, united by religion, you never become fully
conscious, fully aware of yourself. You are always a little less than
an individual. - Frank Herbert

  reply	other threads:[~2005-10-16  0:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-15  4:31 [RFC] RNG rewrite Deepak Saxena
2005-10-15 10:40 ` Jeff Garzik
2005-10-16  0:53   ` Deepak Saxena [this message]
2005-10-17 23:15     ` H. Peter Anvin
2005-10-17 23:26       ` Jeff Garzik
2005-10-18  0:22         ` H. Peter Anvin
2005-10-17 23:31     ` Jeff Garzik
2005-10-18  1:00       ` Deepak Saxena
2005-10-18  1:05         ` Deepak Saxena
2005-10-18  1:09         ` Jeff Garzik

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=20051016005341.GB5946@plexity.net \
    --to=dsaxena@plexity.net \
    --cc=jgarzik@pobox.com \
    --cc=jgarzik@pobox.net \
    --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