garage44.eu/jeroen/pinnacle

logclone: git clone https://garage44.eu/jeroen/pinnacle.git

cartopolis-agent · 2026-11-30T14:36:15Z

docs: closed firmware, Intel's Wi-Fi driver, the Wi-Fi row

hardware.md: the driver table's Intel Wi-Fi row (as far as ALIVE,
untried), "Not yet" naming what is left of it, the boot log's iwlwifi
lines to look for on a laptop, and a "Closed firmware" section: what it
is, why it is carried as data apart from the code, the description file,
`cargo xtask firmware`, PINNACLE_NO_FIRMWARE=1, the boot log and
Settings. roadmap.md's Wi-Fi row: WPA2's handshake and Intel's stage 1,
untried, with the PNVM, configuration, scanning, joining and packets
next, needing a laptop.
docs/hardware.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 docs/roadmap.md  |  2 +-
 2 files changed, 53 insertions(+), 3 deletions(-)

diff --git a/docs/hardware.md b/docs/hardware.md
index d688605..529a0ad 100644
--- a/docs/hardware.md
+++ b/docs/hardware.md
@@ -109,6 +109,7 @@ run on a real machine yet.
 | AHCI (`drivers/ahci.rs`) | each port with a SATA disk, up to 16 commands in slots of their own; optical drives left alone | PCI class 01:06:01 |
 | Intel HDA sound (`drivers/hda.rs`) | the controller reset, its codecs found and spoken to through the command rings (CORB/RIRB; the immediate registers when those do not answer); the first codec with an analog output walked from the speaker's pin and the headphone jack's to a converter, through mixers and selectors, all powered, unmuted at 0 dB, EAPD on; one output stream of 10 ms periods from the kernel's mixer (48 kHz 16-bit stereo), its interrupt as each completes, the position from LPIB; the speaker off while headphones are in (the jack's unsolicited response) | PCI class 04:03 |
 | Intel Ethernet (`drivers/e1000.rs`) | the e1000e family: the 82574L, 82579, and the chipsets' I217, I218 and I219; one ring each way, its interrupt by MSI | PCI 8086, by ID |
+| Intel Wi-Fi (`drivers/iwlwifi.rs`; the formats in `pinnacle_wifi::iwl`), **as far as its firmware's start**: AX201 (the 22000 family's Qu/QuZ MAC with an HR radio, the CNVi of 10th and 11th generation Core), AX211 (the AX210 family's So or Ma MAC with a GF radio, 12th generation on) and the AX210 card (Ty) | BAR 0 mapped; the MAC's and radio's types and steps read (`CSR_HW_REV`, `CSR_HW_RF_ID`, else the CRF ID) and the firmware file chosen as Linux names it; the chip taken (`PCI_OWN_SET`), reset, woken (`INIT_DONE`, `MAC_ACCESS_REQ`), power-gated as an integrated 22000 wants; Intel's closed firmware read from `system:/firmware/intel/` ("Closed firmware" below), its sections each in DMA memory of their own; a context info (22000) or context info v2, periphery scratch and image loader (AX210 family) pointing at them, at a 512-entry receive queue and a command queue; the CPU started, the ALIVE cause polled, the receive buffers then given, the ALIVE notification read and printed (status, LMAC and UMAC versions, SKU) and the PNVM section for that SKU found. Then the chip is reset and its bus mastering turned off: scanning, joining and packets are the next stage. **Untried**: QEMU has no Intel Wi-Fi | PCI 8086:02f0, 06f0, 34f0, 4df0, 43f0, a0f0, 51f0, 51f1, 54f0, 7af0, 7e40, 2725 |
 | The keyboard controller (`drivers/ps2.rs`, PC only) | a laptop's own keyboard (set 1, translated by the controller) and its touchpad as a PS/2 mouse, with a wheel where it says so; interrupts 1 and 12 through the I/O APIC | ports 0x60, 0x64 |
 | The firmware's screen (`board::pc`, `drivers::scanout`) | the framebuffer UEFI's GOP left lit, as the loader passes it on: 32-bit RGB either way round, or 16-bit 5-6-5, in the mode the firmware set; written through a window of its own mapped write-combining (IA32_PAT's entry 1, as Linux has it; the direct map is uncached there), an `sfence` after each copy, and the boot log says how long a whole frame takes each way (`display: a whole frame … us write-combining, … us uncached`); the boot log drawn on it (`drivers::screen_log`) until the display server takes it | Multiboot2's framebuffer tag |
 | Intel graphics (`drivers/i915.rs`), Skylake (Gen9) to Alder Lake (Gen12) | the function at 00:02.0 claimed and its registers (BAR0) mapped; the panel's backlight through the chipset's PWM, as the firmware left it on: Sunrise and Kaby Point's BLC_PWM_PCH_CTL1/CTL2 (0xC8250, 0xC8254: period and duty cycle 16 bits each), Cannon Point's on (Coffee Lake to Alder and Raptor Lake) control, period and duty registers of their own (0xC8250, +4, +8; the controller the firmware left on), the chipset told by the ISA bridge's ID at 00:1f.0; never below 5 %; `brightness` system call (72), a slider in Settings → Screen, kept in `/settings/brightness` | PCI 8086, class 03:00 |
@@ -136,7 +137,9 @@ controllers, `INT34xx`: an I²C touchpad is read every 8 ms instead of
 when its line says), a touchpad's precision mode (fingers, gestures,
 palm rejection: only its mouse report is read), I²C keyboards and touch
 screens, LPSS controllers firmware hides from PCI (its "ACPI mode"),
