Page 1 of 1
how a computer boots
Posted: Sat Jan 31, 2004 2:17 am
by libber
Hi, I am going over how a pc works from poweron to whatever ('loading windows' or 'loading linux..' whatever you want :p) anyhow I think I understand 80-90% of the process but my confusion lies at the beginning of the process specificially how EIP is set to 0xfffffff0 and starts executing there (I am getting this from intel book 3 page 9-17). so we are in real mode and thus we are only using physical memory so how/why/(what is involved in) execuring things (bios it seems but intel says eeprom) at the top of physical memory. It clearly does not, but seems as if it would require 4gb of physical memory does bios/eeprom which isn't part of physical memory just put itself up there? and why the top address? I know the inital IDT/IVT is stored at 0x0 and up (this is done by the bios afaik) but wouldn't it be more logical is EIP was pointed at 0x0 upon bootup?
Thanks for your time,
Libber
Re:how a computer boots
Posted: Sat Jan 31, 2004 2:26 am
by Tim
It really does start executing at FFFF_FFF0. Although it's in real mode, the CPU loads the base address in the CS descriptor cache with a large number.
Remember that the physical address space doesn't need to be contiguous. Say you've got a computer with 256MB RAM. The first 256MB of physical address space is mapped to the RAM chips. Then there's a huge gap. Near the top of the 4GB range you might find PCI memory, such as video RAM. Then right at the top there is the BIOS.
The BIOS code is tied to the motherboard hardware, so if the BIOS code wants its memory to show up at a certain physical address, it can ask the motherboard hardware to arrange that. The mapping of physical addresses to actual chips on the circuit board comes down to how the motharboard is wired.
Re:how a computer boots
Posted: Sat Jan 31, 2004 3:44 am
by Schol-R-LEA
As for the question of BIOS vs. EEPROM, this is confusion of conceptual levels. The BIOS is a set of programs; EEPROM (aka Flash memory) is the medium in which the BIOS is stored on in most modern systems. Since the manual is describing hardwired (rather than programmed) behavior at that point, it naturally referred to the actual hardware implementation rather than the programmatic aspects.