Detailed explanation of the Computer Startup Process

Source: Internet
Author: User
Computer startup process details

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.

Now let's take a closer look at the computer startup process. Step 1: When we press the power switch, the power supply starts to power the motherboard and other devices. The voltage is not stable yet, the control chipset on the motherboard sends a reset signal to the CPU and enables the CPU to automatically return to the initial state. However, the CPU does not execute commands immediately at this 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 is just a jump command, 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, self-check after power-on ), the main task of post is to detect the existence and normal operation of some key devices in the system, such as memory and video 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: 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: 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 will start 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 a device is found, the system BIOS displays the device name, model, and other information on the screen, and allocates resources such as interrupt, DMA channel, and I/O port 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 on the top of 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 hardware configuration of the system is changed. Therefore, we do not see "Update escd... Success ", however, the BIOS of some motherboard uses a different data format than Windows 9x when saving escd data, therefore, Windows 9x will change 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 its 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 the most basic system file for DOS and Windows 9X. 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.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.