aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
GitHub aien-dev/aienux#468 (code only)
Fetch it
curl -fsSL https://interplane.io/drakestapleton/aienux/patches/c58ef386cdacb351.bundle -o c58ef386cdacb351.bundle git fetch c58ef386cdacb351.bundle refs/pull/468/head
Provenance
github-import 1
aien-dev/aienux
468
a978f17cc2d685858065dc9205e69396b44f12f5
{"kind":"github-import","owner":"aien-dev","repo":"aienux","number":468,"url":"https://github.com/aien-dev/aienux/pull/468","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:36:30Z","metadata":"unavailable","state_derived":true}
Changes
diff --git a/.crumb b/.crumb index 12d85264..6b915568 100644 --- a/.crumb +++ b/.crumb @@ -33,8 +33,8 @@ "purpose": "Directory docs. Purpose not yet described by a human." }, { - "digest": "8b81bbe64a067c5aeb6eb22561c27cd13a57774d7876ec2df337d9d2a00419fa", - "last_commit": "c01180eb", + "digest": "1b716d22758667b3d122dc64823eb251a8561f9cee50fa8dca357d0e384b548d", + "last_commit": "6dd64a0c", "name": "native", "purpose": "Directory native. Purpose not yet described by a human." }, @@ -51,15 +51,15 @@ "purpose": "First-party host artifact preparation tools" } ], - "children_root": "sha256:7c5afc1c612aef3f506be56d70fa538d5283bfd8f8c61fd2b8c4ef2566e99c0d", - "compiled_at": "2026-10-30T03:30:36Z", + "children_root": "sha256:9a51e4dbf367368f0a2ee86219d8cf4e1c8d5ca37506df08ecb5fad8d037380a", + "compiled_at": "2026-10-30T04:38:58Z", "compiler": "crumb-compile/1", - "digest": "sha256:620907d5d468f9bab21e07a9f7a61ab3f409aa6068e35bfceea6087f6aed1b41", + "digest": "sha256:ca9e40b904cf216ba3783d4df38fe90f47f7927287e6e2680b4cdb56f2c87cdf", "evidence_files": 236, "evidence_root": "sha256:55ef5621f09577ce1ada90d990955aec996d15e16a9b0f6953ecb90f3ca499df", - "files": 3549, - "generated_at_commit": "f94f6f6dca5fe9b92456fd990b507c740fab8108", - "source_tree": "sha256:e8ff761b687cf1bb56e327d32da3a32ad8082cb43871ecbb45eaa03bb00e17d0" + "files": 3557, + "generated_at_commit": "6dd64a0c588ba28904dd7efc7ed1a1655459005e", + "source_tree": "sha256:b87f0bb336351753589a7ecd074d4b52d96dec472b33965a805ae1da7d9780d1" }, "owner_lane": "", "provenance": { diff --git a/native/.crumb b/native/.crumb index 98c5072c..9894c75d 100644 --- a/native/.crumb +++ b/native/.crumb @@ -56,7 +56,7 @@ }, { "digest": "7569388becee7cad7f289570ed6dbb48be5350ccca1a4e31e4dc74fdfef6e963", - "last_commit": "41119ceb", + "last_commit": "89e296db", "name": "boot", "purpose": "Directory native/boot. Purpose not yet described by a human." }, @@ -80,7 +80,7 @@ }, { "digest": "d309a454c2bf3d88668768219b1411a2a6ed19ef917dc0204f42f28dc49d8f0b", - "last_commit": "41119ceb", + "last_commit": "c01180eb", "name": "kernel", "purpose": "Directory native/kernel. Purpose not yet described by a human." }, @@ -96,6 +96,12 @@ "name": "net", "purpose": "Directory native/net. Purpose not yet described by a human." }, + { + "digest": "f3c7ee4f18f768fa9964c123e07f076c544c58c0966a8a5e9571b0397bf57b06", + "last_commit": "9d8cbeb4", + "name": "omega", + "purpose": "Seeded Omega native modules" + }, { "digest": "e89066d6aa5c09de6f67671846971d09cf733e4620f713983ff29fae60321c9e", "last_commit": "f45d00ad", @@ -109,15 +115,15 @@ "purpose": "Directory native/store. Purpose not yet described by a human." } ], - "children_root": "sha256:18e350cf3062729f85a83252dce7001b33f885d554621b1abfd41573fa32e8c8", - "compiled_at": "2026-10-30T02:44:39Z", + "children_root": "sha256:a5430bc57246e68114cd4f646fb74922773408c792cfb900e17cebe21687ba12", + "compiled_at": "2026-10-30T04:38:58Z", "compiler": "crumb-compile/1", - "digest": "sha256:8b81bbe64a067c5aeb6eb22561c27cd13a57774d7876ec2df337d9d2a00419fa", + "digest": "sha256:1b716d22758667b3d122dc64823eb251a8561f9cee50fa8dca357d0e384b548d", "evidence_files": 24, "evidence_root": "sha256:ecc7ccf2e924c221a5bac1d91e23b13d8f3c8d78c2a893a882ed7ca5e88d855d", - "files": 649, - "generated_at_commit": "ab7768c0dca2ffe6a6b03c722b280ebadde2b971", - "source_tree": "sha256:9855e3d4ad174a4d24f541132b7c39b942fc65ef63d7488ef15e40350799abb2" + "files": 657, + "generated_at_commit": "6dd64a0c588ba28904dd7efc7ed1a1655459005e", + "source_tree": "sha256:16d3440f3390586c8904b87076004f16f4fcb861d69db9409b1b4ecf4955b780" }, "owner_lane": "", "provenance": { diff --git a/native/omega/.crumb b/native/omega/.crumb new file mode 100644 index 00000000..1c75880b --- /dev/null +++ b/native/omega/.crumb @@ -0,0 +1,26 @@ +{ + "extensions": { + "generated": { + "children": [ + { + "digest": "5b8954046044cd9e509cf3696330a580e8bdb515ee73f500184be22daa1dc1bb", + "last_commit": "92e4bc6", + "name": "platform", + "purpose": "Spark read-only ACPI resource readback" + } + ], + "children_root": "sha256:fcc350d101f87cb9e531f243a85d6664b62bbe63cf4b8c71b61bcb4d63d3e9b0", + "compiled_at": "2026-10-28T23:11:15Z", + "compiler": "crumb-compile/1", + "digest": "sha256:f3c7ee4f18f768fa9964c123e07f076c544c58c0966a8a5e9571b0397bf57b06", + "evidence_files": 0, + "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "files": 8, + "generated_at_commit": "92e4bc688150b9754b6f37d3a701c58f7764d7ee", + "source_tree": "sha256:2f18a7d9ab0e0bf0b9e2a3f97a3b3d9a58ee97417a799178c906b8ac9d65b5bd" + } + }, + "name": "omega", + "purpose": "Seeded Omega native modules", + "schema_version": "1.0.0" +} diff --git a/native/omega/platform/.crumb b/native/omega/platform/.crumb new file mode 100644 index 00000000..74b1d827 --- /dev/null +++ b/native/omega/platform/.crumb @@ -0,0 +1,19 @@ +{ + "extensions": { + "generated": { + "children": [], + "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "compiled_at": "2026-10-28T23:11:15Z", + "compiler": "crumb-compile/1", + "digest": "sha256:5b8954046044cd9e509cf3696330a580e8bdb515ee73f500184be22daa1dc1bb", + "evidence_files": 0, + "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "files": 8, + "generated_at_commit": "92e4bc688150b9754b6f37d3a701c58f7764d7ee", + "source_tree": "sha256:2f18a7d9ab0e0bf0b9e2a3f97a3b3d9a58ee97417a799178c906b8ac9d65b5bd" + } + }, + "name": "platform", + "purpose": "Spark read-only ACPI resource readback", + "schema_version": "1.0.0" +} diff --git a/native/omega/platform/README.md b/native/omega/platform/README.md new file mode 100644 index 00000000..0f322470 --- /dev/null +++ b/native/omega/platform/README.md @@ -0,0 +1,246 @@ +# Spark platform readback and control ownership + +Dated observation: 2026-10-28. Aienux base: `659ddd2d7e3e140cb9bf942c3171cbd9cf3d092e`. +This is an offline resource reader and host qualification, not a physical driver +or control qualification. Every fan, power, clock and thermal-policy write is +**NOT_RUN**. No AML method was executed by this investigation. No register was +mapped/read directly, and no existing service was stopped or changed. + +## Evidence and method + +Read-only copies were taken using `sudo -n cat /sys/firmware/acpi/tables/DSDT` +and the same command for SSDT1 through SSDT5. Each copied binary was disassembled +individually with `iasl -d TABLE.aml` (ACPICA 20230628). The earlier `iasl -da` +combined invocation failed on duplicate declarations; it is INVALID setup, not +an AML or hardware failure. The individual disassemblies succeeded. AML remains +data: neither `_TMP`, `_CPC`, `_INI` nor any other method was invoked. + +The external receipt bundle is `handoffs/spark-five-20261028/QualPlatform` on +the qualification machine. It includes command metadata, stdout, stderr, binary +tables, disassemblies, original distro source archives and the source descriptor, +compiler snapshot, host programs, results and a SHA256 manifest. The raw table +copies are not a new firmware authority. Re-discover resources after firmware +changes; this reader is explicitly tied to the captured board profile. + +DSDT SHA256: `2871cbcb8992f7bd3915d6f19e7cfab577e068dcad58b6f00317a9f2d4e1b28e`. +`cppc-fixture.json` records the independent disassembled descriptors, including +all control fields so the qualification can verify the reader excludes them. + +## AML dependency map + +DSDT lines 16136-16280 declare seven thermal zones. Each `_TMP` calls serialized +`RREG(address)`. `RREG` declares a four-byte `SystemMemory` OperationRegion, +`DWordAcc`, `NoLock`, `Preserve`, and returns its 32-bit DAT0 field. `_CRT` returns +TCRT `0x0EC4`. `_PSL` is empty. There are no `_ACn`, `_ALn`, `_PSV`, fan or PWM +relationships in these captured tables. + +| Zone / reader index | `_TMP` backing address | Exposed meaning | +|---|---|---| +| TSOC / 0 | `0x1C238818` | firmware-named SoC zone | +| TS0E / 1 | `0x1C238820` | firmware-named zone; physical placement UNKNOWN | +| TS0P / 2 | `0x1C238824` | firmware-named zone; physical placement UNKNOWN | +| TS1E / 3 | `0x1C238828` | firmware-named zone; physical placement UNKNOWN | +| TS1P / 4 | `0x1C23882C` | firmware-named zone; physical placement UNKNOWN | +| TGPU / 5 | `0x1C238830` | firmware-named GPU zone; not assumed identical to NVML | +| TUNC / 6 | `0x1C238834` | firmware-named uncore zone | + +The firmware value has ACPI temperature units (tenths kelvin). The reader retains +the raw word; a critical shutdown threshold is not a fan or power control limit. +Linux's observed sysfs critical value is 104800 millidegrees Celsius. The +conversion convention must match the actual ACPI thermal driver, not an invented +ambient calibration. + +DSDT lines 1073-6585 contain twenty revision-3, 23-entry `_CPC` packages, ordered +CLU0.CPU0..CPU9 then CLU1.CPU0..CPU9. Entries are `SystemMemory`, 32 bits, +bit offset 0, DWORD access, except reference/delivered counters: `FFixedHW`, +64 bits, addresses 1/0 respectively, with unspecified access size. These FFH +addresses are abstract register selectors, **not physical addresses**. They +must never be dereferenced as SystemMemory. The first capability address is +`0x051CC404`, with per-CPU stride `0xE8`; independent fixture parity checks every +selected descriptor, not just the stride's endpoints. + +Linux `cppc_regs` indexes (package indexes omit the first two integers): + +* Reader exposes 0..4: highest, nominal, lowest-nonlinear, lowest, guaranteed + performance; 10: counter-wrap time; 11/12: reference/delivered counters; + 13: performance-limited; 18: reference performance; 19/20: lowest/nominal MHz. +* Reader refuses 5..9 and 14..17: desired/min/max performance, tolerance/window, + enable/autonomous/activity-window/energy preference. These are not a safe + control API merely because AML provides addresses. + +SSDT2 declares CP0..CP19 SystemMemory regions at each highest-performance +address, with 24-bit fields. `_INI` calls INIT, which writes firmware-provided +values into those fields. This is an offline observation, not a command to replay +INIT or to write a supposedly read-only capability. Firmware changes and +concurrent firmware updates remain possible; a bundle of reads is not an atomic +snapshot. No performance/rate is calculated from unsynchronized CPU counters. + +Other OperationRegions: DSDT debug SystemIO 0x80/0x90; GNVS/ANVS firmware memory; +USB-related EN0/EN1 SystemMemory; generic RTRG SystemMemory read helper; FFA0 +fixed-hardware transport associated with ARM FF-A notifications; SSDT4 GPU +PCI_Config PEGR; SSDT5 TPM fixed-hardware transport. None is evidence of a fan, +EC, SCMI or PCC thermal-control channel. No `EmbeddedControl`, `PNP0C09`, +`PNP0C0B`, SCMI, PCC, `_FST`, `_FPS`, `_FSL`, fan or PWM declaration matched +DSDT/SSDT1..5. The table inventory has no PCCT. Negative table searches do not +prove the board lacks a private controller. + +## Ownership and limits + +R means an observed standard read interface; W means only an interface exists, +not that a write is safe or authorized. UNKNOWN is never zero or a guessed limit. + +| Resource | Controller / transport | Firmware owner | Read / write | Safe limits source | +|---|---|---|---|---| +| Seven ACPI temperatures | Linux acpi_thermal/acpitz; AML RREG -> SystemMemory | MTKINC AML describes shared registers; producer/physical sensor controller UNKNOWN | sysfs R observed; native READ actions host-exercised only; W not exposed | `_CRT` is shutdown policy only; control envelope UNKNOWN | +| NVMe composite/sensor temperatures | Linux NVMe hwmon -> NVMe SMART log, PCI `0004:01:00.0` | Samsung controller firmware | sysfs R observed; no temperature W implemented | SMART critical threshold observed 84850 mC; sensor min/max sentinel values are invalid, not limits | +| Wi-Fi temperature | mt7925 hwmon -> driver MCU thermal query, PCI `0009:01:00.0` | MediaTek MCU firmware | sysfs R observed; no W implemented | safe-control envelope UNKNOWN | +| GPU temperature/power/clocks | nvidia-smi -> NVML -> NVIDIA driver; GPU `000f:01:00.0` | NVIDIA firmware stack; exact physical policy owner not established by query | standard R exercised; generic vendor W commands exist, board support/limits UNKNOWN | current/min/max/default GPU and module power limits N/A; Supported Clocks N/A | +| CPU capability/clock policy | cppc_cpufreq -> ACPI CPPC SystemMemory; FFH counters separately | MTKINC/ANGUSCPU AML and platform firmware; underlying DVFS implementation UNKNOWN | policy sysfs R observed; OS policy W exists but not qualified; reader excludes control fields | AML performance values and Linux policy bounds are not vendor electrical/thermal limits | +| CPU cooling_device0..19 | Linux Processor cooling -> CPU frequency QoS | OS governor acts on firmware-backed CPU policy | state R; W intentionally not attempted | max_state=3 is policy index, not fan speed or safe clock envelope | +| cooling_device20..25 | Linux pcie_cooling -> PCIe bandwidth controller on root ports | PCIe link hardware/firmware, controlled by OS | sysfs R; W not attempted; cd25 current state invalid | max_state=4 is link-speed state count, not temperature/fan setting | +| Chassis fan, PWM, tachometer | no exposed hwmon PWM/fan or bound ACPI fan/EC/SCMI found | UNKNOWN; do not infer NVIDIA GSP, CPU firmware or board EC ownership | no discovered qualified native R/W interface | vendor board-controller protocol, ownership and fail-safe envelope UNKNOWN | +| Board/module power cap | powercap/power_supply/devfreq expose no usable channel in scout inventory | UNKNOWN beyond NVIDIA query path | no qualified W | UNKNOWN; marketing TDP/PSU rating is not a writable envelope | + +### NVIDIA query actually exercised + +``` +nvidia-smi -i 000f:01:00.0 -q -d TEMPERATURE,POWER,CLOCK,PERFORMANCE,SUPPORTED_CLOCKS +``` + +Exit 0, driver 580.173.02. At that sample: GPU 40 C; P8; average 4.64 W, +instantaneous 4.69 W; graphics/SM 208 MHz; video 598 MHz; memory N/A. Maximum +reported graphics/SM/video clock 3003 MHz and application/default graphics +2418 MHz are descriptive telemetry, not a validated allowed lock range. +Supported Clocks and all requested/default/min/max/current GPU/module power +limits are **UNKNOWN (N/A)**. The current SW Power Cap event was Not Active; +a historical nonzero cumulative counter does not say a cap is active now. + +Vendor source: https://docs.nvidia.com/deploy/nvidia-smi/index.html . It defines +N/A as unsupported data and requires `--power-limit` values between reported +Min/Max Power Limit. It documents generic clock lock/reset commands, but generic +command availability and a maximum-clock report do not establish this board's +supported clock/control envelope or recovery semantics. + +## cooling_device25 kernel defect + +The reported `cur_state=-231` and root-port current-link-speed Unknown are ground +truth, not a reason to try a cooling-state write. This is a PCIe cooling device, +not a negative fan speed. Exact distro source package: +`linux-nvidia-7.0 7.0.0-1019.19~24.04.2`, published at +https://ports.ubuntu.com/pool/main/l/linux-nvidia-7.0/ . The original tarball and +Debian diff hashes were checked against that version's `.dsc`; neither +`drivers/thermal/pcie_cooling.c` nor `drivers/thermal/thermal_sysfs.c` is patched +by that diff. The reproduced reference file SHA256 is +`fff34da417c7f8cdb642a8b8ac20b7a5d1010392a2a7b8662178078abd1824c9`. + +`get_cur_level` subtracts `(cur_bus_speed - PCIE_SPEED_2_5GT)` from max_state +without validating cur_bus_speed. At this source pin, the enum base is 0x14, +and PCI_SPEED_UNKNOWN is 0xff. With max_state=4 the result underflows unsigned +long; thermal_sysfs.c prints that word with `%ld`, exposing -231. This does NOT +establish why the port has unknown link speed. Do not mask it by returning a +fabricated state 0 or by interpreting -231 as a valid operating point. + +`pcie-cooling-proposal.patch` proposes rejecting unknown/non-PCIe/unsupported +speeds and speeds above the registered maximum with `-EAGAIN`; output remains +untouched on error. It also rejects an invalid maximum speed with `-EINVAL` +during state-range discovery. Each speed is sampled once with READ_ONCE. +This is a source-level proposal only: no kernel/module build, installation, +reload or deployment was performed. No write callback is changed. A later kernel +integrator must run kernel build/thermal review and topology/resume tests before +shipping; signed sysfs formatting alone would conceal rather than fix the bug. + +`kernel-repro.py` builds the exact original get_* functions with small C +reference structs, applies the actual proposed patch in a disposable directory, +checks all enum speeds and boundaries, and requires red/green controls in both +directions. This host oracle does not execute a PCIe transaction. + +## Seeded reader contract and acceptance + +`readback.om` follows the explicit action/acknowledgement separation used by +Aienux #465's protocol.om, rather than introducing a host AML interpreter. +`plstart(kind, unit, field, sequence)` emits a single bounded READ descriptor in +`Pl`: pending, sequence, space, address, bits, raw, valid, last-sequence. Kinds +are 0 thermal and 1 CPPC. `plack(sequence, space, address, bits, raw, ok)` consumes +it. A successful ACK sets raw and valid; a mismatch, I/O failure, replay or +out-of-width raw value cannot publish data. Sequences must increase and be +nonzero. A pending request cannot be replaced. One single-threaded executor is +required; this is not a cross-core or firmware lock. No command-write action +exists, and there is no physical executor or mapping capability in this module. +The acknowledged transport boundary is real: fixtures exercise the reader, not +the physical register path. Native sensor reads and FFH reads remain NOT_RUN. +Transport mapping/permissions and board-documentation checks are prerequisites +for any future physical integration, not bypassed by a passing host fixture. + +Host-only acceptance, after writers have finished: + +``` +python3 native/omega/platform/gate.py /absolute/pinned/omc EXPECTED_SHA256 /absolute/receipts/readback +python3 native/omega/platform/kernel-repro.py /absolute/receipts/kernel-repro +``` + +Qualification compiler source `1fe5976d398646b17acabbf6d9dfae96b017e439`, committed +`seed/out/omc` SHA256 +`d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84`. +This does not change Aienux's omega.lock runtime-vendor pin. Conductor/oracle +programs use Python, cc and patch only for verification; production behavior +is seeded Omega. Compiler failure does not count as a killed mutant. + +Observed acceptance: both commands exited 0. The readback gate passed all 247 +descriptor reads (twenty CPUs times twelve selected descriptors, plus seven +thermal zones), its boundary suite, and six compiled/runnable mutants: +stale ACK exit 6, wrong address 12, writable selector 26, wide raw word 18, +thermal address 5, CPPC stride 2. The original C reproducer exited 0 and printed +`cur_state=-231 unsigned=18446744073709551385`; the patched reproducer exited 3 +(expected negative control), patched boundary suite exited 0, and the original +code failed that boundary suite with exit 4. Kernel compilation/deployment and +physical native-register readback remain NOT_RUN. + +The first host attempt exposed a test-oracle defect: writable-field rejection +was selected by the reader's own `ploff`, allowing a writable-selector mutant +to survive. The boundary oracle now independently enumerates the excluded +index ranges, and that same runnable mutant is rejected. The first C harness +compile also refused an unused static function under `-Werror`; its reproducer +now checks the maximum-state function too. Both failed attempts are retained +in receipts, not counted as passing controls. + +## Exact authorization procedure and control disposition + +**No fan/power/clock control currently meets the vendor-documented, board-specific +safe-limits requirement. Consequently no validated executable control-write, +readback-and-revert procedure exists for this machine. All control writes are +NOT_RUN, and none should be authorized from this document.** This is a measured +refusal, not permission to experiment with generic nvidia-smi options or sysfs. + +The currently executable procedure is read-only: + +1. Keep the resident model/service and its GPU reservation untouched. Do not + reboot, unload drivers, evaluate AML or open `/dev/mem`. +2. Run exactly the NVIDIA query above; save stdout/stderr and exit status. + Read the existing thermal/hwmon/cpufreq sysfs attributes only. A negative + PCIe cooling state is invalid data, not a control target. +3. Preserve N/A as UNKNOWN. With these captured results, stop before any write. + No revert is necessary because nothing was modified. +4. A future control authorization must name the exact controller/firmware + revision, vendor protocol and board-supported limit source, exact old/requested + values and units, original autonomous/manual mode, exact write operation, + independent readback plus tolerance/settling source, and a documented inverse + that restores both value and mode. Generic `--reset-gpu-clocks` restores a + default, not necessarily the previous lock, so is not automatically a revert. + If any of these are UNKNOWN, authorization remains blocked. This document + deliberately supplies no guessed numbers or unsafe write command. +5. Any kernel-fix boot or native MMIO reader integration is a separate attended + authorization. The existing AIENOSRECOV stick (serial 5D0344B4, PARTUUID + f227357c-1e80-4fd0-a55e-2efbef1dd25c, firmware Boot0002 as observed today) is + recovery-only and must remain read-only. Its 2026-09-25 attended recovery + proof is historical, not a reboot performed today. Any candidate image needs + a separate blank medium and the boot lane's exact procedure. No service + stop/restore or recovery action is needed for the host acceptance above. + +## Arithmetic evidence + +WolframLanguageEvaluator: +`FromDigits["EC4",16] -> 3780`; `(3780-2732)*100 -> 104800` mC; +`4-(255-20) -> -231`; `Mod[4-(255-20),2^64] -> 18446744073709551385`. +Address conversion and CPPC stride/offset derivations are preserved with the +same evaluator query/results in the external receipt bundle. These are MODELED +arithmetic checks, not additional temperature or register measurements. diff --git a/native/omega/platform/cppc-fixture.json b/native/omega/platform/cppc-fixture.json new file mode 100644 index 00000000..980d6f97 --- /dev/null +++ b/native/omega/platform/cppc-fixture.json @@ -0,0 +1,3046 @@ +{ + "source_sha256": "2871cbcb8992f7bd3915d6f19e7cfab577e068dcad58b6f00317a9f2d4e1b28e", + "cpu_order": "CLU0.CPU0..CPU9 then CLU1.CPU0..CPU9", + "cpus": [ + { + "kind": "ECPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC404", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC408", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC40C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC410", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC414", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC418", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005150480", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005150500", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC424", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC428", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC42C", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC430", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC44C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC450", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC454", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC458", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC45C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC460", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC464", + "access": "0x03" + } + ] + }, + { + "kind": "ECPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC4EC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC4F0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC4F4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC4F8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC4FC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC500", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005150484", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005150504", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC50C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC510", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC514", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC518", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC534", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC538", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC53C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC540", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC544", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC548", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC54C", + "access": "0x03" + } + ] + }, + { + "kind": "ECPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC5D4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC5D8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC5DC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC5E0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC5E4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC5E8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005150488", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005150508", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC5F4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC5F8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC5FC", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC600", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC61C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC620", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC624", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC628", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC62C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC630", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC634", + "access": "0x03" + } + ] + }, + { + "kind": "ECPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC6BC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC6C0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC6C4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC6C8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC6CC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC6D0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x000000000515048C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x000000000515050C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC6DC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC6E0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC6E4", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC6E8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC704", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC708", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC70C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC710", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC714", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC718", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC71C", + "access": "0x03" + } + ] + }, + { + "kind": "ECPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC7A4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC7A8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC7AC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC7B0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC7B4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC7B8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005150490", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005150510", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC7C4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC7C8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC7CC", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC7D0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC7EC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC7F0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC7F4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC7F8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC7FC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC800", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC804", + "access": "0x03" + } + ] + }, + { + "kind": "PCPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC88C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC890", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC894", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC898", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC89C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC8A0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005158480", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005158500", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC8AC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC8B0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC8B4", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC8B8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC8D4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC8D8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC8DC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC8E0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC8E4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC8E8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC8EC", + "access": "0x03" + } + ] + }, + { + "kind": "PCPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC974", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC978", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC97C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC980", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC984", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC988", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005158484", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005158504", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC994", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC998", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC99C", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC9A0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC9BC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC9C0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC9C4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC9C8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC9CC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC9D0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CC9D4", + "access": "0x03" + } + ] + }, + { + "kind": "PCPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCA5C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCA60", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCA64", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCA68", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCA6C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCA70", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005158488", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005158508", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCA7C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCA80", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCA84", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCA88", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCAA4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCAA8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCAAC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCAB0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCAB4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCAB8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCABC", + "access": "0x03" + } + ] + }, + { + "kind": "PCPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCB44", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCB48", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCB4C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCB50", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCB54", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCB58", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x000000000515848C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x000000000515850C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCB64", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCB68", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCB6C", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCB70", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCB8C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCB90", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCB94", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCB98", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCB9C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCBA0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCBA4", + "access": "0x03" + } + ] + }, + { + "kind": "PCPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC2C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC30", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC34", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC38", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC3C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC40", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005158490", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005158510", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC4C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC50", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC54", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC58", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC74", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC78", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC7C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC80", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC84", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC88", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCC8C", + "access": "0x03" + } + ] + }, + { + "kind": "ECPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD14", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD18", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD1C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD20", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD24", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD28", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005150494", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005150514", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD34", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD38", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD3C", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD40", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD5C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD60", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD64", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD68", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD6C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD70", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCD74", + "access": "0x03" + } + ] + }, + { + "kind": "ECPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCDFC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCE00", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCE04", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCE08", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCE0C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCE10", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005150498", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005150518", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCE1C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCE20", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCE24", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCE28", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCE44", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCE48", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCE4C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCE50", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCE54", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCE58", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCE5C", + "access": "0x03" + } + ] + }, + { + "kind": "ECPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCEE4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCEE8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCEEC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCEF0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCEF4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCEF8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x000000000515049C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x000000000515051C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCF04", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCF08", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCF0C", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCF10", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCF2C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCF30", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCF34", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCF38", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCF3C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCF40", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCF44", + "access": "0x03" + } + ] + }, + { + "kind": "ECPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCFCC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCFD0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCFD4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCFD8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCFDC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCFE0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051504A0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005150520", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCFEC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCFF0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCFF4", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CCFF8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD014", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD018", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD01C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD020", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD024", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD028", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD02C", + "access": "0x03" + } + ] + }, + { + "kind": "ECPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD0B4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD0B8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD0BC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD0C0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD0C4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD0C8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051504A4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005150524", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD0D4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD0D8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD0DC", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD0E0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD0FC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD100", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD104", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD108", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD10C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD110", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD114", + "access": "0x03" + } + ] + }, + { + "kind": "TCPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD19C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD1A0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD1A4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD1A8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD1AC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD1B0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005158494", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005158514", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD1BC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD1C0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD1C4", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD1C8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD1E4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD1E8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD1EC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD1F0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD1F4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD1F8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD1FC", + "access": "0x03" + } + ] + }, + { + "kind": "TCPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD284", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD288", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD28C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD290", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD294", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD298", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005158498", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005158518", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD2A4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD2A8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD2AC", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD2B0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD2CC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD2D0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD2D4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD2D8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD2DC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD2E0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD2E4", + "access": "0x03" + } + ] + }, + { + "kind": "TCPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD36C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD370", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD374", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD378", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD37C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD380", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x000000000515849C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x000000000515851C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD38C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD390", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD394", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD398", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD3B4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD3B8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD3BC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD3C0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD3C4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD3C8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD3CC", + "access": "0x03" + } + ] + }, + { + "kind": "TCPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD454", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD458", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD45C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD460", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD464", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD468", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051584A0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005158520", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD474", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD478", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD47C", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD480", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD49C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD4A0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD4A4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD4A8", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD4AC", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD4B0", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD4B4", + "access": "0x03" + } + ] + }, + { + "kind": "TCPC", + "registers": [ + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD53C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD540", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD544", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD548", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD54C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD550", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051584A4", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x0000000005158524", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD55C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD560", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD564", + "access": "0x03" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000001", + "access": "0x00" + }, + { + "space": "FFixedHW", + "bits": "0x40", + "offset": "0x00", + "address": "0x0000000000000000", + "access": "0x00" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD568", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD584", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD588", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD58C", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD590", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD594", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD598", + "access": "0x03" + }, + { + "space": "SystemMemory", + "bits": "0x20", + "offset": "0x00", + "address": "0x00000000051CD59C", + "access": "0x03" + } + ] + } + ] +} diff --git a/native/omega/platform/gate.py b/native/omega/platform/gate.py new file mode 100755 index 00000000..d71c3a73 --- /dev/null +++ b/native/omega/platform/gate.py @@ -0,0 +1,70 @@ +#!/usr/bin/env python3 +"""Host verification oracle only. No hardware access; implementation is readback.om.""" +import hashlib +import json +import os +from pathlib import Path +import subprocess +import sys + +here = Path(__file__).resolve().parent +omc, expected, out = sys.argv[1:] +out = Path(out).resolve() +out.mkdir(parents=True, exist_ok=True) +assert hashlib.sha256(Path(omc).read_bytes()).hexdigest() == expected, 'compiler pin mismatch' +source = (here / 'readback.om').read_text() +unit = (here / 'unit.om').read_text() +fixture = json.loads((here / 'cppc-fixture.json').read_text()) +assert len(fixture['cpus']) == 20 +checks = ['fn main to int'] +seq = 0 +for cpu, desc in enumerate(fixture['cpus']): + assert len(desc['registers']) == 21 + for field in [0, 1, 2, 3, 4, 10, 11, 12, 13, 18, 19, 20]: + reg = desc['registers'][field] + space = {'SystemMemory': 0, 'FFixedHW': 127}[reg['space']] + bits = int(reg['bits'], 16) + addr = int(reg['address'], 16) + assert int(reg['offset'], 16) == 0 + assert int(reg['access'], 16) == (3 if space == 0 else 0) + seq += 1 + checks += [f'if ne plstart 1 {cpu} {field} {seq} 0', 'ret 1', 'end', + f'if ne plack {seq} {space} {addr} {bits} 3132 1 0', 'ret 2', 'end', + 'if or ne get Pl 5 3132 ne get Pl 6 1', 'ret 3', 'end'] +for zone, addr in enumerate([0x1C238818, 0x1C238820, 0x1C238824, 0x1C238828, 0x1C23882C, 0x1C238830, 0x1C238834]): + seq += 1 + checks += [f'if ne plstart 0 {zone} 0 {seq} 0', 'ret 4', 'end', + f'if ne plack {seq} 0 {addr} 32 3132 1 0', 'ret 5', 'end'] +checks += ['ret 0', 'end', ''] +parity = '\n'.join(checks) +results = [] +def run(name, code, should_pass): + src = out / (name + '.om') + binary = out / name + src.write_text(code) + with src.open('rb') as stdin, binary.open('wb') as stdout, (out / (name + '.compile.stderr')).open('wb') as stderr: + p = subprocess.run(['nice', '-n', '15', omc], stdin=stdin, stdout=stdout, stderr=stderr) + assert p.returncode == 0, f'{name}: compile failed, not a valid mutant kill' + binary.chmod(0o755) + p = subprocess.run(['nice', '-n', '15', str(binary)], capture_output=True) + (out / (name + '.stdout')).write_bytes(p.stdout) + (out / (name + '.stderr')).write_bytes(p.stderr) + assert (p.returncode == 0) == should_pass, f'{name}: unexpected exit {p.returncode}' + results.append({'name': name, 'compile_exit': 0, 'run_exit': p.returncode, + 'sha256': hashlib.sha256(binary.read_bytes()).hexdigest()}) +run('unit', source + unit, True) +run('descriptor-parity', source + parity, True) +mutants = { + 'stale-ack': ('if or ne seq get Pl 1 ne space get Pl 2', 'if ne space get Pl 2'), + 'wrong-address': ('if or ne addr get Pl 3 ne bits get Pl 4', 'if ne bits get Pl 4'), + 'write-selector': ('if lt field 5', 'if lt field 6'), + 'wide-raw': ('if gt raw 4294967295', 'if gt raw 18446744073709551615'), + 'thermal-address': ('ret 472090648', 'ret 472090649'), + 'cppc-stride': ('mul unit 232', 'mul unit 233'), +} +for name, (old, new) in mutants.items(): + assert source.count(old) == 1 + test = parity if name in ['thermal-address', 'cppc-stride'] else unit + run(name, source.replace(old, new) + test, False) +(out / 'results.json').write_text(json.dumps(results, indent=2) + '\n') +print(f'PLATFORM READBACK PASS: {seq} descriptor reads; boundary suite; {len(mutants)} runnable mutants rejected') diff --git a/native/omega/platform/kernel-repro.py b/native/omega/platform/kernel-repro.py new file mode 100755 index 00000000..0e927c20 --- /dev/null +++ b/native/omega/platform/kernel-repro.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 +"""Exact distro C reference oracle. Never opens sysfs or a PCI device.""" +from pathlib import Path +import hashlib +import json +import re +import subprocess +import sys +here = Path(__file__).resolve().parent +out = Path(sys.argv[1]).resolve() +out.mkdir(parents=True, exist_ok=True) +ref = (here / 'pcie-cooling-ref.c').read_text() +assert hashlib.sha256(ref.encode()).hexdigest() == 'fff34da417c7f8cdb642a8b8ac20b7a5d1010392a2a7b8662178078abd1824c9' +# Apply the actual proposed patch to a disposable copy, not a hand-coded fixed oracle. +tree = out / 'patch-tree/drivers/thermal' +tree.mkdir(parents=True, exist_ok=True) +(tree / 'pcie_cooling.c').write_text(ref) +p = subprocess.run(['patch', '--batch', '-p1', '-i', str(here / 'pcie-cooling-proposal.patch')], cwd=out / 'patch-tree', capture_output=True) +(out / 'patch.stdout').write_bytes(p.stdout) +assert p.returncode == 0, p.stderr +fixed = (tree / 'pcie_cooling.c').read_text() +header = '''#include <stdio.h> +#include <errno.h> +#define READ_ONCE(x) (x) +enum pci_bus_speed { PCIE_SPEED_2_5GT=0x14, PCIE_SPEED_64_0GT=0x19, PCI_SPEED_UNKNOWN=0xff }; +struct pci_bus { unsigned char max_bus_speed, cur_bus_speed; }; +struct pci_dev { struct pci_bus *subordinate; }; +struct thermal_cooling_device { void *devdata; unsigned long max_state; }; +''' +def functions(text): + return '\n'.join(re.findall(r'static int pcie_cooling_get_\w+\([^}]+\n}', text)) +assert len(re.findall('static int ', functions(ref))) == 2 +bug = '''int main(void) { +struct pci_bus bus={0x18,0xff}; struct pci_dev dev={&bus}; +struct thermal_cooling_device c={&dev,4}; unsigned long s=999; +if (pcie_cooling_get_max_level(&c,&s) || s!=4) return 7; +s=999; +int r=pcie_cooling_get_cur_level(&c,&s); +if (r || (long)s != -231) return 3; +printf("REPRODUCED unknown=0xff max_state=4 cur_state=%ld unsigned=%lu\\n",(long)s,s); +return 0; } +''' +test = '''int main(void) { +struct pci_bus bus={0x18,0x14}; struct pci_dev dev={&bus}; +struct thermal_cooling_device c={&dev,4}; unsigned long s; +for (unsigned int i=0x14; i<=0x19; i++) { +bus.max_bus_speed=i; s=999; +if (pcie_cooling_get_max_level(&c,&s) || s!=i-0x14) return 1; +c.max_state=i-0x14; +for (unsigned int j=0x14; j<=i; j++) { +bus.cur_bus_speed=j; s=999; +if (pcie_cooling_get_cur_level(&c,&s) || s!=i-j) return 2; +}} +unsigned int bad[]={0,0x13,0x1a,0xff}; +for (unsigned int i=0;i<4;i++) { +bus.cur_bus_speed=bad[i]; s=999; +if (pcie_cooling_get_cur_level(&c,&s)!=-EAGAIN || s!=999) return 4; +bus.max_bus_speed=bad[i]; s=999; +if (pcie_cooling_get_max_level(&c,&s)!=-EINVAL || s!=999) return 5; +} +c.max_state=4; bus.cur_bus_speed=0x19; s=999; +if (pcie_cooling_get_cur_level(&c,&s)!=-EAGAIN || s!=999) return 6; +printf("FIX PASS all enum speeds, unknown/non-PCIe, stale-above-max; outputs unchanged on errors\\n"); +return 0; } +''' +results=[] +for name, source, main, expected in [('old-repro',ref,bug,0),('fixed-repro-negative',fixed,bug,3),('fixed-boundaries',fixed,test,0),('old-boundaries-negative',ref,test,4)]: + src=out/(name+'.c'); binary=out/name + src.write_text(header+functions(source)+main) + p=subprocess.run(['nice','-n','15','cc','-std=c11','-Wall','-Wextra','-Werror','-o',str(binary),str(src)],capture_output=True) + (out/(name+'.compile.stderr')).write_bytes(p.stderr) + assert p.returncode==0,p.stderr + p=subprocess.run([str(binary)],capture_output=True) + (out/(name+'.stdout')).write_bytes(p.stdout) + assert p.returncode==expected,(name,p.returncode,expected) + results.append({'name':name,'compile_exit':0,'run_exit':p.returncode,'expected':expected,'binary_sha256':hashlib.sha256(binary.read_bytes()).hexdigest()}) +(out/'results.json').write_text(json.dumps(results,indent=2)+'\n') +print('PCIE COOLING REPRO PASS: old reproduces -231; proposed fix refuses; full boundary oracle passes and kills old code') diff --git a/native/omega/platform/pcie-cooling-proposal.patch b/native/omega/platform/pcie-cooling-proposal.patch new file mode 100644 index 00000000..4ca6bf32 --- /dev/null +++ b/native/omega/platform/pcie-cooling-proposal.patch @@ -0,0 +1,34 @@ +--- a/drivers/thermal/pcie_cooling.c ++++ b/drivers/thermal/pcie_cooling.c +@@ -20,9 +20,13 @@ + static int pcie_cooling_get_max_level(struct thermal_cooling_device *cdev, unsigned long *state) + { + struct pci_dev *port = cdev->devdata; ++ enum pci_bus_speed speed = READ_ONCE(port->subordinate->max_bus_speed); ++ ++ if (speed < PCIE_SPEED_2_5GT || speed > PCIE_SPEED_64_0GT) ++ return -EINVAL; + + /* cooling state 0 is same as the maximum PCIe speed */ +- *state = port->subordinate->max_bus_speed - PCIE_SPEED_2_5GT; ++ *state = speed - PCIE_SPEED_2_5GT; + + return 0; + } +@@ -31,8 +35,15 @@ + { + struct pci_dev *port = cdev->devdata; + ++ enum pci_bus_speed speed = READ_ONCE(port->subordinate->cur_bus_speed); ++ ++ /* Unknown, non-PCIe or stale speeds are not cooling states. */ ++ if (speed < PCIE_SPEED_2_5GT || speed > PCIE_SPEED_64_0GT || ++ speed - PCIE_SPEED_2_5GT > cdev->max_state) ++ return -EAGAIN; ++ + /* cooling state 0 is same as the maximum PCIe speed */ +- *state = cdev->max_state - (port->subordinate->cur_bus_speed - PCIE_SPEED_2_5GT); ++ *state = cdev->max_state - (speed - PCIE_SPEED_2_5GT); + + return 0; + } diff --git a/native/omega/platform/pcie-cooling-ref.c b/native/omega/platform/pcie-cooling-ref.c new file mode 100644 index 00000000..a876d64f --- /dev/null +++ b/native/omega/platform/pcie-cooling-ref.c @@ -0,0 +1,80 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * PCIe cooling device + * + * Copyright (C) 2023-2024 Intel Corporation + */ + +#include <linux/build_bug.h> +#include <linux/cleanup.h> +#include <linux/err.h> +#include <linux/module.h> +#include <linux/pci.h> +#include <linux/pci-bwctrl.h> +#include <linux/slab.h> +#include <linux/sprintf.h> +#include <linux/thermal.h> + +#define COOLING_DEV_TYPE_PREFIX "PCIe_Port_Link_Speed_" + +static int pcie_cooling_get_max_level(struct thermal_cooling_device *cdev, unsigned long *state) +{ + struct pci_dev *port = cdev->devdata; + + /* cooling state 0 is same as the maximum PCIe speed */ + *state = port->subordinate->max_bus_speed - PCIE_SPEED_2_5GT; + + return 0; +} + +static int pcie_cooling_get_cur_level(struct thermal_cooling_device *cdev, unsigned long *state) +{ + struct pci_dev *port = cdev->devdata; + + /* cooling state 0 is same as the maximum PCIe speed */ + *state = cdev->max_state - (port->subordinate->cur_bus_speed - PCIE_SPEED_2_5GT); + + return 0; +} + +static int pcie_cooling_set_cur_level(struct thermal_cooling_device *cdev, unsigned long state) +{ + struct pci_dev *port = cdev->devdata; + enum pci_bus_speed speed; + + /* cooling state 0 is same as the maximum PCIe speed */ + speed = (cdev->max_state - state) + PCIE_SPEED_2_5GT; + + return pcie_set_target_speed(port, speed, true); +} + +static struct thermal_cooling_device_ops pcie_cooling_ops = { + .get_max_state = pcie_cooling_get_max_level, + .get_cur_state = pcie_cooling_get_cur_level, + .set_cur_state = pcie_cooling_set_cur_level, +}; + +struct thermal_cooling_device *pcie_cooling_device_register(struct pci_dev *port) +{ + char *name __free(kfree) = + kasprintf(GFP_KERNEL, COOLING_DEV_TYPE_PREFIX "%s", pci_name(port)); + if (!name) + return ERR_PTR(-ENOMEM); + + return thermal_cooling_device_register(name, port, &pcie_cooling_ops); +} + +void pcie_cooling_device_unregister(struct thermal_cooling_device *cdev) +{ + thermal_cooling_device_unregister(cdev); +} + +/* For bus_speed <-> state arithmetic */ +static_assert(PCIE_SPEED_2_5GT + 1 == PCIE_SPEED_5_0GT); +static_assert(PCIE_SPEED_5_0GT + 1 == PCIE_SPEED_8_0GT); +static_assert(PCIE_SPEED_8_0GT + 1 == PCIE_SPEED_16_0GT); +static_assert(PCIE_SPEED_16_0GT + 1 == PCIE_SPEED_32_0GT); +static_assert(PCIE_SPEED_32_0GT + 1 == PCIE_SPEED_64_0GT); + +MODULE_AUTHOR("Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>"); +MODULE_DESCRIPTION("PCIe cooling driver"); diff --git a/native/omega/platform/readback.om b/native/omega/platform/readback.om new file mode 100644 index 00000000..123e0cbc --- /dev/null +++ b/native/omega/platform/readback.om @@ -0,0 +1,110 @@ +note SPDX-License-Identifier: Apache-2.0 +note Spark DSDT resource reader. No AML evaluator, mapping, register access or writes. +note Single consumer; transport supplies an acknowledged READ, never an arbitrary address. +note State: pending,sequence,space,address,bits,raw,valid,last-sequence. +global Pl ulong 8 + +fn pladdr zone ulong to ulong +if eq zone 0 +ret 472090648 +end +if lt zone 7 +ret add 472090652 mul zone 4 +end +ret 0 +end + +note CPPC fields are Linux cppc_regs indexes, excluding every writable control. +fn ploff field ulong to ulong +if lt field 5 +ret mul field 4 +end +if eq field 10 +ret 40 +end +if eq field 13 +ret 44 +end +if and ge field 18 le field 20 +ret add 88 mul sub field 18 4 +end +ret 4294967295 +end + +note kind 0 thermal, kind 1 CPPC; space 0 SystemMemory, space 127 FFixedHW. +note Return 0 ready, 1 unsupported, 2 pending, 3 invalid sequence or ACK, 4 I/O failure. +fn plstart kind ulong unit ulong field ulong seq ulong to uint +if ne get Pl 0 0 +ret 2 +end +put Pl 5 0 +put Pl 6 0 +if or eq seq 0 le seq get Pl 7 +ret 3 +end +addr = ulong 0 +space = ulong 0 +bits = ulong 32 +if eq kind 0 +if ne field 0 +ret 1 +end +addr = pladdr unit +if eq addr 0 +ret 1 +end +else +if ne kind 1 +ret 1 +end +if ge unit 20 +ret 1 +end +if or eq field 11 eq field 12 +space = 127 +bits = 64 +addr = sub 12 field +else +off = ploff field +if eq off 4294967295 +ret 1 +end +addr = add add 85771268 mul unit 232 off +end +end +put Pl 0 1 +put Pl 1 seq +put Pl 2 space +put Pl 3 addr +put Pl 4 bits +put Pl 7 seq +ret 0 +end + +note ACK must match the complete outstanding READ descriptor. A bad ACK consumes it. +note raw is an unsigned native word; 32-bit reads cannot smuggle high bits. +fn plack seq ulong space ulong addr ulong bits ulong raw ulong ok ulong to uint +put Pl 5 0 +put Pl 6 0 +if eq get Pl 0 0 +ret 3 +end +put Pl 0 0 +if or ne seq get Pl 1 ne space get Pl 2 +ret 3 +end +if or ne addr get Pl 3 ne bits get Pl 4 +ret 3 +end +if ne ok 1 +ret 4 +end +if eq bits 32 +if gt raw 4294967295 +ret 3 +end +end +put Pl 5 raw +put Pl 6 1 +ret 0 +end diff --git a/native/omega/platform/unit.om b/native/omega/platform/unit.om new file mode 100644 index 00000000..4e875114 --- /dev/null +++ b/native/omega/platform/unit.om @@ -0,0 +1,88 @@ +note SPDX-License-Identifier: Apache-2.0 +note Concatenate readback.om and unit.om. Complete descriptor parity is in gate.py. +fn main to int +if ne plstart 0 7 0 1 1 +ret 1 +end +if ne plstart 0 0 1 1 1 +ret 2 +end +if ne plstart 0 0 0 0 3 +ret 3 +end +if ne plstart 0 0 0 1 0 +ret 4 +end +if ne plstart 0 1 0 2 2 +ret 5 +end +if ne plack 2 0 472090648 32 3132 1 3 +ret 6 +end +if ne get Pl 6 0 +ret 7 +end +if ne plstart 0 0 0 1 3 +ret 8 +end +if ne plstart 0 0 0 2 0 +ret 9 +end +if ne plack 2 127 472090648 32 3132 1 3 +ret 10 +end +if ne plstart 0 0 0 3 0 +ret 11 +end +if ne plack 3 0 472090652 32 3132 1 3 +ret 12 +end +if ne plstart 0 0 0 4 0 +ret 13 +end +if ne plack 4 0 472090648 64 3132 1 3 +ret 14 +end +if ne plstart 0 0 0 5 0 +ret 15 +end +if ne plack 5 0 472090648 32 3132 0 4 +ret 16 +end +if ne plstart 0 0 0 6 0 +ret 17 +end +if ne plack 6 0 472090648 32 4294967296 1 3 +ret 18 +end +if ne plstart 0 0 0 7 0 +ret 19 +end +if ne plack 7 0 472090648 32 3132 1 0 +ret 20 +end +if or ne get Pl 5 3132 ne get Pl 6 1 +ret 21 +end +if ne plack 7 0 472090648 32 3132 1 3 +ret 22 +end +if or ne get Pl 5 0 ne get Pl 6 0 +ret 23 +end +if ne plstart 1 20 0 8 1 +ret 24 +end +if ne plstart 2 0 0 8 1 +ret 25 +end +note Every CPPC writable field and an unknown field must refuse. +for field ulong 23 +if or and ge field 5 le field 9 or and ge field 14 le field 17 ge field 21 +if ne plstart 1 0 field 8 1 +ret 26 +end +end +end +ret 0 +end