Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know the title reeks of confusion, and some of you might assume I am just wondering about how the computer boots in general, but I'm not. But I'll sort this out for you people now:

1.Onboard firmware is how mostly all modern computer devices work, whether or not with EFI/UEFI(even without "onboard firmware", older computers still employed bank switching, or similar methods with snap-in firmware, cartridges, etc.)

2.On startup there is no "programs" running in the traditional sense yet, i.e. no kernel, OS, user-applications; all of the instructions, especially the very first instruction, is specified by the Instruction Pointer, I am guessing. How is the IP/PC/etc. set to first point to an address for a BIOS/firmware/etc. instruction, and how do the BIOS instructions map themself out in memory prior to startup?

3.Aside from MMIO, BIOS uses certain RAM addresses to have instructions. The big ? comes in when I ask this ... how does BIOS do this?


I am assuming that with the very first instruction there is an initial hardware setup for BIOS prior to complete OS bootup. What I want to know is if it's hardware engineered to always work this way, if there's another step in this bootup method I am missing, a gap of information I am unaware of, or how this all works from the very first instruction, and the RAM data itself.

share|improve this question
Anything here answer your questions… ? – David Marshall Nov 9 '13 at 22:18
The first steps from boot to POST get nicely explained in this recording at FOSDEM 2011 by the coreboot team. – Hennes Nov 9 '13 at 22:25

The physical address space does not have to all point to RAM. Most devices, including the firmware chip, occupies a part of the physical address space as well. They expose control registers and data buffers like normal memory locations to the CPU who will exchange commands and data with the device as if it is reading/writing the RAM. This means the same set of address and data buses can be used for both memory access and device IO and drivers are just like any other pieces memory-manipulating software.

The memory address map as shown by Windows' Device Manager best demostrates this.

Device manager

Now, when the processor starts up, the instruction pointer will be pointing at a known special address, say 0x0, and start execuing from there. The PCB designer must then make sure the firmware chip is hardwired to occupy the physical address space starting 0x0.

In reality though, the processor could be working in a completely different mode (e.g. using a different instruction set or using built-in hardwired instructions) before the firmware finishes initialization. This would be device-driver-like behaviour that is required to operate devices like serial flash (in most devices) or even SD card (like in the Raspberry Pi). However, this access is still done through mapped device memory.

share|improve this answer

You must log in to answer this question.