Thoughts on firmware

Source: Internet
Author: User


In electronic systems and computation, firmware is a firmware that usually controls a variety of electronic devices in a fairly small program or data structure, from hard drives, keyboards, TFT screens or memory cards, to more complex consumer electronic devices, such as mobile phones, digital cameras, synthesizer, etc., all contain firmware to implement basic device operations and more advanced features. There is no strict line between firmware and software, because both are quite loose descriptive words. However, the software can be upgraded without replacing the hardware components, while the firmware is usually a basic low-level operation. Without firmware, the functionality is completely impossible. Firware is also relatively speaking. Most embedded systems include multiple levels of firmware, such as CPU, flash memory chip, communication controller, and LCD module. They have their own firmware, it can be considered as part of the higher-level firmware (the entire embedded system. Low-level firmware usually resident in ROM (OTP
/Prom), while higher-level firmware usually uses flash memory for updates.

 
Firmware at different levels has a similar relationship with the driver of Embedded Development and OS. The driver only implements the functions of specific hardware, and the OS side contains all the drivers. The OS is equivalent to the firmware at the upper level, and also needs to implement process control (different functions are sorted, and some functions are started or paused ). According to this conclusion, it is not difficult to understand why embedded systems such as MONDEM only need firmware to implement simple functions. MONDEM has a single function and does not need to sort functions and other complex tasks, A simple hardware driver can complete functions.

 
At present, the commonly used PC boot is first loaded with bios, and BIOS is the abbreviation of "Basic Input Output System". The Chinese name is "Basic Input Output System ". It is a set of programs that are solidified on a ROM chip on the motherboard of a computer, it stores the most important basic computer input and output programs, system settings, post-boot self-check programs, and system self-start programs. Its main function is to provide computers with the most underlying and direct hardware settings and control. By definition, we can know that BIOS can be abstracted as an advanced firmware, which includes control over the underlying hardware and provides services for the upper-layer software. However, the BIOS is more integrated than firmware, and its functions can be clarified and refined. It is stored in the BIOS chip. Unlike firmware, it is only stored in various hardware. BiOS can be set only when it is turned on. CMOS is mainly used to store the parameters and data set by the BIOS setup program. The BIOS setup program manages and sets the basic input/output system of the computer so that the system runs in the best state, you can also use the BIOS setup program to troubleshoot system faults or diagnose system problems. In an image, BIOS should be a "bridge" Connecting software programs and hardware devices to address real-time hardware requirements. The BIOS chip of the motherboard may be the only chip labeled on the motherboard. Generally, it is a 32-pin dual-line integrated circuit with the words "BIOS" printed on it. In the past 586, most of the BIOS was a Rewritable EPROM chip. The above labels protected the BIOS content (the EPROM content may be lost due to ultraviolet radiation) and cannot be torn down. Rom after 586
Most of the BIOS uses EEPROM (an electro-erasable read-only ROM). You can rewrite the EEPROM by using the jumper switch and the system equipped driver disk to facilitate BIOS upgrade. Computer users will be exposed to the BIOS when using the computer, which plays a very important role in the computer system. The performance of a motherboard is superior, depending on whether the BIOS management function on the motherboard is advanced. BIOS is divided into three parts: self-check and initialization program;

  • Hardware interrupt handling;
  • Program service request;


(1) self-check and initialization
This part is responsible for starting the computer. The first part is used to detect the hardware when the computer is powered on. It is also called power on self test, (post for short), the function is to check whether the computer is good, usually the complete post self-check will include the CPU, 640k basic memory, more than 1 MB of extended memory, Rom, motherboard, CMOS memory, serial port, the display card, software hardware subsystem, and keyboard are tested. Once a problem is detected during self-check, the system will give a prompt or a whistle warning. If any error is found in the self-check, it will be handled in two cases: for a serious fault (fatal fault), it will be shut down. At this time, as various initialization operations have not been completed, no prompts or signals can be given; if the fault is not serious, a prompt or sound alarm signal is provided, waiting for the user to handle it.

The second part is initialization, including creating interrupt vectors, setting registers, initializing and detecting some external devices. A very important part is BIOS settings, these parameters are mainly set for hardware. When the computer starts, these parameters are read and compared with the actual hardware settings. If they do not match, the system starts up.

The last part is the boot program, which is used to boot DoS or other operating systems. The BIOS first reads the Boot Record from the floppy disk or the start sector of the hard disk. If no boot record is found, no boot device is displayed on the monitor. If a boot record is found, the control of the computer is transferred to the Boot Record, boot records load the operating system into the computer. After the computer is started successfully, this part of BIOS task is completed (this part of function is the same as bootloader ).

(2) handling of program service and hardware interruptions

These two parts are two independent content, but they are closely related to use. The program service processing program is mainly used for applications and operating system services. These services are mainly related to input and output devices, such as reading disks and outputting files to printers. To complete these operations, the BIOS must directly deal with computer I/O devices. It sends commands through ports to send data to and receive data from various external devices, the program can be separated from the specific hardware operations, while the hardware interrupt processing processes the requirements of the PC hardware separately. Therefore, the two parts are software and hardware services, which are combined together, make the computer system run normally.

The service functions of BIOs are implemented by calling the interrupt service program. These services are divided into multiple groups, each of which has a special interrupt. For example, video service, with a disconnection value of 10 h, screen printing, a disconnection value of 05 h, disk and serial port service, and a disconnection of 14 h. Each group is subdivided into different service numbers based on specific functions. The peripherals and operations required by the application only need to be described with corresponding instructions in the program, without direct control.

CMOS is short for complementary metal oxide semiconductors. It is intended to be a technology used to manufacture large-scale integrated circuit chips or a chip manufactured using this technology. It usually refers to a read/write RAM chip on the computer motherboard. It stores the real-time clock information and hardware configuration information of the computer system. The System reads the CMOS information when powering on the machine to initialize the status of each part of the machine. It is powered by system power supply and backup battery, and its information will not be lost after the system power is down.

BiOS features are much more advanced than firmware. It has a higher level of functional organization and implementation. BIOS provides services for upper-layer operating systems, firmware implements hardware operations.

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.