Monitoring & data
A field guide to the subsystems that sense board state and store platform data. Each entry gives the role and the key files; the fan/GPU/telemetry actuation path is covered in the companion Fan, power & telemetry deep-dive.
- Voltage & temperature monitor
- Perf monitor
- SoC power smoothing
- GPIO & IOX
- Timers & watchdog
- Flash
- FRU
- Register datastore & register table
- VPP
- See also
Voltage & temperature monitor
Role: ADC-based monitoring of leak-detect rails, busbar temperature, MCU
internal temperature, and power-good voltages. The subsystem exposes a single
unified entry point, nv::volt_mon::init()
(src/nv/volt_mon/volt_mon.h:61), which brings up only the modules a project
enables (via LeakDetectSensorNum, BusBarTempSensorNum, etc.) and starts ADC
scanning in a conflict-free order. The header is explicit that this is the
only function main.cpp should call (src/nv/volt_mon/volt_mon.h:53).
Key files (src/nv/volt_mon/):
adc.h— the sharedAdcclass (src/nv/volt_mon/adc.h:89) with scanning vs. one-shot conversion, an RAIIOneShotGuardlock, and per-instance error tracking.busbar_temp.h— theBusbarTempNTC driver (src/nv/volt_mon/busbar_temp.h:48), including threshold config (overridable at runtime via NSMSetThermalParameter) and a 2-bit virtual-GPIO fault state.common.h— sensor structs (VoltMon,LeakDetectSensor,BusBarTempSensor,McuInternalTempSensor), theState/VrGpioStateenums, and ADC↔voltage conversion helpers. The ADC reference isAdcVolVref = 3317 mVat 16-bit resolution (src/nv/volt_mon/common.h:29).ntc_table.h,leak_detect.h,mcu_internal_temp.h,pgood_volt.h— the per-sensor families. MCU internal temp uses NXP’s VBE bandgap formula (src/nv/volt_mon/adc.h:75).legacy/andtimer/— two implementations: the legacy ISR-driven path and a timer-driven path (void init(TimerId, period),src/nv/volt_mon/volt_mon.h:75) that drains ADC FIFOs on a periodic timer.
Readings from this subsystem feed the telemetry cache and NSM thermal events.
Perf monitor
Role: Firmware performance and out-of-band (OOB) bus error monitoring.
nv::perf_mon::Driver (src/nv/perf_mon/perf_mon.h:91) is a singleton
(src/nv/perf_mon/perf_mon.cpp:52) that records per-task CPU execution time,
packet latency across the USB↔I3C path, interface throughput counters, and
firmware/RAM size usage derived from linker symbols.
CPU accounting is driven by task_switch_hook()
(src/nv/perf_mon/perf_mon.cpp:31), a FreeRTOS trace hook that charges elapsed
CTIMER ticks to the outgoing task on every context switch. OOB per-bus error
counters (OobBus enum) are maintained in a separate file,
perf_mon_oob_err.cpp — e.g. Driver::set_transaction_error()
(src/nv/perf_mon/perf_mon_oob_err.cpp:23) — and surfaced to hosts through
NSM.
Key files (src/nv/perf_mon/): perf_mon.h, perf_mon.cpp,
perf_mon_oob_err.cpp.
SoC power smoothing
Role: Real-time SoC power smoothing (the “MPF” — Modular Power Filter —
control chain) that reacts to the module’s state-of-charge every ADC
conversion. nv::soc_pwr_smoothing::PowerSmoothing
(src/nv/soc_pwr_smoothing/soc_pwr_smoothing.h:63) is the public façade over a
shared PowerManager and PresetManager.
The hot path is PowerSmoothing::adc_isr()
(src/nv/soc_pwr_smoothing/soc_pwr_smoothing.cpp:326) — placed in RAMX SRAM for
speed — which applies any pending preset change and then runs one filter
iteration via PowerManager::run_iteration()
(src/nv/soc_pwr_smoothing/power_manager.h:114), called roughly every 100 µs.
The filter is built from composable function blocks whose base class is
FuncBlock (src/nv/soc_pwr_smoothing/mpf.h:27). Settings that must survive a
power cycle (enable flags, active preset, max AC ramp rate) are persisted to
the flash PDS.
Key files (src/nv/soc_pwr_smoothing/): soc_pwr_smoothing.{h,cpp},
power_manager.h, mpf.h, presets.{h,cpp}, the policy blocks
(power_brake_policy.h, thermal_brake_policy.h, offset_policy.h),
runtime_cfg.h, and the NSM handlers in nsm_pwr_smoothing_handlers.cpp.
GPIO & IOX
Role: Pin-level I/O and I/O-expander emulation.
- GPIO (
src/nv/gpio/):nv::gpio::Driver(src/nv/gpio/driver.h:24) wraps the SoC GPIO peripheral with pin init, interrupt setup, andread()/write()including virtual-physical GPIO reads (src/nv/gpio/driver.h:52). The telemetry cache uses this driver to sample the board’s GPIO status word. - IOX (
src/nv/iox/):nv::iox::Iox(src/nv/iox/iox.h:41) is a PCA9555 I/O-expander emulation — it presents the standard PCA9555 register model over I2C while backing it with real SoC GPIO. It runs as its own RTOS task:Task::make()(src/nv/iox/task.cpp:39) with the work loop inTask::main()(src/nv/iox/task.cpp:79).
Timers & watchdog
Role: Timing primitives and task liveness enforcement.
- CTIMER (
src/nv/ctimer/):nv::ctimer::Driver(src/nv/ctimer/ctimer.h:27) is a thin wrapper over the SoC counter/timer, offeringread_ticks(),ticks_to_us(), anddelay_for_us()(src/nv/ctimer/ctimer.h:33). It is the tick source used by perf monitoring and the power-smoothing ISR timing checks. - Watchdog (
src/nv/watchdog/):nv::watchdog::Runtime(src/nv/watchdog/runtime.h:25) extends the SoC WWDT driver withinit()/update_timeout()/feed()(src/nv/watchdog/runtime.h:28) and a task-liveness scheme:start_task_status_query()(src/nv/watchdog/runtime.cpp:31) periodically polls monitored tasks and only feeds the hardware watchdog when they report alive (RetryThreshold = 2,src/nv/watchdog/runtime.h:37).boot.handnotify_interface.hcover boot-time watchdog state and the task-notify API.
Flash
Role: Non-volatile storage management — firmware slots, a persistent
data-store (PDS), OTP/eFuse, and CFPA/CMPA secure regions. nv::flash::Flash
(src/nv/flash/flash.h:28) is a request-based API whose calls (read,
write, erase, get_data/set_data) are marshaled to a dedicated flash
task (Task::make(), src/nv/flash/task.cpp:73) so callers never touch flash
hardware directly.
Two features stand out:
- Background copy for A/B firmware updates:
background_copy_start()(src/nv/flash/flash.cpp:138) andbackground_copy_query()report progress without blocking. - Persistent data store (PDS):
pds.{h,cpp}/npds.{h,cpp}back the key/value settings used by power smoothing and other modules;pds_pwr_smoothing_defaults.hseeds power-smoothing defaults.
Key files (src/nv/flash/): flash.{h,cpp}, task.{h,cpp},
background_copy.{h,cpp}, datastore.h, pds.{h,cpp}, npds.{h,cpp}.
FRU
Role: Read and parse FRU (Field Replaceable Unit) inventory EEPROMs over
I2C. The flow, per the header, is “FRU → EEPROM → I2C → Parser → API”
(src/nv/fru/fru.h:30). Two one-shot calls extract structured data into
fixed-size, allocation-free buffers: get_chassis_info()
(declaration src/nv/fru/fru.h:93, implementation
src/nv/fru/fru.cpp:292) returns chassis type, serial, and custom fields;
get_board_info() (src/nv/fru/fru.cpp:413) returns the board serial. A rich
Status enum distinguishes I2C-layer failures from parse/checksum errors
(src/nv/fru/fru.h:36).
Key files (src/nv/fru/): fru.h, fru.cpp.
Register datastore & register table
Role: A generic, host-facing register abstraction for telemetry and RAS.
- reg_table (
src/nv/reg_table/):nv::reg_table::Table(src/nv/reg_table/table.h:83) holds an array ofEntryrecords — each with a telemetryentry_id, a downstream handle, RAS/event control bits, and an API-type route (src/nv/reg_table/table.h:47). Host access is dispatched throughHooks::on_register_table_access()(src/nv/reg_table/hooks.cpp:24). The whole module compiles out tocommon::EmptywhenUBS_FEATURES_reg_tableis off (src/nv/reg_table/table.h:101). - reg_ds (
src/nv/reg_ds/): the downstream resource providers a table entry can route to, implementing theDsInterfacecontract —reg_ds::Infofor read-only table/metadata (src/nv/reg_ds/info.h:28) andreg_ds::Gpiofor GPIO-backed entries with read/write (src/nv/reg_ds/gpio.h:32).
(Interpretation: reg_table is the host-visible index; reg_ds supplies the actual values behind each index. Together they let a host read heterogeneous resources through one uniform register interface.)
VPP
Role: Voltage/Power-Protection for E1.S NVMe drive bays — hot-swap control
and presence/power-good handling, presented to a host as PCA9555 GPIO
expanders. nv::vpp::VPP (src/nv/vpp/vpp.h:31) owns a PCA9555 emulator and a
per-drive hot-swap state machine (E1sHotSwap, from hssm.h), driven by GPIO
interrupts and ADC voltage-monitor readings
(gpio_interrupt()/adc_interrupt(), src/nv/vpp/vpp.h:57). It runs as an
RTOS task (nv::vpp::Task, src/nv/vpp/task.h:46) with GPIO and ADC interrupt
callbacks that fan out to the right drive instance.
Key files (src/nv/vpp/): vpp.{h,cpp}, task.{h,cpp}, hssm.{h,cpp},
common.h.
See also
- Fan, power & telemetry — where these sensor readings are cached and served.
- Platform Control & Telemetry — section overview and subsystem table.
- Architecture — the task/supervisor model these drivers and tasks plug into.