mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
ResizeAppleGpuBars.
This commit is contained in:
parent
e036b3d54b
commit
c26dec1e78
@ -2102,6 +2102,7 @@ printf("%s", "");
|
||||
XBool SetupVirtualMap = false;
|
||||
XBool SignalAppleOS = false;
|
||||
XBool SyncRuntimePermissions = false;
|
||||
uint8_t ResizeAppleGpuBars = 0; // 0 is NOT the default value if not set in config.plist. Default value if not set is returned by dgetResizeAppleGpuBars()
|
||||
|
||||
#if __cplusplus > 201703L
|
||||
XBool operator == (const OcBooterQuirksClass&) const = default;
|
||||
@ -2125,6 +2126,7 @@ printf("%s", "");
|
||||
if ( !(SetupVirtualMap == other.SetupVirtualMap) ) return false;
|
||||
if ( !(SignalAppleOS == other.SignalAppleOS) ) return false;
|
||||
if ( !(SyncRuntimePermissions == other.SyncRuntimePermissions) ) return false;
|
||||
if ( !(ResizeAppleGpuBars == other.ResizeAppleGpuBars) ) return false;
|
||||
return true;
|
||||
}
|
||||
void takeValueFrom(const ConfigPlistClass::Quirks_Class::OcBooterQuirks_Class& other)
|
||||
@ -2146,6 +2148,7 @@ printf("%s", "");
|
||||
SetupVirtualMap = other.dgetSetupVirtualMap();
|
||||
SignalAppleOS = other.dgetSignalAppleOS();
|
||||
SyncRuntimePermissions = other.dgetSyncRuntimePermissions();
|
||||
ResizeAppleGpuBars = other.dgetResizeAppleGpuBars();
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
|
||||
|
||||
|
||||
// This is to mimic what's in settings. This is NOT a plist dict section. It is just cosmetic. TODO: remove that OC coupling in SETTINGS_DATA.
|
||||
// This is to mimic what's in settings. This is NOT a plist dict section. It is just cosmetic.
|
||||
class OcKernelQuirks_Class {
|
||||
//const Quirks_Class& parent;
|
||||
public:
|
||||
@ -80,7 +80,7 @@ public:
|
||||
OcKernelQuirks_Class(const Quirks_Class& _parent) /*: parent(_parent)*/ {}
|
||||
};
|
||||
|
||||
// This is to mimic what's in settings. This is NOT a plist dict section. It is just cosmetic. TODO: remove that OC coupling in SETTINGS_DATA.
|
||||
// This is to mimic what's in settings. This is NOT a plist dict section. It is just cosmetic.
|
||||
class OcBooterQuirks_Class {
|
||||
const Quirks_Class& parent;
|
||||
public:
|
||||
@ -101,6 +101,7 @@ public:
|
||||
XmlBool SetupVirtualMap = XmlBool();
|
||||
XmlBool SignalAppleOS = XmlBool();
|
||||
XmlBool SyncRuntimePermissions = XmlBool();
|
||||
XmlInt8 ResizeAppleGpuBars = XmlInt8();
|
||||
|
||||
XBool dgetAvoidRuntimeDefrag() const { return parent.isDefined() ? AvoidRuntimeDefrag.isDefined() ? AvoidRuntimeDefrag.value() : XBool(true) : XBool(false); }; // TODO: different default value if section is not defined
|
||||
XBool dgetDevirtualiseMmio() const { return DevirtualiseMmio.isDefined() ? DevirtualiseMmio.value() : DevirtualiseMmio.nullValue; };
|
||||
@ -119,6 +120,7 @@ public:
|
||||
XBool dgetSetupVirtualMap() const { return parent.isDefined() ? SetupVirtualMap.isDefined() ? SetupVirtualMap.value() : XBool(true) : SetupVirtualMap.nullValue; }; // TODO: different default value if section is not defined
|
||||
XBool dgetSignalAppleOS() const { return SignalAppleOS.isDefined() ? SignalAppleOS.value() : SignalAppleOS.nullValue; };
|
||||
XBool dgetSyncRuntimePermissions() const { return parent.isDefined() ? SyncRuntimePermissions.isDefined() ? SyncRuntimePermissions.value() : XBool(true) : XBool(false); }; // TODO: different default value if section is not defined
|
||||
uint8_t dgetResizeAppleGpuBars() const { return parent.isDefined() && ResizeAppleGpuBars.isDefined() ? ResizeAppleGpuBars.value() : -1; };
|
||||
|
||||
OcBooterQuirks_Class(const Quirks_Class& _parent) : parent(_parent) {}
|
||||
};
|
||||
@ -131,7 +133,7 @@ public:
|
||||
OcKernelQuirks_Class OcKernelQuirks;
|
||||
OcBooterQuirks_Class OcBooterQuirks;
|
||||
|
||||
XmlDictField m_fields[31] = {
|
||||
XmlDictField m_fields[32] = {
|
||||
{"AvoidRuntimeDefrag", OcBooterQuirks.AvoidRuntimeDefrag},
|
||||
{"DevirtualiseMmio", OcBooterQuirks.DevirtualiseMmio},
|
||||
{"DisableSingleUser", OcBooterQuirks.DisableSingleUser},
|
||||
@ -149,6 +151,7 @@ public:
|
||||
{"SetupVirtualMap", OcBooterQuirks.SetupVirtualMap},
|
||||
{"SignalAppleOS", OcBooterQuirks.SignalAppleOS},
|
||||
{"SyncRuntimePermissions", OcBooterQuirks.SyncRuntimePermissions},
|
||||
{"ResizeAppleGpuBars", OcBooterQuirks.ResizeAppleGpuBars},
|
||||
{"MmioWhitelist", MmioWhitelist},
|
||||
{"FuzzyMatch", FuzzyMatch},
|
||||
{"KernelCache", KernelCache},
|
||||
|
@ -517,14 +517,14 @@ public:
|
||||
}
|
||||
if ( BiosReleaseDate.isDefined() ) {
|
||||
int compareReleaseDateResult = compareReleaseDate(GetReleaseDate(getModel()), BiosReleaseDate.value());
|
||||
if ( compareReleaseDateResult == 1 ) {
|
||||
xmlLiteParser->addWarning(generateErrors, S8Printf("BiosReleaseDate '%s' is older than default ('%s') -> ignored. Dict '%s:%d'.", BiosReleaseDate.value().c_str(), GetReleaseDate(getModel()).c_str(), xmlPath.c_str(), keyPos.getLine())); // Do not set b to false : we don't want to invalidate the whole dict
|
||||
BiosReleaseDate.reset();
|
||||
}else
|
||||
if ( compareReleaseDateResult == 0 ) {
|
||||
// This is just 'info'. It's useless but fine to define the same as default.
|
||||
xmlLiteParser->addInfo(generateErrors, S8Printf("BiosReleaseDate '%s' is the same as default. Dict '%s:%d'.", BiosReleaseDate.value().c_str(), xmlPath.c_str(), keyPos.getLine())); // Do not set b to false : we don't want to invalidate the whole dict
|
||||
BiosReleaseDate.reset();
|
||||
}else
|
||||
if ( compareReleaseDateResult == 1 ) {
|
||||
xmlLiteParser->addWarning(generateErrors, S8Printf("BiosReleaseDate '%s' is older than default ('%s') -> ignored. Dict '%s:%d'.", BiosReleaseDate.value().c_str(), GetReleaseDate(getModel()).c_str(), xmlPath.c_str(), keyPos.getLine())); // Do not set b to false : we don't want to invalidate the whole dict
|
||||
BiosReleaseDate.reset();
|
||||
}
|
||||
}
|
||||
if ( EfiVersion.isDefined() ) {
|
||||
@ -533,6 +533,7 @@ public:
|
||||
EfiVersion.reset();
|
||||
} else if (AsciiStrVersionToUint64(ApplePlatformDataArray[dgetModel()].efiversion, 4, 5) == AsciiStrVersionToUint64(EfiVersion.value(), 4, 5)) {
|
||||
xmlLiteParser->addInfo(generateErrors, S8Printf("EfiVersion '%s' is the same as default. Dict '%s:%d'.", EfiVersion.value().c_str(), xmlPath.c_str(), keyPos.getLine())); // Do not set b to false : we don't want to invalidate the whole dict
|
||||
EfiVersion.reset();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
|
@ -1019,6 +1019,7 @@ void LOADER_ENTRY::StartLoader()
|
||||
mOpenCoreConfiguration.Booter.Quirks.SetupVirtualMap = gSettings.Quirks.OcBooterQuirks.SetupVirtualMap;
|
||||
mOpenCoreConfiguration.Booter.Quirks.SignalAppleOS = gSettings.Quirks.OcBooterQuirks.SignalAppleOS;
|
||||
mOpenCoreConfiguration.Booter.Quirks.SyncRuntimePermissions = gSettings.Quirks.OcBooterQuirks.SyncRuntimePermissions;
|
||||
mOpenCoreConfiguration.Booter.Quirks.ResizeAppleGpuBars = gSettings.Quirks.OcBooterQuirks.ResizeAppleGpuBars;
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user