interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / research / m15 / spbm / README.md

112 lines · 6452 bytes Raw Blame History Rendered
1# GB10 SPBM measurement reader
2
3This directory contains preliminary R15 telemetry work. It does not issue an
4R15 PASS. The complete performance harness and qualification remain required.
5
6## Reader boundary
7
8`aien_spbm_readonly.c` is an out-of-tree Linux platform driver for this
9machine's ACPI `NVDA8800` device. Before mapping anything, it checks the
10firmware's `_DSM` resource name and all fifteen permitted register names and
11offsets against `contract.h`. It requires exactly the expected 4 KiB SPBM
12resource and reserves it through `devm_ioremap_resource`. A changed firmware
13layout fails the probe. There is no fallback address, module parameter,
14power-cap control, MMIO write, or access to CLEAR_OVERFLOW registers.
15
16The ten hwmon measurement attributes and five raw overflow attributes are
17read-only. An energy read checks its overflow indicator before and after
18reading the counter and returns `EOVERFLOW` if either is nonzero. Firmware
19rollover semantics are not experimentally established. The sampler rejects a
20backward counter, any overflow, insufficient counter headroom for the window,
21and malformed or missing samples; it does not guess how to unwrap them.
22
23Register locations were independently checked against this machine's
24disassembled DSDT (SHA-256
25`2871cbcb8992f7bd3915d6f19e7cfab577e068dcad58b6f00317a9f2d4e1b28e`).
26The ACPI discovery protocol and milli-unit convention are also described by
27[spark_hwmon](https://github.com/antheas/spark_hwmon/blob/352c76e538cadece0e4887a153fef95f8f5ea1d4/spbm.c),
28licensed GPL-2.0. This reader follows that protocol but implements a narrower
29read-only contract. The firmware table supplies names and offsets, not a
30published accuracy specification.
31
32## Units and limits
33
34Raw energy is interpreted as 32-bit millijoules, exposed as microjoules. Raw
35power is interpreted as milliwatts, exposed as microwatts. The representational
36energy step is 1 mJ; that is not a claim of 1 mJ measurement accuracy.
37
38Energy channels are package, CPU-E, CPU-P, GPC and GPM. GPC stayed at zero in
39every collected window and is explicitly labelled `gpc_unverified`. It must
40not be used as evidence of zero GPU energy. GPM is the functioning graphics
41counter. The separately sampled NVML graphics counter covers a different
42measurement boundary; equality with GPM is not assumed.
43
44The package energy rate exceeded the integrated instantaneous package power
45by 0.27 to 0.52 W in the completed vector-load collection. The source of that
46discrepancy has not been established. Do not silently subtract it or call it
47calibrated accuracy. Neither source was compared with an external meter.
48These are on-device package measurements, not wall-outlet measurements.
49They cannot confirm or rule out a short electrical disturbance at the outlet.
50
51CPU sensor reads and NVML calls have separate timestamp intervals. NVML may
52block for several milliseconds; that delay must not be assigned to the CPU
53counter observation. All raw read intervals are retained.
54
55## Preliminary collections
56
57- `runs/preflight-20260928-01`: initial scalar load, completed. Its older
58 timestamp format grouped NVML with CPU sensor reads; exploratory only.
59- `runs/preflight-20260928-02`: vector load, aborted when that grouped read
60 span exceeded 10 ms. Partial records are retained; no successful status.
61- `runs/preflight-20260928-03`: corrected independent timestamps; three
62 idle, three CPU-P and three CPU-E windows, 101 samples per 10-second
63 window. It completed. `summary.json` is exactly reproduced by `reduce`.
64
65In collection 03, package energy rates were 19.65 to 19.85 W at idle and
6622.79 to 22.96 W under the CPU-P load. CPU-P's own rate rose from 1.87 to 2.07 W
67to 6.78 to 6.86 W. CPU-E's rate rose from 0.28 to 0.33 W at idle to 2.02 to 2.22 W
68under its load. All overflow indicators were zero. Each worker's CPU time and
69verified core affinity are recorded. Other machine activity was present and
70recorded; these runs are not a quiet-machine R15 qualification.
71
72Checks completed: signed reader loaded with Secure Boot enabled; firmware
73contract accepted; malformed register contracts rejected under address and
74undefined-behavior sanitizers; measurement attributes read-only; collection
75checksums verified; summary reproduced byte-for-byte; energy and integrated
76power calculations independently recomputed; damaged records with overflow,
77counter decrease, missing sample, and incorrect sequence rejected.
78
79After the operator reported a power surge, the load processes were confirmed
80stopped and the telemetry module was unloaded. The code changed no power
81limit or CPU governor. The operator has since authorized continuing work;
82give a clear heads-up before further load-generating tests.
83
84Forensic audit, 2026-09-28 12:00 (host journal): the surge report was at
8510:36 during the collection-02 CPU load; the module was removed at 10:37.
86It was loaded again at 10:53 and 11:09 from this directory by a session
87whose log is not on the Spark, and `kernel.perf_event_paranoid` was set to
880 (boot default 4, `CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y`). The owner
89approved leaving the read-only module loaded; paranoid was restored to 4 at
90the audit. The loaded module's srcversion (`D7345BB5C0CCFCB7B177335`) and
91`.ko` SHA-256 match `runs/preflight-20260928-03/source-binary.sha256`, and
92its signature serial matches the enrolled owner key. Secure Boot and
93integrity lockdown were on throughout.
94
95## Reproduction
96
97`make` builds the module against the running kernel; `make tools check`
98builds the small C sampler, bounded CPU load, reducer and contract checks.
99The module must be signed with the already enrolled owner key before manual
100loading. No service, boot autoload configuration, or power-control setting is
101installed. The private key remains outside this repository.
102
103`bash collect.sh NEW-DIRECTORY` deliberately drives ten CPU cores for
10414 seconds per load period, six periods total. It increases CPU activity and
105can increase power draw. The sampler records 10 seconds within each period.
106The collector refuses an existing directory and stops its load child on exit.
107The module must already be loaded; the collector does not load it.
108
109`./reduce RUN-DIRECTORY` reads only saved files and reproduces the V2 summary.
110`sha256sum -c SHA256SUMS` inside a completed run verifies its recorded files.
111The source/binary checksum list is checked from this directory. Earlier
112exploratory runs intentionally bind earlier source versions.