-Intel's Wi-Fi; of Intel's graphics all
+Intel's Wi-Fi past its firmware's ALIVE (the PNVM handed over, the
+firmware's configuration commands, scanning, joining, packets: they wait
+for a laptop that answers); of Intel's graphics all
 but the backlight: no modesetting (the screen stays in the mode the
 firmware set, and a panel whose native resolution needs more than the
 kernel's 16 MiB framebuffer is shown at the loader's smaller mode), no
@@ -225,9 +228,56 @@ once a finger moves, `usb0: xHCI`, each
 USB device and hub, `nvme0:`, `hda: codec 0: 10ec:0257, speaker on pin
 0x14, headphones on 0x21 (out), EAPD on` (the codec and its pins; a
 second codec with only HDMI says `no analog output`), `net: Intel
-Ethernet`. The last line is where it stopped. Sound at start is the
+Ethernet`, then Intel's Wi-Fi: `iwlwifi: Intel AX201 (8086:a0f0) at
+pci@00:14.3`, `iwlwifi: MAC Qu step 2 …, radio HR2 step 1 …` (what
+chose the file), `iwlwifi: Intel's closed firmware, as data:
+system:/firmware/intel/iwlwifi-Qu-c0-hr-b0-77.ucode …`, and `iwlwifi:
+ALIVE from …: status 0xcafe (running), LMAC …, UMAC …` — or `iwlwifi:
+stopped at <step>: …` with the registers that say why (`ownership`: Intel's
+ME holds the chip; `firmware file`: a system built without it; `ALIVE`:
+the firmware did not start, with its secure boot status and program
+counters). The last line is where it stopped. Sound at start is the
 self-check's 440 Hz tone, 300 ms.
 
+## Closed firmware
+
+Every driver in Pinnacle is its own Rust. Some chips start only with a
+program from their maker loaded into them: Intel's Wi-Fi does, and that
+program is closed (no source, and its licence forbids taking it apart).
+Pinnacle carries such firmware **as data, apart from its own code**: it
+is read from the system disk and handed to the chip, never run on the
+computer's own cores, and nothing of it is in this repository.
+
+- `firmware/<name>.txt` describes each package: what it is, whose (the
+  vendor), its licence and where that is, the source (a linux-firmware
+  tag and commit), and for each file its path there, its size, its
+  SHA-256, and which chips (PCI IDs, MAC and radio) it serves. Today one:
+  `firmware/intel-wifi.txt`, Intel's Wi-Fi for the AX201, AX210 and AX211
+  (`iwlwifi-Qu-b0-hr-b0-77.ucode`, `-Qu-c0-`, `-QuZ-a0-` for AX201;
+  `iwlwifi-so-a0-gf-a0-89.ucode`, `-ty-`, `-ma-b0-` with their `.pnvm`
+  for AX210 and AX211), and Intel's licence file.
+- `cargo xtask firmware` fetches the files from git.kernel.org at that
+  commit into `target/firmware/<name>/`, and refuses any whose size or
+  SHA-256 differs from the description.
+- A PC's system disk (`cargo xtask pc`, `laptop`, `installer pc`, and so
+  what an installation copies) carries them in `system:/firmware/intel/`,
+  the description and the licence beside them; it fetches them first if
+  they are not there yet, and goes without them (and says so) when they
+  cannot be fetched. `PINNACLE_NO_FIRMWARE=1` builds a system with none:
+  the Wi-Fi driver then says `stopped at firmware file: … is not on the
+  system disk` and the radio stays off. ARM's system disk carries none.
+- The boot log says what is closed when it is used: `iwlwifi: Intel's
+  closed firmware, as data: system:/firmware/intel/<file>`.
+- Settings → Hardware says it per driver: `open driver`, `open driver +
+  closed firmware (Intel, <file>)` once the driver has read that file for
+  its chip, and `no driver` for what no driver took.
+
+Which file a chip takes follows Linux's naming
+(`iwlwifi-<mac>-<step>-<radio>-<step>-<API>.ucode`): the API version is
+the newest Linux asks for (77 for the 22000 family, 89 for the AX210
+family). Chips this set does not cover (a CDB "gf4" radio, Wi-Fi 7's
+FM, Meteor Lake's Ma at step A) are named in the boot log with why.
+
 ## Disks and partitions
 
 A disk with a GPT partition table is read as its partitions: Pinnacle's
diff --git a/docs/roadmap.md b/docs/roadmap.md
index 6ce66f1..5d61179 100644
--- a/docs/roadmap.md
+++ b/docs/roadmap.md
@@ -26,7 +26,7 @@ What is still missing for daily use, and the projects it will take, is in
 | Through NATs, with no server: a device keeps two introducers, nodes it pings every twenty seconds so its NAT keeps a way in from each, and names them and its address on its own network in its presence record; a HELLO goes to the contact's published and local addresses, and each introducer passes the contact a PUNCH saying where it sees this device, so the contact sends a HELLO back and both NATs let the other through (a PUNCH is not signed, so it only says where a HELLO goes, never where a session sends; once a second at most); tested between simulated routers that map once or per address, filter by address and port, forget a mapping after 30 s and do not hairpin: two homes behind ordinary NATs, one behind a symmetric NAT and one behind a full-cone NAT or none, two devices behind one router, and after five quiet minutes | Done (two NATs that each map anew per address, or one of those and one that filters by port, need a relay through a contact: not built; untried between real routers) |
 | Reliable, ordered streams between contacts over those sessions (`p2p::stream`): numbered frames, cumulative and selective acknowledgements, a window of 64, timeouts from the measured round trip; a stream outlives any one session, so a new handshake or a move carries on with what is unacknowledged; reset when the contact restarts or is not heard from for five minutes | Done (200 kB arrive whole with one datagram in five lost and every step reordered; the remote terminal runs on them) |
 | Calls: video and voice peer to peer over UDP, encrypted; own video codec and ADPCM; a stand-in camera and tone on QEMU; a call by video or by voice only, the microphone muted and the camera turned off in a call (nothing of it sent, the other side showing the caller's mark), a ring during another call answered busy, a number typed in and called by phone; every call kept in the app's folder (who, which way, how, when, how long) and listed under Recent, a missed one a notification and counted on its tab (s924) | Done in QEMU; camera, microphone, speaker come with hardware drivers |
-| Wi-Fi (`wifi`, the `wifi` service, Settings → Wi-Fi): the networks nearby with their signal and protection, joined with a password typed as dots, a wrong one refused and said so; each network joined kept with its password in the vault (`data:/wifi/networks`, never on the radio: `AT+SYSSTORE=0`) and joined again by itself after a start or a network lost; a driver over ESP-AT on the kernel's third radio port, simulated access points in `cargo xtask` (`wifi-demo`) | Done in QEMU (the radio joins but carries no packets yet: the network stays virtio-net's; no driver for a phone's or laptop's own radio, e.g. the RK3399 boards' SDIO Broadcom; no hidden networks or WPA2 Enterprise) |
+| Wi-Fi (`wifi`, the `wifi` service, Settings → Wi-Fi): the networks nearby with their signal and protection, joined with a password typed as dots, a wrong one refused and said so; each network joined kept with its password in the vault (`data:/wifi/networks`, never on the radio: `AT+SYSSTORE=0`) and joined again by itself after a start or a network lost; a driver over ESP-AT on the kernel's third radio port, simulated access points in `cargo xtask` (`wifi-demo`). For a laptop's own radio: WPA2-Personal's handshakes for a radio that leaves them to the host (`wifi::wpa`); Intel's AX201, AX210 and AX211 (`drivers/iwlwifi.rs`, `hardware.md`) as far as their firmware's start: the chip named, its firmware chosen as Linux names it and read from `system:/firmware/intel/`, loaded by context info (22000 family) or context info v2 with the image loader (AX210 family), the ALIVE notification read; Intel's closed firmware carried as data, apart from the code (`firmware/intel-wifi.txt`, fetched and checked by `cargo xtask firmware`, left out with `PINNACLE_NO_FIRMWARE=1`, said per driver in Settings → Hardware) | Done in QEMU for ESP-AT (the radio joins but carries no packets yet: the network stays virtio-net's; no hidden networks or WPA2 Enterprise). Intel's Wi-Fi, stage 1 (2026-11-30): written from Linux's flow and **untried** (QEMU has no Intel Wi-Fi; the firmware's container and the boot structures are tested on the host, against Intel's own files). Next, and they need a laptop that answers: the PNVM handed over, the firmware's configuration commands, scanning, joining (with `wifi::wpa`), packets. No driver yet for a phone's or board's radio (the RK3399 boards' SDIO Broadcom) |
 | Ordinary phone calls as the fallback (`modem`, the `phone` service): a contact the DHT does not find, or whose device does not say within 8 s that the ring arrived (its p2p service answers RING with RINGING at once), is called on their phone number instead; a call to the device's number rings in Calls, its caller named from the contacts by the number's last nine digits. A modem driver over AT commands (SIM PIN, registration, ATD with +COLP, ATA, +CHUP, +CLIP), the kernel's second serial port, and a simulated cell network in `cargo xtask` | Done in QEMU (the call's sound is the modem's PCM to the board's codec: with the board) |
 | Texts (SMS) to people with no Pinnacle: Messages lists everyone in the address book, and writes to a person with only a phone number by text through the phone service, the conversation marked "SMS · not encrypted"; a number in no contact that texts has a conversation of its own, and a text that comes is a notification. The modem driver sends and receives in PDU mode (`AT+CMGF=0`, `+CMGS` with its `>` prompt, `+CNMI` handing texts over as `+CMT`), GSM's 7-bit alphabet or UCS-2, long texts in parts and put back together (`modem::pdu`, checked against 23.040's own examples); texts kept in the vault (`data:/phone/texts`); the simulated cell network carries them, a friend there answers (`cargo xtask sms-demo`), and the self-check texts the landline. A contact with a Pinnacle whose device does not say within 8 s that a message arrived (its p2p service answers each with DELIVERED), or whom the DHT does not find, is texted on their number instead, as Calls falls back (`p2p::delivery`); their texts and the messages that went so show in the one conversation, marked "SMS · not encrypted" (`cargo xtask pair`) | Done in QEMU (a message that arrives late after all comes twice, and one the network refused shows as sent once read again; texts that came while the phone was off stay on the SIM, unread; no delivery reports, MMS or group texts; untried on a real modem and network) |
 | Own TrueType reader (`ttf`), replacing `fontdue` (the last third-party crate) | Done |