diff --git a/CloverPackage/CloverV2/EFI/CLOVER/config-sample.plist b/CloverPackage/CloverV2/EFI/CLOVER/config-sample.plist index 104840ddb..eaf48269e 100644 --- a/CloverPackage/CloverV2/EFI/CLOVER/config-sample.plist +++ b/CloverPackage/CloverV2/EFI/CLOVER/config-sample.plist @@ -74,6 +74,12 @@ Signature SSDT + + Signature + BGRT + DropForAllOS + + FixHeaders diff --git a/rEFIt_UEFI/Platform/AcpiPatcher.cpp b/rEFIt_UEFI/Platform/AcpiPatcher.cpp index 5894bd141..bd96bf873 100644 --- a/rEFIt_UEFI/Platform/AcpiPatcher.cpp +++ b/rEFIt_UEFI/Platform/AcpiPatcher.cpp @@ -2524,6 +2524,19 @@ EFI_STATUS PatchACPI_OtherOS(CONST CHAR16* OsSubdir, BOOLEAN DropSSDT) DropTableFromRSDT(EFI_ACPI_4_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE, 0, 0); } */ + if (gSettings.ACPIDropTables) { + ACPI_DROP_TABLE *DropTable; + DbgHeader("ACPIDropTables"); + for (DropTable = gSettings.ACPIDropTables; DropTable; DropTable = DropTable->Next) { + // only for tables that have OtherOS true + if (DropTable->OtherOS && DropTable->MenuItem.BValue) { + //DBG("Attempting to drop \"%4.4a\" (%8.8X) \"%8.8a\" (%16.16lX) L=%d\n", &(DropTable->Signature), DropTable->Signature, &(DropTable->TableId), DropTable->TableId, DropTable->Length); + DropTableFromXSDT(DropTable->Signature, DropTable->TableId, DropTable->Length); + DropTableFromRSDT(DropTable->Signature, DropTable->TableId, DropTable->Length); + } + } + } + // // find and inject other ACPI tables // diff --git a/rEFIt_UEFI/Platform/Settings.cpp b/rEFIt_UEFI/Platform/Settings.cpp index f924aa467..f95a6f758 100644 --- a/rEFIt_UEFI/Platform/Settings.cpp +++ b/rEFIt_UEFI/Platform/Settings.cpp @@ -5109,6 +5109,7 @@ GetUserSettings( UINT32 Signature = 0; UINT32 TabLength = 0; UINT64 TableId = 0; + BOOLEAN OtherOS = FALSE; if (EFI_ERROR (GetElement (Prop, i, &Dict2))) { DBG (" - [%02lld]: Drop table continue\n", i); @@ -5171,6 +5172,11 @@ GetUserSettings( TabLength = (UINT32)GetPropertyInteger (Prop2, 0); DBG (" length=%d(0x%X)", TabLength, TabLength); } + // Check if to drop for other OS as well + Prop = GetProperty (Dict2, "DropForAllOS"); + if (Prop != NULL) { + OtherOS = IsPropertyTrue (Prop); + } DBG ("\n"); //set to drop @@ -5184,6 +5190,7 @@ GetUserSettings( (!TabLength || (DropTable->Length == TabLength))) || (!Signature && (DropTable->TableId == TableId))) { DropTable->MenuItem.BValue = TRUE; + DropTable->OtherOS = OtherOS; gSettings.DropSSDT = FALSE; //if one item=true then dropAll=false by default //DBG (" true"); Dropped = TRUE; diff --git a/rEFIt_UEFI/Platform/Settings.h b/rEFIt_UEFI/Platform/Settings.h index a728ce94d..19a7098a8 100644 --- a/rEFIt_UEFI/Platform/Settings.h +++ b/rEFIt_UEFI/Platform/Settings.h @@ -86,6 +86,7 @@ struct ACPI_DROP_TABLE UINT32 Length; UINT64 TableId; INPUT_ITEM MenuItem; + BOOLEAN OtherOS; }; typedef struct CUSTOM_LOADER_ENTRY CUSTOM_LOADER_ENTRY;