[coreboot] Code flow from reset vector
peter at stuge.se
Wed Mar 26 16:59:56 CET 2008
On Wed, Mar 26, 2008 at 02:41:39PM +0000, a a wrote:
> > coreboot.rom is not an ELF file so elfutils can't really do much
> > good with it, as you have noticed.
> a v2 coreboot.rom actualy IS a elf file (the payload) with some
> stuff (even another elf and a load of binary code) appended...
Right. It is not one single ELF file.
> > Then disassemble:
> > $ objdump -b binary -m i386 -D out
> wrong should be
> objdump -b binary -m i8086 -D out
Excellent point. Thanks!
> bottom line is that objdump does proetct mode disassemble when dont
> give a -m of give -mi386 ...
> -mi8086 makes it do realmode disasmbly and that what you will need
> for the first ??(100 ?? orso) bytes that get executed .. basicaly
> that jump then some segment discriptor setup and the switch to
> protected mode
Yep. 32 bit vs 16 bit code.
> > Again, objdump treats coreboot.rom as an ELF file, which it is
> > not, and so you get garbage output.
> it is .. and you are looking at the payload ....
Again, coreboot.rom is not one single complete ELF file.
It is a binary blob which consists of several files that have been
concatenated together, with some padding in between. Some of these
files are ELF files, but objdump can't dissect coreboot.rom correctly
just because there are ELF files inside it.
My point is that objdump does not know about the format of the
complete coreboot.rom file, and I don't think it should, for v2.
LARs may be a different matter though. :)
More information about the coreboot