05The second CPU
We got a CPU back.
The 34Kc has two virtual processors and four hardware thread contexts. The stock firmware ran Linux on one. The other ran its SFP EEPROM program: about 900 instructions in a loop with no wait, answering the router's I2C reads, because the stick has no EEPROM chip and the chip has to play one.
The project owner's instruction, verbatim: “our firmware goes to eleven. this means SMP”.
So the EEPROM emulation was rewritten as our own engine and moved to a spare thread context, where it sleeps until the router reads. The freed virtual processor became Linux's second CPU. The kernel says so at boot: smp: Brought up 1 node, 2 CPUs.
One catch. The GPON drivers were written for one CPU. So they run only on CPU0, an island: every entry point is pinned there, an automatic check stops the build if a new one is not, and a runtime tripwire counts violations. CPU1 runs everything else.
One CPU. One loop that never sleeps.Two CPUs. One engine, asleep.
MIPS 34Kc · two virtual processors · four hardware thread contexts
- CPUs Linux runs on
was 12- Same image, boot to LAN
was one CPU: 39.91 s35.2s- Router EEPROM reads that failed
0 / 215
- Measured With the module in a router's SFP cage: 0 of 15 cold and 0 of 200 warm reads by the router failed; the engine counted 539 I2C STARTs, 0 answered late.
- Measured One image booted with and without
nosmp: 39.91 s against 35.21 to 35.27 s to the first LAN answer. Cost: 128 KiB more kernel in flash.






