Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The thing that tells the firmware to initialize? In other words, how does does the firmware "know" to initialize?

The firmware is just software that is executed by the CPU. The question is, how does the CPU know how to find and execute execute the firmware

From the article: The motherboard ensures that the instruction at the reset vector is a jump to the memory location mapped to the BIOS entry point.

The motherboard hardware ensures that the firmware is mapped into memory and that the reset vector points to its entry point. The CPU loads the reset vector into the EIP and starts to run the firmware.



But what will be the procedure when the computer is booted for the very first time(out of the factory, anew)?


It will run whatever is in the flash chip. That one is generally written to outside the system's control.

On modern PC mainboards with SPI flash (8 pins), there's often a set of pins (also 8) in close proximity to the flash chip - attach an external flasher to that, and you can write the flash while the PC is turned off.

The alternative would be to write the flash before it's put on the board, but which method is chosen is an implementation detail.


You're thinking about 10 steps ahead of this guy. He's just confused about the 'reset' vector being hit even when the computer is NOT explicitly reset, just when it's turned on for the first time, or powered on after being off.


The chips are programmed before they are put on the board.


From wikipedia:

That is to say, the reset vector is a pointer or address where the CPU should always begin as soon as it is able to execute instructions.

In other words, people who have lots of experience in this stuff gloss over the fact that "reset vector" doesn't mean reset at all, it actually means "whenever it's turned on, it jumps to this address and starts executing instructions".


That "reset vector doesn't mean 'reset at all'" was what I wasn't able to pick up. Now it makes more sense. Thanks for clarifying.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: