Add ExtendBTFeatureFlags to Quirks

This commit is contained in:
z3DD3r 2021-09-25 11:51:37 +03:00
parent 0bca61ad3d
commit 81d1808c0a
5 changed files with 14 additions and 2 deletions

View File

@ -1156,6 +1156,8 @@
<true/>
<key>DummyPowerManagement</key>
<false/>
<key>ExtendBTFeatureFlags</key>
<false/>
<key>ExternalDiskIcons</key>
<false/>
<key>IncreasePciBarSize</key>

View File

@ -1708,6 +1708,8 @@
<false/>
<key>DummyPowerManagement</key>
<false/>
<key>ExtendBTFeatureFlags</key>
<false/>
<key>ExternalDiskIcons</key>
<false/>
<key>IncreasePciBarSize</key>

View File

@ -2078,6 +2078,7 @@ printf("%s", "");
bool DisableLinkeditJettison = false;
// bool DisableRtcChecksum = false;
bool DummyPowerManagement = false;
bool ExtendBTFeatureFlags = false;
bool ExternalDiskIcons = false;
bool IncreasePciBarSize = false;
// bool LapicKernelPanic = false;
@ -2096,6 +2097,7 @@ printf("%s", "");
if ( !(DisableIoMapper == other.DisableIoMapper) ) return false;
if ( !(DisableLinkeditJettison == other.DisableLinkeditJettison) ) return false;
if ( !(DummyPowerManagement == other.DummyPowerManagement) ) return false;
if ( !(ExtendBTFeatureFlags == other.ExtendBTFeatureFlags) ) return false;
if ( !(ExternalDiskIcons == other.ExternalDiskIcons) ) return false;
if ( !(IncreasePciBarSize == other.IncreasePciBarSize) ) return false;
if ( !(PowerTimeoutKernelPanic == other.PowerTimeoutKernelPanic) ) return false;
@ -2110,6 +2112,7 @@ printf("%s", "");
DisableIoMapper = configPlist.dgetDisableIoMapper();
DisableLinkeditJettison = configPlist.dgetDisableLinkeditJettison();
DummyPowerManagement = configPlist.dgetDummyPowerManagement();
ExtendBTFeatureFlags = configPlist.dgetExtendBTFeatureFlags();
ExternalDiskIcons = configPlist.dgetExternalDiskIcons();
IncreasePciBarSize = configPlist.dgetIncreasePciBarSize();
PowerTimeoutKernelPanic = configPlist.dgetPowerTimeoutKernelPanic();

View File

