How is the computer started?
When you press the power key on your computer or laptop, the windows or Linux icon appears.
What happened to the rear of the screen? From pressing the button to the logon screen, hundreds of components are initialized and the code that goes forward is running during startup. But when will it start?
We will go to the machine to see what happened. Let's get started...
What is booting )?
At startup, a series of processes or operations that load and start to run the operating system start with you pressing your power key.
What is the startup process?
Many basic startup process documents are confusing, because they are often related to Linux, windows, and other operating systems. However, I will write more about it.
The Startup Process of a disk consists of the following steps:
- Press power
- Reset the CPU pin level and set the Register to a specific initial value.
- CPU jumps to the memory zone loaded with BIOS (0xffff0)
- BiOS running power-on self-test and some other checks
- The primary loader runs on the MBR and jumps to the second loader)
- The second loader loads the operating system.
These are the tasks that need to be done during the startup process. Now let's talk about their details.
When we press the power key, send a reset signal, and then initialize the CPU register to a specific initial value (Note: sending a reset signal indicates that there is usually a pin after the CPU is powered on, this pin detects a specific level, such as a high level, and resets the CPU ). First and most importantly, reset the Reset vector shown in (4 gb ram is used in this example ). It is worth noting that the current memory values are all junk values (random values after resetting ), the address where commands and data are stored is determined by the memory map of your computer's chipset. The memory map maps data and commands stored in the Rom to a specific memory address. It must be ensured that the values in these Reset vector addresses must be included in the instruction "Jump to the system BIOS code address", so that the BIOS code can take over and continue to start the system.
BIOS-Basic Input Output System (Basic Input Output System)
As we have seen before, after power-on, the CPU is reset and the register value is set to the initial value. Which memory address stores the BIOS? In general, the hardware of the eeprom (electrically erased read-only memory) stores the BIOS. BiOS executes the following types of tasks:
L post-power-on self-check is the most important program used to detect and test basic hardware. If an error occurs in this step, the error is displayed.
L initialize the hardware device and then let each device run its own BIOS (for example, some graphics cards have their own built-in graphics code)
L search for Master Boot records (MBR) and then read them
L copy the code in the startup sector to Ram (memory) and hand over control to this code.
Start sector
It refers to one of the hard disks, with a size of 512 bytes. A sector is considered as the starting sector because it is in the position and this sector is responsible for further starting the system. This boot sector is generally called an MBr-Master Boot Record ). The primary Boot Record is a sector located at the first position of the hard disk. It has 512 bytes (cylindrical 0, head 0, and sector 1 ). When the BIOS finds the boot sector, it will copy the sector to ram, and then give the running permission to the Code in MBR.
The first 446 bytes in the MBR are the Master loader, also known as PBL, the master boot loader ).
The next 64 bytes are the partition table, which contains the passbook partition records.
MBR ends with 0xaa55 (Bytes byte is 0x55,512 byte is 0xaa ). The two numbers are like creden, indicating that this is a startup sector.
Original Website: http://www.engineersgarage.com/tutorials/how-computer-pc-boots-up? Page = 1
Reprinted this article please keep the following url: http://www.cnblogs.com/warren-wong/p/3982149.html
If you find any errors in this article, please let me know. Thank you.
How is the computer started? (Reprinted translation)