Commit Graph
11709 Commits
Author SHA1 Message Date
gensokyo-dev 3d41ed79ac perf(firmware): measure each literal-pool peripheral name once
The literal-pool representation pass recounted a peripheral name's UTF-8
bytes and built an `svd:` group key from it for every access, and grouping
built that key again per access. With 16,384 loads of one 1 MiB name, a
default call copied about 16 GiB of text and took about 20 s to refuse.

Grouping now keys an index on the identity itself (peripheral name, block
name or page), so a name is hashed once per string. The measurement pass
caches each name's byte length. The same refusal now takes about 0.4 s.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-03 21:19:29 +08:00
gensokyo-dev f06019cf09 docs(firmware): document inspect_firmware_mmio
Merge the literal-pool and split-immediate guides into one firmware MMIO
guide covering both instruction tables, the shared access rows and groups,
attribution basis, budgets and the firmware-mmio view. Update the
documentation index, firmware overview and skill reference.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-03 21:19:29 +08:00
gensokyo-dev 766c45de1d feat(firmware)!: replace the literal-pool and split-immediate MMIO tools with inspect_firmware_mmio
inspect_firmware_literal_pools and inspect_firmware_mmio_synthesis answered
the same question and differed only in the instruction idiom they decode.
One tool, inspect_firmware_mmio, now takes a single architecture vocabulary
across all nine ISAs and dispatches to the literal-pool or split-immediate
decoder.

Both decoders write the same report:
- accesses rows: instruction, address register, access kind and width,
  address and MIPS physical address, region kind, architectural block, and
  CMSIS-SVD peripheral and register facts;
- a source object with the decoder's own facts: pool slot and disassembly,
  or pattern and high instruction;
- decoder facts on the report.

firmwareMmioGroups.ts owns grouping MMIO accesses by SVD peripheral,
architectural block or 4 KiB page. mmioAttributionBasis owns the group
basis. The retained view kind is firmware-mmio, with collections accesses,
peripheral_groups and anomalies, and its summary lists the top 16 groups as
compact rows.

max_references and max_syntheses are removed, since max_representation_bytes
already bounds the rows they counted. The literal-pool pre-allocation
measurement now includes an upper bound for each group, so its refusal
reports the exact required bytes. max_scan_bytes defaults to its 16 MiB
maximum, so one call covers a whole application image. mmio_only, default
true, now also drops literal-pool constants that are not MMIO;
counts.candidate_accesses still counts every decoded access.

BREAKING CHANGE: inspect_firmware_literal_pools and
inspect_firmware_mmio_synthesis (CLI inspect-firmware-literal-pools and
inspect-firmware-mmio-synthesis) and the retained view kinds
firmware-literal-pools and firmware-mmio-synthesis are replaced by
inspect_firmware_mmio (inspect-firmware-mmio) and view kind firmware-mmio.
isa becomes architecture, max_svd_nodes becomes max_svd_xml_nodes, and
max_references and max_syntheses are removed. Neither old tool has been
released.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-03 21:19:29 +08:00
gensokyo-dev 9b8eb0b07e fix(firmware): bound competing peripheral names in ambiguous CMSIS-SVD anomalies
An address claimed by N overlapping CMSIS-SVD peripherals produced an
anomaly that listed all N names. With 4,000 overlapping peripherals each
such anomaly was about 20 KB, so 1,024 ambiguous addresses built a report
over the 16 MiB representation budget and the call was refused.

