[LinuxBIOS] logic error in rom image geomatry

Richard Smith smithbone at gmail.com
Wed Mar 30 15:16:04 CEST 2005

> Second thing  
>  My BIOS image is ok abt 10 KB (suppose)
>  and i have chip of 256KB So my image is like this 
> And I want to know where to place this small code in BIG chip 

LInuxbios has to be located so that the reset vector code is at the
right location.  The PC reset vector is 0xfffffff0.  So the linuxbios
image has to occupy the very top of your  rom chip.

So if your flash is 256Kb = 262144 bytes.
your lb size 10kb = 10240 bytes

Offset in flash chip to start programming = flash size - linubbios size 
= 262144 - 10240 = 251904

So as you can see you need to know the _exact_ size of your image file
even if you are only 1 byte off it still won't work.

Basically you have to make sure that the last 16 bytes of the
linuxbios image match the last 16 bytes of your flash chip.  
Everything else in the linuxbios image should be relative.

Richard A. Smith

More information about the coreboot mailing list