Esempio n. 1
0
        private bool DetectSmsc(LpcPort port)
        {
            port.SmscEnter();

            ushort chipId = port.ReadWord(CHIP_ID_REGISTER);
            Chip   chip;

            switch (chipId)
            {
            default:
                chip = Chip.Unknown;
                break;
            }

            if (chip == Chip.Unknown)
            {
                if (chipId != 0 && chipId != 0xffff)
                {
                    port.SmscExit();
                    ReportUnknownChip(port, "SMSC", chipId);
                }
            }
            else
            {
                port.SmscExit();
                return(true);
            }

            return(false);
        }
Esempio n. 2
0
 private void ReportUnknownChip(LpcPort port, string type, int chip)
 {
     _report.Append("Chip ID: Unknown ");
     _report.Append(type);
     _report.Append(" with ID 0x");
     _report.Append(chip.ToString("X", CultureInfo.InvariantCulture));
     _report.Append(" at 0x");
     _report.Append(port.RegisterPort.ToString("X", CultureInfo.InvariantCulture));
     _report.Append("/0x");
     _report.AppendLine(port.ValuePort.ToString("X", CultureInfo.InvariantCulture));
     _report.AppendLine();
 }
Esempio n. 3
0
        private void Detect()
        {
            for (int i = 0; i < REGISTER_PORTS.Length; i++)
            {
                var port = new LpcPort(REGISTER_PORTS[i], VALUE_PORTS[i]);

                if (DetectWinbondFintek(port))
                {
                    continue;
                }

                if (DetectIT87(port))
                {
                    continue;
                }

                if (DetectSmsc(port))
                {
                    continue;
                }
            }
        }
        public Nct677X(Chip chip, byte revision, ushort port, LpcPort lpcPort)
        {
            Chip      = chip;
            _revision = revision;
            _port     = port;
            _lpcPort  = lpcPort;

            if (chip == Chip.NCT610XD)
            {
                VENDOR_ID_HIGH_REGISTER = 0x80FE;
                VENDOR_ID_LOW_REGISTER  = 0x00FE;

                FAN_PWM_OUT_REG      = new ushort[] { 0x04A, 0x04B, 0x04C };
                FAN_PWM_COMMAND_REG  = new ushort[] { 0x119, 0x129, 0x139 };
                FAN_CONTROL_MODE_REG = new ushort[] { 0x113, 0x123, 0x133 };

                _vBatMonitorControlRegister = 0x0318;
            }
            else if (chip == Chip.NCT6687D)
            {
                FAN_PWM_OUT_REG      = new ushort[] { 0x160, 0x161, 0x162, 0x163, 0x164, 0x165, 0x166, 0x167 };
                FAN_PWM_COMMAND_REG  = new ushort[] { 0xA28, 0xA29, 0xA2A, 0xA2B, 0xA2C, 0xA2D, 0xA2E, 0xA2F };
                FAN_CONTROL_MODE_REG = new ushort[] { 0xA00, 0xA00, 0xA00, 0xA00, 0xA00, 0xA00, 0xA00, 0xA00 };
                FAN_PWM_REQUEST_REG  = new ushort[] { 0xA01, 0xA01, 0xA01, 0xA01, 0xA01, 0xA01, 0xA01, 0xA01 };
            }
            else
            {
                VENDOR_ID_HIGH_REGISTER = 0x804F;
                VENDOR_ID_LOW_REGISTER  = 0x004F;

                if (chip == Chip.NCT6797D || chip == Chip.NCT6798D)
                {
                    FAN_PWM_OUT_REG = new ushort[] { 0x001, 0x003, 0x011, 0x013, 0x015, 0xA09, 0xB09 }
                }
                ;
                else
                {
                    FAN_PWM_OUT_REG = new ushort[] { 0x001, 0x003, 0x011, 0x013, 0x015, 0x017, 0x029 }
                };

                FAN_PWM_COMMAND_REG  = new ushort[] { 0x109, 0x209, 0x309, 0x809, 0x909, 0xA09, 0xB09 };
                FAN_CONTROL_MODE_REG = new ushort[] { 0x102, 0x202, 0x302, 0x802, 0x902, 0xA02, 0xB02 };

                _vBatMonitorControlRegister = 0x005D;
            }

            _isNuvotonVendor = IsNuvotonVendor();

            if (!_isNuvotonVendor)
            {
                return;
            }


            switch (chip)
            {
            case Chip.NCT6771F:
            case Chip.NCT6776F:
            {
                if (chip == Chip.NCT6771F)
                {
                    Fans = new float?[4];

                    // min value RPM value with 16-bit fan counter
                    _minFanRpm = (int)(1.35e6 / 0xFFFF);

                    _temperaturesSource = new[] { (byte)SourceNct6771F.PECI_0, (byte)SourceNct6771F.CPUTIN, (byte)SourceNct6771F.AUXTIN, (byte)SourceNct6771F.SYSTIN };
                }
                else
                {
                    Fans = new float?[5];

                    // min value RPM value with 13-bit fan counter
                    _minFanRpm = (int)(1.35e6 / 0x1FFF);

                    _temperaturesSource = new[] { (byte)SourceNct6776F.PECI_0, (byte)SourceNct6776F.CPUTIN, (byte)SourceNct6776F.AUXTIN, (byte)SourceNct6776F.SYSTIN };
                }

                _fanRpmRegister = new ushort[5];
                for (int i = 0; i < _fanRpmRegister.Length; i++)
                {
                    _fanRpmRegister[i] = (ushort)(0x656 + (i << 1));
                }

                Controls = new float?[3];

                Voltages             = new float?[9];
                _voltageRegisters    = new ushort[] { 0x020, 0x021, 0x022, 0x023, 0x024, 0x025, 0x026, 0x550, 0x551 };
                _voltageVBatRegister = 0x551;

                Temperatures                  = new float?[4];
                _temperatureRegister          = new ushort[] { 0x027, 0x073, 0x075, 0x077, 0x150, 0x250, 0x62B, 0x62C, 0x62D };
                _temperatureHalfRegister      = new ushort[] { 0, 0x074, 0x076, 0x078, 0x151, 0x251, 0x62E, 0x62E, 0x62E };
                _temperatureHalfBit           = new[] { -1, 7, 7, 7, 7, 7, 0, 1, 2 };
                _temperatureSourceRegister    = new ushort[] { 0x621, 0x100, 0x200, 0x300, 0x622, 0x623, 0x624, 0x625, 0x626 };
                _alternateTemperatureRegister = new ushort?[] { null, null, null, null };

                break;
            }

            case Chip.NCT6779D:
            case Chip.NCT6791D:
            case Chip.NCT6792D:
            case Chip.NCT6792DA:
            case Chip.NCT6793D:
            case Chip.NCT6795D:
            case Chip.NCT6796D:
            case Chip.NCT6796DR:
            case Chip.NCT6797D:
            case Chip.NCT6798D:
            {
                switch (chip)
                {
                case Chip.NCT6779D:
                {
                    Fans     = new float?[5];
                    Controls = new float?[5];
                    break;
                }

                case Chip.NCT6797D:
                case Chip.NCT6798D:
                {
                    Fans     = new float?[7];
                    Controls = new float?[7];
                    break;
                }

                default:
                {
                    Fans     = new float?[6];
                    Controls = new float?[6];
                    break;
                }
                }

                _fanCountRegister = new ushort[] { 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4CC };

                // max value for 13-bit fan counter
                _maxFanCount = 0x1FFF;

                // min value that could be transferred to 16-bit RPM registers
                _minFanCount = 0x15;

                Voltages             = new float?[15];
                _voltageRegisters    = new ushort[] { 0x480, 0x481, 0x482, 0x483, 0x484, 0x485, 0x486, 0x487, 0x488, 0x489, 0x48A, 0x48B, 0x48C, 0x48D, 0x48E };
                _voltageVBatRegister = 0x488;
                Temperatures         = new float?[7];
                _temperaturesSource  = new[]
                {
                    (byte)SourceNct67Xxd.PECI_0,
                    (byte)SourceNct67Xxd.CPUTIN,
                    (byte)SourceNct67Xxd.SYSTIN,
                    (byte)SourceNct67Xxd.AUXTIN0,
                    (byte)SourceNct67Xxd.AUXTIN1,
                    (byte)SourceNct67Xxd.AUXTIN2,
                    (byte)SourceNct67Xxd.AUXTIN3
                };

                _temperatureRegister          = new ushort[] { 0x027, 0x073, 0x075, 0x077, 0x079, 0x07B, 0x150 };
                _temperatureHalfRegister      = new ushort[] { 0, 0x074, 0x076, 0x078, 0x07A, 0x07C, 0x151 };
                _temperatureHalfBit           = new[] { -1, 7, 7, 7, 7, 7, 7 };
                _temperatureSourceRegister    = new ushort[] { 0x621, 0x100, 0x200, 0x300, 0x800, 0x900, 0x622 };
                _alternateTemperatureRegister = new ushort?[] { null, 0x491, 0x490, 0x492, 0x493, 0x494, 0x495 };
                break;
            }

            case Chip.NCT610XD:
            {
                Fans     = new float?[3];
                Controls = new float?[3];

                _fanRpmRegister = new ushort[3];
                for (int i = 0; i < _fanRpmRegister.Length; i++)
                {
                    _fanRpmRegister[i] = (ushort)(0x030 + (i << 1));
                }

                // min value RPM value with 13-bit fan counter
                _minFanRpm = (int)(1.35e6 / 0x1FFF);

                Voltages             = new float?[9];
                _voltageRegisters    = new ushort[] { 0x300, 0x301, 0x302, 0x303, 0x304, 0x305, 0x307, 0x308, 0x309 };
                _voltageVBatRegister = 0x308;
                Temperatures         = new float?[4];
                _temperaturesSource  = new[] { (byte)SourceNct610X.PECI_0, (byte)SourceNct610X.SYSTIN, (byte)SourceNct610X.CPUTIN, (byte)SourceNct610X.AUXTIN };

                _temperatureRegister          = new ushort[] { 0x027, 0x018, 0x019, 0x01A };
                _temperatureHalfRegister      = new ushort[] { 0, 0x01B, 0x11B, 0x21B };
                _temperatureHalfBit           = new[] { -1, 7, 7, 7 };
                _temperatureSourceRegister    = new ushort[] { 0x621, 0x100, 0x200, 0x300 };
                _alternateTemperatureRegister = new ushort?[] { null, 0x018, 0x019, 0x01A };

                break;
            }

            case Chip.NCT6687D:
            {
                Fans         = new float?[8];
                Controls     = new float?[8];
                Voltages     = new float?[14];
                Temperatures = new float?[7];

                // CPU
                // System
                // MOS
                // PCH
                // CPU Socket
                // PCIE_1
                // M2_1
                _temperatureRegister = new ushort[] { 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C };

                // VIN0 +12V
                // VIN1 +5V
                // VIN2 VCore
                // VIN3 SIO
                // VIN4 DRAM
                // VIN5 CPU IO
                // VIN6 CPU SA
                // VIN7 SIO
                // 3VCC I/O +3.3
                // SIO VTT
                // SIO VREF
                // SIO VSB
                // SIO AVSB
                // SIO VBAT
                _voltageRegisters = new ushort[] { 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x13A, 0x13E, 0x136, 0x138, 0x13C };

                // CPU Fan
                // PUMP Fan
                // SYS Fan 1
                // SYS Fan 2
                // SYS Fan 3
                // SYS Fan 4
                // SYS Fan 5
                // SYS Fan 6
                _fanRpmRegister = new ushort[] { 0x140, 0x142, 0x144, 0x146, 0x148, 0x14A, 0x14C, 0x14E };

                _restoreDefaultFanControlRequired = new bool[_fanRpmRegister.Length];
                _initialFanControlMode            = new byte[_fanRpmRegister.Length];
                _initialFanPwmCommand             = new byte[_fanRpmRegister.Length];

                // initialize
                ushort initRegister = 0x180;
                byte   data         = ReadByte(initRegister);
                if ((data & 0x80) == 0)
                {
                    WriteByte(initRegister, (byte)(data | 0x80));
                }

                // enable SIO voltage
                WriteByte(0x1BB, 0x61);
                WriteByte(0x1BC, 0x62);
                WriteByte(0x1BD, 0x63);
                WriteByte(0x1BE, 0x64);
                WriteByte(0x1BF, 0x65);

                _alternateTemperatureRegister = new ushort?[] { null };

                break;
            }
            }
        }
