* Segher Boessenkool segher@kernel.crashing.org [061026 22:22]:
Yes, we should get rid of 90% of the motherboard specific code and instead pack things into config files ;-) modularize as much as possible and autogenerate the rest.
Unfortunately, in the failsafe part in the ROM, some things _have_ to be hardcoded, even if you _could_ auto-detect them, simply because auto detect is not "fail-safe" enough.
It should only be the bare minimum required to a) get console output; and b) reflash the board; of course.
Perfectly right. I did not talk about autodetection at runtime. Being able to _configure_ the hardware of a mainboard in a _configuration file_ would be the way to go though.
What makes the boards in linuxbios so ugly at the moment is that 90% of the code in auto.c/cache_as_ram_auto.c is identical for all opteron boards. The 10% difference is the GPIOs for memreset and the I2C configuration for SPD ROM. Plus some hand crafted code to call the correct superio initialisation.
Notice something? This could easily be backed into 5 lines of configuration file, but its several hundreds of lines of code.
By automating this we drop some flexibility that we never used, and add a lot of flexibility because it is so easy to handle and extend.
Stefan