23
  1. I was wondering what differences are between firmware and software?
  2. What differences are between firmware and OS?
  3. Are boot-loaders firmware? Bios is. How about GNU grub? Is grub software or firmware?

5 Answers 5

20

Traditionally, firmware is CPU code that resides on a unmodifiable ROM that is necessary for a hardware device to boot and load an operating system or a binary (software) of choice. Sometimes no choice of a binary is given and one attached to the boot-portion firmware is used.

All CPUs have the classical problem in that, since they fetch instructions from memory, some sort of pre-programmed memory must exist at a fixed address when the CPU starts, so that it can do something automatically on startup. Firmware exists for this purpose. Some firmware also has code that later programs can use for services. BIOS firmware exposes many functions that DOS used for basic input and output (hence why BIOS stands for Basic Input Output System).

The distinction is not totally clear. Some (most) WLAN cards require firmware to be loaded before they will start functioning. However, usually there is a tiny firmware on the device whose job is to do nothing but accept a main "firmware" over the USB bus when the device is started by the operating system, and hand over control when it is loaded. Most people would say all of it is firmware.

Since EEPROMs and flash memory became more common, firmware usually no longer resides in an unwriteable ROM but in flash memory and can be modified. The distinction between firmware and software is blurry today with the advent of flash memory. However, one thing hasn't changed over the years and that is CPUs are still CPUs and require some code, or firmware, to be visible at startup to, well, start up.

CPUs are in more devices than ever before so developing and allowing firmware to be updated in the case of bugs is a big deal now and many hardware devices with a CPU have firmware update interfaces, sometimes undocumented.

A firmware can be used to load an OS. It can contain a boot loader or code that loads a boot loader. It is possible to store an OS image in the same location as firmware and let the boot-time code of firmware load the OS (cell phones do this). PC BIOSes as a rule do not include boot loaders. U-boot (not for PCs) is an example of a "filesystem-aware" firmware that does directly load an operating system.

FIrmwares usually do not have all the features of a full operating system because of the principle that simpler is more reliable. The simplest firmwares simply initialize a minimum of hardware, load a sector or block off of a storage device and throw execution to it. This is simple to program and therefore easy to verify as bug free. Bugs in boot time firmware particularly can spell disaster for a device.

2
  • Thanks! How are firmware and device driver different, as both control devices?
    – Tim
    Jun 20, 2011 at 1:53
  • For devices like WLAN cards: Drivers are built to interface between a hardware device and the operating system itself. Drivers run on the PC. Firmware is built to interface between a hardware device and a driver over a bus (USB, IDE, PCI-E, etc). Firmware runs on the device itself.
    – LawrenceC
    Jun 20, 2011 at 11:17
7

Firmware is software, except instead of being stored on disk, it is stored in an EEPROM which is usually flashable to allow updates.

Firmware is in a way an operating system, but much more restrictive and single-purposed because it is only for controlling that device, whereas an OS is a general-purpose system that allows any kind of software to be run on multiple hardware devices.

No, boot-loaders are not firmware because they are software that exists on the disk. Yes, the BIOS is because it exists on a (flashable) chip. No, GRUB is not firmware either because, again it is not firm (there is no hardware component to it), it is software that exists on disk—though it could (and may) be installed on a chip, in which case it would be firmware.

4

The boundaries can be a little fuzzy.

Software typically is any instructions or routine that a computer can do.

Firmware is typically specific instructions (software) that are loaded in/on to hardware in order for them to perform their function.

I would say that pretty much every piece of hardware has some sort of firmware included in it.

Again, I do not think there is a definitive guide as to where one starts and stops - all what firmware is, is software which is compiled for whatever chip is in the device.

As for your second question about what is firmware, I would say that bootloaders are not but the BIOS is and grub isn't.

This is very hard to draw the line but... the way I look at it is that the BIOS (now EFI) is the firmware of the motherboard, and the Hard drive has it's own firmware.

So, the bootloader/grub is pure software - it may do tasks with the hard drive, but it is not directly actually controlling any hardware.

If you take an embedded device such as an Iphone/Ipad, where does the firmware end and software begin!? If you consider IOS to be firmware, then why not Windows or similar.

To me, this shows that the boundaries are where the manufacturers or vendors of any device allow you to take control and it is not actually a fixed thing/exact science.

For example,

  • A motherboard is for booting - the firmware is the BIOS, when it hands over to the next part
  • The optical and hard drives are components for reading/writing data, the firmware is the part that does this job upon request.
  • The graphics card is a component for displaying graphics, the firmware is the part that upon request draws output.

To complicate further - when I say upon request, this can be from a driver within other software

Now, an Ipad, or an Iphone, or any other embedded device...

  • A device that is bought off the shelf to perform a limited function (e.g run IOS) is the firmware as you do not (or should not) manually modify it. It may contain other pieces of hardware inside, but it is presented as one device and you do not purchase the hardware separately, there by, any update available will update everything invisibly (e.g. a phone, you do not manually update the GSM controller, power variables and more, you just have an update that may modify these things).

So.... To sum up...

For me, I would say that firmware = the software that comes on devices where as pure software is purchased as data, but I am sure others may say different!

1
  • I hope this reads ok... I found this a very interesting topic to write about, but it took me over half an hour and it is very early in the morning/I am very tired... and I am not always clear at the best of times! ... Happy to answer questions and I just hope I didn't repeat myself too much! Jun 20, 2011 at 0:46
4
  1. The difference is basically in where the code resides. Generally, firmware is burned into some kind of EPROM or embedded flash memory, whereas software is stored on a mass stroage device.

  2. The OS of a device may reside in firmware or software. On a PC the firmware (BIOS), just provides low level services that a Software OS (Windows/Linux/etc) can make use of. In mobile devices the entrie OS is generally in firmware.

  3. By the definition in (1) the computer's BIOS is firmware, but bootloaders, which reside on the hard-disk are software.

1

I want to give an answer in just only a few words.firmware and operating system both of them is very important for any digital system to start up and run properly and we will discuss how these both works. Suppose we have switched off our smartphone and we switch on after switching the power button in our smartphone this command will go to BIOS chip which is a non-volatile memory and containing some programme of firmware.this bios chip firmware start working and firmware give command in both directions to RAM and ROM it gives command ram to take off operating system codes from Rom and another command to ROM to give a copy of his operating system to RAM to active all other components of that System.

1
  • "Firmware lets devices start up" is a good abstraction of what firmware's most important job is.
    – LawrenceC
    Jun 29, 2022 at 14:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .