Beispiel #1
0
bool SuperIODevice::detectITEFamilyChip()
{
    // IT87XX can enter only on port 0x2E
    port = 0x2E;

    ite_family_enter(port);
    
    id = superio_listen_port_word(port, kSuperIOChipIDRegister);

    HWSensorsDebugLog("probing device on 0x%x, id=0x%x", port, id);

    ldn = 0;
    vendor = "";
    
    switch (id) {
        case IT8512F:
        case IT8712F:
        case IT8716F:
        case IT8718F:
        case IT8720F:
        case IT8721F:
        case IT8726F:
        case IT8620E:
        case IT8728F:
        case IT8752F:
        case IT8771E:
        case IT8772E:
            model = id;
            ldn = kFintekITEHardwareMonitorLDN;
            vendor = "ITE";
            break;
    }
    
    if (model != 0 && ldn != 0) {

        HWSensorsDebugLog("detected %s %s, starting address sanity checks", vendor, superio_get_model_name(model));

        superio_select_logical_device(port, ldn);
        
        IOSleep(10);
        
        address = superio_listen_port_word(port, kSuperIOBaseAddressRegister);
        
        IOSleep(10);
        
        UInt16 verify = superio_listen_port_word(port, kSuperIOBaseAddressRegister);
        
        IOSleep(10);
        
        ite_family_exit(port);
        
        if (address != verify || address < 0x100 || (address & 0xF007) != 0)
            return false;
        
        return true;
    }
    else ite_family_exit(port);
    
    return false;
}
Beispiel #2
0
bool SuperIODevice::detectITEFamilyChip()
{
    // IT87XX can enter only on port 0x2E
    port = 0x2E;

    ite_family_enter(port);
    
    id = superio_listen_port_word(port, kSuperIOChipIDRegister);
    
    ldn = 0;
    vendor = "";
    
    switch (id) {
        case IT8512F:
        case IT8712F:
        case IT8716F:
        case IT8718F:
        case IT8720F:
        case IT8721F:
        case IT8726F:
        case IT8728F:
        case IT8752F:
        case IT8771E:
        case IT8772E:
            model = id;
            ldn = kFintekITEHardwareMonitorLDN;
            vendor = "ITE";
            break;
    }
    
    if (model != 0 && ldn != 0) {
        superio_select_logical_device(port, ldn);
        
        IOSleep(10);
        
        address = superio_listen_port_word(port, kSuperIOBaseAddressRegister);
        
        IOSleep(10);
        
        UInt16 verify = superio_listen_port_word(port, kSuperIOBaseAddressRegister);
        
        IOSleep(10);
        
        ite_family_exit(port);
        
        if (address != verify || address < 0x100 || (address & 0xF007) != 0)
            return false;
        
        return true;
    }
    else ite_family_exit(port);
    
    return false;
}