Skip to content

Commit

Permalink
implement ProvideCurrentCpuInfo
Browse files Browse the repository at this point in the history
Signed-off-by: SergeySlice <[email protected]>
  • Loading branch information
SergeySlice committed Jan 28, 2022
1 parent e7cbcc3 commit 7945747
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CloverPackage/CloverV2/EFI/CLOVER/config-sample.plist
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,8 @@
<false/>
<key>XhciPortLimit</key>
<false/>
<key>ProvideCurrentCpuInfo</key>
<false/>
</dict>
</dict>
</plist>
5 changes: 3 additions & 2 deletions rEFIt_UEFI/Platform/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -2047,7 +2047,7 @@ printf("%s", "");
XBool PowerTimeoutKernelPanic = false;
XBool ThirdPartyDrives = false;
XBool XhciPortLimit = false;

XBool ProvideCurrentCpuInfo = false;

#if __cplusplus > 201703L
XBool operator == (const OcKernelQuirksClass&) const = default;
Expand All @@ -2065,6 +2065,7 @@ printf("%s", "");
if ( !(PowerTimeoutKernelPanic == other.PowerTimeoutKernelPanic) ) return false;
if ( !(ThirdPartyDrives == other.ThirdPartyDrives) ) return false;
if ( !(XhciPortLimit == other.XhciPortLimit) ) return false;
if ( !(ProvideCurrentCpuInfo == other.ProvideCurrentCpuInfo) ) return false;

return true;
}
Expand All @@ -2081,7 +2082,7 @@ printf("%s", "");
PowerTimeoutKernelPanic = other.dgetPowerTimeoutKernelPanic();
ThirdPartyDrives = other.dgetThirdPartyDrives();
XhciPortLimit = other.dgetXhciPortLimit();

ProvideCurrentCpuInfo = other.dgetProvideCurrentCpuInfo();
}
};

Expand Down
4 changes: 3 additions & 1 deletion rEFIt_UEFI/Settings/ConfigPlist/Config_Quirks.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class Quirks_Class : public XmlDict
XmlBool PowerTimeoutKernelPanic = XmlBool();
XmlBool ThirdPartyDrives = XmlBool();
XmlBool XhciPortLimit = XmlBool();
XmlBool ProvideCurrentCpuInfo = XmlBool();

XBool dgetAppleXcpmExtraMsrs() const { return AppleXcpmExtraMsrs.isDefined() ? AppleXcpmExtraMsrs.value() : AppleXcpmExtraMsrs.nullValue; };
XBool dgetAppleXcpmForceBoost() const { return AppleXcpmForceBoost.isDefined() ? AppleXcpmForceBoost.value() : AppleXcpmForceBoost.nullValue; };
Expand All @@ -76,6 +77,7 @@ class Quirks_Class : public XmlDict
XBool dgetPowerTimeoutKernelPanic() const { return PowerTimeoutKernelPanic.isDefined() ? PowerTimeoutKernelPanic.value() : PowerTimeoutKernelPanic.nullValue; };
XBool dgetThirdPartyDrives() const { return ThirdPartyDrives.isDefined() ? ThirdPartyDrives.value() : ThirdPartyDrives.nullValue; };
XBool dgetXhciPortLimit() const { return XhciPortLimit.isDefined() ? XhciPortLimit.value() : XhciPortLimit.nullValue; };
XBool dgetProvideCurrentCpuInfo() const { return ProvideCurrentCpuInfo.isDefined() ? ProvideCurrentCpuInfo.value() : ProvideCurrentCpuInfo.nullValue; };

OcKernelQuirks_Class(const Quirks_Class& _parent) /*: parent(_parent)*/ {}
};
Expand Down Expand Up @@ -168,7 +170,7 @@ class Quirks_Class : public XmlDict
{"PowerTimeoutKernelPanic", OcKernelQuirks.PowerTimeoutKernelPanic},
{"ThirdPartyDrives", OcKernelQuirks.ThirdPartyDrives},
{"XhciPortLimit", OcKernelQuirks.XhciPortLimit},

{"ProvideCurrentCpuInfo", OcKernelQuirks.ProvideCurrentCpuInfo},
};

Quirks_Class() : OcKernelQuirks(*this), OcBooterQuirks(*this) {}
Expand Down
7 changes: 4 additions & 3 deletions rEFIt_UEFI/refit/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ void LOADER_ENTRY::StartLoader()
mOpenCoreConfiguration.Kernel.Quirks.PowerTimeoutKernelPanic = gSettings.Quirks.OcKernelQuirks.PowerTimeoutKernelPanic;
mOpenCoreConfiguration.Kernel.Quirks.ThirdPartyDrives = gSettings.Quirks.OcKernelQuirks.ThirdPartyDrives;
mOpenCoreConfiguration.Kernel.Quirks.XhciPortLimit = gSettings.Quirks.OcKernelQuirks.XhciPortLimit;

mOpenCoreConfiguration.Kernel.Quirks.ProvideCurrentCpuInfo = gSettings.Quirks.OcKernelQuirks.ProvideCurrentCpuInfo;

mOpenCoreConfiguration.Kernel.Add.Count = (UINT32)kextArray.size();
mOpenCoreConfiguration.Kernel.Add.AllocCount = mOpenCoreConfiguration.Kernel.Add.Count;
Expand Down Expand Up @@ -1635,7 +1635,7 @@ void LOADER_ENTRY::StartLoader()
LoadedImage->LoadOptionsSize = (UINT32)LoadOptionsAsXStringW.sizeInBytesIncludingTerminator();

DBG("Kernel quirks\n");
DBG("ACPCL %d AXCL %d AXEM %d AXFB %d CSG %d DIM %d DLJ %d DRC %d DPM %d EBTFF %d EDI %d IPBS %d LKP %d PNKD %d PTKP %d TPD %d XPL %d\n",
DBG("ACPCL %d AXCL %d AXEM %d AXFB %d CSG %d DIM %d DLJ %d DRC %d DPM %d EBTFF %d EDI %d IPBS %d LKP %d PNKD %d PTKP %d TPD %d XPL %d PCC %d\n",
mOpenCoreConfiguration.Kernel.Quirks.AppleCpuPmCfgLock,
mOpenCoreConfiguration.Kernel.Quirks.AppleXcpmCfgLock,
mOpenCoreConfiguration.Kernel.Quirks.AppleXcpmExtraMsrs,
Expand All @@ -1652,7 +1652,8 @@ void LOADER_ENTRY::StartLoader()
mOpenCoreConfiguration.Kernel.Quirks.PanicNoKextDump,
mOpenCoreConfiguration.Kernel.Quirks.PowerTimeoutKernelPanic,
mOpenCoreConfiguration.Kernel.Quirks.ThirdPartyDrives,
mOpenCoreConfiguration.Kernel.Quirks.XhciPortLimit);
mOpenCoreConfiguration.Kernel.Quirks.XhciPortLimit,
mOpenCoreConfiguration.Kernel.Quirks.ProvideCurrentCpuInfo);

DBG("Closing log\n");
if (SavePreBootLog) {
Expand Down

0 comments on commit 7945747

Please sign in to comment.