New device layout, including static and dynamic initializers

ron minnich rminnich at lanl.gov
Mon Jul 21 23:24:01 CEST 2003


On 21 Jul 2003, Eric W. Biederman wrote:

> I have nits to pick with a single device_configure().  After we have
> something working I will start picking them.

do you mean a single call or a single function? The plan is multiple calls 
to that function. 

> In general timer services are a generic part of LinuxBIOS and just like
> the console we may need an init routine.  We have avoided it many times
> in the past by having a static variable and having the timer code magically
> do something the very first time it is called.

Right. But if the timer is a device in the static tree, and it has a 
device_configure function, that will get called at some point with a PASS 
parameter which will tell it to turn on. 

Greg, you need to fill in the blanks a bit more about the PASS_ stuff.

Possibly show your hardwaremain()

> Long term I would like to see if we can get the cpus into this structure as
> well.  But expressing the dependencies is an interesting process.

The CPUs are in the static structure almost, as a class of CPU. I assume 
you want a static struct for each one. Very doable. But it makes more 
sense to make the instances of CPUs dynamic, and continue with the class 
as a static initializer.

ron




More information about the coreboot mailing list