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>
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>
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>
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>