From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Linux loader for OLPC
Date: Sun, 13 Apr 2008 17:52:46 +0200 [thread overview]
Message-ID: <20080413155246.GA28261@thorin> (raw)
In-Reply-To: <ca0f59980804130818y565dd12q71187989d3c53d4@mail.gmail.com>
On Sun, Apr 13, 2008 at 11:18:31PM +0800, Bean wrote:
> > /* OLPC / XO laptops have three kinds of storage devices:
> >
> > - NAND flash. These are accessible via OFW callbacks, but:
> > - Follow strange semantics, imposed by hardware constraints.
> > - Its ABI is undocumented, and not stable.
> > They lack "device_type" property, which conveniently makes GRUB
> > skip them.
> >
> > - USB drives. Not accessible, because OFW shuts down the controller
> > in order to prevent collisions with applications accessing it
> > directly. Even worse, attempts to access it will NOT return
> > control to the caller, so we have to avoid probing them.
> >
> > - SD cards. These work fine.
> >
> > To avoid brekage, we only need to skip USB probing. However,
> > since detecting SD cards is more reliable, we do that instead.
> > */
> >
> > grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY);
> > }
> >
> > but your patch doesn't seem to disable the GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY
> > hack.
> >
> > Also, I'm not sure how stable this will be. Perhaps it breaks in the future
> > with firmware updates :-(
>
> nand access is different from normal disk, it uses pio-read to read a
> page which is normally 2048 bytes.
>
> : pio-read ( adr len page# offset -- )
I see. As for the "strange semantics" I mentioned, IIRC they're applicable
to write operations. It might turn out to produce funny effects when writing,
but fortunately we don't do that too often :-)
> as for GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY, perhaps we can rename it
> GRUB_IEEE1275_FLAG_OLPC to indicate OLPC platform, we might need to
> use it for other things.
Using flags to describe specific problems has the advantage that if they're
fixed in a more recent version of the firmware, we just need to check for that
in grub_ieee1275_find_options() (the SmartFirmware check there is a nice
example of how nasty it gets).
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)
next prev parent reply other threads:[~2008-04-13 15:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-27 23:23 [PATCH] Linux loader for OLPC Bean
2008-03-31 19:47 ` Bean
2008-04-03 15:19 ` Bean
2008-04-13 11:41 ` Robert Millan
2008-04-13 15:18 ` Bean
2008-04-13 15:52 ` Robert Millan [this message]
2008-04-18 14:56 ` Bean
2008-04-18 15:01 ` Bean
2008-04-13 11:14 ` Robert Millan
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=20080413155246.GA28261@thorin \
--to=rmh@aybabtu.com \
--cc=grub-devel@gnu.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.