Skip to content

Commit 7f43159

Browse files
committed
r0.6.4
1 parent 3217ad9 commit 7f43159

File tree

5 files changed

+33
-33
lines changed

5 files changed

+33
-33
lines changed

AMDRyzenCPUPowerManagement/AMDRyzenCPUPowerManagement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ bool AMDRyzenCPUPowerManagement::initSuperIO(uint16_t *chipIntel){
695695
superIO = nullptr;
696696
if(!superIO) superIO = ISSuperIONCT668X::getDevice(&savedSMCChipIntel);
697697
if(!superIO) superIO = ISSuperIONCT67XXFamily::getDevice(&savedSMCChipIntel);
698-
if(!superIO) superIO = ISSuperIOIT86XXE::getDevice(&savedSMCChipIntel);
698+
if(!superIO) superIO = ISSuperIOIT86XXEFamily::getDevice(&savedSMCChipIntel);
699699

700700
*chipIntel = savedSMCChipIntel;
701701

AMDRyzenCPUPowerManagement/AMDRyzenCPUPowerManagement.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#include "SuperIO/ISSuperIONCT668X.hpp"
2828
#include "SuperIO/ISSuperIONCT67XXFamily.hpp"
29-
#include "SuperIO/ISSuperIOIT86XXE.hpp"
29+
#include "SuperIO/ISSuperIOIT86XXEFamily.hpp"
3030

3131
#include <i386/cpuid.h>
3232

AMDRyzenCPUPowerManagement/SuperIO/ISSuperIOIT86XXE.cpp renamed to AMDRyzenCPUPowerManagement/SuperIO/ISSuperIOIT86XXEFamily.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
//
2-
// ISSuperIOIT86XXE.cpp
2+
// ISSuperIOIT86XXEFamily.cpp
33
// AMDRyzenCPUPowerManagement
44
//
55
// Created by Maurice on 25.05.20.
66
// Copyright © 2020 trulyspinach. All rights reserved.
77
//
88

9-
#include "ISSuperIOIT86XXE.hpp"
9+
#include "ISSuperIOIT86XXEFamily.hpp"
1010

11-
ISSuperIOIT86XXE::ISSuperIOIT86XXE(int psel, uint16_t addr, uint16_t chipIntel)
11+
ISSuperIOIT86XXEFamily::ISSuperIOIT86XXEFamily(int psel, uint16_t addr, uint16_t chipIntel)
1212
{
1313
lpcPortSel = psel;
1414
chipAddr = addr;
@@ -31,7 +31,7 @@ ISSuperIOIT86XXE::ISSuperIOIT86XXE(int psel, uint16_t addr, uint16_t chipIntel)
3131
}
3232
}
3333

34-
ISSuperIOIT86XXE* ISSuperIOIT86XXE::getDevice(uint16_t* chipIntel)
34+
ISSuperIOIT86XXEFamily* ISSuperIOIT86XXEFamily::getDevice(uint16_t* chipIntel)
3535
{
3636

3737
i386_ioport_t regport = 0;
@@ -124,60 +124,60 @@ ISSuperIOIT86XXE* ISSuperIOIT86XXE::getDevice(uint16_t* chipIntel)
124124
outb(regport, 0x02);
125125
}
126126

127-
return new ISSuperIOIT86XXE(portSel, devAddr, *chipIntel); //TODO: Add GPIO Addr
127+
return new ISSuperIOIT86XXEFamily(portSel, devAddr, *chipIntel); //TODO: Add GPIO Addr
128128
}
129129

130-
uint8_t ISSuperIOIT86XXE::readByte(uint16_t addr)
130+
uint8_t ISSuperIOIT86XXEFamily::readByte(uint16_t addr)
131131
{
132132
outb(chipAddr + CHIP_ADDR_REG_OFFSET, addr & 0xFF);
133133
return inb(chipAddr + CHIP_DAT_REG_OFFSET);
134134
}
135135

136-
uint16_t ISSuperIOIT86XXE::readWord(uint16_t addr)
136+
uint16_t ISSuperIOIT86XXEFamily::readWord(uint16_t addr)
137137
{
138138
return (readByte(addr) << 8) | readByte(addr + 1);
139139
}
140140

141-
void ISSuperIOIT86XXE::writeByte(uint16_t addr, uint8_t val)
141+
void ISSuperIOIT86XXEFamily::writeByte(uint16_t addr, uint8_t val)
142142
{
143143
outb(chipAddr + CHIP_ADDR_REG_OFFSET, addr & 0xFF);
144144
outb(chipAddr + CHIP_DAT_REG_OFFSET, val);
145145
}
146146

147-
int ISSuperIOIT86XXE::getNumberOfFans()
147+
int ISSuperIOIT86XXEFamily::getNumberOfFans()
148148
{
149149
return activeFansOnSystem;
150150
}
151151

