Ronald G Minnich <[EMAIL PROTECTED]> writes:

> On 26 Nov 2001, Eric W. Biederman wrote:
> 
> >  * Step 4:  Test for which copy of linuxbios to boot.
> >  *     We use 2 bits of CMOS ram.
> >  *     Bit 0: Initial boot direction
> >  *            0 - Boot the failsafe image.
> >  *            1 - Boot the other image.
> >  *     Bit 1: Reboot direction
> >  *            0 - Boot the failsafe image.
> >  *            1 - Boot the other image.
> >  *
> >  *     On initial boot we read bit0, and write it to bit1, and clear
> >  *     bit0.
> >  *
> >  *     On a reboot the bits are not touched.
> >  *
> >  *     Then the appropriate image is jumped to.
> 
> 
> I assume that on a full boot to Linux, you then set Bit 0? Because
> otherwise it seems you will always boot the failsafe (since you always
> clear bit 0).
> 
> Or did I miss something?

Nope you got it.  

At the moment I actually do this just before starting the bootloader/kernel
from linuxbios.  That is just before calling linuxbiosmain.

Though there is one small variation.  When I want to say the boot was successful
I copy bit1 into bit0.   This allows me to use the same code in both the fallback
path and the normal path.

The actual reason for two bits is so that when starting other cpus etc,
I can remember which way I booted this time, and continue booting that
way until a full board reset.

As for the l440gx porting the functionality should be straight forward.
Though until we can flash the BIOS from linux started with linuxBIOS  
it is a little pointless.

Eric

Reply via email to