mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-08-31 06:15:08 +00:00
Fixed an issue with the Nuvoton NCT6791D (hardware monitor i/o space lock wasn't disabled before attempting to read data).
This commit is contained in:
@@ -39,6 +39,11 @@ namespace OpenHardwareMonitor.Hardware.LPC {
|
|||||||
return Ring0.ReadIoPort(valuePort);
|
return Ring0.ReadIoPort(valuePort);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void WriteByte(byte register, byte value) {
|
||||||
|
Ring0.WriteIoPort(registerPort, register);
|
||||||
|
Ring0.WriteIoPort(valuePort, value);
|
||||||
|
}
|
||||||
|
|
||||||
private ushort ReadWord(byte register) {
|
private ushort ReadWord(byte register) {
|
||||||
return (ushort)((ReadByte(register) << 8) |
|
return (ushort)((ReadByte(register) << 8) |
|
||||||
ReadByte((byte)(register + 1)));
|
ReadByte((byte)(register + 1)));
|
||||||
@@ -71,6 +76,8 @@ namespace OpenHardwareMonitor.Hardware.LPC {
|
|||||||
private const byte F71858_HARDWARE_MONITOR_LDN = 0x02;
|
private const byte F71858_HARDWARE_MONITOR_LDN = 0x02;
|
||||||
private const byte FINTEK_HARDWARE_MONITOR_LDN = 0x04;
|
private const byte FINTEK_HARDWARE_MONITOR_LDN = 0x04;
|
||||||
|
|
||||||
|
private const byte NUVOTON_HARDWARE_MONITOR_IO_SPACE_LOCK = 0x28;
|
||||||
|
|
||||||
private void WinbondNuvotonFintekEnter() {
|
private void WinbondNuvotonFintekEnter() {
|
||||||
Ring0.WriteIoPort(registerPort, 0x87);
|
Ring0.WriteIoPort(registerPort, 0x87);
|
||||||
Ring0.WriteIoPort(registerPort, 0x87);
|
Ring0.WriteIoPort(registerPort, 0x87);
|
||||||
@@ -246,6 +253,19 @@ namespace OpenHardwareMonitor.Hardware.LPC {
|
|||||||
|
|
||||||
ushort vendorID = ReadWord(FINTEK_VENDOR_ID_REGISTER);
|
ushort vendorID = ReadWord(FINTEK_VENDOR_ID_REGISTER);
|
||||||
|
|
||||||
|
// disable the hardware monitor i/o space lock on NCT6791D chips
|
||||||
|
if (address == verify && chip == Chip.NCT6791D) {
|
||||||
|
byte options = ReadByte(NUVOTON_HARDWARE_MONITOR_IO_SPACE_LOCK);
|
||||||
|
|
||||||
|
// if the i/o space lock is enabled
|
||||||
|
if ((options & 0x10) > 0) {
|
||||||
|
|
||||||
|
// disable the i/o space lock
|
||||||
|
WriteByte(NUVOTON_HARDWARE_MONITOR_IO_SPACE_LOCK,
|
||||||
|
(byte)(options & ~0x10));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
WinbondNuvotonFintekExit();
|
WinbondNuvotonFintekExit();
|
||||||
|
|
||||||
if (address != verify) {
|
if (address != verify) {
|
||||||
|
@@ -10,5 +10,5 @@
|
|||||||
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion("0.6.0.10")]
|
[assembly: AssemblyVersion("0.6.0.11")]
|
||||||
[assembly: AssemblyInformationalVersion("0.6.0.10 Alpha")]
|
[assembly: AssemblyInformationalVersion("0.6.0.11 Alpha")]
|
Reference in New Issue
Block a user