5 ms·
How Computers Boot Up (2008)
- nerdponx 7y agoWould love to see a "2019 update" for this (and its predecessor post, https://manybutfinite.com/post/motherboard-chipsets-memory-map/ https://manybutfinite.com/post/motherboard-chipsets-memory-m...)
- dang 7y agoThread from 2012: https://news.ycombinator.com/item?id=3827851 https://news.ycombinator.com/item?id=3827851
- ComputerGuru 7y agoThis kind of glosses over the actual boot loading part, imho. We published a very similar article a few years ago, but as we (NeoSmart Technologies) are bootloader people, there’s a lot more emphasis on that part of things. If you care to read it (and have the time): https://neosmart.net/wiki/mbr-boot-process/ https://neosmart.net/wiki/mbr-boot-process/
- sukritkalra 7y agoThanks for linking this! Interesting read! Do you have a similar one for the UEFI boot process? The article mentions but fails to link to a part 2.
- seafood 7y agoI have the same question as @sukritkalra. Is there an article for the EFI/GPT boot process?
- Thoth0 7y agoNot that i could find on their wiki, quickest of googling got me this; https://lukelogbook.tech/2018/12/14/pc-boot-process-uefi-with-gpt/ https://lukelogbook.tech/2018/12/14/pc-boot-process-uefi-wit...
- mmphosis 7y agohttps://en.wikipedia.org/wiki/Das_U-Boot https://en.wikipedia.org/wiki/Das_U-Boot https://en.wikipedia.org/wiki/Network_booting https://en.wikipedia.org/wiki/Network_booting https://en.wikipedia.org/wiki/Open_Firmware https://en.wikipedia.org/wiki/Open_Firmware
- femto 7y agoI'd like to see a description of the real boot process: the one that starts from cold silicon, and the Management Engine fetching its first instruction, as it brings up the main CPU.
- jbverschoor 7y agoDon't recent intel CPUs include minix?
- bcaa7f3a8bbc 7y agoThis is what "the Management Engine fetching its first instruction" in the original comment is referring to. Although ME is more than just Minix.
- mmphosis 7y agoIt's undocumented, so we don't know what intel CPUs include.
- zaarn 7y agoWhen the CPU is switched on, it's put into a very very basic mode. Caches and peripherals are not available, only the registers on Core 0. A very special sequence of instructions hardcoded into the CPU runs to activate the caches and use them as memory. These instructions have no heap and stack, only a few dozen registers to work with. Since this is before the CPU is properly initialized, it has access to shadow registers and other unseen CPU internals for memory. Once the caches and some CPU-internal peripherals are active, the next stage is loaded. At this point the L1 cache is used as RAM, this code will activate some parts of the system bus and begin training of the PCIe and DDR bus as well as bringing up the chipset, if necessary. This is where the Management Engine first runs. The firmware looks for the BIOS on it's bus, I'm not certain on how it's connected but it's likely part of the I2C or SPI busses. Once that is loaded up, the firmware loads and activates the RAM and disables the Cache as RAM. Then the BIOS/EFI is invoked via the reset vector mentioned in the article. The BIOS/EFI brings up the remaining parts of the CPU and Chipset while initializing and setting up the power and CPU clock. It will iterate the PCIe, USB and SATA busses, bring up the VGA graphics (or an EFI driver for graphics if available), connect up any missing devices on the SPI and I2C bus and setup any missing parameters (DDR RAM, CPU and other overclocks happen here if they are setup in the BIOS) Once the BIOS has setup the device tree, it generates the ACPI table and other memory structures in memory, looks for the boot device and loads up the first applicable bootloader. The BIOS hands of to the OS and bootup is complete. Atleast, this is the process I recall from my computing systems course.
- bcaa7f3a8bbc 7y agoA common interview question for software developers is: what happens when you navigate to google.com. When I was working with Linux kernel and coreboot I digged into the datasheet of my motherboard chipset to troubleshoot my unresponsive power button. It was pretty complicated, the kernel driver of the power button (yes, it's a thing!) actually first communicates to the EC/keyboard controller, and setup a GPIO input for the button to the appropriate mode and then hook an interrupt handler to it, finally it reroutes the interrupt of the EC to southbridge to generate an ACPI power-managerment event (PME), which triggers the actual hardware wakeup from suspend (it's not a standard x86-compatible machine although it uses x86 peripheral chips). If UEFI/ACPI is involved, the whole process would occur at a different layer. So I started to think often since then: "What happens when you press the power button" can be the hardware-equivalent to that interview question. It seems to be a good question for a variety of hardware engineering fields, including simple embedded systems and complex computer systems.
- rollthehard6 7y agoI got asked a similar question from a devops/sysadmin point of view in an interview - If you enter 'ssh somehostnamethatisupandyoucansshto' what happens? I like this sort of question since it has no right or wrong answer, is a good way to get a feel for the breadth and depth of someone's knowledge and also how good they are at getting it across to others.
- NikolaeVarius 7y agoI really like these questions, really digs into exactly how much magic a person knows about.
- tenebrisalietum 7y agoThis provides a really detailed view of the low-level details for booting on an Intel CPU: http://www.drdobbs.com/parallel/booting-an-intel-architecture-system-par/232300699 http://www.drdobbs.com/parallel/booting-an-intel-architectur...
- DannyB2 7y ago> Other POST failures, like a missing keyboard, lead to halts with an error message on the screen. Keyboard not detected. Press any key to continue booting.