0

In the following levels of a computer system, on which level does firmware (e.g. BIOS) run?

I guess:

  • BIOS doesn't depend on OS, so it must run on some level lower than level 3.

  • BIOS is written in machine language, so is it a program running no level 2?

Thanks.

enter image description here

  • 1
    On a typical computer system, there are other digital components other than the CPU which are also capable of executing instructions. In other words, they could also be called some kind of "processing units", although not the "central" one. – rwong Mar 11 '15 at 3:00
3

Firmware doesn't really fit into that hierarchy. Firmware is really just a place where a library of machine code (in the sense of level 2) is stored. Often the code stored in firmware is for the management of the motherboard and IO channels, but it need not be. I've got an old Tandy laptop that has Multiplan, a text editor, a BASIC interpreter, and a calendar in firmware.

2

I'm not quite sure if the image is accurate enough to expose such details as Firmware. For example the top 2 levels usually happen well before rest, the OS is not interpreting the program in usual sense of the word... unless we mean loader etc.

In the end the model does not have straightforward mapping to a 'real life' computer - I would even consider it more as a model of computation contracts then of computer as physical machine. There are some gaps between those two - for example virtually no OS is interpreting the program - it's done in silicon/by microcode directly while OS is handling error conditions and syscalls with ISA sitting in between microcode and both OS and program.

Depending on what you mean by of firmware, you may get different answers:

  • The firmware of various components may be executed on their chips. They roughly corresponds to levels 1 to 5 of 'computers' (i.e. processors) located on the harddrives etc.
  • The firmware can be used as a synonym of OS on mobile phones. In this sense it corresponds to Level 3.
  • Microcode is kind of firmware so it corresponds to Level 2.
  • Finally the firmware such as UEFI or BIOS can mean various functions provided for OS in the address space. They would correspond to Level 2(a) while true OS would correspond to Level 2(b)
  • Conceptually the firmware would belong to Level 1 if we treat it as model of computation and not of computer.
  • Is firmware in terms of machine language, or is machine language in terms of firmware? Is firmware based on Instruction Set architecture, or the other way around (i.e. is instruction set architecture based on firmware)? – Tim Mar 11 '15 at 5:07
  • @Tim Both. In general firmware refers to various embedded programs needed to operate the devices. One of the devices is processor where it can be used to implement ISA (it's called microcode). However it itself needs to use instructions so there is an internal, hidden from user, ISA between microcode and silicon. In addition the firmware of devices is usually encoded using some ISA for their internal processor or CPU external ISA if it is meant to use CPU. – Maciej Piechotka Mar 11 '15 at 5:56
  • @Tim or neither, sometimes firmware may contain data. For example the BIOS in your PC probably contains the bitmaps for the font used for basic console output. – Charles E. Grant Mar 11 '15 at 5:58
2

Firmware is software that runs on Read-Only Memory (ROM) or something similar. Firmware is firmer than software because software can be changed somewhere along the chain from where it is stored in some Read-Write media and loaded into writable memory and executed from there.

Firmware cannot work as in-place self-modifying code. Software can run as in-place, self-modifying code.

If you can think of a ROM and as some form of programmable hardware, then "firmware" is a form of hardware. If you can think of an FPGA as some form of programmable hardware, then you can think of FPGA Verilog and the like as a form of "firmware".

As time marches on, the lines between software, firmware, hardware get blurred more and more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.