Each anomaly now names the first 8 candidates in name order and counts the
rest, and is charged at its actual size.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-03 21:19:29 +08:00
Vincent Koc f9e363435f refactor(analysis-view): project native observation rows directly (#16351) 2026-12-03 13:17:30 +00:00
Vincent Koc 7a06eba0f5 test(javascript): share literal mapping assertions (#16360) 2026-12-03 13:16:39 +00:00
Vincent Koc 6cf887e72d test(mcp): share LabVIEW retained page fixtures (#16362) 2026-12-03 13:16:35 +00:00
Vincent Koc a095642e2c test(ci): share missing timing history assertions (#16359) 2026-12-03 13:10:36 +00:00
Vincent Koc 80108ae89e test(mcp): share web bundle view fixture calls (#16352) 2026-12-03 13:01:34 +00:00
Vincent Koc 655e939d6e test(nib): share registered object fixture tables (#16350) 2026-12-03 13:00:14 +00:00
Vincent Koc 744ed63c1b refactor(analysis-view): derive firmware summary from report schema (#16346) 2026-12-03 12:54:10 +00:00
Vincent Koc e20f706558 test(gpu): share kernel inventory fixture setup (#16345) 2026-12-03 12:45:05 +00:00
Vincent Koc a0d9275951 test(png): share chunk encoding across image fixtures (#16347) 2026-12-03 12:44:47 +00:00
Vincent Koc 663e48fd73 refactor(analysis-view): share source-text result assembly (#16343) 2026-12-03 12:44:39 +00:00
Vincent Koc 085ffaf5f3 test(cli): share failure-output fixture setup (#16344) 2026-12-03 12:34:26 +00:00
Vincent Koc 9958666968 test(evidence): share health record fixtures (#16342) 2026-12-03 12:34:15 +00:00
Vincent Koc d422981f4d refactor(docs): share product catalog reference checks (#16340) 2026-12-03 12:29:16 +00:00
Vincent Koc e79a913f20 refactor(javascript): share semantic query context (#16339) 2026-12-03 12:20:05 +00:00
Vincent Koc ae19a87dd5 refactor(cli): share help row alignment (#16336)
* refactor(cli): share help row alignment

* test(cli): cover blank help description spacing
2026-12-03 12:19:10 +00:00
Vincent Koc 7e1cb05849 refactor(domain): share string and name comparison results (#16334) 2026-12-03 12:18:48 +00:00
Vincent Koc 1b3e3ee83e test(analysis-view): reuse graph binding for source fixtures (#16338) 2026-12-03 12:18:28 +00:00
Vincent Koc aef3fb790d test(api-contract): share retained view fixture calls (#16335) 2026-12-03 12:08:11 +00:00
Vincent Koc 20230a138d refactor(native): share NativeAOT summary fields (#16332) 2026-12-03 12:01:38 +00:00
Vincent Koc 34599ec5ff test(cli): share instructions completion fixtures (#16330) 2026-12-03 12:00:02 +00:00
Vincent Koc 175fc298af refactor(cli): share projected flag binding lookup (#16333) 2026-12-03 11:55:42 +00:00
Vincent Koc 4caa302c80 test(environment): share recorded probe fixtures (#16331) 2026-12-03 11:51:49 +00:00
Vincent Koc 57274a7cdf refactor(desktop): share XML selector container checks (#16329) 2026-12-03 11:44:05 +00:00
Vincent Koc dd20f6d42b test(oci): share index fixture reads (#16328) 2026-12-03 11:41:48 +00:00
Vincent Koc 3132c9a88b perf(cli): reuse encoded Markdown table cells (#16326) 2026-12-03 11:31:05 +00:00
Vincent Koc 10dda6557d refactor(gpu): share PTX kernel location construction (#16325) 2026-12-03 11:30:46 +00:00
Vincent Koc b635ff751e test(cli): share timing flag fixture matrix (#16327) 2026-12-03 11:29:03 +00:00
Vincent Koc 387ddfebc2 test(environment): share linked create note fixtures (#16324) 2026-12-03 11:28:40 +00:00
Vincent Koc 1ef2caafde refactor(model): share complete and partial Evidence projection (#16322) 2026-12-03 11:19:51 +00:00
Vincent Koc 4b2e58d219 refactor(cli): share delimited metadata owner lookup (#16323) 2026-12-03 11:18:45 +00:00
Vincent Koc 1b6bc54cea test(javascript): share semantic graph binding lookups (#16321) 2026-12-03 11:15:42 +00:00
Vincent Koc a290975e53 refactor(protobuf): share trailer observation failures (#16319) 2026-12-03 11:10:35 +00:00
Vincent Koc d3e70b88a2 test(cli): share logged command fixture execution (#16320) 2026-12-03 11:00:55 +00:00
Vincent Koc d29a15d6b3 test(initializers): share ARM64 fixture reads (#16318) 2026-12-03 11:00:14 +00:00
Vincent Koc 95ef54b525 refactor(views): share JavaScript application page results (#16316) 2026-12-03 10:55:00 +00:00
Vincent Koc c41d023097 test(macos): share package resource fork fixtures (#16315) 2026-12-03 10:49:15 +00:00
Vincent Koc baaabb3dfa test(cli): share accessibility comparison result checks (#16317) 2026-12-03 10:46:10 +00:00
Vincent Koc 795bb16dbc refactor(pyinstaller): share opaque PYZ result construction (#16313) 2026-12-03 10:38:46 +00:00
Vincent Koc b013a2ff28 test(cli): share analysis view request fixtures (#16314) 2026-12-03 10:36:10 +00:00
Vincent Koc e414ae0fd2 test(javascript): reuse source-to-bundle graph fixtures (#16312) 2026-12-03 10:35:29 +00:00
Vincent Koc d5ed402722 test(plist): share native CLI fixture invocations (#16310) 2026-12-03 10:30:12 +00:00
Vincent Koc 958864a2ac test(swift): share relative pointer fixtures (#16308) 2026-12-03 10:24:53 +00:00
Vincent Koc 5dd322bc9c refactor(openapi): share path operation context (#16309) 2026-12-03 10:10:42 +00:00
Vincent Koc 42799e8321 refactor(wasm): share facet view result construction (#16306) 2026-12-03 09:58:05 +00:00
Vincent Koc 517e92b267 test(dotnet): share managed artifact inspector fixtures (#16305) 2026-12-03 09:49:25 +00:00
Vincent Koc 246f63a304 test(cli): share Unicode output capture setup (#16307) 2026-12-03 09:49:21 +00:00