@ -59,6 +59,7 @@ public:
XmlBool DisableIoMapper = XmlBool();
XmlBool DisableLinkeditJettison = XmlBool();
XmlBool DummyPowerManagement = XmlBool();
XmlBool ExtendBTFeatureFlags = XmlBool();
XmlBool ExternalDiskIcons = XmlBool();
XmlBool IncreasePciBarSize = XmlBool();
XmlBool PowerTimeoutKernelPanic = XmlBool();
@ -70,6 +71,7 @@ public:
bool dgetDisableIoMapper() const { return DisableIoMapper.isDefined() ? DisableIoMapper.value() : DisableIoMapper.nullValue; };
bool dgetDisableLinkeditJettison() const { return DisableLinkeditJettison.isDefined() ? DisableLinkeditJettison.value() : DisableLinkeditJettison.nullValue; };
bool dgetDummyPowerManagement() const { return DummyPowerManagement.isDefined() ? DummyPowerManagement.value() : DummyPowerManagement.nullValue; };
bool dgetExtendBTFeatureFlags() const { return ExtendBTFeatureFlags.isDefined() ? ExtendBTFeatureFlags.value() : ExtendBTFeatureFlags.nullValue; };
bool dgetExternalDiskIcons() const { return ExternalDiskIcons.isDefined() ? ExternalDiskIcons.value() : ExternalDiskIcons.nullValue; };
bool dgetIncreasePciBarSize() const { return IncreasePciBarSize.isDefined() ? IncreasePciBarSize.value() : IncreasePciBarSize.nullValue; };
bool dgetPowerTimeoutKernelPanic() const { return PowerTimeoutKernelPanic.isDefined() ? PowerTimeoutKernelPanic.value() : PowerTimeoutKernelPanic.nullValue; };
@ -130,7 +132,7 @@ public:
OcKernelQuirks_Class OcKernelQuirks;
OcBooterQuirks_Class OcBooterQuirks;
XmlDictField m_fields[30] = {
XmlDictField m_fields[31] = {
{"AvoidRuntimeDefrag", OcBooterQuirks.AvoidRuntimeDefrag},
{"DevirtualiseMmio", OcBooterQuirks.DevirtualiseMmio},
{"DisableSingleUser", OcBooterQuirks.DisableSingleUser},
@ -156,6 +158,7 @@ public:
{"DisableIoMapper", OcKernelQuirks.DisableIoMapper},
{"DisableLinkeditJettison", OcKernelQuirks.DisableLinkeditJettison},
{"DummyPowerManagement", OcKernelQuirks.DummyPowerManagement},
{"ExtendBTFeatureFlags", OcKernelQuirks.ExtendBTFeatureFlags},
{"ExternalDiskIcons", OcKernelQuirks.ExternalDiskIcons},
{"IncreasePciBarSize", OcKernelQuirks.IncreasePciBarSize},
{"PowerTimeoutKernelPanic", OcKernelQuirks.PowerTimeoutKernelPanic},

View File

@ -1060,6 +1060,7 @@ void LOADER_ENTRY::StartLoader()
mOpenCoreConfiguration.Kernel.Quirks.DisableLinkeditJettison = gSettings.Quirks.OcKernelQuirks.DisableLinkeditJettison;
mOpenCoreConfiguration.Kernel.Quirks.DisableRtcChecksum = gSettings.KernelAndKextPatches.KPAppleRTC;
mOpenCoreConfiguration.Kernel.Emulate.DummyPowerManagement = gSettings.Quirks.OcKernelQuirks.DummyPowerManagement;
mOpenCoreConfiguration.Kernel.Quirks.ExtendBTFeatureFlags = gSettings.Quirks.OcKernelQuirks.ExtendBTFeatureFlags;
mOpenCoreConfiguration.Kernel.Quirks.ExternalDiskIcons = gSettings.Quirks.OcKernelQuirks.ExternalDiskIcons;
mOpenCoreConfiguration.Kernel.Quirks.IncreasePciBarSize = gSettings.Quirks.OcKernelQuirks.IncreasePciBarSize;
mOpenCoreConfiguration.Kernel.Quirks.LapicKernelPanic = gSettings.KernelAndKextPatches.KPKernelLapic;
@ -1602,7 +1603,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 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\n",
mOpenCoreConfiguration.Kernel.Quirks.AppleCpuPmCfgLock,
mOpenCoreConfiguration.Kernel.Quirks.AppleXcpmCfgLock,
mOpenCoreConfiguration.Kernel.Quirks.AppleXcpmExtraMsrs,
@ -1612,6 +1613,7 @@ void LOADER_ENTRY::StartLoader()
mOpenCoreConfiguration.Kernel.Quirks.DisableLinkeditJettison,
mOpenCoreConfiguration.Kernel.Quirks.DisableRtcChecksum,
mOpenCoreConfiguration.Kernel.Emulate.DummyPowerManagement,
mOpenCoreConfiguration.Kernel.Quirks.ExtendBTFeatureFlags,
mOpenCoreConfiguration.Kernel.Quirks.ExternalDiskIcons,
mOpenCoreConfiguration.Kernel.Quirks.IncreasePciBarSize,
mOpenCoreConfiguration.Kernel.Quirks.LapicKernelPanic,