├── .gitignore ├── HWSensors.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── HWSensors.xcscmblueprint │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ ├── ACPIMonitor.xcscheme │ ├── ADT7470.xcscheme │ ├── AmdCPUMonitor.xcscheme │ ├── Andigilog.xcscheme │ ├── DIMMSensor.xcscheme │ ├── F718x.xcscheme │ ├── FakeSMC.xcscheme │ ├── GeforceSensor.xcscheme │ ├── HWInfo.xcscheme │ ├── ICHSMBus.xcscheme │ ├── IT87x.xcscheme │ ├── IntelCPUMonitor.xcscheme │ ├── NVClockX.xcscheme │ ├── PC8739x.xcscheme │ ├── RadeonMonitor.xcscheme │ ├── SMIMonitor.xcscheme │ ├── VoodooBatterySMC.xcscheme │ ├── W836x.xcscheme │ ├── X3100.xcscheme │ └── xcschememanagement.plist ├── README.md ├── SDK ├── MacOSX10.11.sdk.7z └── MacOSX10.13.sdk.7z ├── fakesmc ├── FakeSMC-Info.plist ├── FakeSMC-pre106-info.plist ├── FakeSMC.cpp ├── FakeSMC.h ├── FakeSMCDevice.cpp ├── FakeSMCDevice.h ├── FakeSMCKey.cpp └── FakeSMCKey.h ├── hwmonitor ├── AppDelegate.h ├── AppDelegate.m ├── English.lproj │ ├── Credits.rtf │ ├── InfoPlist.strings │ ├── Localizable.strings │ ├── MainMenu.xib │ └── default.icns ├── HWMonitorSMC-Info.plist ├── HWMonitorSMC.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── HWMonitorSMC.xcscmblueprint │ └── xcshareddata │ │ └── xcschemes │ │ ├── HWMonitorSMC.xcscheme │ │ └── xcschememanagement.plist ├── HWMonitorSMC_Prefix.pch ├── HWMonitorSensor.h ├── HWMonitorSensor.m ├── IOBatteryStatus.h ├── IOBatteryStatus.m ├── ISPSmartController.h ├── ISPSmartController.m ├── NSString+TruncateToWidth.h ├── NSString+TruncateToWidth.m ├── default.icns ├── fan_small.png ├── freq_small.png ├── hd_small.png ├── main.m ├── modern-battery-icon.png ├── monitor-icon.icns ├── monitor_icon_small.png ├── multiply_small.png ├── ru.lproj │ ├── Localizable.strings │ └── MainMenu.xib ├── smc.c ├── smc.h ├── ssd_small.png ├── temp_alt_small.png ├── temperature_small.png ├── temperature_small_dark.png ├── temperature_small_grey.png └── voltage_small.png ├── plugins ├── ACPIMonitor │ ├── ACPIMonitor-Info.plist │ ├── ACPIMonitor-pre106-Info.plist │ ├── ACPIMonitor.cpp │ ├── ACPIMonitor.h │ └── SSDT-Monitor.dsl ├── CPUSensors │ ├── AmdCPUMonitor │ │ ├── AmdCPUMonitor-Info.plist │ │ ├── AmdCPUMonitor-pre106-Info.plist │ │ ├── AmdCPUMonitor.cpp │ │ ├── AmdCPUMonitor.h │ │ └── en.lproj │ │ │ └── InfoPlist.strings │ └── IntelCPUMonitor │ │ ├── IntelCPUMonitor-Info.plist │ │ ├── IntelCPUMonitor-pre106-Info.plist │ │ ├── IntelCPUMonitor.cpp │ │ └── IntelCPUMonitor.h ├── GPUSensors │ ├── GeforceSensors │ │ ├── GeForceSensors-Info.plist │ │ ├── GeForceSensors-Prefix.pch │ │ ├── GeforceSensors.cpp │ │ ├── GeforceSensors.h │ │ ├── adt7473.cpp │ │ ├── f75375.cpp │ │ ├── f75375.h │ │ ├── gm100.cpp │ │ ├── gm100.h │ │ ├── gp100.cpp │ │ ├── gp100.h │ │ ├── i2c_algo_bit.cpp │ │ ├── i2c_algo_bit.h │ │ ├── i2c_base.cpp │ │ ├── i2c_base.h │ │ ├── linux_definitions.h │ │ ├── list.h │ │ ├── lm99.cpp │ │ ├── nouveau.cpp │ │ ├── nouveau.h │ │ ├── nouveau_bios.cpp │ │ ├── nouveau_bios.h │ │ ├── nouveau_definitions.h │ │ ├── nouveau_gpio.cpp │ │ ├── nouveau_gpio.h │ │ ├── nouveau_i2c._base.cpp │ │ ├── nouveau_i2c.h │ │ ├── nouveau_i2c_aux.cpp │ │ ├── nouveau_i2c_bit.cpp │ │ ├── nouveau_therm.cpp │ │ ├── nouveau_therm.h │ │ ├── nouveau_volt.cpp │ │ ├── nouveau_volt.h │ │ ├── nouveau_xpio.cpp │ │ ├── nouveau_xpio.h │ │ ├── nv10.cpp │ │ ├── nv10.h │ │ ├── nv40.cpp │ │ ├── nv40.h │ │ ├── nv50.cpp │ │ ├── nv50.h │ │ ├── nv84.cpp │ │ ├── nv84.h │ │ ├── nva3.cpp │ │ ├── nva3.h │ │ ├── nvc0.cpp │ │ ├── nvc0.h │ │ ├── nvclock_i2c.cpp │ │ ├── nvclock_i2c.h │ │ ├── nvd0.cpp │ │ ├── nvd0.h │ │ ├── nve0.cpp │ │ ├── nve0.h │ │ ├── timer.h │ │ ├── vga.cpp │ │ ├── vga.h │ │ ├── w83781d.cpp │ │ ├── w83l785r.cpp │ │ ├── xf86i2c.cpp │ │ ├── xf86i2c.h │ │ └── xfree.h │ ├── IntelX3100 │ │ ├── X3100-Info.plist │ │ ├── X3100-pre106-Info.plist │ │ ├── X3100.cpp │ │ └── X3100.h │ ├── NVClockX │ │ ├── NVClock │ │ │ ├── adt7473.cpp │ │ │ ├── backend.cpp │ │ │ ├── backend.h │ │ │ ├── bios.cpp │ │ │ ├── error.cpp │ │ │ ├── f75375.cpp │ │ │ ├── f75375.h │ │ │ ├── i2c.cpp │ │ │ ├── i2c.h │ │ │ ├── info.cpp │ │ │ ├── libc_wrapper.cpp │ │ │ ├── lm99.cpp │ │ │ ├── nv40.cpp │ │ │ ├── nv50.cpp │ │ │ ├── nvclock.h │ │ │ ├── nvreg.h │ │ │ ├── overclock.cpp │ │ │ ├── utils.cpp │ │ │ ├── w83781d.cpp │ │ │ ├── w83l785r.cpp │ │ │ ├── xf86i2c.cpp │ │ │ ├── xf86i2c.h │ │ │ └── xfree.h │ │ ├── NVClockX-Info.plist │ │ ├── NVClockX-pre106-info.plist │ │ ├── NVClockX.cpp │ │ ├── NVClockX.h │ │ └── gpl.txt │ └── RadeonMonitor │ │ ├── ATICard.cpp │ │ ├── ATICard.h │ │ ├── ATI_Device_ID_List_Jun_2010.txt │ │ ├── Radeon.cpp │ │ ├── Radeon.h │ │ ├── RadeonMonitor-Info.plist │ │ ├── RadeonMonitor-pre106-Info.plist │ │ ├── atombios.h │ │ ├── radeon_chipinfo_gen.h │ │ └── radeon_chipsets.h ├── IntelMCHMonitor │ ├── IntelMCHMonitor-Info.plist │ ├── IntelMCHMonitor.cpp │ ├── IntelMCHMonitor.h │ └── en.lproj │ │ └── InfoPlist.strings ├── SMIMonitor │ ├── SMIMonitor-Info.plist │ ├── SMIMonitor-Prefix.pch │ ├── SMIMonitor.cpp │ ├── SMIMonitor.h │ └── en.lproj │ │ └── InfoPlist.strings ├── SuperIOSensors │ ├── Fintek718x │ │ ├── F718x-Info.plist │ │ ├── F718x-pre106-Info.plist │ │ ├── F718x.cpp │ │ └── F718x.h │ ├── ITE87x │ │ ├── ITEIT87x-Info.plist │ │ ├── ITEIT87x-Prefix.pch │ │ ├── ITEIT87x.cpp │ │ ├── ITEIT87x.h │ │ └── en.lproj │ │ │ └── InfoPlist.strings │ ├── NSCPC8739x │ │ ├── PC8739x-Info.plist │ │ ├── PC8739x-pre106-Info.plist │ │ ├── PC8739x.cpp │ │ └── PC8739x.h │ ├── SuperIOFamily │ │ ├── SuperIOFamily-Info.plist │ │ ├── SuperIOFamily-pre106-Info.plist │ │ ├── SuperIOFamily.cpp │ │ └── SuperIOFamily.h │ └── WinbondW836x │ │ ├── WinbondW836x-Info.plist │ │ ├── WinbondW836x-Prefix.pch │ │ ├── WinbondW836x.cpp │ │ ├── WinbondW836x.h │ │ ├── en.lproj │ │ └── InfoPlist.strings │ │ └── nct6775.c └── VoodooBattery │ ├── FakeSMC.h │ ├── Info.plist │ ├── Support.h │ ├── VoodooBattery.cpp │ ├── VoodooBattery.h │ └── en.lproj │ └── InfoPlist.strings ├── smcdumper ├── FakeSMCDefinitions.h ├── SmcHelper.h ├── SmcHelper.m ├── main.m ├── smc.c ├── smc.h └── smcutil └── utils ├── Cpuid.c ├── TigerAdditionals.cpp ├── TigerAdditionals.h ├── cpuid.h ├── definitions.h └── utils.h /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X temporary files that should never be committed 2 | .DS_Store 3 | *.swp 4 | *.lock 5 | *~ 6 | .svn 7 | 8 | # XCode files/directories 9 | *~.nib 10 | DerivedData 11 | build/ 12 | *.pbxuser 13 | *.mode1v3 14 | *.mode2v3 15 | *.perspectivev3 16 | !default.pbxuser 17 | !default.mode1v3 18 | !default.mode2v3 19 | !default.perspectivev3 20 | xcuserdata/ 21 | 22 | # Swift.gitignore @ https://github.com/github/gitignore 23 | 24 | # Xcode 25 | *.xccheckout 26 | *.moved-aside 27 | *.hmap 28 | *.ipa 29 | *.xcuserstate 30 | 31 | # Numerous always-ignore extensions 32 | *.diff 33 | *.err 34 | *.orig 35 | *.log 36 | *.rej 37 | *.swo 38 | *.swp 39 | *.zip 40 | *.vi 41 | *~ 42 | 43 | # OS or Editor folders 44 | ._* 45 | Thumbs.db 46 | .cache 47 | .tmproj 48 | *.esproj 49 | nbproject 50 | *.sublime-project 51 | *.sublime-workspace 52 | 53 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/project.xcworkspace/xcshareddata/HWSensors.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "2e15404a-8354-49a5-8ee8-3805ff3cba1c", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | "2e15404a-8354-49a5-8ee8-3805ff3cba1c" : { 5 | 6 | } 7 | }, 8 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 9 | "2e15404a-8354-49a5-8ee8-3805ff3cba1c" : 0 10 | }, 11 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "B4ED0836-9AFD-4A51-B193-ACFFA48D204E", 12 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 13 | "2e15404a-8354-49a5-8ee8-3805ff3cba1c" : "hwsensors3\/" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "HWSensors", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "trunk\/HWSensors.xcodeproj", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "svn+ssh:\/\/svn.code.sf.net\/p\/hwsensors\/hwsensors3\/code3", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Subversion", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "2e15404a-8354-49a5-8ee8-3805ff3cba1c" 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /HWSensors.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/ACPIMonitor.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/ADT7470.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/AmdCPUMonitor.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/Andigilog.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/DIMMSensor.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/F718x.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/FakeSMC.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/GeforceSensor.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/HWInfo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/ICHSMBus.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/IT87x.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/IntelCPUMonitor.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/NVClockX.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/PC8739x.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/RadeonMonitor.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/SMIMonitor.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/VoodooBatterySMC.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/W836x.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /HWSensors.xcodeproj/xcshareddata/xcschemes/X3100.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FakeSMC3 with plugins 2 | Driver for emulation SMC device with hardware sensors support 3 | 4 | ## HWSensors 5 | ### This is a Mac OS X Package 6 | Working 10.6 to 15.x 7 | 8 | ### HWSensors branch based on FakeSMC-3.x 9 | 10 | ### The package includes: 11 | * FakeSMC.kext version 3.x 12 | - ACPIMonitor.kext for custom making ACPI methods to access to hardware 13 | - VoodooBatterySMC for laptop battery monitoring 14 | - IntelMCHMonitor for chipset temperature monitoring, from 7th gen 15 | (Kabylake, Coffeelake, and up). Get also DIMM temperature 16 | - CPU sensors: 17 | + IntelCPUMonitor, from Core Duo up to ArrowLake 18 | + AmdCpuMonitor, FX... and Ryzen 19 | - GPUSensors 20 | + RadeonMonitor for ATI/AMD Radeon card (temperature only), up to RX6900 21 | + GeforceSensors for Nvidia card Fermi, Kepler, Maxwell, Pascal 22 | + NVClockX for Nvidia Geforce 7xxx, 8xxx, Tesla 23 | + X3100 for IntelX3100 (at GM950 chipset) 24 | - LPC chip sensors, motherboard parameters like FAM, Voltages, temperatures 25 | + ITEIT87x for chips ITE 87xx, 86xx, usually present on Gigabyte motherboards 26 | + W836x for chips Winbond/Nuvoton 83xxx, NCT67xx, usually present on ASUS motherboards 27 | + F718x for chips Fintek 28 | + PC8739x for chip SMC 29 | - SMI Monitor 30 | + monitor and control temperature and fans in Dell computers by using SMM technology 31 | - Applications 32 | + HWMonitorSMC, it has less functionality. Working with old computer. Up to Sonoma 14.x compatible. 33 | + HWMonitorSMC2 for SandyBridge and up. It is separate project https://github.com/CloverHackyColor/HWMonitorSMC2 34 | 35 | ## Compilation 36 | Take MacKernelSDK (https://github.com/joevt/MacKernelSDK) and copy it into the project. Or just make a symbol link 37 | ~~~~ 38 | ln -s ../joevt/MacKernelSDK MacKernelSDK 39 | ~~~~ 40 | 41 | The xcodeproject already tuned to use it and tested with Xcode14.3. 42 | 43 | ### HWSensors Project (c) 2010 netkas, slice, usr-sse2, kozlek, navi, vector sigma and other contributors. All rights reserved. 44 | -------------------------------------------------------------------------------- /SDK/MacOSX10.11.sdk.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/SDK/MacOSX10.11.sdk.7z -------------------------------------------------------------------------------- /SDK/MacOSX10.13.sdk.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/SDK/MacOSX10.13.sdk.7z -------------------------------------------------------------------------------- /fakesmc/FakeSMC.cpp: -------------------------------------------------------------------------------- 1 | #include "FakeSMC.h" 2 | 3 | #ifndef Debug 4 | #define Debug FALSE 5 | #endif 6 | 7 | #define LogPrefix "FakeSMC: " 8 | #define DebugLog(string, args...) do { if (Debug) { IOLog (LogPrefix "[Debug] " string "\n", ## args); } } while(0) 9 | #define WarningLog(string, args...) do { IOLog (LogPrefix "[Warning] " string "\n", ## args); } while(0) 10 | #define InfoLog(string, args...) do { IOLog (LogPrefix string "\n", ## args); } while(0) 11 | 12 | #define super IOService 13 | OSDefineMetaClassAndStructors (FakeSMC, IOService) 14 | 15 | bool FakeSMC::init(OSDictionary *dictionary) { 16 | return super::init(dictionary); 17 | } 18 | 19 | IOService *FakeSMC::probe(IOService *provider, SInt32 *score) { 20 | if (!super::probe(provider, score)) { 21 | return 0; 22 | } 23 | InfoLog("opensource SMC device emulator by netkas (C) 2009"); 24 | InfoLog("plugins & plugins support modifications by mozodojo, usr-sse2, slice (C) 2010"); 25 | 26 | return this; 27 | } 28 | 29 | bool FakeSMC::start(IOService *provider) { 30 | if (!super::start(provider)) { 31 | return false; 32 | } 33 | 34 | if (!(smcDevice = new FakeSMCDevice)) { 35 | InfoLog("failed to create smcDevice"); 36 | return false; 37 | } 38 | 39 | if (!smcDevice->init(provider, OSDynamicCast(OSDictionary, getProperty("Configuration")))) { 40 | InfoLog("failed to init smcDevice"); 41 | return false; 42 | } 43 | 44 | smcDevice->registerService(); 45 | registerService(); 46 | 47 | return true; 48 | } 49 | 50 | void FakeSMC::stop(IOService *provider) { 51 | super::stop(provider); 52 | } 53 | 54 | void FakeSMC::free() { 55 | super::free(); 56 | } 57 | -------------------------------------------------------------------------------- /fakesmc/FakeSMC.h: -------------------------------------------------------------------------------- 1 | #ifndef _VIRTUALSMC_H 2 | #define _VIRTUALSMC_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "FakeSMCDevice.h" 9 | #include "FakeSMCKey.h" 10 | #include "definitions.h" 11 | 12 | 13 | class FakeSMC : public IOService { 14 | OSDeclareDefaultStructors(FakeSMC) 15 | private: 16 | FakeSMCDevice *smcDevice; 17 | 18 | public: 19 | virtual bool init(OSDictionary *dictionary = 0); 20 | virtual void free(void); 21 | virtual IOService *probe(IOService *provider, SInt32 *score); 22 | virtual bool start(IOService *provider); 23 | virtual void stop(IOService *provider); 24 | }; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /fakesmc/FakeSMCKey.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FakeSMCKey.h 3 | * FakeSMC 4 | * 5 | * Created by mozo on 03/10/10. 6 | * Copyright 2010 mozodojo. All rights reserved. 7 | * 8 | */ 9 | 10 | #ifndef _FAKESMCKEY_H 11 | #define _FAKESMCKEY_H 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | class FakeSMCKey : public OSObject { 20 | OSDeclareDefaultStructors(FakeSMCKey) 21 | 22 | protected: 23 | static void copySymbol(const char *from, char* to); 24 | 25 | char * name; 26 | char * type; 27 | unsigned char size; 28 | void * value; 29 | IOService * handler; 30 | 31 | public: 32 | static FakeSMCKey *withValue(const char *aName, 33 | const char *aType, 34 | unsigned char aSize, 35 | const void *aValue); 36 | 37 | static FakeSMCKey *withHandler(const char *aName, 38 | const char *aType, 39 | unsigned char aSize, 40 | IOService *aHandler); 41 | 42 | // Not for general use. Use withCallback or withValue instance creation method 43 | virtual bool init(const char * aName, 44 | const char * aType, 45 | unsigned char aSize, 46 | const void *aValue, 47 | IOService *aHandler = 0); 48 | 49 | virtual void free(); 50 | 51 | const char *getName(); 52 | const char *getType(); 53 | unsigned char getSize(); 54 | const void *getValue(); 55 | 56 | bool setValueFromBuffer(const void *aBuffer, unsigned char aSize); 57 | bool setHandler(IOService *aHandler); 58 | IOService *getHandler(); 59 | 60 | bool isEqualTo(const char *aKey); 61 | bool isEqualTo(FakeSMCKey *aKey); 62 | bool isEqualTo(const OSMetaClassBase *anObject); 63 | }; 64 | 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /hwmonitor/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // HWMonitor 4 | // 5 | // Created by mozo,Navi on 20.10.11. 6 | // Copyright (c) 2011 mozodojo. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ISPSmartController.h" 11 | #include "HWMonitorSensor.h" 12 | 13 | 14 | @interface AppDelegate : NSObject { 15 | NSStatusItem * statusItem; 16 | NSFont * statusItemFont; 17 | NSDictionary* statusItemAttributes; 18 | 19 | NSMutableArray * sensorsList; 20 | NSDictionary * DisksList; 21 | NSDictionary * SSDList; 22 | NSDictionary * BatteriesList; 23 | 24 | ISPSmartController * smartController; 25 | 26 | BOOL isMenuVisible; 27 | BOOL smart; 28 | int menusCount; 29 | int lastMenusCount; 30 | 31 | NSDate * lastcall; 32 | 33 | IBOutlet NSMenu * statusMenu; 34 | NSFont * statusMenuFont; 35 | NSDictionary* statusMenuAttributes; 36 | } 37 | 38 | @property (assign) IBOutlet NSMenuItem *startAtLoginItem; 39 | 40 | - (void)updateTitles; 41 | - (HWMonitorSensor *)addSensorWithKey:(NSString *)key 42 | andType:(NSString *)aType 43 | andCaption:(NSString *)caption 44 | intoGroup:(SensorGroup)group; 45 | 46 | - (void)insertFooterAndTitle:(NSString *)title andImage:(NSImage *) img; 47 | 48 | - (void)menuItemClicked:(id)sender; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /hwmonitor/English.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /hwmonitor/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /hwmonitor/English.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | HWSensors 4 | 5 | Created by Navi on 21.02.12. 6 | Copyright (c) 2012 . All rights reserved. 7 | */ 8 | -------------------------------------------------------------------------------- /hwmonitor/English.lproj/default.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/hwmonitor/English.lproj/default.icns -------------------------------------------------------------------------------- /hwmonitor/HWMonitorSMC-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | monitor-icon.icns 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.3.4 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.3.4 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | LSUIElement 28 | 29 | NSHumanReadableCopyright 30 | Copyright © 2011-2018 mozo,Navi. All rights reserved. 31 | NSMainNibFile 32 | MainMenu 33 | NSPrincipalClass 34 | NSApplication 35 | 36 | 37 | -------------------------------------------------------------------------------- /hwmonitor/HWMonitorSMC.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /hwmonitor/HWMonitorSMC.xcodeproj/project.xcworkspace/xcshareddata/HWMonitorSMC.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "2e15404a-8354-49a5-8ee8-3805ff3cba1c", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | "2e15404a-8354-49a5-8ee8-3805ff3cba1c" : { 5 | 6 | } 7 | }, 8 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 9 | "2e15404a-8354-49a5-8ee8-3805ff3cba1c" : 0 10 | }, 11 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "52C130FE-8019-43DF-A163-D5925FE8B035", 12 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 13 | "2e15404a-8354-49a5-8ee8-3805ff3cba1c" : "hwsensors3\/" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "HWMonitorSMC", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "trunk\/hwmonitor\/HWMonitorSMC.xcodeproj", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "svn+ssh:\/\/svn.code.sf.net\/p\/hwsensors\/hwsensors3\/code3", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Subversion", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "2e15404a-8354-49a5-8ee8-3805ff3cba1c" 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /hwmonitor/HWMonitorSMC.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | HWMonitorSMC.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 8D1107260486CEB800E47090 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /hwmonitor/HWMonitorSMC_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'HWMonitorSMC' target in the 'HWMonitorSMC' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /hwmonitor/HWMonitorSensor.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSSensor.h 3 | // HWSensors 4 | // 5 | // Created by mozo,Navi on 22.10.11. 6 | // Copyright (c) 2011 mozo. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ISPSmartController.h" 11 | 12 | enum { 13 | TemperatureSensorGroup = 1, 14 | VoltageSensorGroup = 2, 15 | TachometerSensorGroup = 3, 16 | FrequencySensorGroup = 4, 17 | MultiplierSensorGroup = 5, 18 | HDSmartTempSensorGroup = 6, 19 | BatterySensorsGroup = 7, 20 | HDSmartLifeSensorGroup = 8, 21 | 22 | }; 23 | typedef NSUInteger SensorGroup; 24 | 25 | @interface HWMonitorSensor : NSObject { 26 | NSString * key; 27 | NSString * type; 28 | SensorGroup group; 29 | NSString * caption; 30 | id object; 31 | BOOL favorite; 32 | 33 | // instance vars for the below @property 34 | NSString * _key; 35 | NSString * _type; 36 | SensorGroup _group; 37 | NSString * _caption; 38 | id _object; 39 | BOOL _favorite; 40 | } 41 | 42 | @property (readwrite, retain) NSString * key; 43 | @property (readwrite, retain) NSString * type; 44 | @property (readwrite, assign) SensorGroup group; 45 | @property (readwrite, retain) NSString * caption; 46 | @property (readwrite, retain) id object; 47 | @property (readwrite, assign) BOOL favorite; 48 | 49 | 50 | 51 | + (unsigned int) swapBytes:(unsigned int) value; 52 | 53 | + (NSData *)readValueForKey:(NSString *)key; 54 | + (NSString* )getTypeOfKey:(NSString*)key; 55 | 56 | - (HWMonitorSensor *)initWithKey:(NSString *)aKey 57 | andType: aType 58 | andGroup:(NSUInteger)aGroup 59 | withCaption:(NSString *)aCaption; 60 | 61 | - (NSString *)formatedValue:(NSData *)value; 62 | 63 | @end 64 | 65 | -------------------------------------------------------------------------------- /hwmonitor/IOBatteryStatus.h: -------------------------------------------------------------------------------- 1 | // 2 | // IOBatteryStatus.h 3 | // HWSensors 4 | // 5 | // Created by Navi on 04.01.13. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface IOBatteryStatus : NSObject 12 | 13 | + (BOOL)keyboardAvailable; 14 | + (BOOL)trackpadAvailable; 15 | + (BOOL)mouseAvailable; 16 | 17 | + (NSString *)getKeyboardName; 18 | + (NSString *)getTrackpadName; 19 | + (NSString *)getMouseName; 20 | 21 | + (NSInteger )getKeyboardBatteryLevel; 22 | + (NSInteger )getTrackpadBatteryLevel; 23 | + (NSInteger )getMouseBatteryLevel; 24 | 25 | + (NSDictionary *)getIOPMPowerSource; 26 | + (int)getBatteryVoltageFrom:(NSDictionary *)IOPMPowerSource; 27 | + (int)getBatteryAmperageFrom:(NSDictionary *)IOPMPowerSource; 28 | 29 | + (NSDictionary *)getAllBatteriesLevel; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /hwmonitor/ISPSmartController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ISPSmartController.h 3 | // iStatPro 4 | // 5 | // Created by Buffy on 11/06/07. 6 | // Copyright 2007 . All rights reserved. 7 | // 8 | 9 | #import 10 | #include 11 | #include 12 | 13 | 14 | #define kATADefaultSectorSize 512 15 | #define kWindowSMARTsDriveTempAttribute 194 16 | #define kWindowSMARTsDriveTempAttribute2 190 17 | #define kSMARTsDriveWearLevelingCount 177 18 | #define kSMARTAttributeCount 30 19 | 20 | @interface ISPSmartController : NSObject { 21 | NSMutableArray *diskData; 22 | NSMutableArray *latestData; 23 | NSArray *temps; 24 | NSArray *disksStatus; 25 | NSMutableDictionary *partitionData; 26 | NSNumber *temp; 27 | NSNumber *life; 28 | } 29 | - (void)getPartitions; 30 | - (void)update; 31 | - (NSDictionary *)getDataSet /*:(int)degrees*/; 32 | - (NSDictionary *)getSSDLife; 33 | @end 34 | -------------------------------------------------------------------------------- /hwmonitor/NSString+TruncateToWidth.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString.h 3 | // HWSensors 4 | // 5 | // Created by Natan Zalkin on 18/02/12. 6 | // Copyright (c) 2012 natan.zalkin@gmail.com. All rights reserved. 7 | // 8 | // Original code http://iphonedevelopertips.com/cocoa/truncate-an-nsstring-and-append-an-ellipsis-respecting-the-font-size.html 9 | // 10 | 11 | #import 12 | 13 | @interface NSString (TruncateToWidth) 14 | 15 | - (NSString*)stringByTruncatingToWidth:(CGFloat)width withFont:(NSFont *)font; 16 | - (NSString*)stringByTrimmingLeadingWhitespace; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /hwmonitor/NSString+TruncateToWidth.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString.m 3 | // HWSensors 4 | // 5 | // Created by Natan Zalkin on 18/02/12. 6 | // Copyright (c) 2012 natan.zalkin@gmail.com. All rights reserved. 7 | // 8 | // Original code http://iphonedevelopertips.com/cocoa/truncate-an-nsstring-and-append-an-ellipsis-respecting-the-font-size.html 9 | // 10 | 11 | #import "NSString+TruncateToWidth.h" 12 | 13 | @implementation NSString (TruncateToWidth) 14 | 15 | - (NSString*)stringByTruncatingToWidth:(CGFloat)width withFont:(NSFont *)font { 16 | // Create copy that will be the returned result 17 | NSMutableAttributedString * truncatedString = [[NSMutableAttributedString alloc] initWithString: self]; 18 | 19 | [truncatedString addAttribute:NSFontAttributeName value:font range:NSMakeRange(0, [truncatedString length])]; 20 | 21 | NSMutableAttributedString * ellipsis = [[NSMutableAttributedString alloc] initWithString:@"…"]; 22 | 23 | [ellipsis addAttribute:NSFontAttributeName value:font range:NSMakeRange(0, [ellipsis length])]; 24 | 25 | // Make sure string is longer than requested width 26 | if ([truncatedString size].width > width) { 27 | // Accommodate for ellipsis we'll tack on the end 28 | width -= [ellipsis size].width; 29 | 30 | // Get range for last character in string 31 | NSRange range = {truncatedString.length - 1, 1}; 32 | 33 | // Loop, deleting characters until string fits within width 34 | while ([truncatedString size].width > width) { 35 | // Delete character at end 36 | [truncatedString deleteCharactersInRange:range]; 37 | 38 | // Move back another character 39 | range.location--; 40 | } 41 | 42 | // Append ellipsis 43 | [truncatedString replaceCharactersInRange:range withAttributedString:ellipsis]; 44 | } 45 | 46 | return [NSString stringWithString:[truncatedString string]]; 47 | } 48 | 49 | - (NSString*)stringByTrimmingLeadingWhitespace { 50 | NSUInteger i = 0; 51 | 52 | while ((i < [self length]) 53 | && [[NSCharacterSet whitespaceCharacterSet] characterIsMember:[self characterAtIndex:i]]) { 54 | i++; 55 | } 56 | return [self substringFromIndex:i]; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /hwmonitor/default.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/hwmonitor/default.icns -------------------------------------------------------------------------------- /hwmonitor/fan_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/hwmonitor/fan_small.png -------------------------------------------------------------------------------- /hwmonitor/freq_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/hwmonitor/freq_small.png -------------------------------------------------------------------------------- /hwmonitor/hd_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/hwmonitor/hd_small.png -------------------------------------------------------------------------------- /hwmonitor/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // HWMonitor 4 | // 5 | // Created by Natan Zalkin on 20.10.11. 6 | // Copyright (c) 2011 . All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | return NSApplicationMain(argc, (const char **)argv); 13 | } 14 | 15 | -------------------------------------------------------------------------------- /hwmonitor/modern-battery-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/hwmonitor/modern-battery-icon.png -------------------------------------------------------------------------------- /hwmonitor/monitor-icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/hwmonitor/monitor-icon.icns -------------------------------------------------------------------------------- /hwmonitor/monitor_icon_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/hwmonitor/monitor_icon_small.png -------------------------------------------------------------------------------- /hwmonitor/multiply_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/hwmonitor/multiply_small.png -------------------------------------------------------------------------------- /hwmonitor/ru.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | HWSensors 4 | 5 | Created by Navi on 21.02.12. 6 | Copyright (c) 2012 . All rights reserved. 7 | */ 8 | "TEMPERATURES"="ТЕМПЕРАТУРЫ"; 9 | "FREQUENCIES"="ЧАСТОТЫ"; 10 | "MULTIPLIERS"="МНОЖИТЕЛИ"; 11 | "VOLTAGES"="НАПРЯЖЕНИЯ"; 12 | "FANS"="ВЕНТИЛЯТОРЫ"; 13 | "HARD DRIVES TEMPERATURES"="ТЕМПЕРАТУРЫ ДИСКОВ"; 14 | "BATTERIES"="ЗАРЯД БАТАРЕЙ"; 15 | "CPU Heatsink"="Радиатор ЦПУ"; 16 | "CPU Proximity"="Датчик ЦПУ"; 17 | "CPU %X Diode"="ЦПУ %X"; 18 | "CPU %X Core"="Ядро ЦПУ %X"; 19 | "GPU %X Board" = "GPU %X, радиатор "; 20 | "GPU %X Core" = "GPU %X, ядро "; 21 | "GPU %X Proximity" = "GPU %X, радиатор"; 22 | "GPU %X Shaders"="GPU %X, шейдеры"; 23 | "GPU %X Memory"="GPU %X, память"; 24 | "GPU %X ROP"="GPU %X, ROP"; 25 | "Motherboard"="Чипсет"; 26 | "Memory"="Модули памяти"; 27 | "Ambient"="Корпус"; 28 | "CPU Package Multiplier"="Общий множитель ЦПУ"; 29 | "CPU %X Multiplier"="Множитель ЦПУ %X"; 30 | "CPU Voltage"="Вольтаж ЦПУ"; 31 | "CPU VRM Voltage"="Шина ЦПУ"; 32 | "DIMM Voltage"="Шина модулей DIMM"; 33 | "+12V Bus Voltage"="Шина +12В"; 34 | "+5V Bus Voltage"="Шина +5В"; 35 | "-12V Bus Voltage"="Шина -12В"; 36 | "-5V Bus Voltage"="Шина -5В"; 37 | "3.3 VCC Voltage"="Шина 3.3В VCC"; 38 | "3.3 VSB Voltage"="Шина 3.3В VSB"; 39 | "Battery Voltage"="Шина батареи"; 40 | "GPU %X Voltage"="Вольтаж GPU %X"; 41 | -------------------------------------------------------------------------------- /hwmonitor/ssd_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/hwmonitor/ssd_small.png -------------------------------------------------------------------------------- /hwmonitor/temp_alt_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/hwmonitor/temp_alt_small.png -------------------------------------------------------------------------------- /hwmonitor/temperature_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/hwmonitor/temperature_small.png -------------------------------------------------------------------------------- /hwmonitor/temperature_small_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/hwmonitor/temperature_small_dark.png -------------------------------------------------------------------------------- /hwmonitor/temperature_small_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/hwmonitor/temperature_small_grey.png -------------------------------------------------------------------------------- /hwmonitor/voltage_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/hwmonitor/voltage_small.png -------------------------------------------------------------------------------- /plugins/ACPIMonitor/ACPIMonitor-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | $(MODULE_VERSION) 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | $(MODULE_VERSION) 21 | IOKitPersonalities 22 | 23 | ACPI Monitoring Plugin 24 | 25 | CFBundleIdentifier 26 | org.slice.${PRODUCT_NAME} 27 | FanNames 28 | 29 | System Fan 30 | CPU Fan 31 | Power Fan 32 | Intake Fan 33 | Exhaust Fan 34 | Fan 6 35 | Fan 7 36 | Fan 8 37 | Fan 9 38 | Fan 10 39 | 40 | IOClass 41 | ACPIMonitor 42 | IOMatchCategory 43 | ${PRODUCT_NAME} 44 | IONameMatch 45 | 46 | monitor 47 | 48 | IOProviderClass 49 | IOACPIPlatformDevice 50 | keysToAdd 51 | 52 | MSLD 53 | MSLD-1 54 | TCRR 55 | TA0P 56 | TCRW 57 | TA1P 58 | 59 | 60 | 61 | OSBundleLibraries 62 | 63 | com.apple.iokit.IOACPIFamily 64 | 1.2.0 65 | com.apple.kpi.iokit 66 | 9.0.0 67 | com.apple.kpi.libkern 68 | 9.0.0 69 | com.apple.kpi.mach 70 | 9.0.0 71 | com.apple.kpi.unsupported 72 | 9.0.0 73 | org.netkas.FakeSMC 74 | 3.3.0 75 | 76 | OSBundleRequired 77 | Root 78 | 79 | 80 | -------------------------------------------------------------------------------- /plugins/ACPIMonitor/ACPIMonitor-pre106-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.slice.${PRODUCT_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | IOKitPersonalities 22 | 23 | ACPI Monitoring Plugin 24 | 25 | CFBundleIdentifier 26 | org.slice.${PRODUCT_NAME} 27 | IOClass 28 | ACPIMonitor 29 | IOMatchCategory 30 | ${PRODUCT_NAME} 31 | IONameMatch 32 | 33 | monitor 34 | 35 | IOProviderClass 36 | IOACPIPlatformDevice 37 | Fan Names 38 | 39 | System Fan 40 | Processor Fan 41 | Power Fan 42 | Intake Fan 43 | Exhaust Fan 44 | 45 | keysToAdd 46 | 47 | TCRK 48 | TW0P 49 | 50 | 51 | 52 | OSBundleLibraries 53 | 54 | org.netkas.FakeSMC 55 | 3.1.0 56 | com.apple.iokit.IOACPIFamily 57 | 1.0.0d1 58 | com.apple.kernel.6.0 59 | 7.9.9 60 | com.apple.kernel.iokit 61 | 7.9.9 62 | com.apple.kernel.libkern 63 | 7.9.9 64 | 65 | OSBundleRequired 66 | Root 67 | 68 | 69 | -------------------------------------------------------------------------------- /plugins/ACPIMonitor/ACPIMonitor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ACPIMonitor.h 3 | * HWSensors 4 | * 5 | * Created by Slice. 6 | * 7 | */ 8 | 9 | #include 10 | #include "IOKit/acpi/IOACPIPlatformDevice.h" 11 | #include 12 | 13 | class ACPIMonitor : public IOService 14 | { 15 | OSDeclareDefaultStructors(ACPIMonitor) 16 | 17 | private: 18 | IOService* fakeSMC; 19 | IOACPIPlatformDevice* acpiDevice; 20 | OSDictionary* sensors; 21 | 22 | bool addSensor(const char* method, 23 | const char* key, 24 | const char* type, 25 | unsigned long long size); 26 | bool addTachometer(const char* method, const char* caption); 27 | 28 | public: 29 | virtual IOService* probe(IOService *provider, SInt32 *score) override; 30 | virtual bool start(IOService *provider) override; 31 | virtual bool init(OSDictionary *properties=0) override; 32 | virtual void free(void) override; 33 | virtual void stop(IOService *provider) override; 34 | 35 | virtual IOReturn callPlatformFunction(const OSSymbol *functionName, 36 | bool waitForFunction, 37 | void *param1, 38 | void *param2, 39 | void *param3, 40 | void *param4) override; 41 | }; 42 | -------------------------------------------------------------------------------- /plugins/ACPIMonitor/SSDT-Monitor.dsl: -------------------------------------------------------------------------------- 1 | /* 2 | * Intel ACPI Component Architecture 3 | * AML/ASL+ Disassembler version 20160729-64 4 | * Copyright (c) 2000 - 2016 Intel Corporation 5 | * 6 | * Disassembling to symbolic ASL+ operators 7 | * 8 | * Disassembly of /Volumes/MacHD/Applications/0App/DarwinDumper_3.0.4_13.01_20.19.19_MacBookPro10,1_AMI_X64_4837_High Sierra_17G4015_sergey/ACPI Tables/AML/SSDT-2.aml, Sun Jan 13 20:23:34 2019 9 | * 10 | * Original Table Header: 11 | * Signature "SSDT" 12 | * Length 0x0000016C (364) 13 | * Revision 0x02 14 | * Checksum 0xAE 15 | * OEM ID "APPLE " 16 | * OEM Table ID "Monitor" 17 | * OEM Revision 0x00001000 (4096) 18 | * Compiler ID "INTL" 19 | * Compiler Version 0x20160729 (538314537) 20 | */ 21 | DefinitionBlock ("", "SSDT", 2, "APPLE ", "Monitor", 0x00001000) 22 | { 23 | External (_SB_.ADP1._PSR, MethodObj) // 0 Arguments 24 | External (_SB_.LID0, DeviceObj) 25 | External (_SB_.LID0._LID, MethodObj) // 0 Arguments 26 | External (_SB_.PCI0.LPCB.EC, DeviceObj) 27 | External (_TZ_.THM_._TMP, MethodObj) // 0 Arguments 28 | 29 | Scope (\_SB.PCI0.LPCB.EC) 30 | { 31 | Device (FSAM) 32 | { 33 | Name (_HID, EisaId ("APP0111")) // _HID: Hardware ID 34 | Name (_CID, "monitor") // _CID: Compatible ID 35 | Name (PLID, 0xFFFF) //save previous LID status 36 | Name (PPSR, 0xFFFF) 37 | Name (BPSR, 0xFFFF) 38 | Method (MSLD, 0, NotSerialized) 39 | { 40 | Local0 = \_SB.LID0._LID () 41 | If (Local0 != PLID) 42 | { 43 | PLID = Local0 44 | Notify (\_SB.LID0, 0x80) // Status Change 45 | } 46 | 47 | Return (Local0 ^ One) 48 | } 49 | 50 | Method (TSYS, 0, NotSerialized) 51 | { 52 | Local1 = MSLD () 53 | Local0 = \_TZ.THM._TMP () 54 | Local0 &= 0x7F 55 | Return (Local0) 56 | } 57 | 58 | Method (ACDC, 0, NotSerialized) 59 | { 60 | Local0 = \_SB.ADP1._PSR () 61 | If (Local0 != PPSR) 62 | { 63 | PPSR = Local0 64 | BPSR = (PPSR ^ One) 65 | } 66 | 67 | Return (PPSR) /* \_SB_.PCI0.LPCB.EC.FSAM.PPSR */ 68 | } 69 | 70 | // Method (BATP, 0, NotSerialized) 71 | // { 72 | // Return (BPSR) /* \_SB_.PCI0.LPCB.EC.FSAM.BPSR */ 73 | // } 74 | } 75 | } 76 | } 77 | 78 | -------------------------------------------------------------------------------- /plugins/CPUSensors/AmdCPUMonitor/AmdCPUMonitor-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | $(MODULE_VERSION) 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | IOKitPersonalities 22 | 23 | AMD CPU Monitor 24 | 25 | CFBundleIdentifier 26 | org.slice.sensor.${PRODUCT_NAME} 27 | IOClass 28 | AmdCPUMonitor 29 | IOMatchCategory 30 | AmdCPUMonitor 31 | IOProbeScore 32 | 500 33 | IOProviderClass 34 | IOResources 35 | IOResourceMatch 36 | IOKit 37 | 38 | 39 | OSBundleLibraries 40 | 41 | com.apple.iokit.IOPCIFamily 42 | 2.4 43 | com.apple.kpi.iokit 44 | 9.0.0 45 | com.apple.kpi.libkern 46 | 9.0.0 47 | com.apple.kpi.unsupported 48 | 9.0.0 49 | org.netkas.FakeSMC 50 | 3.3.0 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /plugins/CPUSensors/AmdCPUMonitor/AmdCPUMonitor-pre106-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.slice.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | IOKitPersonalities 22 | 23 | Intel Thermal Management Controller 24 | 25 | CFBundleIdentifier 26 | org.slice.${PRODUCT_NAME} 27 | IOClass 28 | AmdCPUMonitor 29 | IOProbeScore 30 | 500 31 | IOMatchCategory 32 | AmdCPUMonitor 33 | IOProviderClass 34 | IOResources 35 | IOResourceMatch 36 | IOKit 37 | 38 | 39 | OSBundleLibraries 40 | 41 | org.netkas.FakeSMC 42 | 3.1.0 43 | com.apple.iokit.IOACPIFamily 44 | 1.0.0d1 45 | com.apple.iokit.IOPCIFamily 46 | 2.4 47 | com.apple.kernel.6.0 48 | 7.9.9 49 | com.apple.kernel.iokit 50 | 7.9.9 51 | com.apple.kernel.libkern 52 | 7.9.9 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /plugins/CPUSensors/AmdCPUMonitor/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /plugins/CPUSensors/IntelCPUMonitor/IntelCPUMonitor-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | $(MARKETING_VERSION) 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | IOKitPersonalities 22 | 23 | Intel CPU Monitor Plugin 24 | 25 | CFBundleIdentifier 26 | org.slice.IntelCPUMonitor 27 | IOClass 28 | IntelCPUMonitor 29 | IOMatchCategory 30 | IntelCPUMonitor 31 | IOProviderClass 32 | IOResources 33 | IOResourceMatch 34 | IOKit 35 | TjMax 36 | 0 37 | 38 | 39 | OSBundleLibraries 40 | 41 | com.apple.kpi.iokit 42 | 9.0.0 43 | com.apple.kpi.libkern 44 | 9.0.0 45 | com.apple.kpi.mach 46 | 9.0.0 47 | com.apple.kpi.unsupported 48 | 9.0.0 49 | org.netkas.FakeSMC 50 | 3.3.0 51 | 52 | OSBundleRequired 53 | Root 54 | 55 | 56 | -------------------------------------------------------------------------------- /plugins/CPUSensors/IntelCPUMonitor/IntelCPUMonitor-pre106-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.mozodojo.${PRODUCT_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | IOKitPersonalities 22 | 23 | Intel CPU Monitor Plugin 24 | 25 | CFBundleIdentifier 26 | org.mozodojo.IntelCPUMonitor 27 | IOClass 28 | IntelCPUMonitor 29 | IOMatchCategory 30 | IntelCPUMonitor 31 | IOProviderClass 32 | IOResources 33 | IOResourceMatch 34 | IOKit 35 | 36 | 37 | OSBundleLibraries 38 | 39 | org.netkas.FakeSMC 40 | 3.1.0 41 | com.apple.iokit.IOACPIFamily 42 | 1.0.0d1 43 | com.apple.kernel.6.0 44 | 7.9.9 45 | com.apple.kernel.iokit 46 | 7.9.9 47 | com.apple.kernel.libkern 48 | 7.9.9 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /plugins/CPUSensors/IntelCPUMonitor/IntelCPUMonitor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IntelCPUMonitor.h 3 | * HWSensors 4 | * 5 | * Created by Slice on 20.12.10. 6 | * Copyright 2010 mozodojo. All rights reserved. 7 | * 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | #include "../../../utils/cpuid.h" 23 | 24 | #define MSR_IA32_THERM_STATUS 0x019C 25 | #define MSR_IA32_PERF_STATUS 0x0198; 26 | #define MSR_IA32_TEMPERATURE_TARGET 0x01A2 27 | #define MSR_PERF_FIXED_CTR_CTRL (0x38d) 28 | #define MSR_PERF_GLOBAL_CTRL (0x38f) 29 | //#define MSR_PLATFORM_INFO 0xCE; 30 | 31 | #define MaxCpuCount 128 32 | #define MaxPStateCount 32 33 | 34 | extern "C" { 35 | void mp_rendezvous_no_intrs(void (*action_func)(void *), void * arg); 36 | int cpu_number(void); 37 | }; 38 | 39 | struct PState { 40 | union { 41 | UInt16 Control; 42 | struct { 43 | UInt8 VID; // Voltage ID 44 | UInt8 FID; // Frequency ID 45 | }; 46 | }; 47 | 48 | UInt8 DID; // DID 49 | UInt8 CID; // Compare ID 50 | // UInt32 Max; 51 | }; 52 | 53 | class IntelCPUMonitor : public IOService { 54 | OSDeclareDefaultStructors(IntelCPUMonitor) 55 | public: 56 | UInt32 Frequency[MaxCpuCount]; 57 | UInt32 Voltage; //in millivolts 58 | UInt32 BaseFreqRatio; 59 | 60 | private: 61 | bool Active; 62 | bool LoopLock; 63 | UInt64 BusClock; 64 | UInt64 FSBClock; 65 | UInt32 CpuFamily; 66 | UInt32 CpuModel; 67 | UInt32 CpuStepping; 68 | bool CpuMobile; 69 | UInt8 count; 70 | UInt8 threads; 71 | UInt8 tjmax[MaxCpuCount]; 72 | UInt32 userTjmax; 73 | char* key[MaxCpuCount]; 74 | char Platform[4]; 75 | bool nehalemArch; 76 | bool SandyArch; 77 | IOService* fakeSMC; 78 | void Activate(void); 79 | void Deactivate(void); 80 | UInt32 IntelGetFrequency(UInt8 fid); 81 | UInt32 IntelGetVoltage(UInt16 vid); 82 | 83 | IOWorkLoop * WorkLoop; 84 | IOTimerEventSource * TimerEventSource; 85 | 86 | 87 | public: 88 | virtual bool init(OSDictionary *properties=0); 89 | virtual IOService* probe(IOService *provider, SInt32 *score); 90 | virtual bool start(IOService *provider); 91 | virtual void stop(IOService *provider); 92 | virtual void free(void); 93 | virtual IOReturn setPowerState(unsigned long which, IOService *whom); 94 | virtual IOReturn callPlatformFunction(const OSSymbol *functionName, 95 | bool waitForFunction, 96 | void *param1, 97 | void *param2, 98 | void *param3, 99 | void *param4); 100 | virtual IOReturn loopTimerEvent(void); 101 | }; 102 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/GeForceSensors-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | $(MODULE_VERSION) 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | $(MODULE_VERSION) 21 | IOKitPersonalities 22 | 23 | Nouveau nVidia Cards Monitoring Plugin 24 | 25 | CFBundleIdentifier 26 | org.kozlek.${PRODUCT_NAME} 27 | IOClass 28 | GeforceSensors 29 | IOMatchCategory 30 | ${PRODUCT_NAME} 31 | IOProbeScore 32 | 1000 33 | IOProviderClass 34 | IOResources 35 | IOResourceMatch 36 | IOKit 37 | 38 | 39 | OSBundleLibraries 40 | 41 | com.apple.iokit.IOPCIFamily 42 | 2.4 43 | com.apple.kpi.iokit 44 | 9.0.0 45 | com.apple.kpi.libkern 46 | 9.0.0 47 | com.apple.kpi.mach 48 | 9.0.0 49 | com.apple.kpi.unsupported 50 | 9.0.0 51 | org.netkas.FakeSMC 52 | 3.3.0 53 | 54 | OSBundleRequired 55 | Root 56 | 57 | 58 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/GeForceSensors-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'NVClockX' target in the 'NVClockX' project 3 | // 4 | 5 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/GeforceSensors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * GeforceSensors.h 3 | * HWSensors 4 | * 5 | * Created by kozlek on 19/04/12. 6 | * Copyright 2010 Natan Zalkin . All rights reserved. 7 | * 8 | */ 9 | 10 | /* 11 | * Copyright 2007-2008 Nouveau Project 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining a 14 | * copy of this software and associated documentation files (the "Software"), 15 | * to deal in the Software without restriction, including without limitation 16 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 17 | * and/or sell copies of the Software, and to permit persons to whom the 18 | * Software is furnished to do so, subject to the following conditions: 19 | * 20 | * The above copyright notice and this permission notice (including the next 21 | * paragraph) shall be included in all copies or substantial portions of the 22 | * Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 25 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 27 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 28 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 29 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 30 | * DEALINGS IN THE SOFTWARE. 31 | */ 32 | 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | 39 | #include "SuperIOFamily.h" 40 | 41 | //#include "FakeSMCPlugin.h" 42 | #include "nouveau.h" 43 | #include "xf86i2c.h" 44 | 45 | class GeforceSensors : public IOService 46 | { 47 | OSDeclareDefaultStructors(GeforceSensors) 48 | 49 | private: 50 | IOService * fakeSMC; 51 | OSDictionary * sensors; 52 | 53 | nouveau_device card; 54 | 55 | I2CDevPtr i2c_sensor; 56 | int i2c_get_board_temp(I2CDevPtr dev); 57 | int i2c_get_gpu_temp(I2CDevPtr dev); 58 | int i2c_get_fanspeed_rpm(I2CDevPtr dev); 59 | float i2c_get_fanspeed_pwm(I2CDevPtr dev); 60 | int i2c_get_fanspeed_mode(I2CDevPtr dev); 61 | 62 | bool addSensor(const char* key, const char* type, unsigned int size, int index); 63 | int addTachometer(int index, const char* id); 64 | 65 | protected: 66 | // virtual float getSensorValue(FakeSMCSensor *sensor); 67 | SInt8 getVacantGPUIndex(); 68 | 69 | public: 70 | virtual bool init(OSDictionary *properties=0); 71 | virtual IOService* probe(IOService *provider, SInt32 *score); 72 | virtual bool start(IOService *provider); 73 | virtual void stop(IOService *provider); 74 | virtual void free(void); 75 | virtual IOReturn callPlatformFunction(const OSSymbol *functionName, 76 | bool waitForFunction, 77 | void *param1, 78 | void *param2, 79 | void *param3, 80 | void *param4); 81 | }; 82 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/f75375.h: -------------------------------------------------------------------------------- 1 | /* Fintek F75375 sensor module 2 | / Copyright(C) 2005, Matt Wright 3 | */ 4 | //#include "nvclock.h" 5 | #include "nvclock_i2c.h" 6 | 7 | int debug; 8 | typedef struct _fan_vtemp 9 | { 10 | int temp[4]; 11 | int speed[5]; 12 | } fan_vtemp; 13 | 14 | 15 | #define dbg_printf(x) if (debug==1) IOLog(x) 16 | 17 | #define MODE_SPEED 0x00 18 | #define MODE_TEMP 0x10 19 | #define MODE_PWM 0x20 20 | 21 | int f75375_get_gpu_fanmode(I2CDevPtr dev); 22 | int f75375_set_gpu_fanmode(I2CDevPtr dev, I2CByte mode); 23 | int f75375_set_gpu_tempctl(I2CDevPtr dev, fan_vtemp speeds); 24 | int f75375_get_gpu_tempctl(I2CDevPtr dev, fan_vtemp *speeds); 25 | 26 | #define FINTEK_VENDOR1 0x5d 27 | #define FINTEK_VENDOR2 0x5e 28 | 29 | #define ASUS_NV40_CHIPID_H 0x5a 30 | #define ASUS_NV40_CHIPID_L 0x5b 31 | 32 | #define F75375S_VRAM_VCC 0x10 33 | #define F75375S_VRAM_V1 0x11 34 | #define F75375S_VRAM_V2 0x12 35 | #define F75375S_VRAM_V3 0x13 36 | #define F75375S_VRAM_TEMP1 0x14 37 | #define F75375S_VRAM_TEMP2 0x15 38 | #define F75375S_VRAM_FAN1_MSB 0x16 39 | #define F75375S_VRAM_FAN1_LSB 0x17 40 | #define F75375S_VRAM_FAN2_MSB 0x18 41 | #define F75375S_VRAM_FAN2_LSB 0x19 42 | 43 | #define F75375S_FAN1_PWM 0x76 44 | #define F75375S_FAN1_COUNT_H 0x16 45 | #define F75375S_FAN1_COUNT_L 0x17 46 | #define F75375S_FAN1_MODE 0x60 47 | #define F75375S_FAN1_EXPECT_H 0x74 48 | #define F75375S_FAN1_EXPECT_L 0x75 49 | 50 | #define F75375S_TEMP_GPU 0x14 51 | #define F75375S_TEMP_RAM 0x15 52 | 53 | #define F75375S_VT1_B1 0xa0 54 | #define F75375S_VT1_B2 0xa1 55 | #define F75375S_VT1_B3 0xa2 56 | #define F75375S_VT1_B4 0xa3 57 | 58 | #define F75375S_VT1_S1_H 0xa4 59 | #define F75375S_VT1_S1_L 0xa5 60 | #define F75375S_VT1_S2_H 0xa6 61 | #define F75375S_VT1_S2_L 0xa7 62 | #define F75375S_VT1_S3_H 0xa8 63 | #define F75375S_VT1_S3_L 0xa9 64 | #define F75375S_VT1_S4_H 0xaa 65 | #define F75375S_VT1_S4_L 0xab 66 | #define F75375S_VT1_S5_H 0xac 67 | #define F75375S_VT1_S5_L 0xad 68 | 69 | #define FAN_TO_RPM(msb, lsb) (1500000/((msb<<8)+lsb)) 70 | #define RPM_TO_FAN(x) (1500000/x) 71 | #define MERGE_BYTE(msb, lsb) ((msb<<8)+lsb) 72 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/gm100.h: -------------------------------------------------------------------------------- 1 | // 2 | // gm100.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 05.04.14. 6 | // 7 | // 8 | 9 | #ifndef HWSensors_gm100_h 10 | #define HWSensors_gm100_h 11 | 12 | bool gm100_identify(struct nouveau_device *device); 13 | void gm100_init(struct nouveau_device *device); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/gp100.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // gp100.cpp 3 | // HWSensors 4 | // 5 | // Created by Natan Zalkin on 17/12/2016. 6 | // 7 | // 8 | /* 9 | * Copyright 2017 Rhys Kidd 10 | */ 11 | 12 | #include "gp100.h" 13 | 14 | #include "nouveau.h" 15 | #include "nv50.h" 16 | #include "nva3.h" 17 | #include "nv84.h" 18 | #include "nvd0.h" 19 | #include "nve0.h" 20 | #include "nouveau_therm.h" 21 | 22 | static int 23 | gp100_temp_get(struct nouveau_device *device) { 24 | u32 tsensor = nv_rd32(device, 0x020460); //Linux sources uses 20460 25 | u32 inttemp = (tsensor & 0x0001fff8); 26 | 27 | /* device SHADOWed */ 28 | if (tsensor & 0x40000000) { 29 | nv_info(device, "reading temperature from SHADOWed sensor\n"); 30 | } 31 | 32 | /* device valid */ 33 | if (tsensor & 0x20000000) { 34 | return (inttemp >> 8); 35 | } else { 36 | return -ENODEV; 37 | } 38 | } 39 | 40 | bool gp100_identify(struct nouveau_device *device) { 41 | switch (device->chipset) { 42 | case 0x130: 43 | device->cname = "GP100"; 44 | break; 45 | case 0x132: 46 | device->cname = "GP102"; 47 | break; 48 | case 0x134: 49 | device->cname = "GP104"; 50 | break; 51 | case 0x136: 52 | device->cname = "GP106"; 53 | break; 54 | case 0x137: 55 | device->cname = "GP107"; 56 | break; 57 | case 0x138: 58 | case 0x13b: 59 | device->cname = "GP108"; 60 | break; 61 | default: 62 | nv_fatal(device, "unknown Pascal chipset 0x%x\n", device->chipset); 63 | return false; 64 | } 65 | return true; 66 | } 67 | 68 | void gp100_init(struct nouveau_device *device) { 69 | nvd0_therm_init(device); 70 | 71 | device->gpio_find = nouveau_gpio_find; 72 | device->gpio_get = nouveau_gpio_get; 73 | device->gpio_sense = nvd0_gpio_sense; 74 | device->temp_get = gp100_temp_get; //nv84_temp_get; 75 | // device->clocks_get = nve0_clock_read; 76 | // //device->voltage_get = nouveau_voltage_get; 77 | device->pwm_get = nvd0_fan_pwm_get; //gm107_fan_pwm_get; 78 | device->fan_pwm_get = nouveau_therm_fan_pwm_get; 79 | device->fan_rpm_get = nva3_therm_fan_sense; 80 | } 81 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/gp100.h: -------------------------------------------------------------------------------- 1 | // 2 | // gp100.h 3 | // HWSensors 4 | // 5 | // Created by Natan Zalkin on 17/12/2016. 6 | // 7 | // 8 | 9 | #ifndef HWSensors_gp100_hpp 10 | #define HWSensors_gp100_hpp 11 | 12 | bool gp100_identify(struct nouveau_device *device); 13 | void gp100_init(struct nouveau_device *device); 14 | 15 | #endif /* HWSensors_gp100_hpp */ 16 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/i2c_algo_bit.h: -------------------------------------------------------------------------------- 1 | // 2 | // i2c_algo_bit.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 13.08.12. 6 | // 7 | // 8 | 9 | #ifndef __HWSensors__i2c_algo_bit__ 10 | #define __HWSensors__i2c_algo_bit__ 11 | 12 | #include "linux_definitions.h" 13 | #include "i2c_base.h" 14 | 15 | /* --- Defines for bit-adapters --------------------------------------- */ 16 | /* 17 | * This struct contains the hw-dependent functions of bit-style adapters to 18 | * manipulate the line states, and to init any hw-specific features. This is 19 | * only used if you have more than one hw-type of adapter running. 20 | */ 21 | struct i2c_algo_bit_data { 22 | void *data; /* private data for lowlevel routines */ 23 | void (*setsda) (void *data, int state); 24 | void (*setscl) (void *data, int state); 25 | int (*getsda) (void *data); 26 | int (*getscl) (void *data); 27 | int (*pre_xfer) (struct i2c_adapter *); 28 | void (*post_xfer) (struct i2c_adapter *); 29 | 30 | /* local settings */ 31 | int udelay; /* half clock cycle time in us, 32 | minimum 2 us for fast-mode I2C, 33 | minimum 5 us for standard-mode I2C and SMBus, 34 | maximum 50 us for SMBus */ 35 | int timeout; /* in jiffies */ 36 | }; 37 | 38 | int i2c_bit_add_bus(struct i2c_adapter *); 39 | int i2c_bit_add_numbered_bus(struct i2c_adapter *); 40 | extern const struct i2c_algorithm i2c_bit_algo; 41 | 42 | #endif /* defined(__HWSensors__i2c_algo_bit__) */ 43 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/i2c_base.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // i2c_base.cpp 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 13.08.12. 6 | // 7 | // 8 | 9 | #include "i2c_base.h" 10 | #include "timer.h" 11 | 12 | /* ---------------------------------------------------- 13 | * the functional interface to the i2c busses. 14 | * ---------------------------------------------------- 15 | */ 16 | 17 | /** 18 | * __i2c_transfer - unlocked flavor of i2c_transfer 19 | * @adap: Handle to I2C bus 20 | * @msgs: One or more messages to execute before STOP is issued to 21 | * terminate the operation; each message begins with a START. 22 | * @num: Number of messages to be executed. 23 | * 24 | * Returns negative errno, else the number of messages executed. 25 | * 26 | * Adapter lock must be held when calling this function. No debug logging 27 | * takes place. adap->algo->master_xfer existence isn't checked. 28 | */ 29 | int __i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) { 30 | int ret, try1; 31 | 32 | /* Retry automatically on arbitration loss */ 33 | u64 end; 34 | 35 | end = ptimer_read() + adap->timeout * NSEC_PER_USEC; 36 | 37 | for (ret = 0, try1 = 0; try1 <= adap->retries; try1++) { 38 | ret = adap->algo->master_xfer(adap, msgs, num); 39 | 40 | IOLog("GeforceSensors: _i2c_transfer=%d\n", ret); 41 | 42 | if (ret != -EAGAIN) { 43 | break; 44 | } 45 | 46 | if (end - ptimer_read() <= 0) { 47 | break; 48 | } 49 | } 50 | 51 | return ret; 52 | } 53 | 54 | /** 55 | * i2c_transfer - execute a single or combined I2C message 56 | * @adap: Handle to I2C bus 57 | * @msgs: One or more messages to execute before STOP is issued to 58 | * terminate the operation; each message begins with a START. 59 | * @num: Number of messages to be executed. 60 | * 61 | * Returns negative errno, else the number of messages executed. 62 | * 63 | * Note that there is no requirement that each message be sent to 64 | * the same slave address, although that is the most common model. 65 | */ 66 | int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) { 67 | /* REVISIT the fault reporting model here is weak: 68 | * 69 | * - When we get an error after receiving N bytes from a slave, 70 | * there is no way to report "N". 71 | * 72 | * - When we get a NAK after transmitting N bytes to a slave, 73 | * there is no way to report "N" ... or to let the master 74 | * continue executing the rest of this combined message, if 75 | * that's the appropriate response. 76 | * 77 | * - When for example "num" is two and we successfully complete 78 | * the first message but get an error part way through the 79 | * second, it's unclear whether that should be reported as 80 | * one (discarding status on the second message) or errno 81 | * (discarding status on the first one). 82 | */ 83 | 84 | if (adap->algo->master_xfer) { 85 | int ret = __i2c_transfer(adap, msgs, num); 86 | 87 | //IOLog("NouveauI2C: i2c_transfer=%d\n", ret); 88 | 89 | return ret; 90 | } else { 91 | IOLog("GeforceSensors: I2C level transfers not supported\n"); 92 | return -EOPNOTSUPP; 93 | } 94 | } 95 | //EXPORT_SYMBOL(i2c_transfer); 96 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nouveau_definitions.h: -------------------------------------------------------------------------------- 1 | // 2 | // nouveau_definitions.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 07.08.12. 6 | // 7 | // 8 | 9 | #ifndef HWSensors_nouveau_definitions_h 10 | #define HWSensors_nouveau_definitions_h 11 | 12 | #include "linux_definitions.h" 13 | 14 | //#define NV_DEBUG_ENABLED false 15 | #define NV_TRACE_ENABLED false 16 | #define NV_SPAM_ENABLED false 17 | 18 | #define nv_prefix "GeForceSensors" 19 | 20 | #define nv_fatal(o,f,a...) do { if (1) { IOLog ("%s (%d): [Fatal] " f, nv_prefix, (o)->card_index, ##a); } } while(0) 21 | #define nv_error(o,f,a...) do { if (1) { IOLog ("%s (%d): [Error] " f, nv_prefix, (o)->card_index, ##a); } } while(0) 22 | #define nv_warn(o,f,a...) do { if (1) { IOLog ("%s (%d): [Warning] " f, nv_prefix, (o)->card_index, ##a); } } while(0) 23 | #define nv_info(o,f,a...) do { if (1) { IOLog ("%s (%d): " f, nv_prefix, o->card_index, ##a); } } while(0) 24 | #define nv_debug(o,f,a...) do { if (NV_DEBUG_ENABLED) { IOLog ("%s (%d): [Debug] " f, nv_prefix, (o)->card_index, ##a); } } while(0) 25 | #define nv_trace(o,f,a...) do { if (NV_TRACE_ENABLED) { IOLog ("%s (%d): [Trace] " f, nv_prefix, (o)->card_index, ##a); } } while(0) 26 | #define nv_spam(o,f,a...) do { if (NV_SPAM_ENABLED) { IOLog ("%s (%d): [Spam] " f, nv_prefix, (o)->card_index, ##a); } } while(0) 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nouveau_gpio.h: -------------------------------------------------------------------------------- 1 | // 2 | // nouveau_gpio.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 10.08.12. 6 | // 7 | // 8 | 9 | #ifndef __HWSensors__nouveau_gpio__ 10 | #define __HWSensors__nouveau_gpio__ 11 | 12 | #include "nouveau_definitions.h" 13 | 14 | enum dcb_gpio_func_name { 15 | DCB_GPIO_PANEL_POWER = 0x01, 16 | DCB_GPIO_TVDAC0 = 0x0c, 17 | DCB_GPIO_TVDAC1 = 0x2d, 18 | DCB_GPIO_FAN = 0x09, 19 | DCB_GPIO_FAN_SENSE = 0x3d, 20 | DCB_GPIO_UNUSED = 0xff, 21 | DCB_GPIO_VID0 = 0x04, 22 | DCB_GPIO_VID1 = 0x05, 23 | DCB_GPIO_VID2 = 0x06, 24 | DCB_GPIO_VID3 = 0x1a, 25 | DCB_GPIO_VID4 = 0x73, 26 | DCB_GPIO_VID5 = 0x74, 27 | DCB_GPIO_VID6 = 0x75, 28 | DCB_GPIO_VID7 = 0x76, 29 | }; 30 | 31 | struct dcb_gpio_func { 32 | u8 func; 33 | u8 line; 34 | u8 log[2]; 35 | 36 | /* so far, "param" seems to only have an influence on PWM-related 37 | * GPIOs such as FAN_CONTROL and PANEL_BACKLIGHT_LEVEL. 38 | * if param equals 1, hardware PWM is available 39 | * if param equals 0, the host should toggle the GPIO itself 40 | */ 41 | u8 param; 42 | }; 43 | 44 | u16 dcb_gpio_table(struct nouveau_device *device, u8 *ver, u8 *hdr, u8 *cnt, u8 *len); 45 | 46 | int nouveau_gpio_find(struct nouveau_device *device, int idx, u8 tag, u8 line, struct dcb_gpio_func *func); 47 | int nouveau_gpio_get(struct nouveau_device *device, int idx, u8 tag, u8 line); 48 | 49 | #endif /* defined(__HWSensors__nouveau_gpio__) */ 50 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nouveau_i2c.h: -------------------------------------------------------------------------------- 1 | // 2 | // nouveau_i2c.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 11.08.12. 6 | // 7 | // 8 | 9 | #ifndef __HWSensors__nouveau_i2c__ 10 | #define __HWSensors__nouveau_i2c__ 11 | 12 | #include "nouveau_definitions.h" 13 | #include "i2c_algo_bit.h" 14 | #include "list.h" 15 | 16 | #define CONFIG_NOUVEAU_I2C_INTERNAL TRUE 17 | #define CONFIG_NOUVEAU_I2C_NVCLOCK TRUE 18 | 19 | #define NV_I2C_PORT(n) (0x00 + (n)) 20 | #define NV_I2C_DEFAULT(n) (0x80 + (n)) 21 | 22 | struct nouveau_i2c; 23 | 24 | struct nouveau_i2c_port { 25 | struct i2c_adapter adapter; 26 | struct nouveau_i2c *i2c; 27 | struct i2c_algo_bit_data bit; 28 | struct list_head head; 29 | u8 index; 30 | u8 type; 31 | u32 dcb; 32 | u32 drive; 33 | u32 sense; 34 | u32 state; 35 | }; 36 | 37 | struct nouveau_i2c { 38 | struct nouveau_device *device; 39 | 40 | struct nouveau_i2c_port *(*find)(struct nouveau_i2c *, u8 index); 41 | int (*identify)(struct nouveau_i2c *, int index, 42 | const char *what, struct i2c_board_info *, 43 | bool (*match)(struct nouveau_i2c_port *, 44 | struct i2c_board_info *)); 45 | struct list_head ports; 46 | }; 47 | 48 | struct nouveau_i2c_port *nouveau_i2c_find(struct nouveau_i2c *i2c, u8 index); 49 | 50 | void nouveau_i2c_drive_scl(void *, int); 51 | void nouveau_i2c_drive_sda(void *, int); 52 | int nouveau_i2c_sense_scl(void *); 53 | int nouveau_i2c_sense_sda(void *); 54 | 55 | int nv_rdi2cr(struct nouveau_i2c_port *, u8 addr, u8 reg); 56 | int nv_wri2cr(struct nouveau_i2c_port *, u8 addr, u8 reg, u8 val); 57 | bool nv_probe_i2c(struct nouveau_i2c_port *, u8 addr); 58 | 59 | int nv_rdaux(struct nouveau_i2c_port *, u32 addr, u8 *data, u8 size); 60 | int nv_wraux(struct nouveau_i2c_port *, u32 addr, u8 *data, u8 size); 61 | 62 | extern const struct i2c_algorithm nouveau_i2c_bit_algo; 63 | extern const struct i2c_algorithm nouveau_i2c_aux_algo; 64 | 65 | bool nouveau_i2c_create(struct nouveau_device *device); 66 | void nouveau_i2c_probe(struct nouveau_device *device); 67 | 68 | #endif /* defined(__HWSensors__nouveau_i2c__) */ 69 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nouveau_therm.h: -------------------------------------------------------------------------------- 1 | // 2 | // nouveau_temp.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 07.08.12. 6 | // 7 | // 8 | 9 | #ifndef HWSensors_nouveau_temp_h 10 | #define HWSensors_nouveau_temp_h 11 | 12 | #include "linux_definitions.h" 13 | 14 | struct nvbios_therm_sensor { 15 | /* diode */ 16 | s16 slope_mult; 17 | s16 slope_div; 18 | s16 offset_num; 19 | s16 offset_den; 20 | s8 offset_constant; 21 | }; 22 | 23 | void nouveau_therm_init(struct nouveau_device *device); 24 | int nouveau_therm_fan_pwm_get(struct nouveau_device *device); 25 | int nouveau_therm_fan_rpm_get(struct nouveau_device *device); 26 | 27 | int nouveau_fan_pwm_get(struct nouveau_device *device); 28 | int nouveau_fan_rpm_get(struct nouveau_device *device); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nouveau_volt.h: -------------------------------------------------------------------------------- 1 | // 2 | // nouveau_volt.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 10.08.12. 6 | // 7 | // 8 | 9 | #ifndef HWSensors_nouveau_volt_h 10 | #define HWSensors_nouveau_volt_h 11 | 12 | #include "nouveau_definitions.h" 13 | 14 | struct nouveau_pm_voltage_level { 15 | u32 voltage; /* microvolts */ 16 | u8 vid; 17 | }; 18 | 19 | struct nouveau_pm_voltage { 20 | bool supported; 21 | u8 version; 22 | u8 vid_mask; 23 | 24 | struct nouveau_pm_voltage_level *level; 25 | int nr_level; 26 | }; 27 | 28 | void nouveau_volt_init(struct nouveau_device *); 29 | int nouveau_voltage_get(struct nouveau_device *device); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nouveau_xpio.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // nouveau_xpio.cpp 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 08.12.12. 6 | // 7 | // 8 | 9 | #include "nouveau_xpio.h" 10 | 11 | /* 12 | * Copyright 2012 Red Hat Inc. 13 | * 14 | * Permission is hereby granted, free of charge, to any person obtaining a 15 | * copy of this software and associated documentation files (the "Software"), 16 | * to deal in the Software without restriction, including without limitation 17 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 18 | * and/or sell copies of the Software, and to permit persons to whom the 19 | * Software is furnished to do so, subject to the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be included in 22 | * all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 25 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 27 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 28 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 29 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 30 | * OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | * Authors: Ben Skeggs 33 | */ 34 | 35 | #include "nouveau_gpio.h" 36 | #include "nouveau_xpio.h" 37 | #include "nouveau.h" 38 | #include "nouveau_bios.h" 39 | 40 | static u16 dcb_xpiod_table(struct nouveau_device *device, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) 41 | { 42 | u16 data = dcb_gpio_table(device, ver, hdr, cnt, len); 43 | if (data && *ver >= 0x40 && *hdr >= 0x06) { 44 | u16 xpio = nv_ro16(device, data + 0x04); 45 | if (xpio) { 46 | *ver = nv_ro08(device, data + 0x00); 47 | *hdr = nv_ro08(device, data + 0x01); 48 | *cnt = nv_ro08(device, data + 0x02); 49 | *len = nv_ro08(device, data + 0x03); 50 | return xpio; 51 | } 52 | } 53 | return 0x0000; 54 | } 55 | 56 | u16 dcb_xpio_table(struct nouveau_device *device, u8 idx, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) 57 | { 58 | u16 data = dcb_xpiod_table(device, ver, hdr, cnt, len); 59 | if (data && idx < *cnt) { 60 | u16 xpio = nv_ro16(device, data + *hdr + (idx * *len)); 61 | if (xpio) { 62 | *ver = nv_ro08(device, data + 0x00); 63 | *hdr = nv_ro08(device, data + 0x01); 64 | *cnt = nv_ro08(device, data + 0x02); 65 | *len = nv_ro08(device, data + 0x03); 66 | return xpio; 67 | } 68 | } 69 | return 0x0000; 70 | } 71 | 72 | /*static u16 dcb_xpio_parse(struct nouveau_device *device, u8 idx, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_xpio *info) 73 | { 74 | u16 data = dcb_xpio_table(device, idx, ver, hdr, cnt, len); 75 | if (data && *len >= 6) { 76 | info->type = nv_ro08(device, data + 0x04); 77 | info->addr = nv_ro08(device, data + 0x05); 78 | info->flags = nv_ro08(device, data + 0x06); 79 | } 80 | return 0x0000; 81 | }*/ -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nouveau_xpio.h: -------------------------------------------------------------------------------- 1 | // 2 | // nouveau_xpio.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 08.12.12. 6 | // 7 | // 8 | 9 | #ifndef __HWSensors__nouveau_xpio__ 10 | #define __HWSensors__nouveau_xpio__ 11 | 12 | #include "nouveau_definitions.h" 13 | 14 | struct nvbios_xpio { 15 | u8 type; 16 | u8 addr; 17 | u8 flags; 18 | }; 19 | 20 | u16 dcb_xpio_table(struct nouveau_device *device, u8 idx, u8 *ver, u8 *hdr, u8 *cnt, u8 *len); 21 | 22 | #endif /* defined(__HWSensors__nouveau_xpio__) */ 23 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nv10.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // nv10.cpp 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 10.08.12. 6 | // 7 | // 8 | 9 | /* 10 | * Copyright (C) 2009 Francisco Jerez. 11 | * All Rights Reserved. 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice (including the 22 | * next paragraph) shall be included in all copies or substantial 23 | * portions of the Software. 24 | * 25 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 28 | * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE 29 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 30 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 31 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 32 | * 33 | */ 34 | 35 | #include "nv10.h" 36 | 37 | #include "nouveau_definitions.h" 38 | #include "nouveau.h" 39 | 40 | int nv10_gpio_sense(struct nouveau_device *device, int line) 41 | { 42 | if (line < 2) { 43 | line = line * 16; 44 | line = nv_rd32(device, 0x00600818) >> line; 45 | return !!(line & 0x0100); 46 | } else 47 | if (line < 10) { 48 | line = (line - 2) * 4; 49 | line = nv_rd32(device, 0x0060081c) >> line; 50 | return !!(line & 0x04); 51 | } else 52 | if (line < 14) { 53 | line = (line - 10) * 4; 54 | line = nv_rd32(device, 0x00600850) >> line; 55 | return !!(line & 0x04); 56 | } 57 | 58 | return -EINVAL; 59 | } 60 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nv10.h: -------------------------------------------------------------------------------- 1 | // 2 | // nv10.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 10.08.12. 6 | // 7 | // 8 | 9 | #ifndef __HWSensors__nv10__ 10 | #define __HWSensors__nv10__ 11 | 12 | int nv10_gpio_sense(struct nouveau_device *device, int line); 13 | 14 | #endif /* defined(__HWSensors__nv10__) */ 15 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nv40.h: -------------------------------------------------------------------------------- 1 | // 2 | // nv40.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 07.08.12. 6 | // 7 | // 8 | 9 | #ifndef HWSensors_nv40_h 10 | #define HWSensors_nv40_h 11 | 12 | bool nv40_identify(struct nouveau_device *device); 13 | void nv40_init(struct nouveau_device *device); 14 | int nv40_clocks_get(struct nouveau_device *device, u8 source); 15 | int nv40_sensor_setup(struct nouveau_device *device); 16 | int nv40_temp_get(struct nouveau_device *device); 17 | int nv40_fan_pwm_get(struct nouveau_device *device, int line, u32 *divs, u32 *duty); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nv50.h: -------------------------------------------------------------------------------- 1 | // 2 | // nv50.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 07.08.12. 6 | // 7 | // 8 | 9 | #ifndef HWSensors_nv50_h 10 | #define HWSensors_nv50_h 11 | 12 | bool nv50_identify(struct nouveau_device *device); 13 | void nv50_init(struct nouveau_device *device); 14 | 15 | int nv50_gpio_sense(struct nouveau_device *device, int line); 16 | 17 | int nv50_clocks_get(struct nouveau_device *device, u8 source); 18 | void nv50_sensor_setup(struct nouveau_device *device); 19 | int nv50_temp_get(struct nouveau_device *device); 20 | int nv50_fan_pwm_get(struct nouveau_device *device, int line, u32 *divs, u32 *duty); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nv84.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // nv84.cpp 3 | // HWSensors 4 | // 5 | // Created by kozlek on 18.03.13. 6 | // 7 | // 8 | 9 | /* 10 | * Copyright 2012 Red Hat Inc. 11 | * 12 | * Permission is hereby granted, free of charge, to any person obtaining a 13 | * copy of this software and associated documentation files (the "Software"), 14 | * to deal in the Software without restriction, including without limitation 15 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 16 | * and/or sell copies of the Software, and to permit persons to whom the 17 | * Software is furnished to do so, subject to the following conditions: 18 | * 19 | * The above copyright notice and this permission notice shall be included in 20 | * all copies or substantial portions of the Software. 21 | * 22 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 25 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 26 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 27 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | * OTHER DEALINGS IN THE SOFTWARE. 29 | * 30 | * Authors: Ben Skeggs 31 | */ 32 | 33 | #include "nv84.h" 34 | #include "nouveau.h" 35 | 36 | int nv84_temp_get(struct nouveau_device *device) 37 | { 38 | return nv_rd32(device, 0x20400); 39 | } -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nv84.h: -------------------------------------------------------------------------------- 1 | // 2 | // nv84.h 3 | // HWSensors 4 | // 5 | // Created by kozlek on 18.03.13. 6 | // 7 | // 8 | 9 | #ifndef __HWSensors__nv84__ 10 | #define __HWSensors__nv84__ 11 | 12 | int nv84_temp_get(struct nouveau_device *device); 13 | 14 | #endif /* defined(__HWSensors__nv84__) */ 15 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nva3.h: -------------------------------------------------------------------------------- 1 | // 2 | // nva3.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 10.08.12. 6 | // 7 | // 8 | 9 | #ifndef HWSensors_nva3_h 10 | #define HWSensors_nva3_h 11 | 12 | int nva3_therm_fan_sense(struct nouveau_device *device); 13 | int nva3_therm_init(struct nouveau_device *device); 14 | int nva3_clocks_get(struct nouveau_device *device, u8 source); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nvc0.h: -------------------------------------------------------------------------------- 1 | // 2 | // nvc0.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 07.08.12. 6 | // 7 | // 8 | 9 | #ifndef HWSensors_nvc0_h 10 | #define HWSensors_nvc0_h 11 | 12 | #include "nouveau_definitions.h" 13 | 14 | bool nvc0_identify(struct nouveau_device *device); 15 | void nvc0_init(struct nouveau_device *device); 16 | 17 | int nvc0_clocks_get(struct nouveau_device *device, u8 source); 18 | int nve0_clocks_get(struct nouveau_device *device, u8 source); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nvd0.h: -------------------------------------------------------------------------------- 1 | // 2 | // nvd0.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 11.08.12. 6 | // 7 | // 8 | 9 | #ifndef __HWSensors__nvd0__ 10 | #define __HWSensors__nvd0__ 11 | 12 | #include "linux_definitions.h" 13 | 14 | void nvd0_therm_init(struct nouveau_device *device); 15 | int nvd0_fan_pwm_get(struct nouveau_device *device, int line, u32 *divs, u32 *duty); 16 | int nvd0_gpio_sense(struct nouveau_device *device, int line); 17 | 18 | #endif /* defined(__HWSensors__nvd0__) */ 19 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/nve0.h: -------------------------------------------------------------------------------- 1 | // 2 | // nve0.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 07.08.12. 6 | // 7 | // 8 | 9 | #ifndef HWSensors_nve0_h 10 | #define HWSensors_nve0_h 11 | 12 | bool nve0_identify(struct nouveau_device *device); 13 | void nve0_init(struct nouveau_device *device); 14 | int nve0_clock_read(struct nouveau_device *device, u8 source); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/timer.h: -------------------------------------------------------------------------------- 1 | // 2 | // timer.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 28.09.12. 6 | // 7 | // 8 | 9 | #ifndef HWSensors_timer_h 10 | #define HWSensors_timer_h 11 | 12 | #include 13 | 14 | static UInt64 ptimer_read() 15 | { 16 | clock_sec_t secs; 17 | clock_nsec_t nanosecs; 18 | 19 | clock_get_calendar_nanotime(&secs, &nanosecs); 20 | 21 | return (UInt64)secs * (UInt64)NSEC_PER_SEC + (UInt64)nanosecs; 22 | // uint64_t uptime, nanoseconds; 23 | // 24 | // clock_get_uptime(&uptime); 25 | // absolutetime_to_nanoseconds(uptime, &nanoseconds); 26 | // 27 | // return nanoseconds; 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/vga.h: -------------------------------------------------------------------------------- 1 | // 2 | // vga.h 3 | // HWSensors 4 | // 5 | // Created by Kozlek on 13.08.12. 6 | // 7 | // 8 | 9 | #ifndef __HWSensors__vga__ 10 | #define __HWSensors__vga__ 11 | 12 | #include "nouveau_definitions.h" 13 | 14 | /* access to various legacy io ports */ 15 | u8 nv_rdport(void *obj, int head, u16 port); 16 | void nv_wrport(void *obj, int head, u16 port, u8 value); 17 | 18 | /* VGA Sequencer */ 19 | u8 nv_rdvgas(void *obj, int head, u8 index); 20 | void nv_wrvgas(void *obj, int head, u8 index, u8 value); 21 | 22 | /* VGA Graphics */ 23 | u8 nv_rdvgag(void *obj, int head, u8 index); 24 | void nv_wrvgag(void *obj, int head, u8 index, u8 value); 25 | 26 | /* VGA CRTC */ 27 | u8 nv_rdvgac(void *obj, int head, u8 index); 28 | void nv_wrvgac(void *obj, int head, u8 index, u8 value); 29 | 30 | /* VGA indexed port access dispatcher */ 31 | u8 nv_rdvgai(void *obj, int head, u16 port, u8 index); 32 | void nv_wrvgai(void *obj, int head, u16 port, u8 index, u8 value); 33 | 34 | bool nv_lockvgac(void *obj, bool lock); 35 | u8 nv_rdvgaowner(void *obj); 36 | void nv_wrvgaowner(void *obj, u8); 37 | 38 | #endif /* defined(__HWSensors__vga__) */ 39 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/w83781d.cpp: -------------------------------------------------------------------------------- 1 | /* NVClock Winbond W83781D hardware monitoring 2 | */ 3 | //#include 4 | #include 5 | #include 6 | #include "nvclock_i2c.h" 7 | //#include "nvclock.h" 8 | 9 | 10 | /* various defines for register offsets and such are needed */ 11 | 12 | #define W83781D_REG_LOCAL_TEMP 0x27 13 | #define W83781D_REG_REMOTE_TEMP 0x27 14 | #define W83781D_REG_FAN1_COUNT 0x28 15 | #define W83781D_REG_MAN_ID 0x4f 16 | #define ASUS_MAN_ID 0x12 17 | #define W83781D_MAN_ID 0x5c 18 | #define W83781D_REG_CHIP_ID 0x58 19 | #define W83781D_REG_FAN_DIVISOR 0x47 20 | 21 | /* This function should return the chip type .. */ 22 | int w83781d_detect(I2CDevPtr dev) 23 | { 24 | I2CByte man_id, chip_id; 25 | 26 | xf86I2CReadByte (dev, W83781D_REG_MAN_ID, &man_id); 27 | xf86I2CReadByte (dev, W83781D_REG_CHIP_ID, &chip_id); 28 | 29 | switch(man_id) 30 | { 31 | case ASUS_MAN_ID: 32 | case W83781D_MAN_ID: 33 | /* We still need a chip_id check (0x11 for w83781d) */ 34 | dev->chip_id = W83781D; 35 | dev->chip_name = (char*)STRDUP("Winbond W83781D", sizeof("Winbond W83781D")); 36 | break; 37 | default: 38 | //IOLog("Uknown Winbond vendor: %x\n", man_id); 39 | return 0; 40 | } 41 | return 1; 42 | } 43 | 44 | int w83781d_get_board_temp(nouveau_device *device) 45 | { 46 | I2CByte temp; 47 | xf86I2CReadByte(device->nvclock_i2c_sensor, W83781D_REG_LOCAL_TEMP, &temp); 48 | return temp; 49 | } 50 | 51 | /* only one temperature exists ... */ 52 | int w83781d_get_gpu_temp(nouveau_device *device) 53 | { 54 | I2CByte temp; 55 | xf86I2CReadByte(device->nvclock_i2c_sensor, W83781D_REG_REMOTE_TEMP, &temp); 56 | return temp; 57 | } 58 | 59 | int w83781d_get_fanspeed_rpm(nouveau_device *device) 60 | { 61 | I2CByte count, divisor; 62 | 63 | xf86I2CReadByte(device->nvclock_i2c_sensor, W83781D_REG_FAN1_COUNT, &count); 64 | xf86I2CReadByte(device->nvclock_i2c_sensor, W83781D_REG_FAN_DIVISOR, &divisor); 65 | divisor = 1 << ((divisor >> 4) & 0x3); /* bit 5:4 are for fan1; a value of 0 means a divider of 1, while 2 means 2^3 = 8 */ 66 | 67 | /* A count of 0xff indicates that something is wrong i.e. no fan is connected */ 68 | if(count == 0xff) 69 | return 0; 70 | 71 | return 1350000/(count * divisor); 72 | } 73 | 74 | //int w83781d_get_fanspeed_pwm(nouveau_device *device) 75 | //{ 76 | // return 0; 77 | //} 78 | 79 | //int w83781d_set_fanspeed_pwm(I2CDevPtr dev, float speed) 80 | //{ 81 | // return 0; 82 | //} 83 | 84 | -------------------------------------------------------------------------------- /plugins/GPUSensors/GeforceSensors/xfree.h: -------------------------------------------------------------------------------- 1 | /* NVTV xfree -- Dirk Thierbach 2 | * 3 | * Header: All definitions from xfree that are needed. 4 | * 5 | */ 6 | 7 | #ifndef _XFREE_H 8 | #define _XFREE_H 1 9 | 10 | #define xf86Msg(type,format,args...) /*NouveauInfoLog(format,args)*/ 11 | #define xf86DrvMsg(scrnIndex,type,format, args...) /*NouveauInfoLog(format,args)*/ 12 | 13 | #ifndef Bool 14 | # ifndef _XTYPEDEF_BOOL 15 | # define _XTYPEDEF_BOOL 16 | typedef int Bool; 17 | # endif 18 | #endif 19 | 20 | #ifndef _XTYPEDEF_POINTER 21 | # define _XTYPEDEF_POINTER 22 | typedef void *pointer; 23 | #endif 24 | 25 | 26 | /* Flags for driver messages */ 27 | typedef enum { 28 | X_PROBED, /* Value was probed */ 29 | X_CONFIG, /* Value was given in the config file */ 30 | X_DEFAULT, /* Value is a default */ 31 | X_CMDLINE, /* Value was given on the command line */ 32 | X_NOTICE, /* Notice */ 33 | X_ERROR, /* Error message */ 34 | X_WARNING, /* Warning message */ 35 | X_INFO, /* Informational message */ 36 | X_NONE, /* No prefix */ 37 | X_NOT_IMPLEMENTED /* Not implemented */ 38 | } MessageType; 39 | 40 | typedef union _DevUnion { 41 | pointer ptr; 42 | long val; 43 | unsigned long uval; 44 | pointer (*fptr)(void); 45 | } DevUnion; 46 | 47 | 48 | #ifndef TRUE 49 | #define TRUE 1 50 | #endif 51 | 52 | #ifndef FALSE 53 | #define FALSE 0 54 | #endif 55 | 56 | //void xf86usleep(unsigned long usec); 57 | void xf86getsecs(long * secs, long * usecs); 58 | 59 | #define xcalloc(_num, _size) calloc(_num, _size) 60 | #define xfree(_ptr) free(_ptr) 61 | 62 | 63 | /* ---------------- nv driver files ---------------- */ 64 | 65 | /**** nv_dac.c */ 66 | 67 | #define DDC_SDA_READ_MASK (1 << 3) 68 | #define DDC_SCL_READ_MASK (1 << 2) 69 | #define DDC_SDA_WRITE_MASK (1 << 4) 70 | #define DDC_SCL_WRITE_MASK (1 << 5) 71 | 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /plugins/GPUSensors/IntelX3100/X3100-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | $(MODULE_VERSION) 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | $(MODULE_VERSION) 21 | IOKitPersonalities 22 | 23 | Intel X3100 Cards Monitoring Plugin 24 | 25 | CFBundleIdentifier 26 | org.slice.sensor.X3100 27 | IOClass 28 | X3100monitor 29 | IOMatchCategory 30 | X3100monitor 31 | IOProbeScore 32 | 500 33 | IOProviderClass 34 | IOResources 35 | IOResourceMatch 36 | IOKit 37 | 38 | 39 | OSBundleLibraries 40 | 41 | com.apple.iokit.IOPCIFamily 42 | 2.4 43 | com.apple.kpi.iokit 44 | 9.0.0 45 | com.apple.kpi.libkern 46 | 9.0.0 47 | org.netkas.FakeSMC 48 | 3.3.0 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /plugins/GPUSensors/IntelX3100/X3100-pre106-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.slice.sensor.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | IOKitPersonalities 22 | 23 | Intel X3100 Cards Monitoring Plugin 24 | 25 | CFBundleIdentifier 26 | org.slice.sensor.X3100 27 | IOClass 28 | X3100monitor 29 | IOProbeScore 30 | 500 31 | IOMatchCategory 32 | X3100monitor 33 | IOProviderClass 34 | IOResources 35 | IOResourceMatch 36 | IOKit 37 | 38 | 39 | OSBundleLibraries 40 | 41 | org.netkas.FakeSMC 42 | 3.1.0 43 | com.apple.iokit.IOACPIFamily 44 | 1.0.0d1 45 | com.apple.iokit.IOPCIFamily 46 | 2.4 47 | com.apple.kernel.6.0 48 | 7.9.9 49 | com.apple.kernel.iokit 50 | 7.9.9 51 | com.apple.kernel.libkern 52 | 7.9.9 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /plugins/GPUSensors/IntelX3100/X3100.h: -------------------------------------------------------------------------------- 1 | /* 2 | * X3100.h 3 | * HWSensors 4 | * 5 | * Created by Sergey on 19.12.10 with templates of Mozodojo. 6 | * Copyright 2010 Slice. 7 | * 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | class X3100monitor : public IOService 15 | { 16 | OSDeclareDefaultStructors(X3100monitor) 17 | private: 18 | IOService* fakeSMC; 19 | OSDictionary* sensors; 20 | volatile UInt8* mmio_base; 21 | int numCard; //numCard=0 if only one Video, but may be any other value 22 | IOPCIDevice * VCard; 23 | IOMemoryMap * mmio; 24 | 25 | bool addSensor(const char* key, const char* type, unsigned int size, int index); 26 | 27 | public: 28 | virtual IOService* probe(IOService *provider, SInt32 *score); 29 | virtual bool start(IOService *provider); 30 | virtual bool init(OSDictionary *properties=0); 31 | virtual void free(void); 32 | virtual void stop(IOService *provider); 33 | 34 | virtual IOReturn callPlatformFunction(const OSSymbol *functionName, 35 | bool waitForFunction, 36 | void *param1, 37 | void *param2, 38 | void *param3, 39 | void *param4); 40 | }; 41 | -------------------------------------------------------------------------------- /plugins/GPUSensors/NVClockX/NVClock/backend.cpp: -------------------------------------------------------------------------------- 1 | /* NVClock 0.8 - Linux overclocker for NVIDIA cards 2 | * 3 | * Copyright(C) 2001-2007 Roderick Colenbrander 4 | * 5 | * site: http://nvclock.sourceforge.net 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 20 | */ 21 | 22 | //#include 23 | //#include 24 | #include 25 | 26 | //#include "config.h" 27 | #ifdef HAVE_NVCONTROL 28 | #include "nvcontrol.h" 29 | #endif 30 | #include "backend.h" 31 | 32 | /* Read a byte from the pci bus */ 33 | unsigned char nv_read_pbus8(int offset) 34 | { 35 | int shift = (offset % 4)*8; 36 | return (nv_card->PBUS[offset/4] >> shift) & 0xff; 37 | } 38 | 39 | /* Read an unsigned short from the pci bus */ 40 | unsigned short nv_read_pbus16(int offset) 41 | { 42 | int shift = (offset / 2)*16; 43 | return (nv_card->PBUS[offset/4] >> shift) & 0xffff; 44 | } 45 | 46 | /* Read an unsigned int from the pci bus */ 47 | unsigned int nv_read_pbus(int offset) 48 | { 49 | return nv_card->PBUS[offset/4]; 50 | } 51 | 52 | /* Read an unsigned int from the PMC registers */ 53 | unsigned int nv_read_pmc(int offset) 54 | { 55 | return nv_card->PMC[offset/4]; 56 | } 57 | 58 | /* This function is actually a basic version of set_card. 59 | / It mainly copies the entries of the card list and maps 60 | / the video registers. We need this function because we need 61 | / access to the videocard from the config file creation code. 62 | / At that stage we can't use the normal set_card because that 63 | / function also sets function pointers and uses bios/config 64 | / file info which we don't have yet. 65 | */ 66 | int set_card_info(int number) 67 | { 68 | nv_card = &nvclock.card[number]; 69 | 70 | /*if(!nv_card->mem_mapped) 71 | if(!map_mem(nv_card->dev_name)) 72 | return 0; // map_mem already took care of the error 73 | */ 74 | 75 | return 1; 76 | } 77 | 78 | int32_t pciReadLong(unsigned short devbusfn, long offset){ 79 | return -1; 80 | } 81 | 82 | /* Set the card object to the requested card */ 83 | int set_card(int number) 84 | { 85 | if(!set_card_info(number)) 86 | return 0; 87 | 88 | 89 | info_init(); 90 | 91 | if(nv_card->arch & NV3X) 92 | ;//nv30_init(); 93 | else if(nv_card->arch & NV4X) 94 | nv40_init(); 95 | else if(nv_card->arch & NV5X) 96 | nv50_init(); 97 | else 98 | nv_init(); 99 | 100 | return 1; 101 | } 102 | 103 | /*void unset_card() 104 | { 105 | unmap_mem(); 106 | }*/ 107 | -------------------------------------------------------------------------------- /plugins/GPUSensors/NVClockX/NVClock/error.cpp: -------------------------------------------------------------------------------- 1 | /* NVClock 0.8 - Linux overclocker for NVIDIA cards 2 | * 3 | * site: http://nvclock.sourceforge.net 4 | * 5 | * Copyright(C) 2001-2004 Roderick Colenbrander 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 20 | */ 21 | 22 | #include 23 | //#include 24 | //#include 25 | #include 26 | 27 | #include "nvclock.h" 28 | 29 | void set_error(int code) 30 | { 31 | nvclock.nv_errno = code; 32 | } 33 | 34 | 35 | void set_error_str(const char *str) 36 | { 37 | nvclock.nv_errno = NV_ERR_OTHER; 38 | 39 | /* hacky; we need to think about memory management .. */ 40 | nvclock.nv_err_str = /*(char*)strdup(str)*/NULL; 41 | } 42 | 43 | 44 | char *get_error(char *buf, int size) 45 | { 46 | switch(nvclock.nv_errno) 47 | { 48 | case NV_ERR_NO_DEVICES_FOUND: 49 | buf=STRDUP("No nvidia cards found in your system!", sizeof("No nvidia cards found in your system!")); 50 | break; 51 | case NV_ERR_NO_DRIVERS_FOUND: 52 | buf=STRDUP("You don't have enough permissions to run NVClock! Retry as root or install the Nvidia drivers.", sizeof("You don't have enough permissions to run NVClock! Retry as root or install the Nvidia drivers.")); 53 | break; 54 | case NV_ERR_NOT_ENOUGH_PERMISSIONS: 55 | buf=STRDUP("You don't have enough permissions to run NVClock! Retry as root.", sizeof("You don't have enough permissions to run NVClock! Retry as root.")); 56 | break; 57 | case NV_ERR_OTHER: 58 | buf=STRDUP(nvclock.nv_err_str, 80); 59 | break; 60 | } 61 | 62 | return buf; 63 | } 64 | -------------------------------------------------------------------------------- /plugins/GPUSensors/NVClockX/NVClock/f75375.h: -------------------------------------------------------------------------------- 1 | /* Fintek F75375 sensor module 2 | / Copyright(C) 2005, Matt Wright 3 | */ 4 | #include "nvclock.h" 5 | #include "i2c.h" 6 | 7 | int debug; 8 | typedef struct _fan_vtemp 9 | { 10 | int temp[4]; 11 | int speed[5]; 12 | } fan_vtemp; 13 | 14 | 15 | #define dbg_printf(x) if (debug==1) printf(x) 16 | 17 | #define MODE_SPEED 0x00 18 | #define MODE_TEMP 0x10 19 | #define MODE_PWM 0x20 20 | 21 | int f75375_get_gpu_fanmode(I2CDevPtr dev); 22 | int f75375_set_gpu_fanmode(I2CDevPtr dev, I2CByte mode); 23 | int f75375_set_gpu_tempctl(I2CDevPtr dev, fan_vtemp speeds); 24 | int f75375_get_gpu_tempctl(I2CDevPtr dev, fan_vtemp *speeds); 25 | 26 | #define FINTEK_VENDOR1 0x5d 27 | #define FINTEK_VENDOR2 0x5e 28 | 29 | #define ASUS_NV40_CHIPID_H 0x5a 30 | #define ASUS_NV40_CHIPID_L 0x5b 31 | 32 | #define F75375S_VRAM_VCC 0x10 33 | #define F75375S_VRAM_V1 0x11 34 | #define F75375S_VRAM_V2 0x12 35 | #define F75375S_VRAM_V3 0x13 36 | #define F75375S_VRAM_TEMP1 0x14 37 | #define F75375S_VRAM_TEMP2 0x15 38 | #define F75375S_VRAM_FAN1_MSB 0x16 39 | #define F75375S_VRAM_FAN1_LSB 0x17 40 | #define F75375S_VRAM_FAN2_MSB 0x18 41 | #define F75375S_VRAM_FAN2_LSB 0x19 42 | 43 | #define F75375S_FAN1_PWM 0x76 44 | #define F75375S_FAN1_COUNT_H 0x16 45 | #define F75375S_FAN1_COUNT_L 0x17 46 | #define F75375S_FAN1_MODE 0x60 47 | #define F75375S_FAN1_EXPECT_H 0x74 48 | #define F75375S_FAN1_EXPECT_L 0x75 49 | 50 | #define F75375S_TEMP_GPU 0x14 51 | #define F75375S_TEMP_RAM 0x15 52 | 53 | #define F75375S_VT1_B1 0xa0 54 | #define F75375S_VT1_B2 0xa1 55 | #define F75375S_VT1_B3 0xa2 56 | #define F75375S_VT1_B4 0xa3 57 | 58 | #define F75375S_VT1_S1_H 0xa4 59 | #define F75375S_VT1_S1_L 0xa5 60 | #define F75375S_VT1_S2_H 0xa6 61 | #define F75375S_VT1_S2_L 0xa7 62 | #define F75375S_VT1_S3_H 0xa8 63 | #define F75375S_VT1_S3_L 0xa9 64 | #define F75375S_VT1_S4_H 0xaa 65 | #define F75375S_VT1_S4_L 0xab 66 | #define F75375S_VT1_S5_H 0xac 67 | #define F75375S_VT1_S5_L 0xad 68 | 69 | #define FAN_TO_RPM(msb, lsb) (1500000/((msb<<8)+lsb)) 70 | #define RPM_TO_FAN(x) (1500000/x) 71 | #define MERGE_BYTE(msb, lsb) ((msb<<8)+lsb) 72 | -------------------------------------------------------------------------------- /plugins/GPUSensors/NVClockX/NVClock/i2c.h: -------------------------------------------------------------------------------- 1 | /* NVClock 0.8 - Linux overclocker for NVIDIA cards 2 | * 3 | * site: http://nvclock.sourceforge.net 4 | * 5 | * Copyright(C) 2001-2005 Roderick Colenbrander 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 20 | */ 21 | 22 | #ifndef I2C_H 23 | #define I2C_H 24 | 25 | #include "xf86i2c.h" 26 | 27 | #define LM99 0x1 28 | #define MAX6559 0x2 29 | #define F75375 0x4 30 | #define W83L785R 0x8 31 | #define W83781D 0x16 32 | #define ADT7473 0x32 33 | 34 | Bool I2CAddress(I2CDevPtr d, I2CSlaveAddr addr); 35 | I2CBusPtr NV_I2CCreateBusPtr(char *name, int bus); 36 | 37 | /* ADT7473 */ 38 | int adt7473_detect(I2CDevPtr dev); 39 | int adt7473_get_board_temp(I2CDevPtr dev); 40 | int adt7473_get_gpu_temp(I2CDevPtr dev); 41 | int adt7473_get_fanspeed_rpm(I2CDevPtr dev); 42 | float adt7473_get_fanspeed_pwm(I2CDevPtr dev); 43 | int adt7473_set_fanspeed_pwm(I2CDevPtr dev, float speed); 44 | int adt7473_get_fanspeed_mode(I2CDevPtr dev); 45 | void adt7473_set_fanspeed_mode(I2CDevPtr dev, int mode); 46 | 47 | /* LM99 */ 48 | int lm99_detect(I2CDevPtr dev); 49 | int lm99_get_board_temp(I2CDevPtr dev); 50 | int lm99_get_gpu_temp(I2CDevPtr dev); 51 | 52 | /* Fintek F75375 */ 53 | int f75375_detect(I2CDevPtr dev); 54 | int f75375_get_gpu_temp(I2CDevPtr dev); 55 | int f75375_get_board_temp(I2CDevPtr dev); 56 | int f75375_get_fanspeed_rpm(I2CDevPtr dev); 57 | int f75375_set_fanspeed_rpm(I2CDevPtr dev, int desired_rpm); 58 | float f75375_get_fanspeed_pwm(I2CDevPtr dev); 59 | int f75375_set_fanspeed_pwm(I2CDevPtr dev, float speed); 60 | 61 | /* Winbond W83781D */ 62 | int w83781d_detect(I2CDevPtr dev); 63 | int w83781d_get_board_temp(I2CDevPtr dev); 64 | int w83781d_get_gpu_temp(I2CDevPtr dev); 65 | int w83781d_get_fanspeed_rpm(I2CDevPtr dev); 66 | float w83781d_get_fanspeed_pwm(I2CDevPtr dev); 67 | int w83781d_set_fanspeed_pwm(I2CDevPtr dev, float speed); 68 | 69 | /* Winbond W83L785R */ 70 | int w83l785r_detect(I2CDevPtr dev); 71 | int w83l785r_get_board_temp(I2CDevPtr dev); 72 | int w83l785r_get_gpu_temp(I2CDevPtr dev); 73 | int w83l785r_get_fanspeed_rpm(I2CDevPtr dev); 74 | float w83l785r_get_fanspeed_pwm(I2CDevPtr dev); 75 | int w83l785r_set_fanspeed_pwm(I2CDevPtr dev, float speed); 76 | #endif /* I2C_H */ 77 | -------------------------------------------------------------------------------- /plugins/GPUSensors/NVClockX/NVClock/libc_wrapper.cpp: -------------------------------------------------------------------------------- 1 | /* Excerpt from: */ 2 | 3 | /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c,v 1.70 2000/09/26 15:57:20 tsi Exp $ */ 4 | /* 5 | * Copyright 1997 by The XFree86 Project, Inc. 6 | * 7 | * Permission to use, copy, modify, distribute, and sell this software and its 8 | * documentation for any purpose is hereby granted without fee, provided that 9 | * the above copyright notice appear in all copies and that both that 10 | * copyright notice and this permission notice appear in supporting 11 | * documentation, and that the names of Orest Zborowski and David Wexelblat 12 | * not be used in advertising or publicity pertaining to distribution of 13 | * the software without specific, written prior permission. Orest Zborowski 14 | * and David Wexelblat make no representations about the suitability of this 15 | * software for any purpose. It is provided "as is" without express or 16 | * implied warranty. 17 | * 18 | * THE XFREE86 PROJECT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD 19 | * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 20 | * FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT BE LIABLE 21 | * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 22 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 23 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 24 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 25 | * 26 | */ 27 | 28 | //#include 29 | #include "nvclock.h" 30 | #include "xfree.h" 31 | 32 | #ifdef HAVE_UNISTD_H 33 | #include 34 | #endif 35 | 36 | #include 37 | 38 | /* Misc functions. Some are ANSI C, some are not. */ 39 | 40 | /* FIXME might use nanosleep (POSIX) here. */ 41 | /* resolution of 1/HZ s (i.e, 10 ms on Linux/i386 and 1 ms on Linux/Alpha). */ 42 | /* If the process is scheduled under a real-time policy like 43 | SCHED_FIFO or SCHED_RR, then pauses of up to 2 ms will be 44 | performed as busy waits with microsecond precision. 45 | */ 46 | 47 | /*void 48 | xf86usleep(unsigned long usec) 49 | //unsigned long usec; 50 | { 51 | IOSleep(usec); 52 | } 53 | */ 54 | 55 | void xf86getsecs(long * secs, long * usecs) 56 | { 57 | /*struct timeval tv; 58 | 59 | microtime(&tv); 60 | *secs = tv.tv_sec; 61 | *usecs= tv.tv_usec; 62 | */ 63 | return; 64 | } 65 | 66 | -------------------------------------------------------------------------------- /plugins/GPUSensors/NVClockX/NVClock/lm99.cpp: -------------------------------------------------------------------------------- 1 | /* NVClock 0.8 - Linux overclocker for NVIDIA cards 2 | * 3 | * site: http://nvclock.sourceforge.net 4 | * 5 | * Copyright(C) 2001-2005 Roderick Colenbrander 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 20 | * 21 | * LM99 hardware monitoring 22 | */ 23 | #include 24 | #include "i2c.h" 25 | #include "nvclock.h" 26 | 27 | 28 | /* various defines for register offsets and such are needed */ 29 | 30 | #define LM99_REG_LOCAL_TEMP 0x0 31 | #define LM99_REG_REMOTE_TEMP 0x1 32 | #define LM99_REG_MAN_ID 0xfe 33 | #define NATSEM_MAN_ID 0x1 34 | #define MAXIM_MAN_ID 0x4d 35 | #define LM99_REG_CHIP_ID 0xff 36 | 37 | /* This function should return the chip type .. */ 38 | int lm99_detect(I2CDevPtr dev) 39 | { 40 | I2CByte man_id, chip_id; 41 | 42 | xf86I2CReadByte (dev, LM99_REG_MAN_ID, &man_id); 43 | xf86I2CReadByte (dev, LM99_REG_CHIP_ID, &chip_id); 44 | 45 | switch(man_id) 46 | { 47 | /* National Semiconductor LM99; needs offset? */ 48 | case NATSEM_MAN_ID: 49 | dev->chip_id = LM99; 50 | dev->chip_name = (char*)STRDUP("National Semiconductor LM99", sizeof("National Semiconductor LM99")); 51 | break; 52 | /* Unknown vendor; this chip was used in a FX5700Go laptop and looks similar to the MAx6659 */ 53 | case 0x47: 54 | /* Maxim; likely a 655x model */ 55 | case MAXIM_MAN_ID: 56 | dev->chip_id = MAX6559; 57 | dev->chip_name = (char*)STRDUP("Maxim MAX6659", sizeof("Maxim MAX6659")); 58 | break; 59 | default: 60 | return 0; 61 | } 62 | 63 | return 1; 64 | } 65 | 66 | int lm99_get_board_temp(I2CDevPtr dev) 67 | { 68 | I2CByte temp; 69 | xf86I2CReadByte(dev, LM99_REG_LOCAL_TEMP, &temp); 70 | return temp; 71 | } 72 | 73 | int lm99_get_gpu_temp(I2CDevPtr dev) 74 | { 75 | I2CByte temp; 76 | 77 | xf86I2CReadByte(dev, LM99_REG_REMOTE_TEMP, &temp); 78 | 79 | /* Cards with lm99 chips need an offset of 16C according to the datasheets. */ 80 | if(dev->chip_id == LM99) 81 | { 82 | temp += 16; 83 | } 84 | 85 | /* The temperature needs to be corrected using an offset which is stored in the bios. 86 | / If no bios has been parsed we fall back to a default value. 87 | */ 88 | if(nv_card->bios) 89 | { 90 | temp += nv_card->bios->sensor_cfg.temp_correction; 91 | } 92 | else 93 | { 94 | /* An extra offset of 10C seems to be needed on Geforce6800 cards to match nvidia-settings. 95 | / Last but not least Geforce6600GT boards containing an LM99 sensor seem to need a +5C offset. 96 | */ 97 | if(dev->arch == NV43) 98 | temp += 5; 99 | else if(dev->arch & NV4X) 100 | temp += 10; 101 | } 102 | 103 | return temp; 104 | } 105 | -------------------------------------------------------------------------------- /plugins/GPUSensors/NVClockX/NVClock/utils.cpp: -------------------------------------------------------------------------------- 1 | /* NVClock 0.8 - Linux overclocker for NVIDIA cards 2 | * 3 | * site: http://nvclock.sourceforge.net 4 | * 5 | * Copyright(C) 2001-2007 Roderick Colenbrander 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 20 | */ 21 | 22 | #include 23 | 24 | int convert_gpu_architecture(short arch, char *buf); 25 | void convert_unit_mask_to_binary(char mask, char hw_default, char *buf); 26 | 27 | /* Convert the gpu architecture to a string using NVxx/Gxx naming */ 28 | int convert_gpu_architecture(short arch, char *buf) 29 | { 30 | if(!buf) 31 | return 0; 32 | 33 | switch(arch) 34 | { 35 | case 0x46: 36 | snprintf(buf, sizeof("NV46/G72"), "NV46/G72"); /* 7300 */ 37 | break; 38 | case 0x47: 39 | snprintf(buf, sizeof("NV47/G70"), "NV47/G70"); /* 7800 */ 40 | break; 41 | case 0x49: 42 | snprintf(buf, sizeof("NV49/G71"), "NV49/G71"); /* 7900 */ 43 | break; 44 | case 0x4b: 45 | snprintf(buf, sizeof("NV4B/G73"), "NV4B/G73"); /* 7600 */ 46 | break; 47 | case 0x4c: /* is this correct also a C51? */ 48 | case 0x4e: 49 | snprintf(buf, sizeof("C51"), "C51"); /* Geforce 6x00 nForce */ 50 | break; 51 | // sprintf(buf, "C68"); /* Geforce 70xx nForce */ 52 | case 0x50: 53 | snprintf(buf, sizeof("NV50/G80"), "NV50/G80"); /* 8800 */ 54 | break; 55 | case 0xa0: 56 | snprintf(buf, sizeof("GT200"), "GT200"); /* Geforce GTX260/280 */ 57 | break; 58 | case 0xc0 ... 0xcf: 59 | snprintf(buf, sizeof("GF100"), "GF100"); /* GF100 */ 60 | break; 61 | default: 62 | if(arch <= 0x44) /* The NV44/6200TC is the last card with only an NV name */ 63 | snprintf(buf, sizeof("NV??"), "NV%X", arch); 64 | else /* Use Gxx for anything else */ 65 | snprintf(buf, sizeof("G??"), "G%X", arch); 66 | } 67 | return 1; 68 | } 69 | 70 | /* Convert a mask containing enabled/disabled pipelines for nv4x cards 71 | / to a binary string. 72 | */ 73 | void convert_unit_mask_to_binary(char mask, char hw_default, char *buf) 74 | { 75 | int i, len; 76 | 77 | /* Count the number of pipelines on the card */ 78 | for(i=0, len=0; i<8; i++) 79 | len += (hw_default & (1< 4 | #include 5 | #include 6 | #include "i2c.h" 7 | #include "nvclock.h" 8 | 9 | 10 | /* various defines for register offsets and such are needed */ 11 | 12 | #define W83781D_REG_LOCAL_TEMP 0x27 13 | #define W83781D_REG_REMOTE_TEMP 0x27 14 | #define W83781D_REG_FAN1_COUNT 0x28 15 | #define W83781D_REG_MAN_ID 0x4f 16 | #define ASUS_MAN_ID 0x12 17 | #define W83781D_MAN_ID 0x5c 18 | #define W83781D_REG_CHIP_ID 0x58 19 | #define W83781D_REG_FAN_DIVISOR 0x47 20 | 21 | /* This function should return the chip type .. */ 22 | int w83781d_detect(I2CDevPtr dev) 23 | { 24 | I2CByte man_id, chip_id; 25 | 26 | xf86I2CReadByte (dev, W83781D_REG_MAN_ID, &man_id); 27 | xf86I2CReadByte (dev, W83781D_REG_CHIP_ID, &chip_id); 28 | 29 | switch(man_id) 30 | { 31 | case ASUS_MAN_ID: 32 | case W83781D_MAN_ID: 33 | /* We still need a chip_id check (0x11 for w83781d) */ 34 | dev->chip_id = W83781D; 35 | dev->chip_name = (char*)STRDUP("Winbond W83781D", sizeof("Winbond W83781D")); 36 | break; 37 | default: 38 | printf("Uknown Winbond vendor: %x\n", man_id); 39 | return 0; 40 | } 41 | return 1; 42 | } 43 | 44 | int w83781d_get_board_temp(I2CDevPtr dev) 45 | { 46 | I2CByte temp; 47 | xf86I2CReadByte(dev, W83781D_REG_LOCAL_TEMP, &temp); 48 | return temp; 49 | } 50 | 51 | /* only one temperature exists ... */ 52 | int w83781d_get_gpu_temp(I2CDevPtr dev) 53 | { 54 | I2CByte temp; 55 | xf86I2CReadByte(dev, W83781D_REG_REMOTE_TEMP, &temp); 56 | return temp; 57 | } 58 | 59 | int w83781d_get_fanspeed_rpm(I2CDevPtr dev) 60 | { 61 | I2CByte count, divisor; 62 | 63 | xf86I2CReadByte(dev, W83781D_REG_FAN1_COUNT, &count); 64 | xf86I2CReadByte(dev, W83781D_REG_FAN_DIVISOR, &divisor); 65 | divisor = 1 << ((divisor >> 4) & 0x3); /* bit 5:4 are for fan1; a value of 0 means a divider of 1, while 2 means 2^3 = 8 */ 66 | 67 | /* A count of 0xff indicates that something is wrong i.e. no fan is connected */ 68 | if(count == 0xff) 69 | return 0; 70 | 71 | return 1350000/(count * divisor); 72 | } 73 | 74 | float w83781d_get_fanspeed_pwm(I2CDevPtr dev) 75 | { 76 | return 0; 77 | } 78 | 79 | int w83781d_set_fanspeed_pwm(I2CDevPtr dev, float speed) 80 | { 81 | return 0; 82 | } 83 | 84 | -------------------------------------------------------------------------------- /plugins/GPUSensors/NVClockX/NVClock/xfree.h: -------------------------------------------------------------------------------- 1 | /* NVTV xfree -- Dirk Thierbach 2 | * 3 | * Header: All definitions from xfree that are needed. 4 | * 5 | */ 6 | 7 | #ifndef _XFREE_H 8 | #define _XFREE_H 1 9 | 10 | //#include 11 | //#include 12 | 13 | #define xf86Msg(type,format,args...) /* */ 14 | #define xf86DrvMsg(scrnIndex,type,format, args...) /* */ 15 | 16 | #ifndef Bool 17 | # ifndef _XTYPEDEF_BOOL 18 | # define _XTYPEDEF_BOOL 19 | typedef int Bool; 20 | # endif 21 | #endif 22 | 23 | #ifndef _XTYPEDEF_POINTER 24 | # define _XTYPEDEF_POINTER 25 | typedef void *pointer; 26 | #endif 27 | 28 | 29 | /* Flags for driver messages */ 30 | typedef enum { 31 | X_PROBED, /* Value was probed */ 32 | X_CONFIG, /* Value was given in the config file */ 33 | X_DEFAULT, /* Value is a default */ 34 | X_CMDLINE, /* Value was given on the command line */ 35 | X_NOTICE, /* Notice */ 36 | X_ERROR, /* Error message */ 37 | X_WARNING, /* Warning message */ 38 | X_INFO, /* Informational message */ 39 | X_NONE, /* No prefix */ 40 | X_NOT_IMPLEMENTED /* Not implemented */ 41 | } MessageType; 42 | 43 | typedef union _DevUnion { 44 | pointer ptr; 45 | long val; 46 | unsigned long uval; 47 | pointer (*fptr)(void); 48 | } DevUnion; 49 | 50 | 51 | #ifndef TRUE 52 | #define TRUE 1 53 | #endif 54 | 55 | #ifndef FALSE 56 | #define FALSE 0 57 | #endif 58 | 59 | //void xf86usleep(unsigned long usec); 60 | void xf86getsecs(long * secs, long * usecs); 61 | 62 | #define xcalloc(_num, _size) calloc(_num, _size) 63 | #define xfree(_ptr) free(_ptr) 64 | 65 | 66 | /* ---------------- nv driver files ---------------- */ 67 | 68 | /**** nv_dac.c */ 69 | 70 | #define DDC_SDA_READ_MASK (1 << 3) 71 | #define DDC_SCL_READ_MASK (1 << 2) 72 | #define DDC_SDA_WRITE_MASK (1 << 4) 73 | #define DDC_SCL_WRITE_MASK (1 << 5) 74 | 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /plugins/GPUSensors/NVClockX/NVClockX-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | $(MODULE_VERSION) 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | $(MODULE_VERSION) 21 | IOKitPersonalities 22 | 23 | NVClockX nVidia Cards Monitoring Plugin 24 | 25 | CFBundleIdentifier 26 | org.usrsse2.${PRODUCT_NAME} 27 | IOClass 28 | NVClockX 29 | IOMatchCategory 30 | ${PRODUCT_NAME} 31 | IOProbeScore 32 | 2000 33 | IOProviderClass 34 | IOResources 35 | IOResourceMatch 36 | IOKit 37 | 38 | 39 | OSBundleLibraries 40 | 41 | com.apple.iokit.IOPCIFamily 42 | 2.4 43 | com.apple.kpi.iokit 44 | 9.0.0 45 | com.apple.kpi.libkern 46 | 9.0.0 47 | com.apple.kpi.mach 48 | 9.0.0 49 | com.apple.kpi.unsupported 50 | 9.0.0 51 | org.netkas.FakeSMC 52 | 3.3.0 53 | 54 | OSBundleRequired 55 | Root 56 | 57 | 58 | -------------------------------------------------------------------------------- /plugins/GPUSensors/NVClockX/NVClockX-pre106-info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.usrsse2.${PRODUCT_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | 1.0.1 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0.1d1 21 | IOKitPersonalities 22 | 23 | NVClockX nVidia Cards Monitoring Plugin 24 | 25 | CFBundleIdentifier 26 | org.usrsse2.${PRODUCT_NAME} 27 | IOClass 28 | NVClockX 29 | IOMatchCategory 30 | ${PRODUCT_NAME} 31 | IOProviderClass 32 | IOResources 33 | IOResourceMatch 34 | IOKit 35 | 36 | 37 | OSBundleLibraries 38 | 39 | org.netkas.FakeSMC 40 | 3.1.0 41 | com.apple.iokit.IOPCIFamily 42 | 2.4 43 | com.apple.iokit.IOACPIFamily 44 | 1.0.0d1 45 | com.apple.kernel.6.0 46 | 7.9.9 47 | com.apple.kernel.iokit 48 | 7.9.9 49 | com.apple.kernel.libkern 50 | 7.9.9 51 | 52 | OSBundleRequired 53 | Root 54 | 55 | 56 | -------------------------------------------------------------------------------- /plugins/GPUSensors/NVClockX/NVClockX.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NVClockX.h 3 | * HWSensors 4 | * 5 | * Created by mozo on 15/10/10. 6 | * Copyright 2010 mozodojo. All rights reserved. 7 | * 8 | */ 9 | 10 | #include 11 | #include "NVClock/nvclock.h" 12 | 13 | #define kGenericPCIDevice "IOPCIDevice" 14 | #define kNVGraphicsDevice "IONDRVDevice" 15 | 16 | //NVClock nvclock; 17 | //NVCard* nv_card; 18 | 19 | class NVClockX : public IOService { 20 | OSDeclareDefaultStructors(NVClockX) 21 | 22 | private: 23 | IOService * fakeSMC; 24 | OSDictionary * sensors; 25 | 26 | IOMemoryMap * nvio; 27 | 28 | int probeDevices(); 29 | bool addSensor(const char* key, const char* type, unsigned int size, int index); 30 | int addTachometer(int index); 31 | 32 | public: 33 | virtual bool init(OSDictionary *properties=0); 34 | virtual IOService* probe(IOService *provider, SInt32 *score); 35 | virtual bool start(IOService *provider); 36 | virtual void stop(IOService *provider); 37 | virtual void free(void); 38 | 39 | virtual IOReturn callPlatformFunction(const OSSymbol *functionName, 40 | bool waitForFunction, 41 | void *param1, 42 | void *param2, 43 | void *param3, 44 | void *param4); 45 | 46 | }; 47 | -------------------------------------------------------------------------------- /plugins/GPUSensors/RadeonMonitor/ATICard.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ATICard.h 3 | * FakeSMCRadeon 4 | * 5 | * Created by Slice on 24.07.10. 6 | * Copyright 2010 Applelife.ru. All rights reserved. 7 | * 8 | */ 9 | 10 | #ifndef _ATICARD_H 11 | #define _ATICARD_H 12 | 13 | #include 14 | #include 15 | #include "FakeSMC.h" 16 | #include "radeon_chipsets.h" 17 | 18 | #define GPU_OVERCLOCKING (1<<0) 19 | #define MEM_OVERCLOCKING (1<<1) 20 | #define COOLBITS_OVERCLOCKING (1<<2) 21 | #define PIPELINE_MODDING (1<<3) 22 | #define GPU_FANSPEED_MONITORING (1<<4) /* Fanspeed monitoring based on fan voltage */ 23 | #define BOARD_TEMP_MONITORING (1<<5) /* Board temperature */ 24 | #define GPU_TEMP_MONITORING (1<<6) /* Internal GPU temperature */ 25 | #define I2C_FANSPEED_MONITORING (1<<7) /* Fanspeed monitoring using a i2c sensor chip */ 26 | #define I2C_AUTOMATIC_FANSPEED_CONTROL (1<<8) /* The sensor supports automatic fanspeed control */ 27 | #define SMARTDIMMER (1<<9) /* Smartdimmer support for mobile GPUs */ 28 | #define GPU_ID_MODDING (1<<10) /* PCI id modding is supported on this board */ 29 | 30 | 31 | #define INVID8(offset) (mmio_base[offset]) 32 | #define INVID16(offset) OSReadLittleInt16((mmio_base), offset) 33 | #define INVID(offset) OSReadLittleInt32((mmio_base), offset) 34 | #define OUTVID(offset,val) OSWriteLittleInt32((mmio_base), offset, val) 35 | 36 | #define Debug FALSE 37 | 38 | #define LogPrefix "RadeonMonitor: " 39 | #define DebugLog(string, args...) do { if (Debug) { IOLog (LogPrefix "[Debug] " string "\n", ## args); } } while(0) 40 | #define WarningLog(string, args...) do { IOLog (LogPrefix "[Warning] " string "\n", ## args); } while(0) 41 | #define InfoLog(string, args...) do { IOLog (LogPrefix string "\n", ## args); } while(0) 42 | 43 | enum TempFamilies { 44 | R5xx, 45 | R6xx, 46 | R7xx, 47 | R8xx, 48 | R9xx, 49 | RCIx, 50 | RAIx, 51 | RVEx, 52 | }; 53 | 54 | class ATICard : public OSObject { 55 | OSDeclareDefaultStructors(ATICard) 56 | 57 | public: 58 | UInt32 chipID; 59 | UInt16 family; 60 | IOPCIDevice * VCard; 61 | RADEONCardInfo* rinfo; 62 | int tempFamily; 63 | 64 | private: 65 | volatile UInt8* mmio_base; 66 | IOMemoryMap * mmio; 67 | UInt32 Caps; 68 | UInt32 tReg; 69 | int card_number; 70 | 71 | 72 | bool getRadeonInfo (); 73 | 74 | protected: 75 | // IOService* m_Service; //??? 76 | public: 77 | // Binding* tempSensor; 78 | // Binding* boardSensor; 79 | // Binding* fanSensor; 80 | UInt32 read32(UInt32 reg); 81 | void write32(UInt32 reg, UInt32 val); 82 | UInt32 read_ind(UInt32 reg); 83 | UInt32 read_smc(UInt32 reg); 84 | 85 | bool initialize(void); 86 | IOReturn R6xxTemperatureSensor(UInt16* data); 87 | IOReturn R7xxTemperatureSensor(UInt16* data); 88 | IOReturn EverTemperatureSensor(UInt16* data); 89 | IOReturn TahitiTemperatureSensor(UInt16* data); 90 | IOReturn HawaiiTemperatureSensor(UInt16* data); 91 | IOReturn ArcticTemperatureSensor(UInt16* data); 92 | IOReturn VegaTemperatureSensor(UInt16* data); 93 | }; 94 | 95 | 96 | #endif 97 | -------------------------------------------------------------------------------- /plugins/GPUSensors/RadeonMonitor/ATI_Device_ID_List_Jun_2010.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/plugins/GPUSensors/RadeonMonitor/ATI_Device_ID_List_Jun_2010.txt -------------------------------------------------------------------------------- /plugins/GPUSensors/RadeonMonitor/Radeon.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Radeon.h 3 | * HWSensors 4 | * 5 | * Created by Sergey on 20.12.10. 6 | * Copyright 2010 Slice. All rights reserved. 7 | * 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | #include "ATICard.h" 14 | 15 | class RadeonMonitor : public IOService 16 | { 17 | OSDeclareDefaultStructors(RadeonMonitor) 18 | 19 | private: 20 | IOService* fakeSMC; 21 | OSDictionary* sensors; 22 | volatile UInt8* mmio_base; 23 | int numCard; //numCard=0 if only one Video, but may be any other value 24 | IOPCIDevice * VCard; 25 | IOMemoryMap * mmio; 26 | UInt32 vendor_id; 27 | UInt32 device_id; 28 | UInt32 class_id; 29 | 30 | bool addSensor(const char* key, const char* type, unsigned int size, int index); 31 | protected: 32 | ATICard* Card; 33 | 34 | public: 35 | virtual IOService* probe(IOService *provider, SInt32 *score); 36 | virtual bool start(IOService *provider); 37 | virtual bool init(OSDictionary *properties=0); 38 | virtual void free(void); 39 | virtual void stop(IOService *provider); 40 | 41 | virtual IOReturn callPlatformFunction(const OSSymbol *functionName, 42 | bool waitForFunction, 43 | void *param1, 44 | void *param2, 45 | void *param3, 46 | void *param4); 47 | }; 48 | -------------------------------------------------------------------------------- /plugins/GPUSensors/RadeonMonitor/RadeonMonitor-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | $(MODULE_VERSION) 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | $(MODULE_VERSION) 21 | IOKitPersonalities 22 | 23 | Radeon Cards Monitoring Plugin 24 | 25 | CFBundleIdentifier 26 | org.slice.RadeonMonitor 27 | IOClass 28 | RadeonMonitor 29 | IOMatchCategory 30 | RadeonMonitor 31 | IOProbeScore 32 | 500 33 | IOProviderClass 34 | IOResources 35 | IOResourceMatch 36 | IOKit 37 | 38 | 39 | OSBundleLibraries 40 | 41 | com.apple.iokit.IOPCIFamily 42 | 2.4 43 | com.apple.kpi.iokit 44 | 9.0.0 45 | com.apple.kpi.libkern 46 | 9.0.0 47 | com.apple.kpi.unsupported 48 | 9.0.0 49 | org.netkas.FakeSMC 50 | 3.3.0 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /plugins/GPUSensors/RadeonMonitor/RadeonMonitor-pre106-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.slice.RadeonMonitor 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | $(MODULE_VERSION) 19 | IOKitPersonalities 20 | 21 | Radeon Cards Monitoring Plugin 22 | 23 | CFBundleIdentifier 24 | org.slice.RadeonMonitor 25 | IOClass 26 | RadeonMonitor 27 | IOProbeScore 28 | 500 29 | IOMatchCategory 30 | RadeonMonitor 31 | IOProviderClass 32 | IOResources 33 | IOResourceMatch 34 | IOKit 35 | 36 | 37 | OSBundleLibraries 38 | 39 | org.netkas.FakeSMC 40 | 3.1.0 41 | com.apple.iokit.IOACPIFamily 42 | 1.0.0d1 43 | com.apple.iokit.IOPCIFamily 44 | 2.4 45 | com.apple.kernel.6.0 46 | 7.9.9 47 | com.apple.kernel.iokit 48 | 7.9.9 49 | com.apple.kernel.libkern 50 | 7.9.9 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /plugins/IntelMCHMonitor/IntelMCHMonitor-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | $(MODULE_VERSION) 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | $(MODULE_VERSION) 21 | IOKitPersonalities 22 | 23 | Intel MCH Monitor 24 | 25 | CFBundleIdentifier 26 | org.slice.${PRODUCT_NAME} 27 | IOClass 28 | IntelMCHMonitor 29 | IOMatchCategory 30 | IntelMCHMonitor 31 | IOProbeScore 32 | 500 33 | IOProviderClass 34 | IOResources 35 | IOResourceMatch 36 | IOKit 37 | 38 | 39 | OSBundleLibraries 40 | 41 | com.apple.iokit.IOPCIFamily 42 | 2.4 43 | com.apple.kpi.iokit 44 | 9.0.0 45 | com.apple.kpi.libkern 46 | 9.0.0 47 | com.apple.kpi.unsupported 48 | 9.0.0 49 | org.netkas.FakeSMC 50 | 3.3.0 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /plugins/IntelMCHMonitor/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /plugins/SMIMonitor/SMIMonitor-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | KEXT 17 | CFBundleShortVersionString 18 | $(MODULE_VERSION) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(MODULE_VERSION) 23 | IOKitPersonalities 24 | 25 | SMI Monitoring Plugin 26 | 27 | CFBundleIdentifier 28 | org.slice.${PRODUCT_NAME} 29 | FanMultiplier 30 | 1 31 | FanNames 32 | 33 | CPU Fan 34 | System Fan 35 | GPU Fan 36 | PSU Fan 37 | Chipset Fan 38 | Other Fan 39 | 40 | IOClass 41 | SMIMonitor 42 | IOMatchCategory 43 | ${PRODUCT_NAME} 44 | IOProviderClass 45 | IOResources 46 | IOResourceMatch 47 | IOKit 48 | 49 | 50 | NSHumanReadableCopyright 51 | Copyright © 2014 Slice. All rights reserved. 52 | OSBundleLibraries 53 | 54 | com.apple.kpi.iokit 55 | 9.0.0 56 | com.apple.kpi.libkern 57 | 9.0.0 58 | com.apple.kpi.mach 59 | 9.0.0 60 | com.apple.kpi.unsupported 61 | 9.0.0 62 | org.netkas.FakeSMC 63 | 3.3.0 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /plugins/SMIMonitor/SMIMonitor-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SMIMonitor' target in the 'SMIMonitor' project 3 | // 4 | 5 | -------------------------------------------------------------------------------- /plugins/SMIMonitor/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /plugins/SuperIOSensors/Fintek718x/F718x-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | $(MODULE_VERSION) 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | $(MODULE_VERSION) 21 | IOKitPersonalities 22 | 23 | Fintek F718x Monitor Plugin 24 | 25 | CFBundleIdentifier 26 | org.mozodojo.${PRODUCT_NAME} 27 | IOClass 28 | F718x 29 | IOMatchCategory 30 | F718x 31 | IOProbeScore 32 | 3000 33 | IOProviderClass 34 | IOResources 35 | IOResourceMatch 36 | IOKit 37 | Sensors Configuration 38 | 39 | FANIN0 40 | 41 | FANIN1 42 | 43 | FANIN2 44 | 45 | FANIN3 46 | 47 | FANIN4 48 | 49 | 50 | 51 | 52 | OSBundleLibraries 53 | 54 | com.apple.kpi.iokit 55 | 9.0.0 56 | com.apple.kpi.libkern 57 | 9.0.0 58 | com.apple.kpi.mach 59 | 9.0.0 60 | com.apple.kpi.unsupported 61 | 9.0.0 62 | org.netkas.FakeSMC 63 | 3.3.0 64 | 65 | OSBundleRequired 66 | Root 67 | 68 | 69 | -------------------------------------------------------------------------------- /plugins/SuperIOSensors/Fintek718x/F718x-pre106-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.mozodojo.${PRODUCT_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | IOKitPersonalities 22 | 23 | Fintek F718x Monitor Plugin 24 | 25 | CFBundleIdentifier 26 | org.mozodojo.${PRODUCT_NAME} 27 | IOClass 28 | F718x 29 | IOProbeScore 30 | 3000 31 | IOMatchCategory 32 | F718x 33 | IOProviderClass 34 | IOResources 35 | IOResourceMatch 36 | IOKit 37 | Sensors Configuration 38 | 39 | FANIN0 40 | 41 | FANIN1 42 | 43 | FANIN2 44 | 45 | FANIN3 46 | 47 | FANIN4 48 | 49 | 50 | 51 | 52 | OSBundleLibraries 53 | 54 | org.netkas.FakeSMC 55 | 3.1.0 56 | com.apple.kernel.6.0 57 | 7.9.9 58 | com.apple.kernel.iokit 59 | 7.9.9 60 | com.apple.kernel.libkern 61 | 7.9.9 62 | 63 | OSBundleRequired 64 | Root 65 | 66 | 67 | -------------------------------------------------------------------------------- /plugins/SuperIOSensors/Fintek718x/F718x.h: -------------------------------------------------------------------------------- 1 | /* 2 | * F718x.h 3 | * HWSensors 4 | * 5 | * Created by mozo on 16/10/10. 6 | * Copyright 2010 mozodojo. All rights reserved. 7 | * 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | 17 | #include "SuperIOFamily.h" 18 | 19 | // Registers 20 | const UInt8 FINTEK_CONFIGURATION_CONTROL_REGISTER = 0x02; 21 | const UInt8 FINTEK_DEVCIE_SELECT_REGISTER = 0x07; 22 | const UInt8 FINTEK_CHIP_ID_REGISTER = 0x20; 23 | const UInt8 FINTEK_CHIP_REVISION_REGISTER = 0x21; 24 | const UInt8 FINTEK_BASE_ADDRESS_REGISTER = 0x60; 25 | 26 | const UInt8 FINTEK_VENDOR_ID_REGISTER = 0x23; 27 | const UInt16 FINTEK_VENDOR_ID = 0x1934; 28 | const UInt8 F71858_HARDWARE_MONITOR_LDN = 0x02; 29 | const UInt8 FINTEK_HARDWARE_MONITOR_LDN = 0x04; 30 | 31 | // Hardware Monitor 32 | const UInt8 FINTEK_ADDRESS_REGISTER_OFFSET = 0x05; 33 | const UInt8 FINTEK_DATA_REGISTER_OFFSET = 0x06; 34 | 35 | // Hardware Monitor Registers 36 | const UInt8 FINTEK_VOLTAGE_BASE_REG = 0x20; 37 | const UInt8 FINTEK_TEMPERATURE_CONFIG_REG = 0x69; 38 | const UInt8 FINTEK_TEMPERATURE_BASE_REG = 0x70; 39 | const UInt8 FINTEK_FAN_TACHOMETER_REG[] = { 0xA0, 0xB0, 0xC0, 0xD0 }; 40 | 41 | enum F718xMode { 42 | F71858 = 0x0507, 43 | F71862 = 0x0601, 44 | F71869 = 0x0814, 45 | F71882 = 0x0541, 46 | F71889ED = 0x0909, 47 | F71889F = 0x0723, 48 | F71808 = 0x0901, 49 | F71889AD = 0x1005, 50 | F71868A = 0x1106, 51 | }; 52 | 53 | class F718x : public SuperIOMonitor { 54 | OSDeclareDefaultStructors(F718x) 55 | 56 | private: 57 | char vendor[40]; 58 | char product[40]; 59 | 60 | UInt8 readByte(UInt8 reg); 61 | 62 | virtual bool probePort(); 63 | virtual void enter(); 64 | virtual void exit(); 65 | 66 | virtual long readTemperature(unsigned long index); 67 | virtual long readVoltage(unsigned long index); 68 | virtual long readTachometer(unsigned long index); 69 | 70 | virtual const char * getModelName(); 71 | 72 | public: 73 | virtual bool init(OSDictionary *properties=0); 74 | virtual IOService* probe(IOService *provider, SInt32 *score); 75 | virtual bool start(IOService *provider); 76 | virtual void stop(IOService *provider); 77 | virtual void free(void); 78 | }; 79 | -------------------------------------------------------------------------------- /plugins/SuperIOSensors/ITE87x/ITEIT87x-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'ITEIT87x' target in the 'ITEIT87x' project 3 | // 4 | 5 | -------------------------------------------------------------------------------- /plugins/SuperIOSensors/ITE87x/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /plugins/SuperIOSensors/NSCPC8739x/PC8739x-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | $(MODULE_VERSION) 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | $(MODULE_VERSION) 21 | IOKitPersonalities 22 | 23 | NSC PC8739x Monitor Plugin 24 | 25 | CFBundleIdentifier 26 | org.slice.${PRODUCT_NAME} 27 | IOClass 28 | PC8739x 29 | IOMatchCategory 30 | PC8739x 31 | IOProbeScore 32 | 500 33 | IOProviderClass 34 | IOResources 35 | IOResourceMatch 36 | IOKit 37 | Sensors Configuration 38 | 39 | FANIN0 40 | System Fan 41 | FANIN1 42 | 43 | TEMPIN0 44 | System 45 | TEMPIN1 46 | Auxiliary 47 | TEMPIN2 48 | Processor 49 | TEMPIN3 50 | Memory 51 | 52 | 53 | 54 | OSBundleLibraries 55 | 56 | com.apple.kpi.iokit 57 | 9.0.0 58 | com.apple.kpi.libkern 59 | 9.0.0 60 | com.apple.kpi.mach 61 | 9.0.0 62 | com.apple.kpi.unsupported 63 | 9.0.0 64 | org.netkas.FakeSMC 65 | 3.3.0 66 | 67 | OSBundleRequired 68 | Root 69 | 70 | 71 | -------------------------------------------------------------------------------- /plugins/SuperIOSensors/NSCPC8739x/PC8739x-pre106-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.slice.${PRODUCT_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | IOKitPersonalities 22 | 23 | NSC PC8739x Monitor Plugin 24 | 25 | CFBundleIdentifier 26 | org.slice.${PRODUCT_NAME} 27 | IOClass 28 | PC8739x 29 | IOProbeScore 30 | 500 31 | IOMatchCategory 32 | PC8739x 33 | IOProviderClass 34 | IOResources 35 | IOResourceMatch 36 | IOKit 37 | Sensors Configuration 38 | 39 | FANIN0 40 | 41 | FANIN1 42 | 43 | FANIN2 44 | 45 | FANIN3 46 | 47 | FANIN4 48 | System Fan 49 | 50 | 51 | 52 | OSBundleLibraries 53 | 54 | org.netkas.FakeSMC 55 | 3.1.0 56 | com.apple.kernel.6.0 57 | 7.9.9 58 | com.apple.kernel.iokit 59 | 7.9.9 60 | com.apple.kernel.libkern 61 | 7.9.9 62 | 63 | OSBundleRequired 64 | Root 65 | 66 | 67 | -------------------------------------------------------------------------------- /plugins/SuperIOSensors/NSCPC8739x/PC8739x.h: -------------------------------------------------------------------------------- 1 | /* 2 | * PC8739x.h 3 | * HWSensors 4 | * 5 | * Created by mozo on 16/10/10. 6 | * Copyright 2010 mozodojo. All rights reserved. 7 | * 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "SuperIOFamily.h" 17 | //temp and fans 18 | const UInt16 NSC_HARDWARE_MONITOR_REGS[2][4] = {{0x61, 0x62, 0x63, 0x64}, {0x68, 0x68, 0x68, 0x68}}; 19 | 20 | // ITE Environment Controller 21 | const UInt8 NSC_ADDRESS_REGISTER_OFFSET = 0x00; 22 | const UInt8 NSC_DATA_REGISTER_OFFSET = 0x01; 23 | const UInt8 NSC_BANK_SELECT_REGISTER = 0x07; 24 | const UInt8 NSC_CHIP_ID_REGISTER = 0x20; 25 | const UInt8 NSC_CHIP_REVISION_REGISTER = 0x27; 26 | const UInt8 NSC_LDN_PRESENT = 0x30; 27 | 28 | 29 | const UInt8 NSC_HARDWARE_MONITOR_LDN = 0x0F; 30 | const UInt8 NSC_MEM = 0xF4; 31 | 32 | enum PC8739xModel { 33 | PC8739xx = 0xfc00 34 | }; 35 | 36 | class PC8739x : public SuperIOMonitor { 37 | OSDeclareDefaultStructors(PC8739x) 38 | 39 | private: 40 | volatile UInt8 * mmioBase; 41 | IOMemoryMap * mmio; 42 | UInt8 revision; 43 | 44 | UInt8 readByte(UInt8 bank, UInt8 reg); 45 | void writeByte(UInt8 bank, UInt8 reg, UInt8 value); 46 | 47 | virtual bool probePort(); 48 | 49 | virtual long readTemperature(unsigned long index); 50 | virtual long readTachometer(unsigned long index); 51 | 52 | virtual const char * getModelName(); 53 | 54 | public: 55 | virtual bool init(OSDictionary *properties=0); 56 | virtual IOService * probe(IOService *provider, SInt32 *score); 57 | virtual bool start(IOService *provider); 58 | virtual void stop(IOService *provider); 59 | virtual void free(void); 60 | }; 61 | -------------------------------------------------------------------------------- /plugins/SuperIOSensors/SuperIOFamily/SuperIOFamily-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDocumentTypes 8 | 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | org.mozodojo.${PRODUCT_NAME} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | KEXT 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0.0d1 23 | IOKitPersonalities 24 | 25 | OSBundleCompatibleVersion 26 | 1.0.0d1 27 | OSBundleLibraries 28 | 29 | com.apple.kpi.iokit 30 | 9.0.0 31 | com.apple.kpi.libkern 32 | 9.0.0 33 | com.apple.kpi.mach 34 | 9.0.0 35 | com.apple.kpi.unsupported 36 | 9.0.0 37 | org.netkas.FakeSMC 38 | 3.3.0 39 | 40 | OSBundleRequired 41 | Root 42 | 43 | 44 | -------------------------------------------------------------------------------- /plugins/SuperIOSensors/SuperIOFamily/SuperIOFamily-pre106-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.mozodojo.${PRODUCT_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | KEXT 15 | CFBundleShortVersionString 16 | 1.0.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0.0d1 21 | IOKitPersonalities 22 | 23 | OSBundleLibraries 24 | 25 | org.netkas.FakeSMC 26 | 3.1.0 27 | com.apple.iokit.IOPCIFamily 28 | 2.4 29 | com.apple.iokit.IOACPIFamily 30 | 1.0.0d1 31 | com.apple.kernel.6.0 32 | 7.9.9 33 | com.apple.kernel.iokit 34 | 7.9.9 35 | com.apple.kernel.libkern 36 | 7.9.9 37 | 38 | OSBundleCompatibleVersion 39 | 1.0.0d1 40 | OSBundleRequired 41 | Root 42 | 43 | 44 | -------------------------------------------------------------------------------- /plugins/SuperIOSensors/WinbondW836x/WinbondW836x-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'WinbondW836x' target in the 'WinbondW836x' project 3 | // 4 | 5 | -------------------------------------------------------------------------------- /plugins/SuperIOSensors/WinbondW836x/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /plugins/VoodooBattery/FakeSMC.h: -------------------------------------------------------------------------------- 1 | #ifndef _VIRTUALSMC_H 2 | #define _VIRTUALSMC_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "FakeSMCDevice.h" 9 | #include "FakeSMCKey.h" 10 | #include "definitions.h" 11 | 12 | 13 | class FakeSMC : public IOService { 14 | OSDeclareDefaultStructors(FakeSMC) 15 | 16 | private: 17 | FakeSMCDevice *smcDevice; 18 | 19 | public: 20 | virtual bool init(OSDictionary *dictionary = 0); 21 | virtual void free(void); 22 | virtual IOService *probe(IOService *provider, SInt32 *score); 23 | virtual bool start(IOService *provider); 24 | virtual void stop(IOService *provider); 25 | }; 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /plugins/VoodooBattery/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleGetInfoString 10 | 1.2.1, © 2009 Superhai, ${MODULE_VERSION} 2019 Slice 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | KEXT 21 | CFBundleShortVersionString 22 | $(MODULE_VERSION) 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | ${MODULE_VERSION} 27 | IOKitPersonalities 28 | 29 | BatteryManager 30 | 31 | CFBundleIdentifier 32 | $(PRODUCT_BUNDLE_IDENTIFIER) 33 | IOClass 34 | VoodooBattery 35 | IOMatchCategory 36 | VoodooBattery 37 | IOProviderClass 38 | IOResources 39 | IOResourceMatch 40 | IOKit 41 | 42 | 43 | OSBundleLibraries 44 | 45 | com.apple.iokit.IOACPIFamily 46 | 1.0.0 47 | com.apple.iokit.IOHIDSystem 48 | 1.1 49 | com.apple.kpi.iokit 50 | 9.0.0 51 | com.apple.kpi.libkern 52 | 9.0.0 53 | com.apple.kpi.mach 54 | 9.0.0 55 | com.apple.kpi.unsupported 56 | 9.0.0 57 | org.netkas.FakeSMC 58 | 3.4.0 59 | 60 | OSBundleRequired 61 | Root 62 | 63 | 64 | -------------------------------------------------------------------------------- /plugins/VoodooBattery/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/plugins/VoodooBattery/en.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /smcdumper/SmcHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // SmcHelper.h 3 | // HWMonitor 4 | // 5 | // Created by Kozlek on 28/11/13. 6 | // Copyright (c) 2013 kozlek. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SmcHelper : NSObject 12 | 13 | + (int)getIndexFromHexChar:(char)c; 14 | + (BOOL)isValidIntegerSmcType:(NSString *)type; 15 | + (BOOL)isValidFloatingSmcType:(NSString *)type; 16 | + (NSNumber*)decodeNumericValueFromBuffer:(void*)data length:(NSUInteger)length type:(const char *)type; 17 | + (BOOL)encodeNumericValue:(NSNumber*)value length:(NSUInteger)length type:(const char *)type outBuffer:(void*)outBuffer; 18 | 19 | + (void)writeKey:(NSString*)key value:(NSNumber*)value connection:(io_connect_t)connection; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /smcdumper/smc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Apple System Management Control (SMC) Tool 3 | * Copyright (C) 2006 devnull 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef __SMC_H__ 21 | #define __SMC_H__ 22 | 23 | #define VERSION "1.0" 24 | 25 | #define OP_NONE 0 26 | #define OP_LIST 1 27 | #define OP_READ 2 28 | #define OP_READ_FAN 3 29 | #define OP_WRITE 4 30 | #define OP_BRUTEFORCE 5 31 | 32 | #define KERNEL_INDEX_SMC 2 33 | 34 | #define SMC_CMD_READ_BYTES 5 35 | #define SMC_CMD_WRITE_BYTES 6 36 | #define SMC_CMD_READ_INDEX 8 37 | #define SMC_CMD_READ_KEYINFO 9 38 | #define SMC_CMD_READ_PLIMIT 11 39 | #define SMC_CMD_READ_VERS 12 40 | 41 | typedef struct { 42 | UInt8 major; 43 | UInt8 minor; 44 | UInt8 build; 45 | UInt8 reserved[1]; 46 | UInt16 release; 47 | } SMCKeyData_vers_t; 48 | 49 | typedef struct { 50 | UInt16 version; 51 | UInt16 length; 52 | UInt32 cpuPLimit; 53 | UInt32 gpuPLimit; 54 | UInt32 memPLimit; 55 | } SMCKeyData_pLimitData_t; 56 | 57 | typedef struct { 58 | UInt32 dataSize; 59 | UInt32 dataType; 60 | UInt8 dataAttributes; 61 | } SMCKeyData_keyInfo_t; 62 | 63 | typedef UInt8 SMCBytes_t[32]; 64 | 65 | typedef struct { 66 | UInt32 key; 67 | SMCKeyData_vers_t vers; 68 | SMCKeyData_pLimitData_t pLimitData; 69 | SMCKeyData_keyInfo_t keyInfo; 70 | UInt8 result; 71 | UInt8 status; 72 | UInt8 data8; 73 | UInt32 data32; 74 | SMCBytes_t bytes; 75 | } SMCKeyData_t; 76 | 77 | typedef char UInt32Char_t[5]; 78 | 79 | typedef struct { 80 | UInt32Char_t key; 81 | UInt32 dataSize; 82 | UInt32Char_t dataType; 83 | SMCBytes_t bytes; 84 | } SMCVal_t; 85 | 86 | UInt32 _strtoul(const char *str, int size, int base); 87 | void _ultostr(char *str, UInt32 val); 88 | 89 | kern_return_t SMCOpen(io_connect_t *conn, const char *serviceName); 90 | kern_return_t SMCClose(io_connect_t conn); 91 | kern_return_t SMCCall(io_connect_t conn, int index, SMCKeyData_t *inputStructure, SMCKeyData_t *outputStructure); 92 | kern_return_t SMCReadKey(io_connect_t conn, const UInt32Char_t key, SMCVal_t *val); 93 | kern_return_t SMCWriteKey(io_connect_t conn, const SMCVal_t *val); 94 | kern_return_t SMCWriteKeyUnsafe(io_connect_t conn, const SMCVal_t *val); 95 | 96 | #endif -------------------------------------------------------------------------------- /smcdumper/smcutil: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CloverHackyColor/FakeSMC3_with_plugins/614eca29f2f3a5ef1b06baad79dfd0b8c034a5be/smcdumper/smcutil -------------------------------------------------------------------------------- /utils/TigerAdditionals.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * TigerAdditionals.cpp 3 | * VoodooHDA 4 | * 5 | * Created by Andy Vandijck on 12/03/10. 6 | * Copyright 2010 AnV Software. All rights reserved. 7 | * 8 | * Slice, 05.10.2010 some additions 9 | */ 10 | 11 | #ifdef TIGER // needed for compile fix 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include 26 | #include 27 | 28 | int 29 | vprintf_vhda(const char *fmt, va_list ap) { 30 | char tmp[65536]; /* Should be enough, right? */ 31 | vsnprintf(tmp, sizeof(tmp), fmt, ap); 32 | printf("%s", tmp); 33 | return 0; 34 | } 35 | 36 | int snprintf_vhda(char *text, size_t maxlen, const char *fmt, ...) { 37 | va_list ap; 38 | int retval; 39 | va_start(ap, fmt); 40 | retval = vsnprintf(text, maxlen, fmt, ap); 41 | va_end(ap); 42 | return retval; 43 | } 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /utils/TigerAdditionals.h: -------------------------------------------------------------------------------- 1 | /* 2 | * TigerAdditionals.h 3 | * VoodooHDA 4 | * 5 | * Created by Andy Vandijck on 12/03/10. 6 | * Copyright 2010 AnV Software. All rights reserved. 7 | * 8 | */ 9 | 10 | #ifdef TIGER // needed for compile fix... 11 | int vprintf_vhda(const char *fmt, va_list ap); 12 | int snprintf_vhda(char *text, size_t maxlen, const char *fmt, ...); 13 | 14 | #define vprintf vprintf_vhda 15 | #define snprintf snprintf_vhda 16 | #define strlcpy strncpy 17 | #define strlcat strncat 18 | 19 | enum { 20 | kIOUCVariableStructureSize = 0xffffffff 21 | }; 22 | #endif 23 | 24 | --------------------------------------------------------------------------------