mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-02-02 22:51:28 +01:00
Remove OcBooter, just call it Quirks.
This commit is contained in:
parent
887136a381
commit
1476a8662b
@ -2900,66 +2900,64 @@ GetEarlyUserSettings (
|
||||
}
|
||||
}
|
||||
|
||||
const TagDict* DictPointer = CfgDict->dictPropertyForKey("OcBooter");
|
||||
if (DictPointer != NULL) {
|
||||
const TagDict* OcQuirksDict = DictPointer->dictPropertyForKey("Quirks");
|
||||
if (OcQuirksDict != NULL) {
|
||||
const TagStruct* Prop;
|
||||
Prop = OcQuirksDict->propertyForKey( "AvoidRuntimeDefrag");
|
||||
gSettings.ocBooterQuirks.AvoidRuntimeDefrag = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.AvoidRuntimeDefrag? QUIRK_DEFRAG:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "DevirtualiseMmio");
|
||||
gSettings.ocBooterQuirks.DevirtualiseMmio = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.DevirtualiseMmio? QUIRK_MMIO:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "DisableSingleUser");
|
||||
gSettings.ocBooterQuirks.DisableSingleUser = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.DisableSingleUser? QUIRK_SU:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "DisableVariableWrite");
|
||||
gSettings.ocBooterQuirks.DisableVariableWrite = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.DisableVariableWrite? QUIRK_VAR:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "DiscardHibernateMap");
|
||||
gSettings.ocBooterQuirks.DiscardHibernateMap = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.DiscardHibernateMap? QUIRK_HIBER:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "EnableSafeModeSlide");
|
||||
gSettings.ocBooterQuirks.EnableSafeModeSlide = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.EnableSafeModeSlide? QUIRK_SAFE:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "EnableWriteUnprotector");
|
||||
gSettings.ocBooterQuirks.EnableWriteUnprotector = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.EnableWriteUnprotector? QUIRK_UNPROT:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ForceExitBootServices");
|
||||
gSettings.ocBooterQuirks.ForceExitBootServices = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.ForceExitBootServices? QUIRK_EXIT:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ProtectMemoryRegions");
|
||||
gSettings.ocBooterQuirks.ProtectMemoryRegions = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.ProtectMemoryRegions? QUIRK_REGION:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ProtectSecureBoot");
|
||||
gSettings.ocBooterQuirks.ProtectSecureBoot = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.ProtectMemoryRegions? QUIRK_SECURE:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ProtectUefiServices");
|
||||
gSettings.ocBooterQuirks.ProtectUefiServices = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.ProtectUefiServices? QUIRK_UEFI:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ProvideConsoleGopEnable");
|
||||
gProvideConsoleGopEnable = IsPropertyNotNullAndTrue(Prop);
|
||||
Prop = OcQuirksDict->propertyForKey( "ProvideCustomSlide");
|
||||
gSettings.ocBooterQuirks.ProvideCustomSlide = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.ProvideCustomSlide? QUIRK_CUSTOM:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ProvideMaxSlide");
|
||||
gSettings.ocBooterQuirks.ProvideMaxSlide = GetPropertyAsInteger(Prop, 0);
|
||||
Prop = OcQuirksDict->propertyForKey( "RebuildAppleMemoryMap");
|
||||
gSettings.ocBooterQuirks.RebuildAppleMemoryMap = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.RebuildAppleMemoryMap? QUIRK_MAP:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "SetupVirtualMap");
|
||||
gSettings.ocBooterQuirks.SetupVirtualMap = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.SetupVirtualMap? QUIRK_VIRT:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "SignalAppleOS");
|
||||
gSettings.ocBooterQuirks.SignalAppleOS = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.SignalAppleOS? QUIRK_OS:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "SyncRuntimePermissions");
|
||||
gSettings.ocBooterQuirks.SyncRuntimePermissions = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.SyncRuntimePermissions? QUIRK_PERM:0;
|
||||
}
|
||||
const TagDict* OcQuirksDict = CfgDict->dictPropertyForKey("Quirks");
|
||||
if (OcQuirksDict != NULL) {
|
||||
const TagStruct* Prop;
|
||||
Prop = OcQuirksDict->propertyForKey("AvoidRuntimeDefrag");
|
||||
gSettings.ocBooterQuirks.AvoidRuntimeDefrag = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.AvoidRuntimeDefrag? QUIRK_DEFRAG:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "DevirtualiseMmio");
|
||||
gSettings.ocBooterQuirks.DevirtualiseMmio = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.DevirtualiseMmio? QUIRK_MMIO:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "DisableSingleUser");
|
||||
gSettings.ocBooterQuirks.DisableSingleUser = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.DisableSingleUser? QUIRK_SU:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "DisableVariableWrite");
|
||||
gSettings.ocBooterQuirks.DisableVariableWrite = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.DisableVariableWrite? QUIRK_VAR:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "DiscardHibernateMap");
|
||||
gSettings.ocBooterQuirks.DiscardHibernateMap = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.DiscardHibernateMap? QUIRK_HIBER:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "EnableSafeModeSlide");
|
||||
gSettings.ocBooterQuirks.EnableSafeModeSlide = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.EnableSafeModeSlide? QUIRK_SAFE:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "EnableWriteUnprotector");
|
||||
gSettings.ocBooterQuirks.EnableWriteUnprotector = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.EnableWriteUnprotector? QUIRK_UNPROT:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ForceExitBootServices");
|
||||
gSettings.ocBooterQuirks.ForceExitBootServices = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.ForceExitBootServices? QUIRK_EXIT:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ProtectMemoryRegions");
|
||||
gSettings.ocBooterQuirks.ProtectMemoryRegions = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.ProtectMemoryRegions? QUIRK_REGION:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ProtectSecureBoot");
|
||||
gSettings.ocBooterQuirks.ProtectSecureBoot = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.ProtectMemoryRegions? QUIRK_SECURE:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ProtectUefiServices");
|
||||
gSettings.ocBooterQuirks.ProtectUefiServices = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.ProtectUefiServices? QUIRK_UEFI:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ProvideConsoleGopEnable");
|
||||
gProvideConsoleGopEnable = IsPropertyNotNullAndTrue(Prop);
|
||||
Prop = OcQuirksDict->propertyForKey( "ProvideCustomSlide");
|
||||
gSettings.ocBooterQuirks.ProvideCustomSlide = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.ProvideCustomSlide? QUIRK_CUSTOM:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ProvideMaxSlide");
|
||||
gSettings.ocBooterQuirks.ProvideMaxSlide = GetPropertyAsInteger(Prop, 0);
|
||||
Prop = OcQuirksDict->propertyForKey( "RebuildAppleMemoryMap");
|
||||
gSettings.ocBooterQuirks.RebuildAppleMemoryMap = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.RebuildAppleMemoryMap? QUIRK_MAP:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "SetupVirtualMap");
|
||||
gSettings.ocBooterQuirks.SetupVirtualMap = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.SetupVirtualMap? QUIRK_VIRT:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "SignalAppleOS");
|
||||
gSettings.ocBooterQuirks.SignalAppleOS = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.SignalAppleOS? QUIRK_OS:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "SyncRuntimePermissions");
|
||||
gSettings.ocBooterQuirks.SyncRuntimePermissions = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.SyncRuntimePermissions? QUIRK_PERM:0;
|
||||
gSettings.mmioWhiteListArray.setEmpty();
|
||||
const TagArray* Dict2 = DictPointer->arrayPropertyForKey("MmioWhitelist"); // array of dict
|
||||
|
||||
const TagArray* Dict2 = OcQuirksDict->arrayPropertyForKey("MmioWhitelist"); // array of dict
|
||||
if (Dict2 != NULL) {
|
||||
INTN Count = Dict2->arrayContent().size();
|
||||
//OC_SCHEMA_INTEGER_IN ("Address", OC_MMIO_WL_STRUCT, Address),
|
||||
|
Loading…
Reference in New Issue
Block a user