From BIOS to OS

Source: Internet
Author: User

1. When the machine is turned on, after the power supply is stable, the power supply will send a "power-on Success signal" to the chip to start the clock generator (8284 );

2. Then, set the CPU to the initial test status and start preparation. When the CPU is initially started, the system Ram is empty and there is no content available for execution. Of course, the CPU designers also know this, so they program the CPU in advance so that the CPU will always find a fixed position in the system biosrom at this stage to start the BIOS bootprogram, this position is ffff0h, which is the position near the end of Uma. The reason for choosing this position is that this will not cause compatibility problems caused by the ROM size change. Since ffff0h is 16 bytes after the end of the UMA, only one jump command is placed here to further jump to the true biosstartup program position. (Different BIOS vendors can place them in different locations. You only need to specify them through jump ).

3. Then, the BIOS starts implementing power-onself test (post). In this process, if any error occurs, the booting process ends and the machine is suspended.

4. Then the BIOS starts searching for the display card. Specifically, it is used to find the display card built in the BIOS.ProgramAnd execute it. It is usually placed in the memory location of c0000h, and its role is to initialize the display card. The vast majority of modern display cards can display their information on the display. This is why information about the display card appears at the top of the display when we start the system.

5. Then, the BIOS will check the ROM of other devices to see which BIOS exists in these devices. Generally, the BIOS of the IDE/ATA Hard Disk can be found at the c8000h location and executed. BIOSes of any other device is also executed.

6. Then the BIOS displays its startup screen.

7. Then the BIOS starts further detection, including the memory capacity detection we can see. At this stage, if the BIOS encounters any error, the BIOS will display its error information on the screen.

8. the BIOS then checks system resources based on its "system resource list" to determine which system resources (devices) are installed on the machine. Some computers gradually display these detected devices.

9. If the BiOS supports the plug & lay standard, it detects and configures the plug & lay device and displays the devices it finds.

10. After some detection is completed, the BIOS will list a detection summary on the System screen.

11. then, the BIOS starts to look for a boot device. You can configure the BIOS to determine the search sequence. These devices include floppydisk (A, or hard disk (C, you can even include a CD-ROM driver or other devices.

12. After you find the boot device for the response, the BIOS will look for the boot information to start the OS startup process. If it finds a harddisk, it will find a master bootrecord (the first sector of the hard disk) located in Cylinder 0, head 0, Sector 1. If it finds floppy disk, it also reads the first sector of the floppy disk.

13. If no Startup Device is found, the system displays an error message and freezes the system. If you find the boot device that responds, the BIOS places the read sector in the memory 7c00h and jumps to it to execute it. Since then, the hardware startup phase has entered the OS startup phase.

In short, there are a lot of things to do at this stage, such as self-check, initialization of various chips, controllers, and ports, including displays, memory, keyboards, soft drives, serial ports, etc; during this process, the BIOS places the detected data in 1 K to 2 k ram, which is also called the BIOS data area; at the same time, it also places the interrupt vector and the stack settings required for the BIOS program to 0 to 1 k ram. In the end, the int H interrupt is executed in post, the disk that can be started is found, the boot program is loaded into the memory 7c00h, and the control is handed over to the OS boot program.
I do not know if it is correct.

Read the full text

Category:View BIOS comments

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.