Another V2 question

Eric W. Biederman ebiederman at lnxi.com
Fri Jan 21 20:05:01 CET 2005


Richard Smith <smithbone at gmail.com> writes:

> > To start I added all of this framework in freebios v1.x and it
> > caused not problems there.  We just default to using it all in v2.
> > There should be no reason to require it.  Especially if you are doing
> > your own motherboard.
> 
> I would like what I'm making to be as usefult to the next 440bx user
> as possible and so I wan't to keep all the fallback framework stuff in
> unless I just have a real remove it.

Just don't implement a failover.c for your mainboard.
That is the only real practical difference.
 
> > Beyond that on the boards that use it I usually write a failover.c
> > which comes before auto.c that sets things up.
> 
> Man the waters just get deeper.  I though auto.c was first.  I just
> looked at failover.c and the fallback does a 'retun bist'  so who
> called failover.c?
> 
> Can you list out the boot sequence for me step by step?  Who calls what?

It is the order they are listed in Config.lb.  
Or more simply the order the included files are included into crt0.S
just like in freebios v1.  There is just an extra step to build the assembly
code now.
  
> > As for the magic include order in auto.c that is because currently
> > romcc does not do prototypes.
> 
> Why does that  require them to be after the big block of includes? 
> You can't just stick them all up at the beginning of the .c file?

Things get interesting when you are including .c files.
As has been previously mentioned auto.c defines board specific helper
functions for the memory initialization code.

And since I don't have prototypes (which makes inlining easier) those
functions must be defined before they are used.

So the file that uses them is included after the functions are
defined.

Eric



More information about the coreboot mailing list