implement ProvideCurrentCpuInfo

Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
SergeySlice 2022-01-28 21:47:15 +03:00
parent e7cbcc3129
commit 7945747d83
4 changed files with 12 additions and 6 deletions

View File

@ -1184,6 +1184,8 @@
<false/>
<key>XhciPortLimit</key>
<false/>
<key>ProvideCurrentCpuInfo</key>
<false/>
</dict>
</dict>
</plist>

View File

@ -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;
@ -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;
}
@ -2081,7 +2082,7 @@ printf("%s", "");
PowerTimeoutKernelPanic = other.dgetPowerTimeoutKernelPanic();
ThirdPartyDrives = other.dgetThirdPartyDrives();
XhciPortLimit = other.dgetXhciPortLimit();
ProvideCurrentCpuInfo = other.dgetProvideCurrentCpuInfo();
}
};

View File

@ -64,6 +64,7 @@ public:
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; };
@ -76,6 +77,7 @@ public:
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)*/ {}
};
@ -168,7 +170,7 @@ public:
{"PowerTimeoutKernelPanic", OcKernelQuirks.PowerTimeoutKernelPanic},
{"ThirdPartyDrives", OcKernelQuirks.ThirdPartyDrives},
{"XhciPortLimit", OcKernelQuirks.XhciPortLimit},
{"ProvideCurrentCpuInfo", OcKernelQuirks.ProvideCurrentCpuInfo},
};
Quirks_Class() : OcKernelQuirks(*this), OcBooterQuirks(*this) {}

View File

@ -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;
@ -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,
@ -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) {