tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

sysmon_envsys - Setting sensor on-chip thresholds from userland



I'm working on a driver for On-DIMM temperature sensors for memory modules, similar to OpenBSD's sdtemp but with sysmon_envsys(9) support.

These sensors have on-chip limit registers for a Lower, Uppper, and Critical boundary setting, and have on-chip comparison and flag-bit setting when the actual temp transitions from one zone to another. (The sensor chips also have an event output pin, which might be able to generate an I2C interrupt, but that's a question for another day!)

I've been muddling through the sysmon_envsys stuff, and I'm having difficulty understanding how a userland program might provide some threshold values to the driver. Would it be correct (or at least acceptable) for the driver's sensor refresh routine to grovel through the sensor's event queue to find the values associated with certain monitor types (ie, ENVSYS_FMONWARNUNDER, WARNOVER, and CRITOVER)?

I'm also a bit more confused about all this, since the example in the sysmon_envsys(9) man page seems to use a hard-wired threshold for setting the sensor state, rather than using a limit from userland.

Any guidance in this area would be greatly appreciated.


----------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |  paul%whooppee.com@localhost   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette%juniper.net@localhost |
----------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index