From 76b59df43ccc0391718e57850cf247bb8df2dfb4 Mon Sep 17 00:00:00 2001 From: vit9696 Date: Mon, 2 Jan 2023 20:53:31 +0300 Subject: [PATCH] OcAcpiLib: Improve debug logging when applying ACPI patches closes acidanthera/bugtracker#2140 --- Changelog.md | 3 +++ Library/OcAcpiLib/OcAcpiLib.c | 2 -- Library/OcMainLib/OpenCoreAcpi.c | 9 +++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index e7b08860..5e9156f0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ OpenCore Changelog ================== +#### v0.8.9 +- Improved debug logging when applying ACPI patches + #### v0.8.8 - Updated underlying EDK II package to edk2-stable202211 - Updated AppleKeyboardLayouts.txt from macOS 13.1 diff --git a/Library/OcAcpiLib/OcAcpiLib.c b/Library/OcAcpiLib/OcAcpiLib.c index 5e795caf..d4b2d241 100644 --- a/Library/OcAcpiLib/OcAcpiLib.c +++ b/Library/OcAcpiLib/OcAcpiLib.c @@ -1255,8 +1255,6 @@ AcpiApplyPatch ( UINT32 ReplaceLimit; UINT32 TablePrintSignature; - DEBUG ((DEBUG_INFO, "OCA: Applying %u byte ACPI patch skip %u, count %u\n", Patch->Size, Patch->Skip, Patch->Count)); - if ( (Context->Dsdt != NULL) && ((Patch->TableSignature == 0) || (Patch->TableSignature == EFI_ACPI_6_2_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE)) && ((Patch->TableLength == 0) || (Context->Dsdt->Length == Patch->TableLength)) diff --git a/Library/OcMainLib/OpenCoreAcpi.c b/Library/OcMainLib/OpenCoreAcpi.c index cb2c3097..769006ce 100644 --- a/Library/OcMainLib/OpenCoreAcpi.c +++ b/Library/OcMainLib/OpenCoreAcpi.c @@ -188,6 +188,15 @@ OcAcpiPatchTables ( Patch.TableLength = UserPatch->TableLength; CopyMem (&Patch.OemTableId, UserPatch->OemTableId, sizeof (UserPatch->OemTableId)); + DEBUG (( + DEBUG_INFO, + "OC: Applying %u byte ACPI patch patch at %u, skip %u, count %u\n", + Patch.Size, + (UINT32)Index, + Patch.Skip, + Patch.Count + )); + Status = AcpiApplyPatch (Context, &Patch); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_WARN, "OC: ACPI patcher failed %u - %r\n", Index, Status));