Hi All ,
I am trying to understand the boot sequence of PC BIOS
I have got an rough idea it is as follows
1. system power up and fetch up first from ffffff0 addr. 2. there is a near jump to code to get system in to flat or protected mode 3. then we can jump to further secod stage bootloader after neccessary HW init.
Plz Somebody correct it and explain it in detail .
Second thing My BIOS image is ok abt 10 KB (suppose) and i have chip of 256KB So my image is like this
------------------------- lower most address(00000) Second stage bootloader :
Protected mode init code :
Basic HW init Code :
..ffff0 jmp instruction to Basic HW init code( at bottom ) --------------------------- uppermost address(ffff...)
(Fig is reversed as per normal figures in books for memory )
And I want to know where to place this small code in BIG chip
---------------------Chip start addr
where to place my code in it ???
----------------------chip end addr
I think start and end of both will be in same direction so it may be like this
--------------------------lowest address for chip (free space with ff ff)
------------------------- lower most address(00000) Second stage bootloader :
Protected mode init code :
Basic HW init Code :
..ffff0 jmp instruction to Basic HW init code( at bottom )
--------------------------- uppermost address(ffff...) both for chip and code
Plz comment and correct above information .
Thank you
Ramesh Chander
Yahoo! India Matrimony: Find your life partneronline.
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.