Question

As per my understanding, the firmware is what controls the hardware, and drivers interacts with the firmware to control the hardware. Is that correct?

In Linux, what are the APIs or functions which interact with the firmware? Is the firmware code independent of any OS (e.g. Linux or Windows)?

Was it helpful?

Solution

Firmware is the software that runs on the device. A driver is the software that tells your operating system how to communicate with the device. All the devices having firmware are generally programed in to the device (either with a ROM chip, or a programmable ROM chip), but there are some devices where the firmware is loaded into the device at initialization time. Every device does not have the frimware.

  1. More technically "Firmware is software that is uploaded to a microprocessor or programmable logic on the hardware device itself. Examples of hardware that use firmware are HP printers that receive their code from the USB port at power up, wireless network interfaces that upload firmware at start up, routers that can update themselves from the internet, etc... In general, the ability to upload firmware to a device is a plus. it allows for product improvements to be added after the initial sale. These include fixing bugs in the product, responding to security issues, or responding to changes in the regulatory environment; Examples: FCC opening or restricting allowable bandwidths, power consumption, safety."
  2. In General: A driver is a kernel module that talks to hardware; firmware is software that runs on the hardware that talks to the driver.

OTHER TIPS

This depends on the way of connection between device and PC. For PCI boards there is set of Linux kernel mode API. Another set of kernel mode API is used to communicate with device connected through USB port. For Ethernet and WiFi connection you can use sockets API, communication is done completely in user mode. Devices, connected through serial port are also handled with user-mode API - they are treated as files in the Linux OS.

Generally, device firmware does not depend on the host system OS. It depends, however, on the OS (if any) running on the device itself. Firmware code may be written in plain C without any OS, or running under real-time OS. Modern devices may contain full-featured OS like embedded Linux or Windows. In this case, the whole OS with the programs specific to this device, are considered device firmware. For example, Android OS for specific mobile device.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top