rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Stappers <stappers@stappers.nl>
To: Sven Van Asbroeck <thesven73@gmail.com>, rust-for-linux@vger.kernel.org
Subject: Re: [RFC] Short Circuit simplest Rust driver that touches real hardware?
Date: Mon, 26 Apr 2021 22:58:10 +0200	[thread overview]
Message-ID: <20210426205810.sahdkjyeueg3miug@gpm.stappers.nl> (raw)
In-Reply-To: <CAGngYiUHmkGTP7encnQOHv9CU6H4+RTN96oJb9B7DY4cuGPwAQ@mail.gmail.com>

On Mon, Apr 26, 2021 at 03:47:59PM -0400, Sven Van Asbroeck wrote:
>         ...
> 2. implement the simplest `IoMemBlock` in Rust. Since we have a live
> `struct device *`, the `IoMemBlock` constructor can simply call
> `devm_platform_get_and_ioremap_resource(our struct device *)` in C,
> which will automatically use the right method to retrieve the `void
> __iomem *`: devicetree, platform data, etc, we don't have to care.
> 3. use the `IoMemBlock` above to implement a trivial iomem-only driver
> as a module. A few possible candidates:
> * h/w random number generator in Raspberry Pi Zero: `brcm,bcm2835-rng`
> * SoC thermal sensor in Raspberry Pi Zero: `brcm,bcm2835-thermal`
> 4. we don't have `hwrng` or `thermal_hwmon` devices in Rust yet, but
> we could perhaps expose this as a `misc_device`, which is something we
> already have. A single temp or randnum readout might do the trick.
> 
> The Raspberry Pi Zero can be purchased for $10. There is [QEMU
> support](https://qemu.readthedocs.io/en/latest/system/arm/raspi.html)
> for the peripherals above.
> 
> Feedback and ideas welcome !

Hope that hardware manufactures see this opportunity.  Because I fear that
this cool project might get botched due lack of knowledge on hardware.


Implementing kernel module for 8250 UART in Rust is something that
wouldn't get botched due lack of hardware knowledge.



Regarding
Geert Stappers
-- 
Silence is hard to parse

  parent reply	other threads:[~2021-04-26 20:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26 19:47 [RFC] Short Circuit simplest Rust driver that touches real hardware? Sven Van Asbroeck
2021-04-26 20:22 ` Miguel Ojeda
2021-04-26 20:58 ` Geert Stappers [this message]
2021-04-26 21:11   ` Sven Van Asbroeck
2021-04-27  8:17     ` Geert Stappers
2021-04-27  6:49   ` Greg KH

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=20210426205810.sahdkjyeueg3miug@gpm.stappers.nl \
    --to=stappers@stappers.nl \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=thesven73@gmail.com \
    /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).