thermal.h 749 B

123456789101112131415161718192021222324
  1. /* Intel digital thermal sensor (DTS) access. */
  2. #ifndef THERMAL_H
  3. #define THERMAL_H
  4. /* Probe once on the BSP (before the timer starts); logs the result to COM1. */
  5. void thermal_init(void);
  6. /* Sample this CPU's DTS. Called from the per-CPU scheduler tick, at most
  7. * once per second. */
  8. void thermal_tick(void);
  9. /* Read this CPU's DTS now: degrees C, or -1 when unavailable. */
  10. int thermal_read_this_cpu(void);
  11. /* Read this CPU's raw IA32_THERM_STATUS: 0 on success, -1 when unavailable. */
  12. int thermal_status_this_cpu(unsigned int *status);
  13. /* Hottest per-CPU reading cached by the ticks, or -1 when unavailable. */
  14. int thermal_max_c(void);
  15. /* TjMax used for the conversion, or 0 when DTS is unavailable. */
  16. int thermal_tjmax(void);
  17. #endif