r/AskComputerScience • u/Witherscorch • Mar 17 '26
How do we load data from ROM to RAM, and when is the BIOS/UEFI executed?
I know that the two questions seem unrelated, but hear me out and I think you'll see why I'm asking both at the same time.
First, I'd like to preface that I have a basic understanding of the core components of a CPU. I know that, on startup, the instruction register should read from address 0, send off the instruction to the binary decoder, execute it, and then increment.
But this address 0 is located on RAM, and the BIOS/UEFI is sitting in a flash ROM on my mobo. Since RAM is volatile, address 0 will be empty, so the first step is obviously to load the BIOS/UEFI into memory. However, it's the CPU that has to do the loading, which it won't do without instruction. In my mind, it's a catch-22.
Is there a separate circuit that will manually load the BIOS/UEFI into RAM before the CPU starts execution? How do we read ROM? You can't store it on transistors like SRAM, so how do you get an electrical signal from magnetic storage? How is data even stored on ROM?