Skip to navigation
Is the firmware is either already present on the network card or it must be provided by the driver?
02.07.26
It can be both, depending on the complexity and the age of the network card. There are three common ways this works: ### 1. The "Hard-Coded" Firmware (ROM/Flash) On many older or simpler network cards, the firmware is stored in a **non-volatile memory chip** (like an EEPROM or Flash chip) soldered directly onto the card. * **How it works:** As soon as the card receives power, it loads its own firmware from that chip. * **Driver's role:** The driver doesn't need to "load" anything. It just starts talking to the card's registers immediately. The card is "ready to go" the moment the computer turns on. ### 2. The "Loadable" Firmware (The "Blob") Modern, high-performance network cards (like those from Intel, Mellanox, or Broadcom) are often designed to be "upgradable." The hardware manufacturer wants to be able to fix bugs or add features to the card after it has been sold. * **How it works:** The card has a very small "bootloader" in its permanent memory. When the computer starts, the card is in a "waiting" state. * **Driver's role:** When the FreeBSD driver attaches to the card, it checks the card's status. If it sees the card is waiting for firmware, the driver **loads a binary file** (the "firmware blob") from the operating system's disk (usually located in `/boot/firmware/` or `/lib/firmware/`) and pushes that data into the card's memory. * **Why do this?** It allows the manufacturer to release a driver update that includes a newer, better version of the firmware without you having to physically replace the card or use a special flashing tool. ### 3. The "Hybrid" Approach Some cards have a base level of firmware in permanent memory that allows them to perform basic functions, but they require the driver to upload a "patch" or "configuration" file to enable advanced features (like hardware-based encryption, advanced packet filtering, or virtualization support). --- ### How do you know which one your card uses? If you are writing a driver, you can usually tell by looking at the **Datasheet** or the **existing Linux/FreeBSD driver code**: * **If you see a `firmware_register` or `request_firmware` call** in the driver code, it means the driver is responsible for uploading the firmware from the OS to the card. * **If you don't see any firmware loading code**, the card either has the firmware permanently burned into its own chips, or it is a very simple device that doesn't need complex firmware to function. ### The "Firmware" vs. "Driver" distinction: * **The Driver** is the code that runs on your **CPU** (in the FreeBSD kernel). * **The Firmware** is the code that runs on the **NIC's processor**. **Think of it like this:** * If you buy a **printer**, it has firmware inside it. You don't "load" the printer's brain every time you turn it on; it's already there. * If you buy a **programmable robot**, you might have to plug it into your computer and "upload" a program to it before it can walk. Modern high-end network cards are more like the **programmable robot**. The driver is the software on your computer that sends the "program" (firmware) to the robot so it knows how to do its job.
Reply
Anonymous
Information Epoch 1784069969
Clarity is better than cleverness.
Home
Notebook
Contact us