4965 Microcode Overview The 4965 ucode contains three sections: 1) bootstrap (~900 bytes instruction, no data) 2) initialize (~2000 - 5000 bytes instruction, plus a data image) 3) runtime/protocol (tens of KBytes instruction, plus a data image) The 4965 Bootstrap State Machine (BSM) stores a short bootstrap uCode program in special SRAM that does not power down during RFKILL. When powering back up after power-saving sleeps (or during initial uCode load), the BSM loads the bootstrap program into the on-board processor, and starts it. The bootstrap program loads (via DMA) instructions and data for a new program from host DRAM locations indicated by the host driver in the BSM_DRAM_* registers. Once the new program is loaded, it starts automatically. Initialization steps -------------------- The following steps are followed to initialize the NIC with the 4965 ucode: 1) Load Bootstrap State Machine (BSM) with "bootstrap" uCode image. BSM contains a small memory that *always* stays powered up, so it can retain the bootstrap program even when the card is in a power-saving power-down state. The BSM loads the small program into ARC processor's instruction memory when triggered by power-up. 2) Load Initialize image via bootstrap program. The Initialize image sets up regulatory and calibration data for the Runtime/Protocol uCode and notifies host via "initialize alive" when it is complete. The "initialize alive" notification contains calibration data for Voltage, temperature, and MIMO tx gain correction. 3) Tell initialization uCode where to find runtime uCode. BSM registers initially contain pointers to initialization uCode. The host needs to replace them to point to runtime uCode instruction and a backup uCode data cache buffer. 4) Trigger the Initialize program to load and Runtime/Protocol image which begins normal operation. A "run alive" notification is sent to the host.