Commit Graph
12 Commits
Author SHA1 Message Date
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
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
PhyxionNL f5d5d3ee5f Fixes #2002 2025-11-01 11:16:37 +01:00
dependabot[bot]PhyxionNLcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Copilot
cbd3f4b1d2 Bump Microsoft.Windows.CsWin32 from 0.3.235 to 0.3.236 (#1999)
* Bump Microsoft.Windows.CsWin32 from 0.3.235 to 0.3.236

---
updated-dependencies:
- dependency-name: Microsoft.Windows.CsWin32
  dependency-version: 0.3.236
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix build compatibility with Microsoft.Windows.CsWin32 0.3.236 (#2000)

* Initial plan

* Fix compatibility with CsWin32 0.3.236 and resource path case sensitivity

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

* Remove unnecessary local variable pData in BatteryGroup.cs

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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-10-30 23:51:27 +01:00
PhyxionNL 4093b276c6 Add x86 target 2025-10-01 12:03:50 +02:00
PhyxionNL d594734225 Move remainder to CsWin32 (#1918) 2025-09-30 18:58:21 +02:00
CopilotPhyxionNLcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
95efd9fbbc Add IsLoaded check to PawnIo.Close() method to prevent closing invalid handles (#1916)
* Initial plan

* Add IsLoaded check to PawnIo.Close() method to prevent closing invalid handles

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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-09-29 22:16:44 +02:00
PhyxionNLandCopilot ee60348eac Use CsWin32 (#1912)
* Use CsWin32

* Update LibreHardwareMonitorLib/Hardware/Cpu/CpuLoad.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update LibreHardwareMonitorLib/Hardware/Battery/BatteryGroup.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update pull requests.yml

* Update pull requests.yml

* Update master.yml

* A couple more to CsWin32

* Restore PawnIO defaults

Fixes #1910

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-29 18:48:00 +02:00
Teemu KorhonenandPhyxionNL c56cf3f042 Use PawnIO driver directly in LibreHardwareMonitorLib (#1908)
* Use PawnIO driver directly.

- Implemented PawnIO library in C#
- Builds in AnyCPU, x64 and x86
- Fixes #1895

* Implement review changes for PawnIO.

- Use existing Kernel32.CreateFile import.
- Move new DeviceIOControl to Kernel32.
- Replace Lazy Version loading with static property.
- Remove bin resource cache.
- Add constant for function name length.

* More review changes for PawnIO.

- Replace redundant internal checks with IsLoaded.
- Convert Win32 error code to HRESULT before returning it in
  ExecuteHR()

* Drop KernelDriver

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2025-09-29 16:41:57 +02:00
PhyxionNL 79a043e5bf Fixes #1889 2025-09-27 12:54:24 +02:00
Blacktempel bb65e069fd Fix memory only being available for Intel (#1887)
* Current implementation of PawnIo.LoadModuleFromResource swallows exceptions instead of throwing them like it has been previously.
It also returns a not-null PawnIo object.
RAMSPDToolkitDriver has been catching exception, returning false for LoadModule and checking if returned object is null.
Therefore the return for a failed loaded module was true where it should have been false.

Returning null from PawnIo.LoadModuleFromResource in catch block fixes this issue.

* Add IsValid property for PawnIo and check in RAMSPDToolkitDriver.
Remove null return.

* Update RAMSPDToolkit to newest version.
Fixes bug in .NET Framework and changed PawnIO interface due to adjusted Piix4 detection.

Add new Data sensor.

* Rename property.
2025-09-23 10:38:48 +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