Windows7 will abandon the mystery of the BIOS: EFI interface detailed

  

Everyone is worried about not setting up bios, don't be afraid, we don't need bios in the future, we use EFI. Windows7 system can fully support EFI, then what is EFI?

The full name of EFI is Extensible Firmware Interface, and the Chinese name is an extensible firmware interface. As early as the first half of 2006, Intel had demonstrated EFI on IDF. To use the EFI system, both the motherboard and the operating system must support EFI. Currently, the operating systems that support EFI are Mac OS X, Vista, and Server 2003.

Introduction to EFI Working Principles

EFI has the same function as the BIOS when booting, which is to initialize the PC, but the details are different. BIOS initialization of the PC, just power on the hardware in a certain order, simply check whether the hardware can work, and EFI not only checks the integrity of the hardware, but also loads the hardware driver in EFI, without the driver responsible for the loading of the driver. jobs. The most revolutionary aspect of EFI is the subversion of the BIOS interface concept, making the interface as easy to use as Windows. In the EFI interface, the mouse has become an input tool for replacing the keyboard. The modules for each function adjustment are also the same as the Windows program. It can be said that EFI is a miniaturized Windows system.

For the operating system, if the motherboard uses the BIOS, then the operating system must face all the hardware, up to the motherboard graphics card, as small as the mouse and keyboard, each time reinstall the system or system upgrade, The new driver must be installed manually or the hardware may not work properly. EFI-based motherboards are much more convenient because the drivers used in the EFI architecture are based on the EFI Byte Code. EFI Byte Code is somewhat similar to Java's intermediate code. It is not directly executed by the CPU, but requires the EFI layer to translate. For different operating systems, EFI protects the hardware layer very well. All operating systems see only EFI's program interface for EFI Byte Code, and EFI Byte Code directly links with Windows API. This means that regardless of whether the operating system is Windows or Linux, as long as EFI Byte Code is supported, only one driver is required to eat all operating system platforms.

Even more amazing is that the EFI Byte Code driver can also bypass the operating system and install it directly in the EFI environment. The control of the hardware is the responsibility of the EFI layer. EFI provides hardware operation directly to the operating system. Interface, no need for the operating system to call the driver. The advantage of this method is that you do not need to enter the operating system, you only need to enter the EFI interface, update the driver can be completed, and you do not need to upgrade the driver for each operating system. As long as the EFI interface is upgraded once, all upper-level operating systems are The new EFI interface can be called directly.

EFI can drive all hardware at the beginning of the boot, and the network is no exception, so in the EFI interface, the program can be directly connected to the Internet, to the outside world for help with the operating system maintenance information or online. Upgrade the driver.

Since EFI is so powerful, where is it stored? Is it stored in the original BIOS chip? The answer is of course No. The BIOS chip is only 256KB, which is far from enough for EFI. EFI is stored on the hard disk in the form of a small disk partition. EFI installation must use the optical drive to boot the system on the EFI-enabled motherboard, and then EFI-based the disk. This process is mainly to divide the disk space used by EFI.

EFI's storage space is about 50MB to 100MB, depending on the number of driver files. In this part of the space, the following parts are included:

1. Pre-EFI initialization module

2. EFI driver execution environment

3. EFI driver
>

4. Compatibility Support Module (CSM)

5. EFI High-Level Applications

6. GUID Disk Partitions

In Implementation, EFI Initialization Modules and Drivers The execution environment is usually integrated into a read-only memory. The Pre-EFI initialization program is executed first when the system is powered on. It is responsible for the initial CPU, Northbridge, Southbridge, memory and hard disk initialization, followed by the EFI driver. When the EFI driver is loaded and running, the system has the ability to control all hardware. In the EFI specification, a GUID disk partition system (GPT) that breaks through the limitations of the traditional MBR disk partition structure is introduced. In the new structure, the number of partitions of the disk is no longer limited (in the MBR structure, only 4 primary partitions can exist). ), and the partition type will be represented by the GUID. Among the many partition types, the EFI system partition can be accessed by the EFI system to store some of the drivers and applications. CSM is a special module in the EFI system on the x86 platform. It will provide system services similar to the traditional BIOS for operating systems without EFI boot capability.

