5 ms·
Modern systems are even more interesting in how they boot. There is chipset initialization, DRAM configuration, etc that needs to be done. But how do you execut
by xenadu02 6y ago
Modern systems are even more interesting in how they boot. There is chipset initialization, DRAM configuration, etc that needs to be done. But how do you execute when there is no DRAM? It turns out modern CPUs have a decent amount of cache so they load the code from ROM or flash into the CPU's cache and both execute from there as well as using it as RAM.
Quite a lot goes on before even EFI or similar firmware starts, which itself does quite a bit of work before the OS boot loader starts.
- colejohnson66 6y agoAnd then even before BIOS/EFI is Intel’s ME or AMD’s PSP. And when control is handed over to the BIOS/EFI, the processor is pretending to be an 8086-era processor running in “Real Mode” (16 bit). The BIOS/EFI have to tell the processor to stop pretending (switch to “Protected” (32 bit) or “Long Mode” (64 bit)), do their things - and in the case of the BIOS, switch back to Real Mode - and then hand control over to the OS. It’s layers and layers of complexity all the way down. It’s astounding how much technical debt there is in these machines, and yet they still work.
- the_only_law 6y agoiirc, the first thing it execute any sort of code is the power management controller (PMC) somewhere on the chipset.
- the_only_law 6y ago> Modern systems are even more interesting in how they boot. Interesting is definitely correct I suppose... I don’t think I’ll ever get a good understanding of the x86 boot process.