9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Shane Morris <edgecomberts@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Raspberry Pi image
Date: Wed, 19 Feb 2014 21:14:42 +1100	[thread overview]
Message-ID: <CANZw+5f4HiLZxjNC3o=E46JmShj+SyqKk8pV4HAb8AJkJO4n3g@mail.gmail.com> (raw)
In-Reply-To: <b9fac8b65035ff2db2291ac08d30b0fc@hamnavoe.com>

[-- Attachment #1: Type: text/plain, Size: 3649 bytes --]

So the "trade secret" thing explains why you don't see a port of Plan 9 for
every new and exciting device and board that comes out. It is a shame, but
these companies producing things like the GPUs in ARM devices insist on
proprietary licences.

As far as I can tell, the i.MX6 chip from Freescale is about as open as you
can get, I'm just trying to remember where someone said it had an over
1,000 page manual for the chip, and I'm hoping its not this very list,
otherwise I will look like a fool! The i.MX6, for that "openness" reason
has been a chip I've been meaning to get, and never gotten around to. The
UDOO board has the chip, and integrates an Arduino Due along for the ride.
Its reasonably cheap too, although availability is not something I've
looked at in a little while, and being one of those Kickstarter things, I
don't think availability is a priority past shipping them to backers.

I found the blog I was referring to:

http://lynxline.com/projects/labs-portintg-inferno-os-to-raspberry-pi/

And it is a detailed read, I've skimmed over his Season 2 with interest. He
cites your work regularly.

I think you can tell what I'm thinking by mentioning the i.MX6, but I'm not
pressuring you to make a port, or even get a board with the chip on it. I
just think it would be interesting having Plan 9 on a multicore ARM chip,
but as I said, I'm pretty certain its open enough, but please do not quote
me - I'd hate to be horribly wrong!

Many thanks for your description!


On Wed, Feb 19, 2014 at 9:00 PM, Richard Miller <9fans@hamnavoe.com> wrote:

> > I'd be curious to know the methodology for producing this port as well.
>
> OS porting is something of a black art.  I've been doing it for a while
> (
> http://www.usenix.org/legacy/publications/library/proceedings/usenix98/invited_talks/miller.ps
> )
> and it's not getting any easier.  Hardware vendors used to provide
> meticulously accurate reference manuals describing device behaviour at a
> register level, along with a programming manual explaining the sequence of
> operations required for standard procedures like device initialisation and
> error recovery.  Too often nowadays the best you'll get is a sketchy and
> inaccurate datasheet, and at worst the datasheet will be a "trade secret"
> and the only option is to reverse engineer many thousand lines of badly
> written linux driver.
>
> For the Raspberry Pi port, excellent documentation was available at least
> for the arm cpu.  Plan 9 kernels already existed for armv5 and armv7
> architectures, so I was mostly able to interpolate between the two to
> produce the low-level assembly parts of the kernel for the Pi's armv6.
> Hardware floating support for the kernel had already been done at the Labs
> for the teg2, and vfp code generation for the 5l linker was straightforward
> to add, using arm manuals.
>
> The rest of the work was creating device drivers, some easily adapted from
> other Plan 9 instances (eg uart and lcd display), some written from scratch
> using Broadcom's BCM2835 datasheet (eg sd/mmc).  By far the hardest driver
> was for the usb host adapter, which on the Pi is very non-standard and has
> no officially available documentation.  I couldn't face the prospect of
> digesting the linux driver (which is huge, unreadable, and at the time was
> known not to work reliably).  Luckily a web search turned up datasheets
> for some apparently very similar devices, which I was able to work from.
> Even so, writing and debugging the usb driver accounted for most of the
> time
> and effort of the whole project.
>
>
>

[-- Attachment #2: Type: text/html, Size: 4464 bytes --]

  reply	other threads:[~2014-02-19 10:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 10:23 Ramakrishnan Muthukrishnan
2014-02-18 10:29 ` Richard Miller
2014-02-18 11:56   ` Ramakrishnan Muthukrishnan
2014-02-18 20:18   ` Grant R. Mather
2014-02-18 21:05     ` Richard Miller
2014-02-18 22:25       ` Yoann Padioleau
2014-02-19  0:13         ` Shane Morris
2014-02-19  0:19           ` Jacob Todd
2014-02-19 10:00           ` Richard Miller
2014-02-19 10:14             ` Shane Morris [this message]
2014-02-20  1:24               ` erik quanstrom
2014-02-20 15:47               ` Steven Stallion
2014-02-20 15:55                 ` erik quanstrom
2014-02-20 15:57                 ` David du Colombier
2014-02-20 15:57                 ` Charles Forsyth
2014-02-19 10:55             ` Ramakrishnan Muthukrishnan
2014-02-19  9:05         ` Richard Miller

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='CANZw+5f4HiLZxjNC3o=E46JmShj+SyqKk8pV4HAb8AJkJO4n3g@mail.gmail.com' \
    --to=edgecomberts@gmail.com \
    --cc=9fans@9fans.net \
    /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).