Due to the simplicity of EFI driver development, all hardware vendors can participate and customize the most suitable driver for their own hardware. The EFI-based driver model can make the EFI system accessible to all hardware functions. It is no longer a fantasy to browse the website without entering the operating system, and it is even simple to implement. This is an impossible task for a traditional BIOS-based system. Adding a few simple USB device support to the BIOS has caused many BIOS designers to suffer, not to mention adding support for countless network hardware. It is necessary to build a TCP/IP protocol in 16-bit mode out of thin air.

Many people worry that the open model of EFI will lead to new security risks, because the EFI system is more vulnerable to computer viruses than the traditional BIOS. When some EFI drivers are destroyed, the system may be Faced with an unbootable situation. In fact, the EFI driver part that the system boot depends on is usually not stored in the GUID partition of EFI. Even if the driver in the partition is damaged, it can be recovered in a simple way because the EFI code in the read-only chip. Sufficient to boot the computer from the CD-ROM drive, insert the EFI installation disk, repair or cover the EFI system storage area, you can restore the PC to normal. Moreover, this repair process is equivalent to shifting one of the two configurations from the two configurations to the other operating system, and there is no need to re-identify the hardware. EFI is conceptually very similar to a low-level operating system and has the ability to manipulate all hardware resources. Many people feel that its continuous development will likely replace the modern operating system. In fact, the founders of EFI limited EFI's ability to threaten the dominance of the operating system when the first version of the specification was introduced. First, it is only an interface specification between the hardware and the operating system. Secondly, the EFI environment does not provide an interrupt access mechanism, which means that each EFI driver must check the hardware status by polling and need to explain it. The operation is much less efficient than the operating system. Third, the EFI system does not provide complex memory protection. It only has a simple memory management mechanism, specifically, it runs in the segment protection mode of the x86 processor. The memory is divided into a flat segment with maximum addressability. All programs have permission to access any location and do not provide real protection services.

EFI's Command Line Control Mode

In EFI's design architecture, once the boot software passes control to the operating system, all service code for booting will stop working, part of the running era. The service program can continue to work so that when the operating system cannot find a driver for a particular device at a time, the device can continue to be used. EFI's programs are limited to Java pseudo-execution files, and do not have direct access to all of the disk's resources, and in most cases after entering the operating system, the EFI part of the code goes into sleep mode, even if there is a virus against EFI Nor can it cause further impact.

The emergence of EFI can be said to fully compensate for the original deficiencies of the BIOS. Because the BIOS is too confident in the security of the chip, when the CIH virus is encountered, the boot mechanism is completely destroyed. EFI puts the main program files on the hard disk, and it can be repaired by using the CD. For the operating system, the way of “destruction-maintenance” is completely transparent and will not affect the operating system. use. Although it seems that EFI is more susceptible to damage, it is also easier to repair.

After more than a decade of development, the BIOS has finally come to an end. The backwardness in appearance, the weakness in function, the weakness in security, and the lack of performance all seriously restrict its further development. . Although in these days, the BIOS can bring us basic functions, but to advance the PC, we must seek higher and better technology.

As a replacement for BIOS, EFI is far superior to the latter in terms of interface, function and security, and as the trend of future motherboards, the programs that can be executed on EFI will become more and more More, the basic functions that EFI can provide are getting stronger and stronger. Today, MSI demonstrated the power of EFI motherboards at CES, because it does not conflict with the design of common BIOS motherboards in terms of design difficulty and production compatibility. Therefore, it is believed that EFI with many advantages will replace BIOS and make PC easier. use.

As a promoter and developer of EFI, Intel can see EFI gradually move from the server platform to the desktop market, and it is only because of its own bitterness. From the initial manufacturers, there is no interest in the concept of EFI. Today, major BIOS providers such as Phoenix, AMI, etc., were originally considered to be the obstacles to the development of EFI, and now they are constantly introducing their own solutions. The motherboard supporting EFI function has gradually withdrawn. Everything seems to indicate that we can say goodbye to the BIOS and let the technology advance to record history.

Copyright © Windows knowledge All Rights Reserved