grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Linux loader for OLPC


From: Robert Millan
Subject: Re: [PATCH] Linux loader for OLPC
Date: Sun, 13 Apr 2008 17:52:46 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

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 /.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]