Turning on the power to start the machine is almost a daily task for computer enthusiasts. We will not be unfamiliar with the screen startup screen,, what does the computer do when it displays these boot screens? I believe some of my friends are not very clear. This article will introduce what computers have done when the power is turned on to the appearance of Windows blue sky and white clouds.
First, let's understand some basic concepts. First, we are very familiar with BIOS (Basic Input and Output Systems). BIOS is the underlying Code that deals directly with hardware. It provides the basic functions for the operating system to control hardware devices. BIOS includes the BIOS of the system BIOS (commonly referred to as the motherboard BIOS), the video card BIOS, and other devices (such as the IDE controller, scsicard, or Nic, the system BIOS is the main character of this article, because the Startup Process of a computer is under its control. The BIOS is generally stored in the ROM (read-only storage chip), and the Code will not disappear even after it is shut down or powers down.
The second basic concept is the memory address. Generally, 32 MB, 64 MB, or MB memory is installed on our machine. Each byte of memory is assigned an address, so that the CPU can access the memory. The 32 MB address range is expressed as 0 ~ in hexadecimal notation ~ 1 FFFFFFH, where 0 ~ FFFFFH's low-end 1 MB memory is very special, because the first 8086 processor can access a maximum of 1 MB of memory, which is known as the basic memory at the low end of 1 MB 640KB, while A0000H ~ BFFFFH must be retained for the display card. C0000H ~ FFFFFH is reserved for the BIOS. The system BIOS usually occupies 64KB or more space ~ At C7FFFH, the BIOS of the IDE controller is in C8000H ~ CBFFFH.
Step 1:
When we press the power switch, the power supply starts to power the motherboard and other devices, the voltage is not stable, the control chipset on the motherboard will send to the CPU and keep a RESET (RESET) signal, so that the CPU is automatically restored to the initial state, but the CPU will not immediately execute the command at the moment. When the chipset detects that the power supply has begun to stabilize the power supply (of course, the process from unstable to stable is only a matter of an instant ), it removes the RESET signal (if you manually press the Reset button on the computer panel to restart the machine, the chipset removes the RESET signal when the button is released ), the CPU immediately starts executing commands from the address FFFF0H. From the previous introduction, we can see that this address is actually within the system BIOS address range, whether it is Award
BIOS or ami bios. Here, only a jump command is put to jump to the real startup code in the system BIOS.
Step 2: The first thing to do with the startup code of the system BIOS is to perform POST (Power-On Self
Test, after power-on self-check), the main task of POST is to check whether some key devices in the system exist and can work normally, such as memory and graphics card devices. Since POST is the earliest detection process, the video card has not been initialized yet. If the system BIOS finds some fatal errors during the POST process, for example, if the memory is not found or the memory is faulty (only KB of general memory will be checked at this time), the system BIOS will directly control the speaker voice to report the error, the length and number of sounds indicate the type of errors. Under normal circumstances, the POST process is very fast and we can hardly feel its existence. After the POST process is completed, other code will be called for more complete hardware detection.
Step 3:
Next, the system BIOS will look for the BIOS of the video card. As mentioned above, the starting address of the ROM chip storing the video card BIOS is usually located at C0000H, after the system BIOS finds the video card BIOS, it calls its initialization code. The video card BIOS initializes the video card. At this time, most video cards will display some initialization information on the screen, introduce the manufacturer, graphics chip type and other content, but this picture is almost a flash. The system BIOS then looks for the BIOS program of another device. After finding the program, you also need to call the initialization code in the BIOS to initialize the relevant device.
Step 4:
After finding the BIOS of all other devices, the system BIOS displays its own boot screen, including the type, serial number, and version number of the system BIOS.
Step 5:
Then, the system BIOS detects and displays the CPU type and operating frequency, starts testing all RAM, and displays the Memory Test Progress on the screen, we can choose to use a simple and time-consuming or detailed testing method in the CMOS settings.
Step 6:
After the memory test is passed, the system BIOS starts to detect some standard hardware devices installed in the system, including hard disks, CD-ROM, serial ports, parallel ports, and soft drives, in addition, the vast majority of newer versions of the system BIOS also need to automatically detect and set the memory timing parameters, hard disk parameters and access mode.
Step 7:
After the standard device is detected, the plug-and-play code in the system BIOS starts to detect and configure the plug-and-play devices installed in the system. After each device is found, the system BIOS displays the device name, model, and other information on the screen, and allocates resources such as interrupts, DMA channels, and I/O ports to the device.
Step 8:
By now, all hardware has been tested and configured. Most system BIOS will be refreshed and a table is displayed above the screen, it roughly lists the various standard hardware devices installed in the system, the resources they use, and some related working parameters.
Step 9: The System BIOS will update the ESCD (Extended System Configuration
Data, extended system configuration Data ). The ESCD is a means for the system BIOS to exchange hardware configuration information with the operating system. The data is stored in CMOS (a small block of special RAM, powered by a battery on the motherboard. Generally, the ESCD data is updated only after the system hardware configuration is changed.
ESCD... Success "information, however, the BIOS of some motherboard uses
9x data format is different, so Windows
9x changes the ESCD data to its own format during its own startup, but even if the hardware configuration does not change during the next startup, the system BIOS will also change the ESCD data format back, so that the loop will cause the system BIOS to update the ESCD every time the machine is started, this is why some machines will display relevant information each time they are started.
Step 10:
After the ESCD is updated, the startup code of the system BIOS performs the last task, that is, starting from a floppy disk, hard disk, or optical drive according to the boot sequence specified by the user. Take disk C as an example. The system BIOS will read and execute the Master Boot Record on the hard disk. The Master Boot Record will then find the first active partition from the partition table, then read and execute the Partition Boot Record of the active partition, And the Partition Boot Record reads and executes IO. SYS, Which is DOS and Windows
9x basic system files. Windows
9x IO. SYS first needs to initialize some important system data, and then shows the familiar blue sky and white clouds. In this picture, Windows will continue to perform DOS and GUI (graphic user interface) partial boot and initialization work.
If a tool or software is installed in the system that directs multiple operating systems, the Master Boot Record is usually replaced with the boot code of the software, which allows you to select an operating system, then read and execute the basic Boot Code of the operating system (the Basic Boot Code of DOS and Windows is the Partition Boot Record ).
The above describes the various initialization tasks that need to be completed by the computer when the power switch (or press the Reset key) is enabled for cold start, if we press Ctrl + Alt + Del in DOS to perform Hot Start (or restart the computer from Windows), the POST process will jump over and start directly from step 3, in addition, the CPU and memory test in step 5 will not be performed. We can see that both cold start and hot start, the system BIOS repeats these things that we do not pay too much attention to at ordinary times, however, it is these monotonous hardware detection steps that provide us with the Foundation for normal use of computers.