What is the difference between the firmware and the operating system?

后端 未结 6 514
温柔的废话
温柔的废话 2021-02-04 03:12

In embedded devices such as printer, switches, I am confused what the difference between the firmware and the operating system is. Are embedded devices operating systems similar

6条回答
  •  被撕碎了的回忆
    2021-02-04 04:05

    To dovetail off what other have posted:

    Firmware is more than just the bootstrap or BIOS, although that is a common use of the term in most consumer devices.

    In more sophisticated applications, field-programmable gate arrays (FPGAs), complex programmable logic devices (CPLDs), and other similar technologies provide a mechanism for creating configurable logic circuits that can go way beyond the linearly executable code run by a microcontroller or larger processor. This is often an alternative to application-specific integrated circuits (ASICs), which cannot be altered after the die is laid down.

    In such applications the firmware does much more than simply load code to get things started. Applications can be designed to handle multiple parallel operations, including but by no means limited to address routing, signal processing, math coprocessing, timers, power and reset sequencing, even LED and relay controls.

    The possibilities for creating custom devices is endless, and in the case of FPGA and CPLD, can be reprogrammed.

    Firmware of the type described above is (usually) programmed in VHDL, which describes either synchronous or asynchronous parallel logic to represent desired functions. The designs are typically laid out to be software accessible via either a memory mapped address range or via some other protocol (e.g., PCI/PCI-X/PCIe). The registers created by the firmware design represent a set of control and status for desired features.

    The operating system on the other hand, provides software the interfaces to function within some processing environment (i.e., provides context and "rules" to utilize the processor and any software accessible hardware or firmware). An OS can be either laid down as processing rules in firmware or (more commonly) it is just software loaded from either ROM, flash, or other media.

    The interface between the machine-independent parts of the OS and the hardware comes in many forms: board support package (BSP), drivers, etc. The BSP is usually where addresses to processor and board-specific peripherals are set up, among other things. Many real-time OS (RTOS) vendors provide some basic BSP setups and/or tools to get things started.

    Some designers will keep the BSP design simple to just get things going, and write many of the interfaces to reach hardware or firmware independently of the RTOS BSP protocols; this is more prevalent with custom firmware.

    Yes, embedded device OSes are "similar" to PCs. The distinctions are on a spectrum, but they all fundamentally work the same and provide an execution context for the applications to operate on some set of peripherals. As far as what type of OS is actually in the printer? There is no way of really knowing without more information (they only publish that the version is 9.86... could be custom, could be any one of a number RTOSes or GPOSes); also it is not clear if the OS listed with the firmware is actually in that download or just a notation related to compatibility.

    I hope that helps!

提交回复
热议问题