Esempio n. 5
0
        private bool DetectIT87(LpcPort port)
        {
            // IT87XX can enter only on port 0x2E
            // IT8792 using 0x4E
            if (port.RegisterPort != 0x2E && port.RegisterPort != 0x4E)
            {
                return(false);
            }


            port.IT87Enter();

            ushort chipId = port.ReadWord(CHIP_ID_REGISTER);
            Chip   chip;

            switch (chipId)
            {
            case 0x8620:
                chip = Chip.IT8620E;
                break;

            case 0x8628:
                chip = Chip.IT8628E;
                break;

            case 0x8665:
                chip = Chip.IT8665E;
                break;

            case 0x8686:
                chip = Chip.IT8686E;
                break;

            case 0x8688:
                chip = Chip.IT8688E;
                break;

            case 0x8705:
                chip = Chip.IT8705F;
                break;

            case 0x8712:
                chip = Chip.IT8712F;
                break;

            case 0x8716:
                chip = Chip.IT8716F;
                break;

            case 0x8718:
                chip = Chip.IT8718F;
                break;

            case 0x8720:
                chip = Chip.IT8720F;
                break;

            case 0x8721:
                chip = Chip.IT8721F;
                break;

            case 0x8726:
                chip = Chip.IT8726F;
                break;

            case 0x8728:
                chip = Chip.IT8728F;
                break;

            case 0x8771:
                chip = Chip.IT8771E;
                break;

            case 0x8772:
                chip = Chip.IT8772E;
                break;

            case 0x8733:
                chip = Chip.IT879XE;
                break;

            default:
                chip = Chip.Unknown;
                break;
            }

            if (chip == Chip.Unknown)
            {
                if (chipId != 0 && chipId != 0xffff)
                {
                    port.IT87Exit();

                    ReportUnknownChip(port, "ITE", chipId);
                }
            }
            else
            {
                port.Select(IT87_ENVIRONMENT_CONTROLLER_LDN);
                ushort address = port.ReadWord(BASE_ADDRESS_REGISTER);
                Thread.Sleep(1);
                ushort verify = port.ReadWord(BASE_ADDRESS_REGISTER);

                byte version = (byte)(port.ReadByte(IT87_CHIP_VERSION_REGISTER) & 0x0F);

                ushort gpioAddress;
                ushort gpioVerify;

                if (chip == Chip.IT8705F)
                {
                    port.Select(IT8705_GPIO_LDN);
                    gpioAddress = port.ReadWord(BASE_ADDRESS_REGISTER);
                    Thread.Sleep(1);
                    gpioVerify = port.ReadWord(BASE_ADDRESS_REGISTER);
                }
                else
                {
                    port.Select(IT87XX_GPIO_LDN);
                    gpioAddress = port.ReadWord(BASE_ADDRESS_REGISTER + 2);
                    Thread.Sleep(1);
                    gpioVerify = port.ReadWord(BASE_ADDRESS_REGISTER + 2);
                }

                port.IT87Exit();

                if (address != verify || address < 0x100 || (address & 0xF007) != 0)
                {
                    _report.Append("Chip ID: 0x");
                    _report.AppendLine(chip.ToString("X"));
                    _report.Append("Error: Invalid address 0x");
                    _report.AppendLine(address.ToString("X", CultureInfo.InvariantCulture));
                    _report.AppendLine();

                    return(false);
                }

                if (gpioAddress != gpioVerify || gpioAddress < 0x100 || (gpioAddress & 0xF007) != 0)
                {
                    _report.Append("Chip ID: 0x");
                    _report.AppendLine(chip.ToString("X"));
                    _report.Append("Error: Invalid GPIO address 0x");
                    _report.AppendLine(gpioAddress.ToString("X", CultureInfo.InvariantCulture));
                    _report.AppendLine();

                    return(false);
                }

                _superIOs.Add(new IT87XX(chip, address, gpioAddress, version));
                return(true);
            }

            return(false);
        }
