- How much do you think the NOR flash costs inside this cable?
- How big do you think the firmware actually is?
- 16MB Winbond NOR flash is like $0.70 with no price breaks (for me, I am not Apple making 1 million units) - there's no way they need 1MB for two slots, much less 16MB.
- These cables retail for $49.
Two firmware boot slots is standard practice because it is essentially free to provide in any higher-end consumer electronic device: especially one that is explicitly designed to be unplugged easily.
How many support claims are saved on this $49 cable because mid-update bricking does not occur?
In practice pretty much every embedded device I've worked on that has supported in-field firmware updates has had either double buffering and/or a recovery mode to limit the possibility of bricking.
For the products where every last penny really needs to get squeezed out of the BOM (toys, low-end appliances, ...) the ability to do in-field firmware upgrades itself is IME often one of the first things to go.
BTW, they don't have to double the flash memory. They just have to provide enough extra memory for a fallback updater that the boot code can load if the main firmware is corrupt. All the fallback updater has to handle is telling the computer it needs firmware and then installing the firmware the computer provides.
Depending on the scope of the device (from multipurpose PC down to single-purpose things like microwaves, gas pumps, hard drives, LCD controllers) the firmware may just allow an operating system to be loaded or actually be all the code the appliance needs for its CPU.
If the CPU is embedded in a peripheral, then:
- it has to have some small ROM that does nothing but wait for an image to come in from a bus (USB, etc.) and then execute. The sound chip in Nintendo's Super NES is an example, on power on/reset it has a 64 byte boot ROM that does nothing but wait for data to come in from the main 65816 CPU and then runs that code when received.
- the host has to have some way of externally programming the peripheral's RAM directly and resetting the peripheral's CPU but not the peripheral's RAM. I suppose JTAG could be used for this.
My opinion: CPU microcode isn't firmware - CPU microcode sets the configuration of internal connections/parameters in the CPU. It's kind of like a settings file. But: I think recent microcodes do actually include code (see Xucode) but that code is meant to be the behavior of advanced instructions and not designed to be something that tells the CPU what to do from the moment it's powered on.
Commonly there is a hardware peripheral that pulls the firmware from a couple of places (could be an onboard ROM, could be jtag, or other) and loads it in to RAM.