Skip to content

Commit

Permalink
Changed RGEN 3 -> 2 for AppleIntelPCHPMC.kext compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed Jun 14, 2019
1 parent b85854e commit 0cf1a6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ VirtualSMC Changelog
#### v1.0.5
- Allow loading on 10.15 without `-lilubetaall`
- Fixed SMCBatteryManager compatibility with 10.15
- Changed RGEN 3 -> 2 for AppleIntelPCHPMC.kext compatibility

#### v1.0.4
- Removed exposed REV, RBr, RPlt keys from I/O Registry
Expand Down
7 changes: 7 additions & 0 deletions VirtualSMC/kern_keystore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,13 @@ bool VirtualSMCKeystore::mergePredefined(const char *board, int model) {
if (!addKey(KeyNTOK, VirtualSMCValueNTOK::withState()))
return false;

if (gen >= 3) {
// Force 2nd generation on 3rd as it currently causes sleep issues due to AppleSMCPMC
// being used by AppleIntelPCHPMC.kext. More details can be found in
// https://github.com/acidanthera/bugtracker/issues/388
gen = 2;
}

if (!addKey(KeyRGEN, VirtualSMCValueVariable::withData(
&gen, sizeof(uint8_t), SmcKeyTypeUint8, SMC_KEY_ATTRIBUTE_CONST|SMC_KEY_ATTRIBUTE_READ)))
return false;
Expand Down

0 comments on commit 0cf1a6b

Please sign in to comment.