Efuse programming: port the vendor PG-packet write path (append-only logical-map updates)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 12/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- c
- 領域
- embedded-iot
調査の方向性
Start with the existing read power sequence in src/jaguar1/EepromManager.cpp and the 8822E OTP path in src/jaguar3/HalJaguar3.cpp; compare them with the vendor write primitives and packet format. Implement the generation-neutral encoder in src/ with pseudo-test coverage before attempting hardware-specific writes. Done means safe dry-run and space accounting, verified packet writes with recovery, and family-specific hardware validation; burns require sacrificial adapters.
索引モデルが issue の本文から書いたものです。
説明
Motivation
The vendor drivers ship a full efuse-programming stack (rtw_efuse_map_write → Efuse_PgPacketWrite → efuse_OneByteWrite, exposed as the MP-mode iwpriv efuse_set wmap,...). Devourer is read-only. Mirroring the write path lets us permanently fix MAC/board-option/ID fields on adapters — including resurrecting corrupt-efuse units — without carrying a vendor kernel module around.
Prerequisite: #284 (logical-map override). Its dump + patch grammar is the authoring format, and the RAM-only override is the mandatory pre-burn validation step: dump → edit → run with override → validate on-air → burn.
Write model (mirror of rtw_efuse_map_write)
Efuse is one-way: blank bytes read 0xFF, programming only pulls bits toward 0, nothing is ever erased. "Overwrite" = diff the desired logical map against the current one, encode only the changed 2-byte word-units as new PG packets, append them at the current end of the physical chain (Efuse_GetCurrentSize); later entries shadow earlier ones at materialization time.
Delivery: a dedicated efusetool example (dump / diff / dry-run / burn) — not wired into the demos. Dry-run is the default and prints the exact packet list + physical byte cost vs. remaining budget; burning requires an explicit flag, and MAC/VID/PID regions a second one.
Implementation details / hazards
- The write-mode power sequence is not the read one. Devourer's
EfusePowerSwitch8812A(src/jaguar1/EepromManager.cpp:1322) only implements the read bracket; the vendor write path additionally raises programming voltage (LDO bits +REG_EFUSE_BURN_GNT= 0x69, thebWritebranch). Getting it wrong does not error — it produces silent partial burns. Port verbatim per chip. - Per-generation write primitives diverge. Jaguar1: one-byte protocol on
EFUSE_CTRL0x0030. Jaguar2/3 vendor writes go through HalMAC (halmac_write_efuse), and our HalMAC port is read-only — decide between porting the halmac write entry points vs. raw-register writes with re-derived brackets. 8822E is a third primitive entirely: OTP power-cut + burst bracket, V1 register layout (RDY at bit 29, 11-bit address field) (src/jaguar3/HalJaguar3.cpp:522-573). - 8822E burns must happen pre-
InitWrite— the existing cache comment records that post-bring-up OTP access is unreliable (TX/coex interference).efusetoolon Jaguar3-E is a dedicated cold session, never a live-device operation. - Space accounting is chip-specific and unforgiving. Extended 2-byte headers past section 16 (Jaguar1/2), packed 2-byte headers everywhere on 8822E, and the vendor reserves an OOB-protect tail (
EFUSE_OOB_PROTECT_BYTES) that must never be consumed. Overrun = chain tail lands in reserved space → undefined parse on next boot. badwordenrecovery is mandatory. Vendor verifies each word post-burn and re-programs failed words in a fresh packet; without it a marginal cell silently corrupts the value and wastes the space. Read-back verify + retry from day one.- Interrupted-burn risk is real on USB. The header must precede data (the chain is positional), so an unplug mid-packet leaves a header pointing at 0xFF data and everything after may misparse. No clean mitigation exists: keep burns single-packet-small, re-parse and verify the full chain after each packet, document "don't burn through a flaky hub".
- Port the vendor efuse masks (per-chip protected-byte arrays covering calibration: xtal, thermal baseline, TX-power PG). Without them one typo'd offset permanently spends spare space shadowing a calibration byte.
- Testability without sacrificing hardware: port the vendor's
bPseudoTestidea as a simulated efuse backend so diff→packet→space→extended-header logic runs as headless ctest selftests. Hardware validation still needs a sacrificial adapter — every burn, including successful tests, permanently spends bytes; budget the test plan honestly (a handful of burns per adapter lifetime). - Shared logic placement: the diff→PG-packet encoder is generation-neutral pure code →
src/next toPhyTableLoader; only the byte-read/byte-write/power-bracket primitives live per-HAL.
Scope exclusions
- BT efuse bank (8821A) — out.
- Kestrel families — out.
- PCIe 8821CE: likely works through
RtlAdapter, but theis_usb()power-seq gates need checking before claiming it.
Suggested milestones
- Pseudo-test backend + PG-packet encoder + space accounting in
src/, headless selftests (incl. extended-header and 8822E packed-header encodes). - Jaguar1 write primitive (power bracket + one-byte write + read-back verify), validated on a sacrificial 8812AU: burn one scratch logical byte, cold-cycle, confirm shadowing.
efusetoolUX: dump / diff vs. #284 patch file / dry-run / burn, masks enforced.- Jaguar2, then Jaguar3-8822C, then 8822E primitives — each gated on having a sacrificial adapter of that family.
- 主要言語
- C
- スター
- 56
- フォーク
- 29
- 平均マージ
- 3時間 43分
- マージ済み PR(30日)
- 75
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenIPC/devourer のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Follow-ups left open by the 8822B fast bandwidth toggle fix (#584)対応中かも @josephnef が今日担当しました。 オープンenhancement
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
OpenIPC/devourer#579 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 8/100
メンテナーはふだん 1 日以内に返信
OpenIPC/devourer の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 2 日以内に返信
-
issue: bug report
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
cross-platform fix-now
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
feature:index kind:crash status:confirmed triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
clice-io/clice#1123 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信