Tech, ExplainedSemiconductors and devices
Concept

Firmware

The code that wakes the machine.

HOW IT WORKSThe device isswitched onThe boot code runs andchecks the hardwareIt loads the rest ofthe firmwareThe firmware readsinputs such as buttonsand sensorsIt controlsoutputs such as amotor or a displayThe firmware is the lowest layer of software, so the device cannot work without it.HOW IT WORKSThe device isswitched onThe bootcode runsand checksthe hardwareIt loadsthe rest ofthe firmwareThe firmwarereads inputssuch asbuttonsand sensorsIt controlsoutputs suchas a motor ora displayThe firmware is the lowest layer of software, so the device cannot work without it.HOW IT WORKSThe device is switched on↓The boot code runs andchecks the hardware↓It loads the rest of the firmware↓The firmware reads inputs such as buttonsand sensors↓It controls outputs suchas a motor or a displayThe firmware is the lowest layer of software, so thedevice cannot work without it.
On start-up, the boot code loads the firmware, which reads the device's inputs and controls its outputs.
opens a page inside this one a page in the same scene a page in another scene a concept page a label only, with no page

Firmware is software built into hardware that starts it and controls it. The chip in a washing machine, a car's engine computer, a router and a keyboard all run firmware. It is stored in the device's own memory, not installed by the user. It is called "firm" because it changes less often than ordinary software.

Here is how it works in general. When the device is switched on, a small program called the boot code runs first. It checks the hardware and loads the rest of the firmware. The firmware then reads inputs, such as button presses and sensors, and controls outputs, such as a motor or a display. It works with very little memory, and often must respond within milliseconds. The maker can send a new version to fix faults or add features; this is a firmware update. A failed update can leave the device unusable, so devices often keep a second copy to fall back on.

Firmware is usually kept in flash memory. In devices with secure boot, the very first program, the boot code, sits in memory that cannot be changed. It checks that the next stage is signed by the maker before running it, so that fake firmware cannot start. Firmware is harder to look after than ordinary software, because it is in millions of devices in homes and vehicles, and a mistake cannot be corrected until each device is updated. A device whose update failed and no longer starts is called bricked.

Take, for example, a smart bulb. Its firmware connects to the home Wi-Fi, listens for commands and sets the brightness. Consider the firmware in a server, which starts the machine before any operating system loads; see BMC firmware and PC firmware and drivers. Say an electric scooter's motor controller has firmware that decides how much current to send to the motor. This is part of a vehicle's electronic control unit.

Firmware is a target for attackers because it runs below the operating system, which is why the hardware root of trust checks it at start-up. It is written and tested with tools such as embedded real-time operating systems and embedded code generation, and it is one layer of IoT architecture.

How is it different from an operating system or an app? An operating system runs on a general computer and loads many apps. Firmware is made for one device and one job, and the user rarely sees it.

Appears in

Networking, infrastructure and security
Cloud platforms and developer tools
Healthtech and life sciences
Semiconductors and devices
Industrial tech and mobility
Tech, Explained is a part of ingrid.fyi. Every page explains one piece of technology in plain words.