What is the meaning of "Unable to read Pkg-TjMax from CPU" message?

Solution Unverified - Updated -

Environment

  • Red Hat Enterprise Linux 6.2
  • kernel-2.6.32-431.11.2

Issue

  • Why are following messages logged?
2014-07-09T23:57:19.122768-07:00 host kernel: coretemp coretemp.0: Unable to read Pkg-TjMax from CPU:0
2014-07-09T23:57:19.123753-07:00 host kernel: coretemp coretemp.0: CPU (model=0x3e) is not supported yet, using default TjMax of 100C.

Resolution

  • These messages appear to be part of coretemp driver, as per kernel documentation (/usr/share/doc/kernel-doc-2.6.32/Documentation/hwmon/coretemp) this driver permits reading temperature sensor embedded inside Intel Core CPU. Temperature is measured in degrees Celsius and measurement resolution is 1 degree C. Valid temperatures are from 0 to TjMax degrees C, because the actual value of temperature register is in fact a delta from TjMax.

  • Temperature known as TjMax is the maximum junction temperature of processor. Intel defines this temperature as 85C or 100C. Same document also lists the currently supported chips by coretemp driver:

  * All Intel Core family
    Prefix: 'coretemp'
    CPUID: family 0x6, models 0xe (Pentium M DC), 0xf (Core 2 DC 65nm),
                              0x16 (Core 2 SC 65nm), 0x17 (Penryn 45nm),
                              0x1a (Nehalem), 0x1c (Atom), 0x1e (Lynnfield)
  • Presence of these messages indicate that the CPU model of the system is 0x3e which is not yet supported by this driver.

Root Cause

  • "Unable to read Pkg-TjMax from CPU" message is printed when get_pkg_tjmax is called and coretemp is unable to read the TjMax from CPU:
static int get_pkg_tjmax(unsigned int cpu, struct device *dev)
{
    int err;
    u32 eax, edx, val;

    err = rdmsr_safe_on_cpu(cpu, MSR_IA32_TEMPERATURE_TARGET, &eax, &edx);
    if (!err) {
        val = (eax >> 16) & 0xff;
        if (val > 80 && val < 120)
            return val * 1000;
    }
    dev_warn(dev, "Unable to read Pkg-TjMax from CPU:%u\n", cpu);  <<<< here 
    return 100000; /* Default TjMax: 100 degree celsius */
}
  • And "CPU (model=0x3e) is not supported yet, using default TjMax of 100C" is getting printed by the get_tjmax function, it is printed when CPU is deemed unsupported and a default TjMax temperature is chosen instead:
static int get_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *dev)
{
    /* The 100C is default for both mobile and non mobile CPUs */
    int err;
    u32 eax, edx;
    u32 val;
..
..

    /*
     * An assumption is made for early CPUs and unreadable MSR.
     * NOTE: the given value may not be correct.
     */

    switch (c->x86_model) {
    case 0xe:
    case 0xf:
    case 0x16:
    case 0x1a:
        dev_warn(dev, "TjMax is assumed as 100 C!\n");
        return 100000;
        break;
    case 0x17:
    case 0x1c:      /* Atom CPUs */
        return adjust_tjmax(c, id, dev);
        break;
    default:
        dev_warn(dev, "CPU (model=0x%x) is not supported yet,"   <<<<< here
            " using default TjMax of 100C.\n", c->x86_model);
        return 100000;
    }
}

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.