Skip to content
This repository has been archived by the owner on Oct 12, 2018. It is now read-only.

Commit

Permalink
Merge pull request #387 from interferenc/add_skylakex_support
Browse files Browse the repository at this point in the history
Added Skylake-X support
  • Loading branch information
CozmoNate committed Jan 25, 2018
2 parents be781de + 7ff4617 commit b2e6341
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions CPUSensors/CPUSensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ bool CPUSensors::start(IOService *provider)

case CPUID_MODEL_HASWELL_DT:
case CPUID_MODEL_BROADWELL_DT:
case CPUID_MODEL_SKYLAKE_X:
case CPUID_MODEL_SKYLAKE_DT:
case CPUID_MODEL_KABYLAKE_S:
if (!platform) platform = OSData::withBytes("j45\0\0\0\0\0", 8); // TODO: got from macbookpro11,2 need to check for other platforms
Expand Down
2 changes: 2 additions & 0 deletions Shared/cpuid.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
#define CPUID_MODEL_BROADWELL_ULV 0x3D
#define CPUID_MODEL_BROADWELL_MB 0x4f
#define CPUID_MODEL_SKYLAKE_LT 0x4E
#define CPUID_MODEL_SKYLAKE_X 0x55 /* Intel® Core™ X-series Processors */
#define CPUID_MODEL_SKYLAKE_DT 0x5E
#define CPUID_MODEL_KABYLAKE_U 0x8E
#define CPUID_MODEL_KABYLAKE_S 0x9E
Expand Down Expand Up @@ -697,6 +698,7 @@ cpuid_set_cpufamily(i386_cpu_info_t *info_p)
cpufamily = CPUFAMILY_INTEL_BROADWELL;
break;
case CPUID_MODEL_SKYLAKE_LT:
case CPUID_MODEL_SKYLAKE_X:
case CPUID_MODEL_SKYLAKE_DT:
cpufamily = CPUFAMILY_INTEL_SKYLAKE;
break;
Expand Down
1 change: 1 addition & 0 deletions SuperIOSensors/LPCSensors-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2978,6 +2978,7 @@
<string>Nuvoton,NCT6791D</string>
<string>Nuvoton,NCT6792D</string>
<string>Nuvoton,NCT6793D</string>
<string>Nuvoton,NCT6796D</string>
</array>
<key>IOProviderClass</key>
<string>SuperIODevice</string>
Expand Down
6 changes: 5 additions & 1 deletion SuperIOSensors/NCT677xSensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ float NCT677xSensors::readTemperature(UInt32 index)
case NCT6791D:
case NCT6792D:
case NCT6793D:
case NCT6796D:
value = readByte(NUVOTON_TEMPERATURE_REG_NEW[index]) << 1;
break;
}
Expand Down Expand Up @@ -135,6 +136,7 @@ float NCT677xSensors::readVoltage(UInt32 index)
case NCT6791D:
case NCT6792D:
case NCT6793D:
case NCT6796D:
value = readByte(NUVOTON_VOLTAGE_REG_NEW[index]) * NUVOTON_VOLTAGE_SCALE[index] * 0.001f;
break;
}
Expand Down Expand Up @@ -266,6 +268,7 @@ bool NCT677xSensors::initialize()
case NCT6791D:
case NCT6792D:
case NCT6793D:
case NCT6796D:
fanLimit = 6;
tempLimit = 7;
voltLimit = 15;
Expand All @@ -288,7 +291,8 @@ void NCT677xSensors::hasPoweredOn()
switch (model) {
case NCT6791D:
case NCT6792D:
case NCT6793D: {
case NCT6793D:
case NCT6796D: {
// disable the hardware monitor i/o space lock on NCT679xD chips
winbond_family_enter(port);

Expand Down
9 changes: 9 additions & 0 deletions SuperIOSensors/SuperIODevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,15 @@ bool SuperIODevice::detectWinbondFamilyChip()
break;
} break;

case 0xD4:
switch (id & 0xff) {
case 0x23:
model = NCT6796D;
ldn = kWinbondHardwareMonitorLDN;
vendor = "Nuvoton";
break;
} break;

} break;
}

Expand Down
4 changes: 3 additions & 1 deletion SuperIOSensors/SuperIODevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ enum SuperIOModel
NCT6779D = 0xC560,
NCT6791D = 0xC803,
NCT6792D = 0xC911,
NCT6793D = 0xD121
NCT6793D = 0xD121,
NCT6796D = 0xD423,
};

inline UInt8 superio_listen_port_byte(i386_ioport_t port, UInt8 reg)
Expand Down Expand Up @@ -182,6 +183,7 @@ inline const char* superio_get_model_name(UInt16 model)
case NCT6791D: return "NCT6791D";
case NCT6792D: return "NCT6792D";
case NCT6793D: return "NCT6793D";
case NCT6796D: return "NCT6796D";
}

return "unknown";
Expand Down

0 comments on commit b2e6341

Please sign in to comment.