Many times the different components and peripherals of our computer require an update of what we call the firmware. Either to solve certain bugs and errors that said piece of hardware has or to add new capabilities that did not exist before. How does the firmware update process work?
First of all we have to clarify that a firmware update is not equivalent to a driver update, since while the controller that we install on the PC is used by the applications to communicate with the different components and devices. The firmware, on the other hand, tells it how it should work at all times.

We must not forget that many devices contain a microcontroller for their management, which we can consider a computer by itself. Which recursively executes a program that is inside where it is found how to do things and when. These processors that are found in the different pieces of hardware do not interact, therefore, in their operation with the CPU and the rest of the system in terms of communication, but they are essential in order to access all the capabilities of our hardware. .
What are the benefits of upgrading firmware to a component?
Suppose we have a monitor with HDMI 2.1 support that is not complete, the manufacturer has decided not to include functions such as VRR inside it, and the bandwidth it supports is less than 48 Gbps. One day through a firmware update we have access to those features without having to buy a new model.

Updating a firmware can also positively affect a CPU, since its control unit and even the memory controller are microcontrollers themselves that have a specific firmware. We can find a performance increase in certain instructions or support for faster memory thanks to updating the firmware of the processor. However, its capabilities can also be reduced, either for security reasons or because there is a feature that conflicts with other products from the same company.
economic advantage
Although its greatest advantage is in the fact that being able to perform a firmware update means that we and the manufacturer do not have to carry out replacements and repairs to solve certain problems that affect our hardware. So it saves major headaches for both sides, since it avoids us having to send the device in warranty and the manufacturer having to manage complex shipping and returns logistics, as well as having to stop production.

In any case, updating the Firmware does not give it capabilities beyond what the hardware can execute by itself, but what it does is optimize the operation of its functions to make it more efficient and block or unblock its functions. Nor can we forget that the process can also involve solving errors from previous versions of it.
How does updating a firmware work?
There are two ways a manufacturer can update the Firmware of their hardware, both of which depend on the type of memory used to store the firmware, as not all manufacturers want users to have easy access to their content.
Using a programmable ROM
In some cases, this is found in an EEPROM , whose content can only be modified by the manufacturer using specialized tools or by replacing the chip that contains it with another of the same type, but which stores an updated version, being the case, for example, of graphics cards in PC.

As its name indicates, a ROM is read-only and its content cannot be replaced by another, in addition, in many cases, they are pieces small enough that those who do not have knowledge of handling small electronic pieces have problems to handle them. Moreover, many times its factory assembly has been carried out by a high-precision robot.
Via internal Flash memory
Instead, most hardware typically includes firmware content in nonvolatile RAM or Flash memory that resides within the device’s own embedded microcontroller. This indicates that the user does not need to manipulate the hardware to update the firmware.

Devices with direct access to RAM
If we are talking about a device that has direct access to RAM, be it the CPU, the motherboard chipset or a PCI Express device, then the update is obviously done through the DMA unit included in the component to be updated. Let’s not forget that what a DMA unit does is give an external device access to RAM by temporarily blocking access to the IMC of the rest of the components in order to copy the content of one physical memory to another. In this case it was the memory that stores the firmware inside the controller.

The memory addresses that are specifically used to update the firmware are not known by the user, but are known by the specific component and are carried out completely transparently to the operating system. Simply, the component to be updated looks at that part of the RAM periodically and stores the information. In many cases, the flash memory usually includes space for two Firmware, one for the current version and one for the update. The reason? Simple, in case the update is broken and gives serious operating errors, to be able to return to the previous one.
Components without direct access to RAM
Instead, for peripherals that connect via USB or other ports that don’t have direct memory access and rely on the IOMMU, they simply receive the firmware update directly, so there’s no DMA drive in the middle running the IOMMU. process.

For example, a mouse or keyboard that are input and not output peripherals, but the interface they use is bidirectional. Therefore, it is only necessary to send them data to update their firmware or even to store certain information such as the macros of the keys or buttons.