All notable changes to soc-consistency are documented here. Releases follow Semantic Versioning.
meta-socc Yocto layer: BitBake 6.0 (Yocto 6.0 wrynose) compatibility.
LAYERSERIES_COMPAT in meta-socc/conf/layer.conf now covers
mickledore nanbield scarthgap styhead walnascar whinlatter wrynose
(Yocto 4.2 → 6.0), so the layer passes BitBake’s compatibility gate on
the yocto-6.0.1 release instead of being rejected as “layer not
compatible”. No other changes were needed: the socc.bbclass gate and the
recipe use only stable BitBake core APIs (d.getVar, bb.utils.which,
bb.warn/bb.note/bb.fatal, addtask), which are unchanged in 6.0.
socc itself is pure Python and does not depend on BitBake, so the tool is
unaffected.A full-codebase audit release: ~65 verified bugs fixed across the parser, analysis engines, rule packs, simulation engine, CLI, and generators.
&label { ... }; override nodes are now parsed — the
standard form in board DTS files and overlay sources. Overrides are merged
into their labelled target (properties, children, and /delete-*/
directives applied); unresolved overrides are kept for the overlay merger.<(-40000)>, <(1 << 2)>
and friends now evaluate to integers instead of raising SyntaxError.regulator-always-on;,
interrupt-controller; etc. now parse as True and are visible to rules.Regulator.always_on / Regulator.boot_on model fields, populated
from DTS; vin-supply phandles now build real parent links and power-tree
edges (FMEA blast radius, shell cascades, and PD/PS checks see a real tree).IRNode.parent / IRNode.children / real hierarchical path /
source_line populated by the mapper; same-named nodes under different
parents no longer overwrite each other.socc check -o FILE and socc fix -o FILE — write the report / a
unified-diff patch to a file, as the README always documented.< arrays no longer hang the process; /omit-if-no-ref/
is no longer misapplied as a delete directive; /include/ no longer
swallows the following node; files ending in / or 0 no longer crash;
comma-separated phandle lists tokenize correctly.status as enabled per the DT spec and skips bus
slaves whose pinctrl lives on the parent controller. Rule exceptions go
to stderr (JSON/SARIF stdout stays machine-parseable); the registry now
rejects cross-bucket (common vs vendor) rule-code collisions.reg (no more crashes or phantom 4 GB regions); zero-size regions no
longer report false containment; smart-diff no longer crashes on
multi-cell changes and sees continuation lines / second entries; IRQ
checks resolve interrupt-parent = <&gic> correctly and key collisions
per interrupt domain; bounds checks every *-gpios/dmas/pwms entry,
not just the first; gc no longer resolves &gpio1 to gpio10@...;
deep dependency graphs no longer hit the recursion limit.reg
parsed correctly); RS-001 provider readiness derived from the model
instead of a hardcoded list; FMEA reports NOT_FOUND for unknown nodes
instead of “SAFE”.generate report no longer crashes; diff --ci enforces strict
exit codes; the violation cache keys on --netlist/--preprocess/
--include and the socc version (no more cross-option poisoning);
--since includes uncommitted changes; install-hook works in git
worktrees; missing-file arguments produce clean usage errors instead of
tracebacks; --strict with info-only findings exits 0 per the documented
contract; -o files no longer contain ANSI color codes.set -u exactly when a device is present; C headers emit correct 64-bit
base addresses; HTML reports escape DTS-derived content (script-injection
fix); ssh/scp targets are validated (-oProxyCommand= injection fix);
BOM audits survive short rows, cp1252 encodings, and 40h-style hex;
compliance reports no longer render compatibles character-by-character;
SKU audits detect order-significant property changes.IMX-101 CCM clock controller missingIMX-102 24 MHz reference oscillator missingIMX-201 companion PMIC (PCA9450 / BD718x7) missingIMX-202 VDD_ARM / VDD_SOC core rail missingIMX-301 IOMUXC pin controller missingIMX-302 GPIO pin index out of range (banks are 32 lines wide)Bus / interrupt / memory checks now apply to every vendor. The
constraint-driven BUS-4xx, IRQ-5xx, and MEM-3xx rules — previously
registered only for Rockchip — moved to the common rule set, so
Allwinner, Amlogic, Qualcomm, NXP, and any future vendor inherit them with
no duplication.
PD-009 (power-domains / power-domain-names mismatch) promoted to common.
The genpd list-length check is vendor-agnostic; it now runs for every SoC
instead of Rockchip only.
Allwinner IOMMU rule AW-301 — flags two masters bound to the same
<&iommu ID> cell (a copy-paste collision that silently shares one
translation context and defeats IOMMU isolation). Complements the common
DMA-001 presence check rather than duplicating it.
Amlogic security rule ML-301 — flags an eFuse (or other SMC-backed
peripheral) present without an amlogic,meson-*-sm Secure Monitor node, which
leaves the driver with no firmware interface to probe against.
Device-tree byte arrays are now parsed. Property values written as raw
byte strings (mac-address = [00 11 22 ff], local-mac-address = [aabbcc])
previously raised SyntaxError; the tokenizer now understands [ … ] and
decodes them to integer lists.
/delete-node/ and /delete-property/ directives are recognised. The
parser records them (deleted_nodes / deleted_properties) and applies
same-scope deletes instead of silently mis-skipping the following tokens.
socc generate qemu emits a buildable machine. The generated C machine
file now creates the CPUs, instantiates a GICv3 (with per-CPU IRQ/FIQ and
timer-PPI wiring), and a PL011 UART routed to its GIC SPI line — replacing
the previous /* TODO */ stubs.PD-007. Two unrelated rules shared the code:
the common IO-before-Core sequencing check and a Rockchip
power-domain-names count mismatch check. The latter is renamed to
PD-009 (and moved to the common rule set, see above) so each code maps
to exactly one rule (fixes ambiguous socc explain PD-007 and duplicated
findings on Rockchip targets).iommu_rules and sec_rules
previously carried near-duplicate, drifting copies of the DMA-master and
IOMMU-controller token sets. They now share
socc/rules/common/_classifiers.py, so a newly recognised DMA-capable IP
block is picked up by both the isolation and secure-memory rules at once.board.dts appears to require preprocessing.
Run preprocessor now? [y/N]
Default is N (safe). In CI / non-interactive environments the tool still fails immediately with the full diagnostic — no prompt, fully deterministic behaviour preserved.
--no-preprocess — Explicitly disables all prompting and preprocessing;
fails on unpreprocessed or binary input. Use in scripts to lock down
behaviour.
-y / --yes — Assumes yes to the preprocessing prompt without
requiring an interactive terminal. Intended for trusted scripts that know
the input needs preprocessing but don’t want an interactive session.
--include DIR (repeatable) — Passes extra -I<DIR> flags to cpp
during preprocessing. Essential when the DTS references kernel dt-bindings
headers:
socc check board.dts --preprocess --include /linux/include
| Situation | --preprocess |
--no-preprocess |
-y / --yes |
Result |
|---|---|---|---|---|
| Clean DTS | — | — | — | Parse normally |
| Raw DTS, TTY | — | — | — | Prompt [y/N] |
| Raw DTS, CI | — | — | — | Fail + hint |
| Raw DTS | ✓ | — | — | Preprocess silently |
| Raw DTS | — | ✓ | — | Fail immediately |
| Raw DTS, CI | — | — | ✓ | Preprocess silently |
#include, #define, #ifdef, …), DTS /include/ syntax, or
unexpanded dt-bindings macros (IRQ_TYPE_LEVEL_HIGH, GPIO_ACTIVE_HIGH, …),
socc now immediately prints a clear diagnostic instead of silently
mis-parsing the file:
This DTS appears unpreprocessed in 'board.dts' — found #include directive at line 1.
Run with --preprocess to let socc invoke cpp automatically, or preprocess manually:
cpp -x assembler-with-cpp -P board.dts > preprocessed.dts
socc check preprocessed.dts
Detection is comment-aware; CPP tokens inside /* */ or // comments are
never flagged.
--preprocess flag for socc check. Passes the input through an
external tool before parsing — no manual preprocessing step required:
.dtb binary → decompiled via dtc -I dtb -O dts.dts / .dtsi → expanded via cpp -x assembler-with-cpp -P
If the required tool is absent a clear install hint is shown.
--preprocess also bypasses the parse cache so the result is always fresh.socc/preprocess.py — new public module exposing detect_unpreprocessed,
preprocess_file, is_dtb, and UnpreprocessedDTSError for programmatic use.JSON/SARIF output corruption. Status messages (Loading device tree,
[cache] …) were written to stdout, prepending non-JSON text before the
report and making --format json / --format sarif unparseable by downstream
tools (e.g. jq, CI SARIF parsers). Status messages now always go to stderr.
(socc/commands/_shared.py)
IRQ-C02 false positive — ARM PMU (PPI 7). pmu-a55 / pmu-a76 nodes
were incorrectly flagged as using a reserved PPI. PPI 7 is the architecturally
assigned PMU interrupt and is perfectly valid for performance-counter drivers.
(socc/irqcheck.py — _RESERVED_PPI)
IRQ-C02 false positive — ARM architectural timer (PPIs 13/14/15).
arm,armv8-timer nodes were flagged; PPIs 13–15 are the correct ARM
architectural timer lines by specification. These nodes are now exempted from
the reserved-PPI check.
(socc/irqcheck.py — IRQ-C02 stage)
IRQ-C02 false positive — 4-cell GIC interrupt format (GIC-v3 / SMMU).
arm,smmu-v3 and other GIC-v3 peripherals encode interrupts as 4-cell tuples
<type number flags affinity>. The parser consumed them as 3-cell triplets,
misaligning subsequent entries and generating phantom IRQ collisions. The
parser now auto-detects stride-4 when the array length is a multiple of 4 but
not 3.
(socc/irqcheck.py — _parse_interrupts)
__version__ mismatch. socc/__init__.py reported 1.4.1 while
pyproject.toml declared 1.4.2; socc --version showed the wrong string.
Both files now agree on 1.4.3.
Credibility — CK-107 suggestion text.
Suggestion messages no longer contain fabricated clock IDs (CLK_USB3) or
hardcoded rates (500000000) that are irrelevant to HDMI, DSI, or PCIe
devices. Both suggestion variants now say “manual review required” and direct
the user to the SoC TRM and upstream kernel DTS.
"hdmi", "i2s", "spdif", "dma", "pl330",
"axi-dmac", "display", "drm" — all of which caused false positives.
Added exclusions for:
grf / syscon compatibles (config register banks, not DMA devices)-connector compatibles (connector stubs)pl330 / axi-dmac compatibles (DMA engine controllers, not clients)dmas property (they use the DMA engine; IOMMU belongs
to the engine, not the client)Result: DMA-001 violations reduced from 26 → 9 (all true positives: GPU ×1, USB ×4, AV1-VPU ×1, PCIe ×2, GMAC ×1).
OrphanedRegulator / power-domain sub-nodes.
power-domain@N sub-nodes on RK3588 have #power-domain-cells = <0x00>
(they accept no specifier; they ARE domains, not providers). The mapper now
only registers a node as a power-domain provider when
#power-domain-cells >= 1. Previously the presence check caused all 28
sub-nodes to be registered as providers, generating 26 spurious PD-006
violations.tests/test_regression_fp.py — focused regression test file (14 tests)
locking down the most credibility-critical false-positive fixes:
DMA-001 exclusions (GRF, I2S/SPDIF, pl330, connectors), CK-107 token safety
(fusb302, usbdpphy, -phy suffix), CK-107 suggestion quality, CK-106
provider:spec skipping, PD-006 power-domain@N exclusion, PD-007 severity.False positives — MM-006 RegisterAddressNodeNameMismatch.
Rewrote _all_addrs_from_reg() to correctly handle multi-region reg arrays
and 2-cell <addr size> forms. Previously, usb2phy@0, codec-sram@0,
video-codec@fdc38000, and both pcie@fe180000/fe190000 were flagged as
mismatches; all were false positives caused by only reading the first region
and misinterpreting 2-cell arrays as 64-bit hi/lo pairs.
False positives — CK-106 ClockSourceContention.
CRU/SCMI/CCF-managed clocks stored in provider:spec format are now skipped.
Linux CCF handles multi-consumer sharing via reference counting; flagging 4
USB controllers sharing the same CRU output as “contention” was incorrect.
False positives — CK-107 AssignedClockRatesMissing.
Removed "usb3" token (matched fusb302 USB-PD chip via substring "usb3"
in "fusb302") and "dp" token (matched csidphy-grf, usbdpphy-grf,
hdptxphy-grf syscon nodes and csi-dphy/hdptx-phy PHY nodes).
Added explicit exclusions for syscon, -connector, and -phy compatibles.
False positives — CK-104 ClockProviderOrphaned.
Added _link_device_clocks() pass in DTSMapper.map() to populate
ClockProvider.outputs from device_clocks. Providers such as the SCMI
protocol@14 clock controller were incorrectly flagged as orphaned even
though many devices consumed their clocks.
False positives — PD-006 OrphanedRegulator.
Power-domain controller detection now requires #power-domain-cells in the
node’s properties rather than matching by name pattern. Previously all 28
power-domain@N sub-nodes of the RK3588 power controller were incorrectly
registered as standalone regulators and immediately flagged as orphaned.
regulator-state-* sub-nodes (operating-mode descriptors) are also excluded.
False positives — DMA-001 / SEC-201.
display-subsystem virtual bus aggregator nodes are now excluded from DMA
master checks; they are not DMA devices themselves.
Severity — PD-007 IOBeforeCoreSequence downgraded to warning.
PMIC sub-regulators powered directly from VIN do not declare an explicit DTS
parent — this is the normal PMIC pattern. Raising these to error produced
noise on every PMIC-based board.
Polish — SARIF output your-org placeholder URLs replaced.
helpUri and informationUri now point to
https://github.com/gahingwoo/SoC-Consistency.
Polish — SARIF version field was hardcoded "0.2.0".
Now reads from socc.__version__ dynamically.
MissingIommuBinding — Detects DMA-capable devices (GPU, USB3, PCIe, VPU, GMAC …)
that lack an iommus property when an IOMMU controller is present. Silent DMA without
memory isolation is a common security hole on RK3588/i.MX8MP boards.IommuPhandelUndefined — Catches dangling iommus = <&label> references
that do not resolve to any known IOMMU/SMMU controller node.PowerDomainNamesMismatch — Flags devices where the number of entries in
power-domains and power-domain-names disagrees. of_pm_find_power_domain_dev()
silently returns NULL for unmatched entries, causing probe failure (ENODEV).MissingThermalSensor — Thermal zone without a thermal-sensors binding;
the kernel thermal driver cannot read temperature and the zone is inactive.MissingCoolingDevice — Passive thermal zone with no cooling-maps entry;
frequency scaling is never triggered and the zone reaches critical temp with no
intermediate cooling step.AssignedClockRatesMissing — USB3, PCIe, MIPI-DSI, HDMI, and other
rate-critical devices that have assigned-clocks but are missing assigned-clock-rates
will boot at the wrong frequency, causing silent malfunction.socc generate ci — Writes ready-to-use GitHub Actions (.github/workflows/socc-check.yml)
or GitLab CI (.gitlab-ci.yml) configuration that gates every DTS PR through socc check.
Options: --platform github|gitlab|both, --strict, --soc, --dts-glob.socc generate docs — Generates a structured Markdown or HTML peripheral inventory
from a DTS file — base addresses, clocks, voltage rails, IRQs, GPIO assignments — for
sharing with hardware teams. Options: --format markdown|html.socc audit sku — Multi-SKU DTS comparison: loads two or more board-variant DTS files,
reports conflicting property values and nodes present in some SKUs but absent in others.
Exits non-zero if any divergences are found. Options: --format table|json.socc check --binding — Invokes dt-validate (dtschema) if installed and appends its
findings after socc’s own violations, giving a combined socc + upstream binding audit in a
single command.Critical — SoC YAML data not bundled in wheel distribution.
All 26 SoC constraint YAML files are now copied into socc/data/soc/ and
included via package-data. Previously, pyproject.toml referenced a
non-existent Python package named data, causing setuptools to silently
omit every .yaml file from the wheel. Users who installed from PyPI
received an empty constraint set for all simulation runs.
Security — Path traversal in find_soc_yaml() and _load_bga_data().
Both functions now validate the soc_name / soc_lower argument against
^[a-zA-Z0-9][a-zA-Z0-9_\-]*$ before constructing file paths, preventing
a malicious --soc ../../etc/passwd-style argument from traversing outside
the data directory (OWASP A01).
Data path resolution for installed packages.
find_soc_yaml() and pinmap._load_bga_data() now check the
package-internal socc/data/soc/ tree first (works for pip install),
then fall back to the project-root data/soc/ tree (works for editable /
development installs). The previous implementation only checked the project
root, so wheel installs always fell back to an empty constraint set.
Renderer — misleading “No violations” message.
render_text() previously printed "No {min_severity}-level violations
found." even though the severity filter is inclusive (e.g.
min_severity=warning also includes errors). Changed to the unambiguous
"No violations found.".
PowerStateMachine.simulate_boot() is now documented
with a clarifying comment: because _topo_order() always processes parent
regulators before children, the check is unreachable in a well-formed power
tree traversal. It remains in place as a guard for callers that manipulate
states externally before calling simulate_boot().socc sim scenario)v1.3.0 introduces a full behavioural simulation engine that models the three state machines a Linux kernel runs at every boot, suspend, and resume cycle: power rail sequencing, clock gate/ungate cascades, and reset deassertion ordering.
Static rules can only see what the DTS says. The simulation asks what actually happens at runtime.
socc sim scenario board.dts --soc rk3588
socc sim scenario board.dts --soc rk3588 --scenario suspend --timeline
socc sim scenario board.dts --soc rk3588 --format json
socc sim scenario --demo --scenario all
| Scenario | Description |
|---|---|
boot |
Power-on and full device probe sequence |
suspend |
Linux PM suspend (s2idle / deep) |
resume |
Resume from suspend back to active |
runtime_pm |
Runtime PM autosuspend + wake cycle |
all |
Run all four in sequence (default) |
| Code | Severity | Scenario | Description |
|---|---|---|---|
PS-001 |
warning | boot | Supply does not meet required stability window before consumer probes |
PS-002 |
error | suspend | Supply disabled before consumer finishes suspend callback |
PS-003 |
error | boot / resume | Child regulator enabled before parent is fully stable |
CG-001 |
error | suspend | Clock gated while consumer device still active |
CG-002 |
error | suspend | Parent clock disabled while child clock has active consumers |
RS-001 |
error | boot | Device reset deasserted before required clock provider is ready |
RS-002 |
warning | boot | Device missing required resets property |
Timing requirements and ordering rules are read from the SoC YAML file
(simulation_constraints section). The shipped rk3588 constraints cover
power_sequencing, clock_gating, reset_dependencies, and
required_resets_patterns. Any custom SoC YAML can include the same section.
Catches copy-paste errors where the @hex suffix in a node name disagrees
with the first value of the reg property. dtc compiles such files
without warnings; the kernel maps the driver to the wrong MMIO window.
/* BAD */
i2c@fe2b0000 { reg = <0xfe2c0000 0x1000>; /* MM-006 */ };
Both 32-bit and 64-bit cell pairs are handled.
socc-expectComplements the existing socc-ignore. An expected violation that does not
fire produces info[SE-001] so stale annotations are surfaced immediately:
/* socc-expect: MM-006 -- fly-wire on board rev B */
i2c@fe2b0000 { reg = <0xfe2c0000 0x1000>; };
socc decompileAnnotates dtc decompile output with human-readable peripheral names from
the SoC database. Accepts .dtb or .dts input:
socc decompile board.dtb --soc rk3588
socc decompile board.dtb --soc rk3588 -o board_annotated.dts
socc check --strictBy default socc check exits 0 for warnings (only errors produce exit 3).
--strict restores full granular exit-code behaviour so CI can be configured
to treat warnings as failures.
socc explain CODEsocc explain BW-101
Renders with rich when installed, falls back to plain text.
socc smart-diff --semanticFilters the diff output to hardware-relevant property changes only —
clock frequencies, reg, supply rails, interrupt lines, pin-control settings,
etc. Node ordering, labels, phandle renumbering, and non-critical metadata
are silently dropped.
--soc produce helpful suggestions
(Did you mean: rk3588, rk3588s, rk3576?).socc check and socc diff return 0 / 1 / 2 / 3
for clean / info / warning / error respectively.--watch) — re-runs on file change.--format annotations).socc diff --ci — exits non-zero on any regression.~/.cache/socc/.socc sim shell launches IPython when installed.socc bootstrap — generate a working SoC constraint stub from mainline
.dtsi files in under two seconds.socc viz pinmap --format xlsx — Excel / CSV pin-assignment matrix
(requires openpyxl, pip install socc[xlsx]).socc-ignore suppression comments in DTS source..socc_ignore project-level exclusion file.--rules-dir).socc check --since REF — git-aware incremental check.socc install-hook — one-command git pre-commit integration.All flat command names continue to work as hidden aliases.
| Pre-1.1 command | 1.1+ equivalent |
|---|---|
socc gc |
socc analyze gc |
socc check-memory |
socc analyze memory |
socc check-bounds |
socc analyze bounds |
socc check-irq |
socc analyze irq |
socc check-deps |
socc analyze deps |
socc audit |
socc audit bindings |
socc audit-bom |
socc audit bom |
socc amp-audit |
socc audit amp |
socc cross-check |
socc audit cross-check |
socc generate-qemu |
socc generate qemu |
socc generate-diagram |
socc generate diagram |
socc export-headers |
socc generate headers |
socc topology |
socc viz topology |
socc pinmap |
socc viz pinmap |
socc power-seq |
socc viz power-seq |
socc shell |
socc sim shell |
socc live-check |
socc sim live-check |
socc simulate-smoke |
socc sim smoke |
socc simulate failure NODE DTS |
socc sim failure NODE DTS |
socc migrate |
socc sim migrate |
socc validate-socdef |
socc socdef validate |
socc check-socdef |
socc socdef check |