BIOS code execution

BIOS Questions that don't belong in the other forums. Read them!
Post Reply
sid_007
New visitors - please read the rules.
Posts: 8
Joined: Thu Aug 23, 2007 8:15 am

Fri Sep 07, 2007 7:04 pm

Hi,

When the processor starts the bootstrap procedure reading from the BIOS, does the code from the BIOS flow through the memory hierarchy, that is, the main memory (DRAM), and caches, or the processor has an ability to read instructions directly from the ROM, if so how ?

Thanks in advance
cp
BIOS Guru
Posts: 1914
Joined: Mon Oct 21, 2002 9:07 pm
Location: Germany

Sat Sep 08, 2007 9:27 am

the processor reads the first instructions directly from the rom. this is nothing special since the rom consists of addresses and data, too. the only difference between ram and bios is that no values can be saved in the bios address area. after the first few instructions which initialize the chipset and thus the ram, the bios is decrunched to main memory.
on startup the only memory hierarchy are the processor registers (maybe L1 caches) and the bios eprom.
sid_007
New visitors - please read the rules.
Posts: 8
Joined: Thu Aug 23, 2007 8:15 am

Sun Sep 09, 2007 4:45 am

Thanks for the reply, does the copying of BIOS to DRAM happen always or only when the ROM shadowing option is turned ON. Thanks again
cp
BIOS Guru
Posts: 1914
Joined: Mon Oct 21, 2002 9:07 pm
Location: Germany

Sun Sep 09, 2007 12:56 pm

since most - if not all - mainboard bios use compressed code, they have to be decrunched to memory. otherwise execution wouldn't be possible. this is the reason why compressed bioses will automaticaly be shadowed.
but if you load a modern OS (Linux, Windows NT/2K/XP/VISTA), the bios doesn't play any role at all because none of those OS uses bios calls or uses any data provided by the bios (except some acpi stuff maybe).
Post Reply