summaryrefslogtreecommitdiff
path: root/sys/dev/sysmon
AgeCommit message (Collapse)Author
2013-09-15Remove unused variablemartin
2013-01-23Fix spelling, grammar, typos.mbalmer
2012-12-14Constifypgoyette
2012-12-14The sensor limit values were moved out of the event structure and into thepgoyette
per-sensor structure a long time ago. Garbage collect the old structure member which is now unused.
2012-12-11Replace a couple of many-line #define with equivalent code loops.pgoyette
No functional change intended, and atf tests (using swsensor(4)) still pass 100%
2012-11-29Remove trailing white space(s) from name of random source.msaitoh
And also, changind space(s) in the middle with '-'. PR#47232.
2012-10-31in sme_battery_check():macallan
- don't assume that all batteries have exactly one ENVSYS_INDICATOR - check capacity and charge sensors for ENVSYS_SVALID before using them now this works on macppc
2012-09-06opt_envsys.h needs #ifdef _KERNEL_OPTmacallan
( thanks martin@ )
2012-09-06Remove (commented-out) definitions for debugging - thanks to macallan@pgoyette
for defflagging these.
2012-09-06defflag debug #definesmacallan
2012-08-271. Enable use of FMONSTCHANGED events for INDICATOR sensorspgoyette
2. Update handling of FMONCRITICAL event reporting. The state transition does not require a corresponding change in value. With these changes, you can now have an INDICATOR sensor that reports the presence or absence of a device, and (if the device is present) separately monitor it for proper functioning. Should address the concerns expressed recently with the commit of changes to wmi(4) BBU handling.
2012-08-27Add hw.swsensor.state variable for additional control capability.pgoyette
2012-08-27Fix indentation. No code change.pgoyette
2012-08-27Simplify some logic - no functional change intended.pgoyette
While here, clean up a couple of comments.
2012-07-19Make sure to re-add the sensor as an entropy source after user requestpgoyette
to reset (via envstat -S)
2012-07-19If previously there was only a dummy event entry (to force refresh forpgoyette
entropy gathering), allow it to be updated for the current request to add a real entry.
2012-07-18Release the mutex before taking a quick exit.pgoyette
2012-07-16Extend previous changes so that even sensors which don't use a refresh()pgoyette
callback to update the value can be polled to provide rnd(4) entropy.
2012-07-15If a sensor is flagged as capable of providing rnd(4) with entropy,pgoyette
hook the sensor into rnd subsystem, and make sure we periodically refresh the sensor whether or not it is being actively monitored.
2012-07-15When unregistering a sensor device, make sure we unregister and deletepgoyette
all the associated events.
2012-02-18Don't export sysmon_envsys_list as a common.matt
2012-02-02Entropy-pool implementation move and cleanup.tls
1) Move core entropy-pool code and source/sink/sample management code to sys/kern from sys/dev. 2) Remove use of NRND as test for presence of entropy-pool code throughout source tree. 3) Remove use of RND_ENABLED in device drivers as microoptimization to avoid expensive operations on disabled entropy sources; make the rnd_add calls do this directly so all callers benefit. 4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might have lead to slight entropy overestimation for some sources. 5) Add new source types for environmental sensors, power sensors, VM system events, and skew between clocks, with a sample implementation for each. ok releng to go in before the branch due to the difficulty of later pullup (widespread #ifdef removal and moved files). Tested with release builds on amd64 and evbarm and live testing on amd64.
2011-08-01According to the Oxford Dictionary of Etymology, a wether is a male sheepmbalmer
or ram.
2011-07-22Ensure events come off the list in the same order they went on.jakllsch
Hotkey press/release events now happen in the correct order.
2011-06-19Use {...} to prevent premature exit from initialization function - thispgoyette
lets the atf tests run again. Move validation of current value vs min/max into the refresh routine where it will get checked every time, not just at initialization. While here, do a little more housekeeping: - Retrieve numeric property value once - Ensure that a numeric-specified sensor type is valid - printout any unrecognized properties (DEBUG only)
2011-06-19Instead of crashing, print a usable error message when a driver eroneouslymartin
does not properly initialize sensor state.
2011-06-19Pass table_id to sme_find_table().nonaka
2011-06-19fix typo.nonaka
2011-06-19simplify and don't deref NULL.christos
2011-06-19Use correct routine to retrieve string value from prop-dictionarypgoyette
2011-06-19Rather than requiring the user to know the internal encoding of sensorpgoyette
types, allow the user to specify the type using the units description. XXX Numeric specification is still permitted but will be removed soon.
2011-06-19Add routine to lookup description tables by description instead of bypgoyette
type.
2011-06-15Previous fix broke the setting of current value for Indicator andpgoyette
Battery-Charge sensors. Fix this.
2011-06-08Factor out some duplicated code to simplify maintenance. Reducespgoyette
the source file by ~100 lines, and amd64 object file shrinks by ~650 bytes. No functional change intended.
2011-06-08Restrict limit monitoring for Indicator sensors as well as forpgoyette
Battery-charge sensors.
2011-06-04Remove ability to the value_avg since it no longer existspgoyette
2011-06-04Since nothing actually records or maintains an average sensor value,pgoyette
remove value_avg from the prop_dict. We can't completely remove it because there's one driver that uses this field for its own private purposes, so for now we just rename the member.
2011-06-04Enable creation of value_{max,min,avg} entries via the proplist, as wellpgoyette
as setting the ENVSYS_FPERCENT flag
2011-01-04add support for autostarting watchdogs (wdog was started by firmwarematt
and can't be disabled). Add critical pool hooks for kernel tickled watchdogs.
2010-12-30When the user updates the sensor device's refresh timer, reset thepgoyette
callout immediately rather than waiting for the previous timer to expire.
2010-12-17use aprintpooka
2010-12-16Be sure to always initialize props variable to a sensible value.njoly
Fix a problem with envstat -S call which was installing bogus/random limits. ok pgoyette.
2010-12-16Also allow specification of sensor's initial value when it is loaded,pgoyette
using "-i value=<value>". Suggested by njoly@
2010-12-15Extract searching of description tables into a single function, ratherpgoyette
than duplicating the code every time. Minor reduction in code size (about 1200 bytes on amd64), no change in functionality.
2010-12-11Handle removal of limit properties correctly, even for sensors thatpgoyette
provide their own internal limit(s).
2010-12-11Enhance the swsensor(4) pseudo-device's capabilities to emulate morepgoyette
sensor types
2010-12-08When removing properties (as in envstat -S), clear the flags that trackpgoyette
whether the properties actually exist. When setting new limit values, don't complain/ignore about duplicate values if the associated flag bits (indicating that the limit is valid) are not set. These two fixes together should fix a problem reported in private Email by njoly@ a couple months ago. Issue replicated and solution tested using my recent swsensor pseudo-device running inside qemu world!
2010-12-06Make this compile when "options ENVSYS_OBJECTS_DEBUG" is defined.pgoyette
2010-11-11Apparently swwdog reboot hasn't worked in several years since itpooka
tried to cpu_reboot() from a callout. Make it reboot from a workq instead. problem made manifest by atf test rumpfs unmount flush caused issue to un-shush tested: rump kernel (tests/dev/sysmon) and qemu
2010-10-23Revert 1.2 apart from incorrect comment. the devattach() routinepooka
is of course still used by kernel&config pseudodev. pointed out by jakllsch