mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-10 09:40:53 +01:00
Implement possibility to drop tables for any OS
This commit is contained in:
parent
e37d782aad
commit
d7a38dce3e
@ -74,6 +74,12 @@
|
||||
<key>Signature</key>
|
||||
<string>SSDT</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Signature</key>
|
||||
<string>BGRT</string>
|
||||
<key>DropForAllOS</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>FixHeaders</key>
|
||||
<true/>
|
||||
|
@ -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
|
||||
//
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user