Skip to content

Commit

Permalink
OcAcpiLib: Improve debug logging when applying ACPI patches
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed Jan 2, 2023
1 parent eb1347c commit 76b59df
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions Library/OcAcpiLib/OcAcpiLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
9 changes: 9 additions & 0 deletions Library/OcMainLib/OpenCoreAcpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 76b59df

Please sign in to comment.