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.
Best Answer
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.
References: