- I was wondering what differences are
between firmware and software?
- What differences are
between firmware and OS?
- Are boot-loaders firmware? Bios is.
How about GNU grub? Is grub software or firmware?
Firmware and Middleware are simple industry terms to describe a certain set of 'some code'.
Firmware (as wiki states) 'usually' represents software 'usually' written in assembly or C that 'usually' runs on/the hardware.
The 'on/the' is to indicate that this software resides on a permanent storage medium (like some sort of small flash) that is directly connected to the hardware the software is to control. It's called 'firmware' because it is software specifically designed to run the hardware.
I also quote the word usually because the tech industry has a horrible habit of coining terms and then warping them so that no one can know what the true intention of the word is. 'Embedded programming' is a good current example; while the term typically referred to programmers who developed what is essentially firmware (i.e. low-level ASM/C hardware developers), the term has since morphed to include Android developers (i.e. Linux/kernel developers who can operate at both the Java and C level). I'm not bashing any sort of developer or development practice (I do a lot of those types of developing myself), merely pointing out that the tech industry likes to misuse words.
Middleware is another example of such a word; while I've yet to hear or see 'firmware' used for anything but hardware level code, I've seen middleware used on everything from firmware to .NET/Java. Middleware is a generic term that (as a developer) you usually can decipher from context what is intended as I've seen it misused too many times; so to answer you directly:
I still don't understand the differences in their roles, relative to hardware, high-level software, operating system, etc. Firmware is software (code turned to binary format) that resides on a certain piece of hardware and runs said hardware. Middleware can be used to mean an API/library that interacts with hardware (or another piece of software for that matter).
Is BIOS firmware not middleware? Depending on your view of this, it could be both. Technically the BIOS is firmware (it's software that is specifically used to run the hardware it's on, i.e. the motherboard), but if your intent is to interact directly with a piece of hardware in some fashion (as an OS would), the BIOS 'could' be middleware, as you don't have to 'write' your own BIOS and hardware routines and this is where the misuse of 'middleware' can come in, but in a classical since, no the BIOS is not middleware.
Is a bootloader for an OS a firmware, middleware or someware? A bootloader for an OS is a piece of code that resides between the BIOS (or other basic hardware subsystem) and the higher level systems (usually the OS) that tells the lower systems (i.e. BIOS) where the OS resides on the boot medium. Typically speaking, a bootloader usually sits on a specific location of a storage medium (like the first few hundred bytes or more) and the BIOS knows (thanks to industry standards) where to 'look' for a bootloader at which point the bootloader takes over to do what it was written to do (usually boot the OS).
A bootloader is not firmware but could technically reside in firmware and as far as it being 'middleware', that could be yes or no depending on 'your' view of what 'middleware' is/should be, though in the classical since of middleware, I would not consider a bootloader middleware as it doesn't provide me any easier context (unless I'm writing an OS).
Is the instruction set of a CPU firmware and not middleware? An instruction set of a CPU would be considered more of an application programming interface (API) (which 'could' be considered a form of middleware), it is not firmware as the CPU (the central processing unit itself) doesn't have anything 'to run'; the CPU instruction set is what the software gets 'compiled' to (assembly) that the CPU then 'understands' how to run.
Is there some middleware not firmware? Yes; just about any software framework you can think of (the .NET or Java libraries for example) could be considered a form of middleware as they give a programmer an 'easier' way to interact with various aspects of a computer. Using Java, for instance, you could open a file and write to it and have that code 'work' on any Java supported system. Since certain Java API's let you have a few lines of code that interact with files across disparate systems, it can be considered a form of 'middleware' since the developer doesn't have to write the code for each different system (Linux/Windows/Apple,etc) to interact with the filesystem of the hard drive and OS him/herself.
What are the relations and differences between device drivers and firmware and middleware? A device driver is a piece of software that sits at the OS level (usually as an 'installed' library) that tells the OS 'how' to interact with said device. For instance, when you install the latest video drivers, you are installing software that the OS 'uses' to communicate with the actual video card itself. The video card itself has firmware on it that knows how to interpret the information given it to by the OS (because of the driver) and does what it will with it (draw a window or game sprite for instance).
Device drivers could be considered middleware (again depending on your view of such) since it sits between the OS/hardware and anyone wanting to use the hardware through the OS.
Anecdotal: in my industry experiences, I have found 'middleware' to 'mean' 'web services' or something of the like (at least what the person using the term is meaning anyways), though I have also seen/heard it (mis)used in many job postings and interviews to mean a variety of things from API's and libraries (like Boost or Spring) to the C++ STL and even C# itself (the language itself, not .NET).
I hope that can help.
A service area is a logical area on the hard-drive (residing on the platters) set aside by hard-drive vendors for internally managing the drive. These areas are outside the hard-drive's Logical Block Address (LBA) space and as such are non-addressable and inaccessible via the standard ATA commands. The service area contains both code and data modules, such as defect management modules, SMART data modules, self-test modules and much more.
Here's an overview of the disk areas:
In order to access the service area, Programmable IO must be used to send commands directly to the hard-drive's IO port. These commands are unique to the hard-drive vendor and are not publicly disclosed, used rather by vendor tools and some sophisticated viruses such as Stuxnet.
Disk Firmware Area (DFA)
In most cases this area is the one that is called service area.
The firmware is composed of a series of modules. Examples are: SECU (Security System Module), P-List, G-List, T-List, SMART Attributes, and U-List (Firmware Zone Translator). See also Bad sector remapping.
A portion of the disk firmware usually resides on the drive, loaded on power up by code located on the controller board of the hard-drive and managing the disk until the disk is shutdown, or sometimes residing in flash memory located on the disk controller chip.
Host Protected Area
The Host Protected Area (HPA) is used for holding diagnostics and other utilities required by the manufacturer such as the boot sector, the exact content depending upon the manufacturer. It may contain information about the user addressable sectors, start of the reserved area, and code for booting.
Device Configuration Overlay
A Device Configuration Overlay (DCO) is similar to the HPA, but is used by manufacturers to configure drive sizes and may exist in addition to the HPA.
Its purpose is to allow the PC manufacturers to purchase one disk and market it as different models of different sizes. It can also be used to enable and disable features on the disk.
- The Impact of Hard Disk Firmware Steganography on Computer Forensics (PDF)
- Hiding Data in Hard-Drive's Service Areas (PDF)
- Hidden Disk Areas: HPA and DCO (PDF)
- Wikipedia Data recovery
- How the NSA's Firmware Hacking Works and Why It's So Unsettling
- How to conceal data on a hard disk and dodge (almost) any forensic examination without using encryption or steganography