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
- Servers↗ Data centresA server's firmware starts the machine and checks its memory before the operating system loads.
- Baseboard management controller (BMC)↗ Data centresThe BMC firmware lets an administrator restart a server in a Mumbai data centre from a laptop elsewhere.
- Hardware root of trust↗ Data centresThe security chip checks the firmware's signature at power-on, and stops the machine if it was altered.
- Real-time operating system (RTOS)↗ Embedded softwareThe firmware of a pacemaker runs on a real-time operating system that responds within a fixed time.
- AI for embedded software↗ Embedded softwareAn AI tool writes firmware for one chip's timers and pins, which the engineer then tests on the board.
- Clinical lab analyser↗ Laboratory diagnosticsThe analyser's firmware moves its pipettes and reads its sensors, and a software update is a controlled change.
- Medical imaging equipment↗ Medical imagingThe firmware of an MRI machine controls the magnets and collects the raw signal before the software shows an image.
- Cardiac implants↗ Medical devicesA pacemaker's firmware decides when to send each pulse, and a doctor updates it over a short-range link.
- Chromatography and mass spectrometry↗ Lab instruments and informaticsThe instrument's firmware controls the pump and oven temperatures during each run.
- NAND flash memory and SSDs↗ Smartphone hardwareFirmware in the flash chip's controller manages wear and bad blocks.
- SSD controller↗ Smartphone hardwareThe controller's firmware maps logical addresses to flash blocks and spreads writes evenly.
- Smartphone design (ODM)↗ Smartphone hardwareThe phone maker adds its own firmware to start the phone's chips and make the camera work.
- Smart home appliances↗ Home technologyA washing machine's firmware runs its wash cycles, and an update from the maker adds a new program.
- Microcontroller (MCU)↗ Analog and embedded chipsA microcontroller holds the firmware that is the program for its one job.
- Laptops and desktops↗ Workplace devicesA laptop's firmware starts the processor and checks the hardware before Windows loads.
- PC firmware and device management↗ Workplace devicesA PC maker updates the firmware for a laptop's battery, which fixes a charging fault.
- Office printers and copiers↗ Workplace devicesA printer's firmware checks that a cartridge is genuine and counts the pages printed.
- Computer peripherals↗ Workplace devicesA keyboard's firmware decodes the pressed keys and sends them to the computer.
- Programmable logic controller (PLC)↗ Industrial automationA PLC's firmware runs the user's ladder program in a fixed scan cycle each few milliseconds.