152-
const char* ISSuperIOIT86XXE::getReadableStringForFan(int fan)
152+
const char* ISSuperIOIT86XXEFamily::getReadableStringForFan(int fan)
153153
{
154154
if (fan > activeFansOnSystem)
155155
return nullptr;
156156
return kFAN_READABLE_STRS[fan];
157157
}
158158

159-
uint32_t ISSuperIOIT86XXE::getRPMForFan(int fan)
159+
uint32_t ISSuperIOIT86XXEFamily::getRPMForFan(int fan)
160160
{
161161
if (fan > activeFansOnSystem)
162162
return 0;
163163
return fanRPMs[fan];
164164
}
165165

166-
bool ISSuperIOIT86XXE::getFanAutoControlMode(int fan)
166+
bool ISSuperIOIT86XXEFamily::getFanAutoControlMode(int fan)
167167
{
168168
if (fan > activeFansOnSystem)
169169
return 0;
170170
return fanControlMode[fan] != 0;
171171
}
172172

173-
uint8_t ISSuperIOIT86XXE::getFanThrottle(int fan)
173+
uint8_t ISSuperIOIT86XXEFamily::getFanThrottle(int fan)
174174
{
175175
if (fan > activeFansOnSystem)
176176
return 0;
177177
return fanControlMode[fan];
178178
}
179179

180-
void ISSuperIOIT86XXE::updateFanRPMS()
180+
void ISSuperIOIT86XXEFamily::updateFanRPMS()
181181
{
182182
for (int i = 0; i < activeFansOnSystem; i++)
183183
{
@@ -195,15 +195,15 @@ void ISSuperIOIT86XXE::updateFanRPMS()
195195
}
196196
}
197197

198-
void ISSuperIOIT86XXE::updateFanControl()
198+
void ISSuperIOIT86XXEFamily::updateFanControl()
199199
{
200200
for (int i = 0; i < activeFansOnSystem; i++)
201201
{
202202
fanControlMode[i] = readByte(kFAN_PWM_CTRL_EXT_REGS[i]);
203203
}
204204
}
205205

206-
void ISSuperIOIT86XXE::overrideFanControl(int fan, uint8_t thr)
206+
void ISSuperIOIT86XXEFamily::overrideFanControl(int fan, uint8_t thr)
207207
{
208208
if (fan >= activeFansOnSystem)
209209
return;
@@ -212,7 +212,7 @@ void ISSuperIOIT86XXE::overrideFanControl(int fan, uint8_t thr)
212212
writeByte(kFAN_PWM_CTRL_EXT_REGS[fan], thr);
213213
}
214214

215-
void ISSuperIOIT86XXE::setDefaultFanControl(int fan)
215+
void ISSuperIOIT86XXEFamily::setDefaultFanControl(int fan)
216216
{
217217
if (fan >= activeFansOnSystem)
218218
return;

AMDRyzenCPUPowerManagement/SuperIO/ISSuperIOIT86XXE.hpp renamed to AMDRyzenCPUPowerManagement/SuperIO/ISSuperIOIT86XXEFamily.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//
2-
// ISSuperIOIT86XXE.hpp
2+
// ISSuperIOIT86XXEFamily.hpp
33
// AMDRyzenCPUPowerManagement
44
//
55
// Created by Maurice on 25.05.20.
66
// Copyright © 2020 trulyspinach. All rights reserved.
77
//
88

9-
#ifndef ISSuperIOIT86XXE_hpp
10-
#define ISSuperIOIT86XXE_hpp
9+
#ifndef ISSuperIOIT86XXEFamily_hpp
10+
#define ISSuperIOIT86XXEFamily_hpp
1111

1212
#include <IOKit/IOLib.h>
1313

@@ -28,7 +28,7 @@
2828
#define CHIP_ADDR_REG_OFFSET 0x05
2929
#define CHIP_DAT_REG_OFFSET 0x06
3030

31-
class ISSuperIOIT86XXE : public ISSuperIOSMCFamily
31+
class ISSuperIOIT86XXEFamily : public ISSuperIOSMCFamily
3232
{
3333

3434
public:
@@ -40,9 +40,9 @@ class ISSuperIOIT86XXE : public ISSuperIOSMCFamily
4040
"CPU OPT Fan",
4141
};
4242

43-
static ISSuperIOIT86XXE* getDevice(uint16_t* chipIntel);
43+
static ISSuperIOIT86XXEFamily* getDevice(uint16_t* chipIntel);
4444

45-
ISSuperIOIT86XXE(int psel, uint16_t addr, uint16_t chipIntel);
45+
ISSuperIOIT86XXEFamily(int psel, uint16_t addr, uint16_t chipIntel);
4646

4747
int fanRPMs[IT86XXE_MAX_NUMFAN];
4848
uint8_t fanControlMode[IT86XXE_MAX_NUMFAN];

SMCAMDProcessor.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
5B72086C247C884C00BF7492 /* ISSuperIOIT86XXE.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 5B72086A247C884C00BF7492 /* ISSuperIOIT86XXE.hpp */; };
11-
5B72086D247C884C00BF7492 /* ISSuperIOIT86XXE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5B72086B247C884C00BF7492 /* ISSuperIOIT86XXE.cpp */; };
10+
5B72086C247C884C00BF7492 /* ISSuperIOIT86XXEFamily.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 5B72086A247C884C00BF7492 /* ISSuperIOIT86XXEFamily.hpp */; };
11+
5B72086D247C884C00BF7492 /* ISSuperIOIT86XXEFamily.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5B72086B247C884C00BF7492 /* ISSuperIOIT86XXEFamily.cpp */; };
1212
B5011EA1242E01CC009FB2A2 /* SMCAMDProcessor.hpp in Headers */ = {isa = PBXBuildFile; fileRef = B5011EA0242E01CC009FB2A2 /* SMCAMDProcessor.hpp */; };
1313
B5011EA3242E01CC009FB2A2 /* SMCAMDProcessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B5011EA2242E01CC009FB2A2 /* SMCAMDProcessor.cpp */; };
1414
B56162C72400EF770006A7D8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B56162C62400EF770006A7D8 /* AppDelegate.swift */; };
@@ -47,8 +47,8 @@
4747
/* End PBXBuildFile section */
4848

