Commit Graph
164 Commits
Author SHA1 Message Date
MadLongTomandPhyxionNL aa7c8be02f feat: Add Native AOT compilation support for LibreHardwareMonitorLib (#2280)
* feat: Add Native AOT compilation support for LibreHardwareMonitorLib

- Replace non-generic Marshal.GetDelegateForFunctionPointer with generic versions
  (NvApi.cs, NvidiaML.cs, OpCode.cs)
- Replace non-generic Marshal.PtrToStructure/SizeOf with generic versions
  (AtiAdlxx.cs, AmdGpu.cs, Ipmi.cs)
- Replace reflection-based Mono.Posix calls with direct Syscall for non-NETFRAMEWORK
  (OpCode.cs)
- Add DynamicallyAccessedMembers annotations for trim-safe generic marshaling
  (MsiCoreLiquidController.cs, WireViewPro2.cs)
- Add IsAotCompatible, IsTrimmable, and AOT/trim analyzers to csproj for net8.0+
- All changes maintain full backward compatibility with net472/netstandard2.0

Tested: dotnet publish with PublishAot=true on net10.0 win-x64 succeeds.
AOT binary correctly enumerates all hardware and sensors without errors.

* feat: Add conditional compilation for .NET 5.0 or greater in various classes

* feat: Add AOT test project and update workflows for AOT compilation

* Drop test project

* NET5_0_OR_GREATER > NET

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2026-04-07 13:38:41 +02:00
MadLongTom 9d9bb0084b Fix NCT6687DR fan control for system fans (index 9–15) (#2294)
* Add NCT6687DR fan control support with bit mapping and configuration phase handling

* NCT6687DR: emulate CC_Engine SetManualFAN protocol

- System fans (index > 8): skip manual mode bit (0xA00), use flat SmartFAN curve instead
- Change commit value from 0x40 to 0xC0 (REQ|DONE) matching CC_Engine
- Write 7-point temp curve (all 0x20/32C) alongside duty curve for system fans
- Add Sleep(10ms) after request (0x80) and commit (0xC0) per CC_Engine timing
- Restore: only clear manual mode bit for CPU/Pump/Chipset/EZ-Connect fans

* NCT6687DR: add INVALID bit check with retry after EC commit

- FinishFanCfgUpdate now returns bool: false if EC sets INVALID (0xCF8 & 0x10)
- SetControl and RestoreDefaultFanControl retry up to 3 times on INVALID
- Matches CC_Engine's post-commit validation behavior

* fix(NCT6687DR): bypass SmartFAN engine for system fans — use direct PWM

System fans (SYSFAN1-7) now use the same direct PWM mechanism as
CPU/Pump/Chipset fans, completely bypassing the SmartFAN curve engine
and its inherent ~2%/sec PWM smoothing.

Key changes:
- FAN_PWM_COMMAND_REG: system fans now point to direct PWM registers
  (SYSFAN7: 08:E9, SYSFAN1-6: 02:65..02:60) instead of SmartFAN
  curve base addresses (0xBE0..0xC70)
- FAN_CONTROL_MODE_REG: system fans use 08:0F (not 0xA00) for their
  manual-mode enable bits
- FAN_CONTROL_MODE_BIT: corrected per-channel bit positions derived
  from BIOS unk_104C0 table (sub_2F50 / sub_2BDC analysis)
- Set6687DRControl: simplified to single WriteByte for all fans
  (no more 7-point flat curve + step/rate writes)
- SetControl: unified path — all fans set manual-mode bit + direct PWM
- RestoreDefaultFanControl: clear manual-mode bit to return to SmartFAN

Register mapping discovered via IDA analysis of BIOS firmware:
- Extended unk_101E0 table at 0x103AC contains channels 10-15
- sub_2BDC configures 5 register operations per channel before curve write
- Entry[1] in unk_104C0 = manual-mode enable register + bit position

* review: Stopwatch, engineSts rename, CompleteFanConfigUpdate

* refactor: PreciseWait via SpinWait, DateTime to Stopwatch in ReadByte/WriteByte

* review: remove regions, revert PreciseWait to Thread.Sleep
2026-04-02 14:21:13 +02:00
Stephen Horvath 4058577277 Sensors on older Intel Framework Laptops (#2284)
* Add missing Framework Desktop

* PawnIO: Update LpcCrOSEC.bin

* Revert "Remove early Framework models"

This reverts commit 6d8326c56b15a655eb7a8f2c129176797a29786e.

* Add suspected Chromebook model
2026-03-20 12:03:24 +01:00
Blacktempel 0db3cc8e15 Add MSI B860 mainboard handling (NCT6687D-R). (#2281) 2026-03-19 13:14:54 +01:00
Rémi Mercier e4566effd3 ROG Crosshair X870E Dark Hero (#2242)
T-Sensor support
2026-02-27 14:26:04 +01:00
Alcolawl d8a41b3313 Foundational support for all MSI B840/B850, X870(E), and Z890 Motherboards (#2216)
* Add support for MSI MAG B850 Tomahawk Wifi (non-max) using NCT6687DR Controller

* Handle MSI NCT6687DR SIO Controller declaration more elegantly

This is a more powerful yet elegant way of handling MSI motherboards with the MSI flavored Nuvoton NCT6687D (aka NCT6687D-R). While it still requires that support be manually added for each motherboard so it be properly identified, this reduces the amount of work to add support and also reduces the amount of clutter in LpcIO.cs.

* Add support for MSI MEG X870E ACE MAX

* Foundational support for ALL MSI B840/B850, X870(E), and Z890 Motherboards!

Assigns all MSI B840, B850, X870, X870E and Z890 motherboards the NCT6687D-R SIO Controller

* Remove MSI B850 GAMING PLUS WIFI6E NCT6687D handling

* Used more stringent comparison criteria for MSI 800 series NCT6687DR identification
2026-02-13 18:13:20 +01:00
Alcolawl 24e76153eb Add support for MSI MAG B850 Tomahawk Wifi (non-max) using NCT6687DR Controller (#2199) 2026-02-06 12:54:53 +01:00
Blacktempel 16c1e49501 Add JAF Fan for Godlike Max & fix Pump Fan 2 (#2194)
* Add JAF Fan for Godlike Max & fix Pump Fan 2.

* Update JAF Fan name according to MSI doc.
2026-02-04 11:25:03 +01:00
Blacktempel 541926c757 Add detection for MSI MAG B850 Tomahawk Wifi. (#2191)
Handle two mainboards for NCT6687D with fan mapping for newer models.
2026-02-02 16:32:38 +01:00
AlcolawlandPhyxionNL 0b42635cf6 Add support for MSI PRO B850M-A Project Zero (#2190)
* Support for 10 new MSI motherboards with NCT6687D-R SIO controller

* Support for newly established fan and control register structure

WILL ABSOLUTELY BREAK FAN CONTROL CONFIGS FOR NCT6687DR USERS. This introduces Support for 16 System Fans and Controls, including EZ-Connect, Pump Fan 2, and System Fan 7. Also improved the logic for nct6687dr control.

* Add support for X870E Tomahawk WIFI, fix B850 Gaming Plus WIFI PZ identification

Additionally sync with upstream

* Add support for B850M Gaming Plus WIFI and Z890 Unify-X

Also removes duplicate model identification case for B850M GAMING PLUS WIFI6E

* Rename temperature sensor to proper name for X870E Carbon Wifi and GODLIKE motherboards

* Add support for MSI PRO B850M-A Project Zero (MS-7E78)

* Rename 'T_Sensor' to 'Temperature Sensor' for clarity

* T Sensor > Temperature Sensor

* Rename Temperature Sensors to Thermistor Sensors

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2026-02-02 15:40:09 +01:00
WiktorandPhyxionNL 2423b1b7f1 Fix ASUS Z170 EC temperature read returning zero values (#2153)
* Fix ASUS Z170 EC temperature read returning zero values
Adjust EC read logic so temperature registers (PCH, T_SENSOR, VRM)
return valid values on ASUS Z170 boards in user-mode.
Verified with RWEverything and HWiNFO.

* merge back to inter100,
Use IBF clearing fallback when OBF unsupported

* Fix formatting of CrOS enum entry

* Update WindowsEmbeddedControllerIO.cs

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2026-02-01 15:40:16 +01:00
Blacktempel 883f24d149 Add Pump Fan 2 for MSI MEG Z790 GODLIKE MAX + handle 0 RPM / unplugged fan (#2187)
* Add Pump Fan 2.
Handle Fan at 0 RPM or unplugged.

* Space
2026-01-30 10:58:22 +01:00
Blacktempel eecee7e865 Add fan 7 for MSI MEG Z790 GODLIKE MAX (#2185)
* Add special fan 7 for MSI MEG Z790 GODLIKE MAX.

* Add optional temperature sensors.

* Rename pump fan.

* Adjust comments / documentation.

* PR comments
2026-01-28 21:47:19 +01:00
Rémi Mercier 9b4ec91e9e Remove the 0-initialized control registers array (#2137) 2026-01-06 23:06:00 +01:00
Alcolawl 1ee7c16cba Add support for three additional MSI Motherboards (#2132)
* Support for 10 new MSI motherboards with NCT6687D-R SIO controller

* Support for newly established fan and control register structure

WILL ABSOLUTELY BREAK FAN CONTROL CONFIGS FOR NCT6687DR USERS. This introduces Support for 16 System Fans and Controls, including EZ-Connect, Pump Fan 2, and System Fan 7. Also improved the logic for nct6687dr control.

* Add support for X870E Tomahawk WIFI, fix B850 Gaming Plus WIFI PZ identification

Additionally sync with upstream

* Add support for B850M Gaming Plus WIFI and Z890 Unify-X

Also removes duplicate model identification case for B850M GAMING PLUS WIFI6E
2026-01-03 10:30:16 +01:00
Rémi Mercier 8e9a633389 EC support for TUF_Gaming-X870_Plus_WIFI (#2121)
* EC support for TUF_Gaming-X870_Plus_WIFI

* Update Identification.cs
2026-01-03 10:29:00 +01:00
Blacktempel cc13e1e909 Add MAG B850M MORTAR (MS-7E61). (#2125) 2025-12-30 17:08:27 +01:00
Lando Verardo 6dcd8838f0 Add limited support for “ASUS ROG STRIX Z690-G GAMING WIFI” (#2117) 2025-12-24 10:55:41 +01:00
lochorst e41611863b Add support for MSI MAG X870E TOMAHAWK MAX WIFI PZ (#2120) 2025-12-24 10:49:22 +01:00
Betalos (Oussama Thoura) 8f632dca1c Remove faulty register (#2105) 2025-12-14 15:05:16 +01:00
Betalos (Oussama Thoura) dcc3825521 Add missing T_Sensor from NCT6799D (#2073) 2025-11-25 10:29:07 +01:00
Alcolawl affd01db48 Re-Structure Fan and Control Register Layout for NCT6687DR, Support 10 new MSI Motherboards (#2068)
* Support for 10 new MSI motherboards with NCT6687D-R SIO controller

* Support for newly established fan and control register structure

WILL ABSOLUTELY BREAK FAN CONTROL CONFIGS FOR NCT6687DR USERS. This introduces Support for 16 System Fans and Controls, including EZ-Connect, Pump Fan 2, and System Fan 7. Also improved the logic for nct6687dr control.
2025-11-24 16:40:59 +01:00
Blacktempel 5a1a40a549 Fix warnings. (#2072) 2025-11-24 16:39:42 +01:00
Betalos (Oussama Thoura) e0cc2e2d4e FIX Correctly Initialize NCT67XX registries (#2069)
* FIX Correctly Initialize NCT67XX registries

* FIX Correclty address X570 phantom temp indexes

* FIX File formatings
2025-11-24 16:39:05 +01:00
Rémi MercierandPhyxionNL f6c2c70a50 Try and migrate the old GigabyteController stuff with PawnIO (#2014)
* Try and migrate the old GigabyteController stuff with PawnIO

* Bring back WinRing0 era GigabyteController stuff
* ISABridge use the PawnIO module with its built-in logic
* Ecio uses LpcIO directly (not sure about the initialization logic in TryCreate() to make this work)

* Code-review

* Fix inverted logic
* Remove IsaBridgeEc field init
* Format document

* Combine logic

* Gigabyte Implementation best attempt

* Update IsaBridgeGigabyteController.cs

* Cleanup and fix enablind logic for Isa version

* Add debug logs

* Update IsaBridgeGigabyteController.cs

* Code review

* Unmap + restore the mmio state  is done through the closing of the module.
* Fix boolean logic
* Restore the fan control byte instead

* Fallback to ECIO if FanControl enable byte is 0xFF

+ add logs to ECIO

* Port back to validation logic

* Allow for one or the other MMIO to be 0

* Wrap enter/exit mmio logic + enter/exit each time

* Keep state of EcioPort enable

* Missing dispose + close order fix

* Update IsaBridgeGigabyteController.cs

* Remove empty line before TryCreate method

* Code review

* Remove try/finally for SW

* Cleanup debug log methods

* Add DEBUG_LOG define conditional

* Misc

* Misc

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-11-20 19:06:32 +01:00
PhyxionNL e5ec823726 Update Nct677X.cs 2025-11-20 18:31:21 +01:00
Stephen HorvathandPhyxionNL b02fc4c4cf Sensors on Framework Laptops (#1681)
* Begin CrOS implementation for Framework Laptops

* CrOS: Talk directly to the EC, instead of through ACPI

* Add a few Framework models

* Remove early Framework models

These have a different EC, and don't currently work

* Migrate CrOS ECs to PawnIO

* Implement EcCommand and read sensor names

* Add more Framework models

* Add some error handling

* Misc

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-11-19 10:57:57 +01:00
Rémi MercierandPhyxionNL 0ed17c77ce Nct677x Make the Debug,WriteLine opt in with a symbol define (#2048)
* Make the Debug,WriteLine opt in with a symbol define

Having all these Debug,WriteLine made the update method painfully slow and the running process laggy during a debug session.

* Update Nct677X.cs

* Update Nct677X.cs

* Update Nct677X.cs

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-11-18 10:34:05 +01:00
BlacktempelandPhyxionNL f402533ddf Add limited support for MSI MEG Z790 GODLIKE MAX (#2040)
* Add support for MSI MEG Z790 GODLIKE MAX.

* Update LibreHardwareMonitorLib/Hardware/Motherboard/SuperIOHardware.cs

* Rename M2_1 to M2 #1 in temperature readings

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-11-13 16:30:56 +01:00
objecttothis 517794ce53 Add ASRock X870E Nova WiFi Support (#2012)
* Add ASRock X870E Nova WiFi Support

- Added support for Nuvoton NCT5585D chip
- Added support for Nuvoton NCT6796D-S chip
- Added motherboard-specific switch to select the correct chip due to duplicate chip ID/Revision (see #2005)
- Added chips to disable monitor i/o space lock block
- Added business logic to include chips in _superIOs.Add for the Nct677X() logic.
- Added chips to business logic to properly assign indices for fans, controls, temperatures and voltages.
- Added TSENSOR to the enum for SourceNct67Xxd to display the 3rd thermistor sensor.
- Added Naming and Identification for the X870E Nova WiFi
- Supressed warnings and added documentation

* Corrections

These changes reflect scraping the datasheet for the correct registers, half-registers, halfBits, sourceRegisters and alternateRegisters
- Replaced TSENSOR with AUXTIN5 as it is named in the datasheet
- Corrected Register values
- Reworked indexes and temperature naming

* Requested Changes

- Linked to PR instead of Datasheet which may change.
- Changed descriptions to be more understandable rather than using Datasheet labels

* Removed duplicate TSENSOR in enum
2025-11-06 13:39:13 +01:00
Betalos (Oussama Thoura)andPhyxionNL 7aff2a8a77 FIX missing T_SENSOR of X870e Taichi (#2003)
* FIX missing T sensor 3 of X870e Taichi

* FIX Adjust X870E taichi votages readings

* FIX Conditionally add missing register to NCT6799D

* Update Nct677X.cs

* Update LibreHardwareMonitorLib/Hardware/Motherboard/SuperIOHardware.cs

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-11-04 12:46:09 +01:00
salvathor79andPhyxionNL 2a886a938d X570_MS7C35 added 2 temperatures from NTCs connected to voltage channels. Fixed Nct67x registers. (#1975)
* X570_MS7C35 added 2 temperature form NTCs connected to voltage channels.
Fix Nct677X registers.

* Update LibreHardwareMonitorLib/Hardware/Motherboard/SuperIOHardware.cs

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>

* Update LibreHardwareMonitorLib/Hardware/Motherboard/SuperIOHardware.cs

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-10-31 10:38:03 +01:00
Arnold VinkandPhyxionNL 4e0ba8959c Added Gigabyte X870 AORUS ELITE WIFI7 ICE support. (#1991)
* Added Gigabyte X870 AORUS ELITE WIFI7 ICE support.

* Update LibreHardwareMonitorLib/Hardware/Motherboard/Lpc/IT87XX.cs

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-10-27 13:43:23 +01:00
Riccardo Manzan 3abeda696b [#1934] dev: add support for MSI B850M GAMING PLUS WIFI6E (#1967) 2025-10-17 16:45:26 +02:00
hopsaandStephan Koster 8b42be793b added support for MSI PRO B850-S WIFI6E (#1948)
added identifier string to Identification.cs
added new model enum entry B850S_PRO_WIFI6E
added B850S_PRO_WIFI6E to the list of models that get the NCT6687DR instead of NCT6687D

Co-authored-by: Stephan Koster <skoster@enclustra.com>
2025-10-09 13:06:30 +02:00
Serial95 c19f38c27d Add support for ASUS TUF GAMING B450 PLUS II and fixes for some ITE (#1677)
* Add informations for ASUS TUF GAMING B450 PLUS II + some fix

* Improved and more correct IT8665 fixes
2025-10-02 12:36:18 +02:00
JoeBroesele a18b1221ad Added support for Lenovo V50t Gen 2. (#1897) 2025-09-25 11:54:33 +02:00
namazsoandPhyxionNL eb5e1a20be Swap WinRing0 to PawnIO (#1857)
* Replace WinRing0 with PawnIO

* Update RAMSPDToolkit

* Add install check + cleanup

* Move folder + formatting

* Add back missing TryLoadDll

* Update PawnIo.cs

* Add third party notices file

* Remove the how to apply section

* Drop silent

* Don't crash if PawnIO isn't installed

* Formatting

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-09-16 11:58:31 +02:00
Rémi Mercier 8036ea21cb Restore fan control for IT8696E + make the 0 values array specific to the X870 Aorus elite WIFI7 (#1812)
* Make the 0 values array specific to the X870 Aorus elite WIFI7

* Update IT87XX.cs

* Update IT87XX.cs

* Update IT87XX.cs
2025-08-06 16:54:53 +02:00
Mihai Vasiliu c40db485f9 Add support for MSI PRO Z890 WIFI (Nuvoton NCT6687D) (#1809) 2025-08-05 12:42:27 +02:00
PhyxionNL e920eca98d Fix whitespace 2025-07-21 17:03:44 +02:00
fd3bfeb7c5 GIGABYTE X870 AORUS ELITE WIFI7 (ITE IT8696E, ITE IT87952E) (#1510)
* Initial support for Gigabyte X870 AORUS ELITE WIFI 7 and ITE IT8696E

* remove unintentional gitignore change

* Add support of X870E AORUS ELITE WIFI7

* Remove X870E

* move x870 to its own case

* rename fan#3

* apply suggestion from code review

* Fix broken merge

* Update IT87XX.cs

* Update IT87XX.cs

---------

Co-authored-by: davidmoellmann <public.cushy530@passinbox.com>
Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-07-21 17:01:53 +02:00
Maciej ZonskiandPhyxionNL 4a964dd6c4 Add support for ROG STRIX X870-I GAMING WIFI (#1794)
* Add support for ROG STRIX X870-I GAMING WIFI

* Update LibreHardwareMonitorLib/Hardware/Motherboard/SuperIOHardware.cs

* Update LibreHardwareMonitorLib/Hardware/Motherboard/SuperIOHardware.cs

* Update LibreHardwareMonitorLib/Hardware/Motherboard/SuperIOHardware.cs

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-07-21 16:57:07 +02:00
Alcolawl 3b1c1cbd12 Add support for three additional MSI motherboards (#1791)
* Add Support for MSI B840P PRO WIFI

* Rectify loop mathematical operator syntax

* Add support for two additional motherboards

Z890 Gaming Plus Wifi and Pro Z890-S Wifi Project Zero
2025-07-17 13:30:56 +02:00
Nicholas Flintham e6c9dd9853 Add Support for ASUS STRIX Z790-E WIFI II (#1727) 2025-06-13 16:12:32 +02:00
Scott Chow 2aa06cfdf7 Add support for MSI B850M Mortar (#1702) 2025-05-12 11:13:17 +02:00
Alcolawl a6cb35feb4 Add Support for MSI B840 PRO WIFI (#1716)
* Add Support for MSI B840P PRO WIFI

* Rectify loop mathematical operator syntax
2025-05-12 11:11:30 +02:00
5da7fafd93 Add support for ROG STRIX B850-I GAMING WIFI and fix for NCT6701D (#1704)
* Add support for ROG STRIX B850-I GAMING WIFI and fix for NCT6701D

* Update Model.cs

---------

Co-authored-by: Fabio Simoes <fsimoes@outlook.de>
Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-05-02 16:01:24 +02:00
CoxxsandCoxxs 9d6ed38e2d Add support for MSI Pro Z890-A WiFi (MS-7E32) (#1705)
Co-authored-by: Coxxs <coxxs@users.noreply.github.com>
2025-05-02 16:00:31 +02:00
clownpiece 788103df77 Add support for MSI MPG B850 EDGE TI WIFI (#1707)
* Update LpcIO.cs

Add support for MSI MPG B850 EDGE TI WIFI (MS-7E62)

* Update Identification.cs

Add support for MSI MPG B850 EDGE TI WIFI (MS-7E62)

* Update Model.cs

Add support for MSI MPG B850 EDGE TI WIFI (MS-7E62)
2025-05-02 16:00:16 +02:00