Esempio n. 6
0
        private bool DetectWinbondFintek(LpcPort port)
        {
            port.WinbondNuvotonFintekEnter();

            byte logicalDeviceNumber = 0;
            byte id       = port.ReadByte(CHIP_ID_REGISTER);
            byte revision = port.ReadByte(CHIP_REVISION_REGISTER);
            Chip chip     = Chip.Unknown;

            switch (id)
            {
            case 0x05:
            {
                switch (revision)
                {
                case 0x07:
                {
                    chip = Chip.F71858;
                    logicalDeviceNumber = F71858_HARDWARE_MONITOR_LDN;
                    break;
                }

                case 0x41:
                {
                    chip = Chip.F71882;
                    logicalDeviceNumber = FINTEK_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0x06:
            {
                switch (revision)
                {
                case 0x01:
                {
                    chip = Chip.F71862;
                    logicalDeviceNumber = FINTEK_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0x07:
            {
                switch (revision)
                {
                case 0x23:
                {
                    chip = Chip.F71889F;
                    logicalDeviceNumber = FINTEK_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0x08:
            {
                switch (revision)
                {
                case 0x14:
                {
                    chip = Chip.F71869;
                    logicalDeviceNumber = FINTEK_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0x09:
            {
                switch (revision)
                {
                case 0x01:
                {
                    chip = Chip.F71808E;
                    logicalDeviceNumber = FINTEK_HARDWARE_MONITOR_LDN;
                    break;
                }

                case 0x09:
                {
                    chip = Chip.F71889ED;
                    logicalDeviceNumber = FINTEK_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0x10:
            {
                switch (revision)
                {
                case 0x05:
                {
                    chip = Chip.F71889AD;
                    logicalDeviceNumber = FINTEK_HARDWARE_MONITOR_LDN;
                    break;
                }

                case 0x07:
                {
                    chip = Chip.F71869A;
                    logicalDeviceNumber = FINTEK_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0x11:
            {
                switch (revision)
                {
                case 0x06:
                {
                    chip = Chip.F71878AD;
                    logicalDeviceNumber = FINTEK_HARDWARE_MONITOR_LDN;
                    break;
                }

                case 0x18:
                {
                    chip = Chip.F71811;
                    logicalDeviceNumber = FINTEK_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0x52:
            {
                switch (revision)
                {
                case 0x17:
                case 0x3A:
                case 0x41:
                {
                    chip = Chip.W83627HF;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0x82:
            {
                switch (revision & 0xF0)
                {
                case 0x80:
                {
                    chip = Chip.W83627THF;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0x85:
            {
                switch (revision)
                {
                case 0x41:
                {
                    chip = Chip.W83687THF;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0x88:
            {
                switch (revision & 0xF0)
                {
                case 0x50:
                case 0x60:
                {
                    chip = Chip.W83627EHF;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0xA0:
            {
                switch (revision & 0xF0)
                {
                case 0x20:
                {
                    chip = Chip.W83627DHG;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0xA5:
            {
                switch (revision & 0xF0)
                {
                case 0x10:
                {
                    chip = Chip.W83667HG;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0xB0:
            {
                switch (revision & 0xF0)
                {
                case 0x70:
                {
                    chip = Chip.W83627DHGP;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0xB3:
            {
                switch (revision & 0xF0)
                {
                case 0x50:
                {
                    chip = Chip.W83667HGB;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0xB4:
            {
                switch (revision & 0xF0)
                {
                case 0x70:
                {
                    chip = Chip.NCT6771F;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0xC3:
            {
                switch (revision & 0xF0)
                {
                case 0x30:
                {
                    chip = Chip.NCT6776F;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0xC4:
            {
                switch (revision & 0xF0)
                {
                case 0x50:
                {
                    chip = Chip.NCT610XD;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0xC5:
            {
                switch (revision & 0xF0)
                {
                case 0x60:
                {
                    chip = Chip.NCT6779D;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0xC8:
            {
                switch (revision)
                {
                case 0x03:
                {
                    chip = Chip.NCT6791D;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0xC9:
            {
                switch (revision)
                {
                case 0x11:
                {
                    chip = Chip.NCT6792D;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }

                case 0x13:
                {
                    chip = Chip.NCT6792DA;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0xD1:
            {
                switch (revision)
                {
                case 0x21:
                {
                    chip = Chip.NCT6793D;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0xD3:
            {
                switch (revision)
                {
                case 0x52:
                {
                    chip = Chip.NCT6795D;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }

            case 0xD4:
            {
                switch (revision)
                {
                case 0x23:
                {
                    chip = Chip.NCT6796D;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }

                case 0x2A:
                {
                    chip = Chip.NCT6796DR;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }

                case 0x51:
                {
                    chip = Chip.NCT6797D;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }

                case 0x2B:
                {
                    chip = Chip.NCT6798D;
                    logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
                    break;
                }
                }

                break;
            }
            }

            if (chip == Chip.Unknown)
            {
                if (id != 0 && id != 0xff)
                {
                    port.WinbondNuvotonFintekExit();
                    ReportUnknownChip(port, "Winbond / Nuvoton / Fintek", (id << 8) | revision);
                }
            }
            else
            {
                port.Select(logicalDeviceNumber);
                ushort address = port.ReadWord(BASE_ADDRESS_REGISTER);
                Thread.Sleep(1);
                ushort verify = port.ReadWord(BASE_ADDRESS_REGISTER);

                ushort vendorId = port.ReadWord(FINTEK_VENDOR_ID_REGISTER);

                // disable the hardware monitor i/o space lock on NCT679XD chips
                if (address == verify && (chip == Chip.NCT6791D ||
                                          chip == Chip.NCT6792D ||
                                          chip == Chip.NCT6792DA ||
                                          chip == Chip.NCT6793D ||
                                          chip == Chip.NCT6795D ||
                                          chip == Chip.NCT6796D ||
                                          chip == Chip.NCT6796DR ||
                                          chip == Chip.NCT6798D ||
                                          chip == Chip.NCT6797D))
                {
                    port.NuvotonDisableIOSpaceLock();
                }

                port.WinbondNuvotonFintekExit();

                if (address != verify)
                {
                    _report.Append("Chip ID: 0x");
                    _report.AppendLine(chip.ToString("X"));
                    _report.Append("Chip revision: 0x");
                    _report.AppendLine(revision.ToString("X", CultureInfo.InvariantCulture));
                    _report.AppendLine("Error: Address verification failed");
                    _report.AppendLine();

                    return(false);
                }

                // some Fintek chips have address register offset 0x05 added already
                if ((address & 0x07) == 0x05)
                {
                    address &= 0xFFF8;
                }

                if (address < 0x100 || (address & 0xF007) != 0)
                {
                    _report.Append("Chip ID: 0x");
                    _report.AppendLine(chip.ToString("X"));
                    _report.Append("Chip revision: 0x");
                    _report.AppendLine(revision.ToString("X", CultureInfo.InvariantCulture));
                    _report.Append("Error: Invalid address 0x");
                    _report.AppendLine(address.ToString("X", CultureInfo.InvariantCulture));
                    _report.AppendLine();

                    return(false);
                }

                switch (chip)
                {
                case Chip.W83627DHG:
                case Chip.W83627DHGP:
                case Chip.W83627EHF:
                case Chip.W83627HF:
                case Chip.W83627THF:
                case Chip.W83667HG:
                case Chip.W83667HGB:
                case Chip.W83687THF:
                {
                    _superIOs.Add(new W836XX(chip, revision, address));
                    break;
                }

                case Chip.NCT610XD:
                case Chip.NCT6771F:
                case Chip.NCT6776F:
                case Chip.NCT6779D:
                case Chip.NCT6791D:
                case Chip.NCT6792D:
                case Chip.NCT6792DA:
                case Chip.NCT6793D:
                case Chip.NCT6795D:
                case Chip.NCT6796D:
                case Chip.NCT6796DR:
                case Chip.NCT6797D:
                case Chip.NCT6798D:
                {
                    _superIOs.Add(new Nct677X(chip, revision, address, port));
                    break;
                }

                case Chip.F71858:
                case Chip.F71862:
                case Chip.F71869:
                case Chip.F71878AD:
                case Chip.F71869A:
                case Chip.F71882:
                case Chip.F71889AD:
                case Chip.F71889ED:
                case Chip.F71889F:
                case Chip.F71808E:
                {
                    if (vendorId != FINTEK_VENDOR_ID)
                    {
                        _report.Append("Chip ID: 0x");
                        _report.AppendLine(chip.ToString("X"));
                        _report.Append("Chip revision: 0x");
                        _report.AppendLine(revision.ToString("X", CultureInfo.InvariantCulture));
                        _report.Append("Error: Invalid vendor ID 0x");
                        _report.AppendLine(vendorId.ToString("X", CultureInfo.InvariantCulture));
                        _report.AppendLine();

                        return(false);
                    }

                    _superIOs.Add(new F718XX(chip, address));
                    break;
                }
                }

                return(true);
            }

            return(false);
        }
Esempio n. 7
0
        public Nct677X(Chip chip, byte revision, ushort port, LpcPort lpcPort)
        {
            Chip      = chip;
            _revision = revision;
            _port     = port;
            _lpcPort  = lpcPort;

            if (chip == Chip.NCT610XD)
            {
                VENDOR_ID_HIGH_REGISTER = 0x80FE;
                VENDOR_ID_LOW_REGISTER  = 0x00FE;

                FAN_PWM_OUT_REG      = new ushort[] { 0x04A, 0x04B, 0x04C };
                FAN_PWM_COMMAND_REG  = new ushort[] { 0x119, 0x129, 0x139 };
                FAN_CONTROL_MODE_REG = new ushort[] { 0x113, 0x123, 0x133 };

                _vBatMonitorControlRegister = 0x0318;
            }
            else
            {
                VENDOR_ID_HIGH_REGISTER = 0x804F;
                VENDOR_ID_LOW_REGISTER  = 0x004F;

                if (chip == Chip.NCT6797D || chip == Chip.NCT6798D)
                {
                    FAN_PWM_OUT_REG = new ushort[] { 0x001, 0x003, 0x011, 0x013, 0x015, 0xA09, 0xB09 }
                }
                ;
                else
                {
                    FAN_PWM_OUT_REG = new ushort[] { 0x001, 0x003, 0x011, 0x013, 0x015, 0x017, 0x029 }
                };

                FAN_PWM_COMMAND_REG  = new ushort[] { 0x109, 0x209, 0x309, 0x809, 0x909, 0xA09, 0xB09 };
                FAN_CONTROL_MODE_REG = new ushort[] { 0x102, 0x202, 0x302, 0x802, 0x902, 0xA02, 0xB02 };

                _vBatMonitorControlRegister = 0x005D;
            }

            _isNuvotonVendor = IsNuvotonVendor();

            if (!_isNuvotonVendor)
            {
                return;
            }


            switch (chip)
            {
            case Chip.NCT6771F:
            case Chip.NCT6776F:
            {
                if (chip == Chip.NCT6771F)
                {
                    Fans = new float?[4];

                    // min value RPM value with 16-bit fan counter
                    _minFanRpm = (int)(1.35e6 / 0xFFFF);

                    _temperaturesSource = new[] { (byte)SourceNct6771F.PECI_0, (byte)SourceNct6771F.CPUTIN, (byte)SourceNct6771F.AUXTIN, (byte)SourceNct6771F.SYSTIN };
                }
                else
                {
                    Fans = new float?[5];

                    // min value RPM value with 13-bit fan counter
                    _minFanRpm = (int)(1.35e6 / 0x1FFF);

                    _temperaturesSource = new[] { (byte)SourceNct6776F.PECI_0, (byte)SourceNct6776F.CPUTIN, (byte)SourceNct6776F.AUXTIN, (byte)SourceNct6776F.SYSTIN };
                }

                _fanRpmRegister = new ushort[5];
                for (int i = 0; i < _fanRpmRegister.Length; i++)
                {
                    _fanRpmRegister[i] = (ushort)(0x656 + (i << 1));
                }

                Controls = new float?[3];

                Voltages             = new float?[9];
                _voltageRegisters    = new ushort[] { 0x020, 0x021, 0x022, 0x023, 0x024, 0x025, 0x026, 0x550, 0x551 };
                _voltageVBatRegister = 0x551;

                Temperatures                  = new float?[4];
                _temperatureRegister          = new ushort[] { 0x027, 0x073, 0x075, 0x077, 0x150, 0x250, 0x62B, 0x62C, 0x62D };
                _temperatureHalfRegister      = new ushort[] { 0, 0x074, 0x076, 0x078, 0x151, 0x251, 0x62E, 0x62E, 0x62E };
                _temperatureHalfBit           = new[] { -1, 7, 7, 7, 7, 7, 0, 1, 2 };
                _temperatureSourceRegister    = new ushort[] { 0x621, 0x100, 0x200, 0x300, 0x622, 0x623, 0x624, 0x625, 0x626 };
                _alternateTemperatureRegister = new ushort?[] { null, null, null, null };

                break;
            }

            case Chip.NCT6779D:
            case Chip.NCT6791D:
            case Chip.NCT6792D:
            case Chip.NCT6792DA:
            case Chip.NCT6793D:
            case Chip.NCT6795D:
            case Chip.NCT6796D:
            case Chip.NCT6796DR:
            case Chip.NCT6797D:
            case Chip.NCT6798D:
            {
                switch (chip)
                {
                case Chip.NCT6779D:
                {
                    Fans     = new float?[5];
                    Controls = new float?[5];
                    break;
                }

                case Chip.NCT6797D:
                case Chip.NCT6798D:
                {
                    Fans     = new float?[7];
                    Controls = new float?[7];
                    break;
                }

                default:
                {
                    Fans     = new float?[6];
                    Controls = new float?[6];
                    break;
                }
                }

                _fanCountRegister = new ushort[] { 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4CC };

                // max value for 13-bit fan counter
                _maxFanCount = 0x1FFF;

                // min value that could be transferred to 16-bit RPM registers
                _minFanCount = 0x15;

                Voltages             = new float?[15];
                _voltageRegisters    = new ushort[] { 0x480, 0x481, 0x482, 0x483, 0x484, 0x485, 0x486, 0x487, 0x488, 0x489, 0x48A, 0x48B, 0x48C, 0x48D, 0x48E };
                _voltageVBatRegister = 0x488;
                Temperatures         = new float?[7];
                _temperaturesSource  = new[]
                {
                    (byte)SourceNct67Xxd.PECI_0,
                    (byte)SourceNct67Xxd.CPUTIN,
                    (byte)SourceNct67Xxd.SYSTIN,
                    (byte)SourceNct67Xxd.AUXTIN0,
                    (byte)SourceNct67Xxd.AUXTIN1,
                    (byte)SourceNct67Xxd.AUXTIN2,
                    (byte)SourceNct67Xxd.AUXTIN3
                };

                _temperatureRegister          = new ushort[] { 0x027, 0x073, 0x075, 0x077, 0x079, 0x07B, 0x150 };
                _temperatureHalfRegister      = new ushort[] { 0, 0x074, 0x076, 0x078, 0x07A, 0x07C, 0x151 };
                _temperatureHalfBit           = new[] { -1, 7, 7, 7, 7, 7, 7 };
                _temperatureSourceRegister    = new ushort[] { 0x621, 0x100, 0x200, 0x300, 0x800, 0x900, 0x622 };
                _alternateTemperatureRegister = new ushort?[] { null, 0x491, 0x490, 0x492, 0x493, 0x494, 0x495 };
                break;
            }

            case Chip.NCT610XD:
            {
                Fans     = new float?[3];
                Controls = new float?[3];

                _fanRpmRegister = new ushort[3];
                for (int i = 0; i < _fanRpmRegister.Length; i++)
                {
                    _fanRpmRegister[i] = (ushort)(0x030 + (i << 1));
                }

                // min value RPM value with 13-bit fan counter
                _minFanRpm = (int)(1.35e6 / 0x1FFF);

                Voltages             = new float?[9];
                _voltageRegisters    = new ushort[] { 0x300, 0x301, 0x302, 0x303, 0x304, 0x305, 0x307, 0x308, 0x309 };
                _voltageVBatRegister = 0x308;
                Temperatures         = new float?[4];
                _temperaturesSource  = new[] { (byte)SourceNct610X.PECI_0, (byte)SourceNct610X.SYSTIN, (byte)SourceNct610X.CPUTIN, (byte)SourceNct610X.AUXTIN };

                _temperatureRegister          = new ushort[] { 0x027, 0x018, 0x019, 0x01A };
                _temperatureHalfRegister      = new ushort[] { 0, 0x01B, 0x11B, 0x21B };
                _temperatureHalfBit           = new[] { -1, 7, 7, 7 };
                _temperatureSourceRegister    = new ushort[] { 0x621, 0x100, 0x200, 0x300 };
                _alternateTemperatureRegister = new ushort?[] { null, 0x018, 0x019, 0x01A };

                break;
            }
            }
        }
        public Nct677X(Chip chip, byte revision, ushort port, LpcPort lpcPort)
        {
            Chip      = chip;
            _revision = revision;
            _port     = port;
            _lpcPort  = lpcPort;

            if (chip == Chip.NCT610XD)
            {
                VENDOR_ID_HIGH_REGISTER = 0x80FE;
                VENDOR_ID_LOW_REGISTER  = 0x00FE;

                FAN_PWM_OUT_REG      = new ushort[] { 0x04A, 0x04B, 0x04C };
                FAN_PWM_COMMAND_REG  = new ushort[] { 0x119, 0x129, 0x139 };
                FAN_CONTROL_MODE_REG = new ushort[] { 0x113, 0x123, 0x133 };

                _vBatMonitorControlRegister = 0x0318;
            }
            else if (chip == Chip.NCT6687D || chip == Chip.NCT6683D)
            {
                FAN_PWM_OUT_REG      = new ushort[] { 0x160, 0x161, 0x162, 0x163, 0x164, 0x165, 0x166, 0x167 };
                FAN_PWM_COMMAND_REG  = new ushort[] { 0xA28, 0xA29, 0xA2A, 0xA2B, 0xA2C, 0xA2D, 0xA2E, 0xA2F };
                FAN_CONTROL_MODE_REG = new ushort[] { 0xA00, 0xA00, 0xA00, 0xA00, 0xA00, 0xA00, 0xA00, 0xA00 };
                FAN_PWM_REQUEST_REG  = new ushort[] { 0xA01, 0xA01, 0xA01, 0xA01, 0xA01, 0xA01, 0xA01, 0xA01 };
            }
            else
            {
                VENDOR_ID_HIGH_REGISTER = 0x804F;
                VENDOR_ID_LOW_REGISTER  = 0x004F;

                if (chip == Chip.NCT6797D || chip == Chip.NCT6798D)
                {
                    FAN_PWM_OUT_REG = new ushort[] { 0x001, 0x003, 0x011, 0x013, 0x015, 0xA09, 0xB09 }
                }
                ;
                else
                {
                    FAN_PWM_OUT_REG = new ushort[] { 0x001, 0x003, 0x011, 0x013, 0x015, 0x017, 0x029 }
                };

                FAN_PWM_COMMAND_REG  = new ushort[] { 0x109, 0x209, 0x309, 0x809, 0x909, 0xA09, 0xB09 };
                FAN_CONTROL_MODE_REG = new ushort[] { 0x102, 0x202, 0x302, 0x802, 0x902, 0xA02, 0xB02 };

                _vBatMonitorControlRegister = 0x005D;
            }

            _isNuvotonVendor = IsNuvotonVendor();

            if (!_isNuvotonVendor)
            {
                return;
            }


            switch (chip)
            {
            case Chip.NCT6771F:
            case Chip.NCT6776F:
            {
                if (chip == Chip.NCT6771F)
                {
                    Fans = new float?[4];

                    // min value RPM value with 16-bit fan counter
                    _minFanRpm = (int)(1.35e6 / 0xFFFF);
                }
                else
                {
                    Fans = new float?[5];

                    // min value RPM value with 13-bit fan counter
                    _minFanRpm = (int)(1.35e6 / 0x1FFF);
                }

                _fanRpmRegister = new ushort[5];
                for (int i = 0; i < _fanRpmRegister.Length; i++)
                {
                    _fanRpmRegister[i] = (ushort)(0x656 + (i << 1));
                }

                Controls = new float?[3];

                Voltages             = new float?[9];
                _voltageRegisters    = new ushort[] { 0x020, 0x021, 0x022, 0x023, 0x024, 0x025, 0x026, 0x550, 0x551 };
                _voltageVBatRegister = 0x551;
                _temperaturesSource  = new TemperatureSourceData[]
                {
                    new TemperatureSourceData(chip == Chip.NCT6771F ?  SourceNct6771F.PECI_0 : SourceNct6776F.PECI_0, 0x027, 0, -1, 0x621),
                    new TemperatureSourceData(chip == Chip.NCT6771F ?  SourceNct6771F.CPUTIN : SourceNct6776F.CPUTIN, 0x073, 0x074, 7, 0x100),
                    new TemperatureSourceData(chip == Chip.NCT6771F ?  SourceNct6771F.AUXTIN : SourceNct6776F.AUXTIN, 0x075, 0x076, 7, 0x200),
                    new TemperatureSourceData(chip == Chip.NCT6771F ?  SourceNct6771F.SYSTIN : SourceNct6776F.SYSTIN, 0x077, 0x078, 7, 0x300),
                    new TemperatureSourceData(null, 0x150, 0x151, 7, 0x622),
                    new TemperatureSourceData(null, 0x250, 0x251, 7, 0x623),
                    new TemperatureSourceData(null, 0x62B, 0x62E, 0, 0x624),
                    new TemperatureSourceData(null, 0x62C, 0x62E, 1, 0x625),
                    new TemperatureSourceData(null, 0x62D, 0x62E, 2, 0x626)
                };

                Temperatures = new float?[4];
                break;
            }

            case Chip.NCT6779D:
            case Chip.NCT6791D:
            case Chip.NCT6792D:
            case Chip.NCT6792DA:
            case Chip.NCT6793D:
            case Chip.NCT6795D:
            case Chip.NCT6796D:
            case Chip.NCT6796DR:
            case Chip.NCT6797D:
            case Chip.NCT6798D:
            {
                switch (chip)
                {
                case Chip.NCT6779D:
                {
                    Fans     = new float?[5];
                    Controls = new float?[5];
                    break;
                }

                case Chip.NCT6796DR:
                case Chip.NCT6797D:
                case Chip.NCT6798D:
                {
                    Fans     = new float?[7];
                    Controls = new float?[7];
                    break;
                }

                default:
                {
                    Fans     = new float?[6];
                    Controls = new float?[6];
                    break;
                }
                }

                _fanCountRegister = new ushort[] { 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4CC };

                // max value for 13-bit fan counter
                _maxFanCount = 0x1FFF;

                // min value that could be transferred to 16-bit RPM registers
                _minFanCount = 0x15;

                Voltages             = new float?[15];
                _voltageRegisters    = new ushort[] { 0x480, 0x481, 0x482, 0x483, 0x484, 0x485, 0x486, 0x487, 0x488, 0x489, 0x48A, 0x48B, 0x48C, 0x48D, 0x48E };
                _voltageVBatRegister = 0x488;
                var temperaturesSources = new List <TemperatureSourceData>();
                switch (chip)
                {
                case Chip.NCT6796D:
                case Chip.NCT6796DR:
                case Chip.NCT6797D:
                case Chip.NCT6798D:
                {
                    temperaturesSources.AddRange(new TemperatureSourceData[]
                            {
                                new TemperatureSourceData(SourceNct67Xxd.PECI_0, 0x073, 0x074, 7, 0x100),
                                new TemperatureSourceData(SourceNct67Xxd.CPUTIN, 0x075, 0x076, 7, 0x200, 0x491),
                                new TemperatureSourceData(SourceNct67Xxd.SYSTIN, 0x077, 0x078, 7, 0x300, 0x490),
                                new TemperatureSourceData(SourceNct67Xxd.AUXTIN0, 0x079, 0x07A, 7, 0x800, 0x492),
                                new TemperatureSourceData(SourceNct67Xxd.AUXTIN1, 0x07B, 0x07C, 7, 0x900, 0x493),
                                new TemperatureSourceData(SourceNct67Xxd.AUXTIN2, 0x07D, 0x07E, 7, 0xA00, 0x494),
                                new TemperatureSourceData(SourceNct67Xxd.AUXTIN3, 0x4A0, 0x49E, 6, 0xB00, 0x495),
                                new TemperatureSourceData(SourceNct67Xxd.AUXTIN4, 0x027, 0, -1, 0x621),
                                new TemperatureSourceData(SourceNct67Xxd.SMBUSMASTER0, 0x150, 0x151, 7, 0x622),
                                new TemperatureSourceData(SourceNct67Xxd.SMBUSMASTER1, 0x670, 0, -1, 0xC26),
                                new TemperatureSourceData(SourceNct67Xxd.PECI_1, 0x672, 0, -1, 0xC27),
                                new TemperatureSourceData(SourceNct67Xxd.PCH_CHIP_CPU_MAX_TEMP, 0x674, 0, -1, 0xC28, 0x400),
                                new TemperatureSourceData(SourceNct67Xxd.PCH_CHIP_TEMP, 0x676, 0, -1, 0xC29, 0x401),
                                new TemperatureSourceData(SourceNct67Xxd.PCH_CPU_TEMP, 0x678, 0, -1, 0xC2A, 0x402),
                                new TemperatureSourceData(SourceNct67Xxd.PCH_MCH_TEMP, 0x67A, 0, -1, 0xC2B, 0x404),
                                new TemperatureSourceData(SourceNct67Xxd.AGENT0_DIMM0, 0),
                                new TemperatureSourceData(SourceNct67Xxd.AGENT0_DIMM1, 0),
                                new TemperatureSourceData(SourceNct67Xxd.AGENT1_DIMM0, 0),
                                new TemperatureSourceData(SourceNct67Xxd.AGENT1_DIMM1, 0),
                                new TemperatureSourceData(SourceNct67Xxd.BYTE_TEMP0, 0),
                                new TemperatureSourceData(SourceNct67Xxd.BYTE_TEMP1, 0),
                                new TemperatureSourceData(SourceNct67Xxd.PECI_0_CAL, 0),
                                new TemperatureSourceData(SourceNct67Xxd.PECI_1_CAL, 0),
                                new TemperatureSourceData(SourceNct67Xxd.VIRTUAL_TEMP, 0)
                            });

                    if (chip == Chip.NCT6798D)
                    {
                        temperaturesSources.AddRange(new TemperatureSourceData[]
                                {
                                    new TemperatureSourceData(SourceNct67Xxd.WATER_IN, 0xC33),
                                    new TemperatureSourceData(SourceNct67Xxd.WATER_OUT, 0xC39)
                                });
                    }
                    break;
                }

                default:
                {
                    temperaturesSources.AddRange(new TemperatureSourceData[]
                            {
                                new TemperatureSourceData(SourceNct67Xxd.PECI_0, 0x027, 0, -1, 0x621),
                                new TemperatureSourceData(SourceNct67Xxd.CPUTIN, 0x073, 0x074, 7, 0x100, 0x491),
                                new TemperatureSourceData(SourceNct67Xxd.SYSTIN, 0x075, 0x076, 7, 0x200, 0x490),
                                new TemperatureSourceData(SourceNct67Xxd.AUXTIN0, 0x077, 0x078, 7, 0x300, 0x492),
                                new TemperatureSourceData(SourceNct67Xxd.AUXTIN1, 0x079, 0x07A, 7, 0x800, 0x493),
                                new TemperatureSourceData(SourceNct67Xxd.AUXTIN2, 0x07B, 0x07C, 7, 0x900, 0x494),
                                new TemperatureSourceData(SourceNct67Xxd.AUXTIN3, 0x150, 0x151, 7, 0x622, 0x495)
                            });
                    break;
                }
                }
                _temperaturesSource = temperaturesSources.ToArray();
                Temperatures        = new float?[_temperaturesSource.Length];
                break;
            }

            case Chip.NCT610XD:
            {
                Fans     = new float?[3];
                Controls = new float?[3];

                _fanRpmRegister = new ushort[3];
                for (int i = 0; i < _fanRpmRegister.Length; i++)
                {
                    _fanRpmRegister[i] = (ushort)(0x030 + (i << 1));
                }

                // min value RPM value with 13-bit fan counter
                _minFanRpm = (int)(1.35e6 / 0x1FFF);

                Voltages             = new float?[9];
                _voltageRegisters    = new ushort[] { 0x300, 0x301, 0x302, 0x303, 0x304, 0x305, 0x307, 0x308, 0x309 };
                _voltageVBatRegister = 0x308;
                Temperatures         = new float?[4];
                _temperaturesSource  = new TemperatureSourceData[] {
                    new TemperatureSourceData(SourceNct610X.PECI_0, 0x027, 0, -1, 0x621),
                    new TemperatureSourceData(SourceNct610X.SYSTIN, 0x018, 0x01B, 7, 0x100, 0x018),
                    new TemperatureSourceData(SourceNct610X.CPUTIN, 0x019, 0x11B, 7, 0x200, 0x019),
                    new TemperatureSourceData(SourceNct610X.AUXTIN, 0x01A, 0x21B, 7, 0x300, 0x01A)
                };
                break;
            }

            case Chip.NCT6683D:
            case Chip.NCT6687D:
            {
                Fans         = new float?[8];
                Controls     = new float?[8];
                Voltages     = new float?[14];
                Temperatures = new float?[7];

                // CPU
                // System
                // MOS
                // PCH
                // CPU Socket
                // PCIE_1
                // M2_1
                _temperaturesSource = new TemperatureSourceData[] {
                    new TemperatureSourceData(null, 0x100),
                    new TemperatureSourceData(null, 0x102),
                    new TemperatureSourceData(null, 0x104),
                    new TemperatureSourceData(null, 0x106),
                    new TemperatureSourceData(null, 0x108),
                    new TemperatureSourceData(null, 0x10A),
                    new TemperatureSourceData(null, 0x10C),
                };

                // VIN0 +12V
                // VIN1 +5V
                // VIN2 VCore
                // VIN3 SIO
                // VIN4 DRAM
                // VIN5 CPU IO
                // VIN6 CPU SA
                // VIN7 SIO
                // 3VCC I/O +3.3
                // SIO VTT
                // SIO VREF
                // SIO VSB
                // SIO AVSB
                // SIO VBAT
                _voltageRegisters = new ushort[] { 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x13A, 0x13E, 0x136, 0x138, 0x13C };

                // CPU Fan
                // PUMP Fan
                // SYS Fan 1
                // SYS Fan 2
                // SYS Fan 3
                // SYS Fan 4
                // SYS Fan 5
                // SYS Fan 6
                _fanRpmRegister = new ushort[] { 0x140, 0x142, 0x144, 0x146, 0x148, 0x14A, 0x14C, 0x14E };

                _restoreDefaultFanControlRequired = new bool[_fanRpmRegister.Length];
                _initialFanControlMode            = new byte[_fanRpmRegister.Length];
                _initialFanPwmCommand             = new byte[_fanRpmRegister.Length];

                // initialize
                ushort initRegister = 0x180;
                byte   data         = ReadByte(initRegister);
                if ((data & 0x80) == 0)
                {
                    WriteByte(initRegister, (byte)(data | 0x80));
                }

                // enable SIO voltage
                WriteByte(0x1BB, 0x61);
                WriteByte(0x1BC, 0x62);
                WriteByte(0x1BD, 0x63);
                WriteByte(0x1BE, 0x64);
                WriteByte(0x1BF, 0x65);

                break;
            }
            }
        }