4949
/* Begin PBXFileReference section */
50-
5B72086A247C884C00BF7492 /* ISSuperIOIT86XXE.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ISSuperIOIT86XXE.hpp; sourceTree = "<group>"; };
51-
5B72086B247C884C00BF7492 /* ISSuperIOIT86XXE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ISSuperIOIT86XXE.cpp; sourceTree = "<group>"; };
50+
5B72086A247C884C00BF7492 /* ISSuperIOIT86XXEFamily.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ISSuperIOIT86XXEFamily.hpp; sourceTree = "<group>"; };
51+
5B72086B247C884C00BF7492 /* ISSuperIOIT86XXEFamily.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ISSuperIOIT86XXEFamily.cpp; sourceTree = "<group>"; };
5252
B5011E9E242E01CC009FB2A2 /* SMCAMDProcessor.kext */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SMCAMDProcessor.kext; sourceTree = BUILT_PRODUCTS_DIR; };
5353
B5011EA0242E01CC009FB2A2 /* SMCAMDProcessor.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = SMCAMDProcessor.hpp; sourceTree = "<group>"; };
5454
B5011EA2242E01CC009FB2A2 /* SMCAMDProcessor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SMCAMDProcessor.cpp; sourceTree = "<group>"; };
@@ -254,8 +254,8 @@
254254
B5810041246D627700A38AB7 /* SuperIO */ = {
255255
isa = PBXGroup;
256256
children = (
257-
5B72086B247C884C00BF7492 /* ISSuperIOIT86XXE.cpp */,
258-
5B72086A247C884C00BF7492 /* ISSuperIOIT86XXE.hpp */,
257+
5B72086B247C884C00BF7492 /* ISSuperIOIT86XXEFamily.cpp */,
258+
5B72086A247C884C00BF7492 /* ISSuperIOIT86XXEFamily.hpp */,
259259
B5810042246D629C00A38AB7 /* ISSuperIONCT67XXFamily.cpp */,
260260
B5810043246D629C00A38AB7 /* ISSuperIONCT67XXFamily.hpp */,
261261
B5DF4AB3247156F200663498 /* ISSuperIONCT668X.cpp */,
@@ -307,7 +307,7 @@
307307
B5810045246D629C00A38AB7 /* ISSuperIONCT67XXFamily.hpp in Headers */,
308308
B57C7E972424EFFF00C86B68 /* cpu_topology.h in Headers */,
309309
B564A5CA240B8256000FF929 /* LegacyIOUserClient.h in Headers */,
310-
5B72086C247C884C00BF7492 /* ISSuperIOIT86XXE.hpp in Headers */,
310+
5B72086C247C884C00BF7492 /* ISSuperIOIT86XXEFamily.hpp in Headers */,
311311
B5DDAAC224714A1500A7572D /* ISSuperIOSMCFamily.hpp in Headers */,
312312
B57D280923F66C8E002BC699 /* AMDRyzenCPUPowerManagement.hpp in Headers */,
313313
);
@@ -473,7 +473,7 @@
473473
files = (
474474
B5DF4AB5247156F200663498 /* ISSuperIONCT668X.cpp in Sources */,
475475
B584F5CC242E2CBE007DEA77 /* pmAMDRyzen.c in Sources */,
476-
5B72086D247C884C00BF7492 /* ISSuperIOIT86XXE.cpp in Sources */,
476+
5B72086D247C884C00BF7492 /* ISSuperIOIT86XXEFamily.cpp in Sources */,
477477
B5D20189241B85E800BBD06A /* kernel_resolver.c in Sources */,
478478
B57D280B23F66C8E002BC699 /* AMDRyzenCPUPMUserClient.cpp in Sources */,
479479
B57D280723F66C8E002BC699 /* AMDRyzenCPUPowerManagement.cpp in Sources */,

0 commit comments

Comments
 (0)