4

During the process of booting, CPU reads address of system BIOS from the Reset Vector and jumps to the location where BIOS is stored. My question here is:

*As BIOS is stored on some external memory like EEPROM (and not on main memory) , how does CPU access this external memory ?

*Is this external memory already mapped to some region of main memory? and does the CPU just jump to this mapped region to access BIOS instructions Or it actually accesses the instructions from external memory where BIOS is stored?

2
  • 1
    I think that maybe ask this question on SuperUser is a good idea.
    – Remi Guan
    Commented Oct 9, 2015 at 5:36
  • thanks for suggesting... will also post it there Commented Oct 9, 2015 at 5:43

2 Answers 2

3

First I can refer you to a detailed article:

https://resources.infosecinstitute.com/system-address-map-initialization-x86x64-architecture-part-2-pci-express-based-systems/#gref

But I will summarize here:

  1. When CPU is "resetted", the reset vector interrupt (a specific memory address - 0xFFFFFFF0H) is executed - and the ROM content has to be there at that specific address.

Intel Reset Vector

How is the BIOS ROM mapped into address space on PC?

Who loads the BIOS and the memory map during boot-up

0xffff0 and the BIOS (hardwired address mapping is also explained/emphasized here)

  1. When BIOS is executed, it will also initialize hardware like VGA, and initialize DRAM memory. Sometimes RAM memory and BIOS may overlapped, and usually the OS will takeover and reimplement all the functionalities of the BIOS (whis is specific to each motherboard).

What information does BIOS load into RAM?

https://resources.infosecinstitute.com/system-address-map-initialization-in-x86x64-architecture-part-1-pci-based-systems/

Diagram below illustrate how motherboard designer will design the address ranges usable by the different hardware peripherals to lie in certain ranges, and the OS then has the responsibilities to allocate RAM ranges to lie in the unused by hardware regions. Don't forget that each core (for 32-bit) can only access 4GB memory - but phyical memory available can be much more than that. This is where pagetable comes in.

enter image description here

  1. Once the pagetable is setup, then only the TLB and pagetable can be used - which is to provide indirect and efficient access to the RAM memory.
-1

Normally the CPU access the data and information through by interfacing with the SPI in turn communicates with the EEEPROM to fulfill the task requested or deliver the information requested by the CPU. And no, the external memory is not mapped anywhere and no the CPU does not just jump to it. It communicates with what it or the BIOS needs through SPI or I^C depending on the age of the machine.

1
  • Pretty sure the southbridge does the actual low-level communication with the EEPROM or flash. Instruction fetch from the ROM has to be possible for the CPU to boot, so yes the ROM is mapped into physical address space. Commented Aug 15, 2019 at 21:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.