[coreboot] Code flow from reset vector
Peter Stuge
peter at stuge.se
Thu Mar 27 10:51:16 CET 2008
On Wed, Mar 26, 2008 at 11:47:56PM -0700, Viswesh S wrote:
> > But why are you doing this anyway? Wouldn't it be easier to just
> > look at the source code?
>
> [Viswesh] The source code doesnt give you the functional flow.
It does, but the source code flow is not obvious in v2.
> Taking one example, if we look at entry32.inc, we cant see that the
> next function is fpu_start.
No, but mainboard/*/*/Config.lb is also part of the source code.
Think of it as a macro file that is processed to generate code.
Following mainboardinit entry32.inc there is mainboardinit
cpu_reset.inc and then mainboardinit fpu_enable.inc.
Again, this design is in no way optimal and big improvements have
been made in the new version 3 of coreboot. :)
> If we dump the elf file we can actually see the next function which
> is being called, one of the reasons why I looked at the assembly
> code.
>
> I like to understand the assembly code also, but right now the
> utmost priority is to understand the functional flow.
I understand. But look into Config.lb, or even ask on this list, I
think you will get faster results. :)
> Suppose you modify the linux bios, using linux how do u flash it to
> the chip ?
>
> Do you have in system code for it (or) any tool which does it for
> you.
There is a tool called flashrom in util/flashrom/. Remember to erase
before writing to flash when using it.
> Is it better that I write code to write the coreboot to the bios
> chip.
The flashrom tool already supports a number of flash chips and
chipsets, but if your hardware is unsupported or not working properly
and you add code to make it work, please send a signed-off patch to
the list. (See the Coding guidelines in the wiki.)
//Peter
More information about the coreboot
mailing list