Traditional Culture Encyclopedia - Traditional stories - What is the device boot sequence of a perfectly good computer? What starts first and what starts second?

What is the device boot sequence of a perfectly good computer? What starts first and what starts second?

Of course the system self-test including memory self-test.

The following is the system self-test and start the detailed process:

Step 1: When we press the power switch, the power supply to the motherboard and other devices to start power supply, this time the voltage is not too stable, the motherboard control chipset will be issued to the CPU and maintain a RESET (reset) signal, so that the CPU internal automatically restored to the initial state, but the CPU will not be immediately at this moment! The CPU will not execute commands immediately at this moment. When the chipset detects that the power supply has begun to stabilize (of course, the process of going from unstable to stable is only a momentary event), it removes the RESET signal (if you manually press the Reset button on the panel of the computer to reboot the machine, the chipset removes the RESET signal when the button is released), and the CPU immediately starts executing commands from the address FFFFF0H, which is actually the address that you can see from the introduction of the previous section. This address is actually within the address range of the system BIOS, whether it's Award BIOS or AMI BIOS, and is placed here as a jump instruction to the real boot code in the system BIOS.

Step 2: The first thing the system BIOS boot code does is perform a POST (Power-On Self Test), the main task of which is to detect the presence and proper functioning of some key devices in the system, such as memory and graphics cards. Since POST is the earliest testing process and the graphics card is not yet initialized, if the system BIOS finds some fatal errors during the POST process, such as no memory found or faulty memory (at this time, it will only check the 640K regular memory), then the system BIOS will directly control the speakers to sound to report the errors, and the length of the sound and the number of times it will sound represents the type of error. Under normal circumstances, the POST process proceeds so quickly that we can barely feel it, and once POST is complete other code is called to perform a more complete hardware check.

Step 3: Next, the system BIOS will look for the graphics card's BIOS. As mentioned earlier, the starting address of the ROM chip that stores the graphics card's BIOS is usually located at C0000H, and after the system BIOS finds the graphics card's BIOS in this place, it will call its initialization code to initialize the graphics card by the graphics card's BIOS, and at this point, most of the graphics cards will show some initialization information on screen, introducing the manufacturer's initialization information, as well as a description of the graphics card. At this point, most graphics cards will display some initialization information on the screen, introducing the manufacturer, the type of graphics chip and so on, but this screen is almost a flash. The system BIOS then looks for BIOS programs for other devices, and when it does, it also calls the initialization code inside those BIOSes to initialize the devices in question.

Step 4: After finding all the other BIOSes, the system BIOS displays its own boot screen, which includes the system BIOS type, serial number, and version number.

Step 5: The system BIOS then detects and displays the CPU type and operating frequency, and then starts to test all the RAM, while displaying the progress of the memory test on the screen, which can be as simple or as detailed as you want it to be, at your own discretion, in the CMOS settings.

Step 6: After the memory test is complete, the system BIOS will start detecting some of the standard hardware devices installed in the system, including hard disks, CD-ROMs, serial ports, parallel ports, floppy drives, etc. In addition, most of the newer versions of the system BIOS will also auto-detect and setup the memory timing parameters, hard disk parameters, and access modes during this process. The BIOS also automatically detects and sets memory timing parameters, hard disk parameters, access modes, and so on.

Step 7: After the standard devices have been detected, the internal Plug and Play code in the system BIOS will start detecting and configuring the Plug and Play devices installed in the system. After each device is found, the system BIOS will display the name and model number of the device on the screen, and at the same time, allocate resources such as interrupts, DMA channels, and I/O ports to the device.

Step 8: By this point, all hardware has been detected and configured, and most system BIOSes re-clear the screen and display a table at the top of the screen outlining the various standard hardware devices installed on the system, as well as the resources they use and some of the associated operating parameters.

Step 9: Next, the system BIOS updates the ESCD (Extended System Configuration Data), a means by which the system BIOS exchanges hardware configuration information with the operating system, which is stored in the CMOS (a small, special piece of RAM powered by the motherboard's The ESCD is a means used by the system BIOS to exchange hardware configuration information with the operating system. Usually the ESCD data is only updated when the system hardware configuration is changed, so we don't see the message "Update ESCD... Success" every time we boot up the machine, but some motherboards use the same BIOS as Windows 9x to save the ESCD data. However, some motherboards' system BIOS uses a different data format than Windows 9x to save the ESCD data, so Windows 9x will modify the ESCD data into its own format during its own startup process, but at the next startup, even if there is no change in the hardware configuration, the system BIOS will change the ESCD data back, and so on and so forth, which will result in every time we start up the system BIOS will have to update the ESCD again. This is the reason why some machines display the relevant information every time they boot up.

Step 10: After the ESCD is updated, the system BIOS boot code will do its last job, which is to boot from a floppy disk, hard disk, or CD-ROM drive according to the user-specified boot sequence. Taking booting from disk C as an example, the system BIOS will read and execute the master boot record on the hard disk. the master boot record then finds the first active partition from the partition table, and then reads and executes the partition boot record for this active partition, and the partition boot record will be responsible for reading and executing the IO.SYS, which is the most basic system file for both DOS and Windows 9x. windows 9x's IO.SYS will first initialize some important system data, and then it will display the familiar blue sky and white clouds, and underneath this image, Windows will continue to boot and initialize the DOS part and the GUI (Graphical User Interface) part.

If there is software installed on the system to boot multiple operating systems, the master boot record is usually replaced with the software's boot code, which allows the user to select an operating system, and then reads and executes the operating system's base boot code (the DOS and Windows base boot code is the partition boot record). The above is the computer in the power switch (or press the Reset key) for a cold start to complete a variety of initialization work, if we press Ctrl + Alt + Del under DOS (or from Windows to restart the computer) for a hot start, then the POST process will be skipped, directly from the beginning of the third step, in addition to the fifth step of the detection of the CPU and memory tests will also not be performed anymore. As we can see, the system BIOS repeats these things over and over again for both cold and hot starts, but it is these monotonous hardware testing steps that provide the foundation for us to be able to use our computers properly.