From 707007e317dac64baef7d52a702f08f26d78d596 Mon Sep 17 00:00:00 2001 From: vit9696 Date: Thu, 2 Apr 2020 15:45:30 +0300 Subject: [PATCH] OcAppleBootCompatLib: Improve debug logging --- Library/OcAppleBootCompatLib/ServiceOverrides.c | 16 ++++++++++++++-- Platform/OpenCore/OpenCoreMisc.c | 2 ++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Library/OcAppleBootCompatLib/ServiceOverrides.c b/Library/OcAppleBootCompatLib/ServiceOverrides.c index ba955fae..22d05c3f 100644 --- a/Library/OcAppleBootCompatLib/ServiceOverrides.c +++ b/Library/OcAppleBootCompatLib/ServiceOverrides.c @@ -765,9 +765,21 @@ SetGetVariableHookHandler ( (VOID **) &FwRuntime ); - if (!EFI_ERROR (Status) && FwRuntime->Revision == OC_FIRMWARE_RUNTIME_REVISION) { - Status = FwRuntime->OnGetVariable (OcGetVariable, &BootCompat->ServicePtrs.GetVariable); + if (!EFI_ERROR (Status)) { + if (FwRuntime->Revision == OC_FIRMWARE_RUNTIME_REVISION) { + DEBUG ((DEBUG_INFO, "OCABC: Got rendezvous with OpenRuntime r%u\n", OC_FIRMWARE_RUNTIME_REVISION)); + Status = FwRuntime->OnGetVariable (OcGetVariable, &BootCompat->ServicePtrs.GetVariable); + } else { + DEBUG (( + DEBUG_ERROR, + "OCABC: Incompatible OpenRuntime r%u, require r%u\n", + (UINT32) FwRuntime->Revision, + (UINT32) OC_FIRMWARE_RUNTIME_REVISION + )); + CpuDeadLoop (); + } } else { + DEBUG ((DEBUG_INFO, "OCABC: Awaiting rendezvous with OpenRuntime r%u\n", OC_FIRMWARE_RUNTIME_REVISION)); Status = EFI_UNSUPPORTED; } diff --git a/Platform/OpenCore/OpenCoreMisc.c b/Platform/OpenCore/OpenCoreMisc.c index 145610e4..730180e7 100644 --- a/Platform/OpenCore/OpenCoreMisc.c +++ b/Platform/OpenCore/OpenCoreMisc.c @@ -645,6 +645,8 @@ OcMiscBoot ( Context->HideAuxiliary = Config->Misc.Boot.HideAuxiliary; Context->PickerAudioAssist = Config->Misc.Boot.PickerAudioAssist; + DEBUG ((DEBUG_INFO, "OC: Ready for takeoff in %u us\n", (UINT32) Context->TakeoffDelay)); + OcLoadPickerHotKeys (Context); Context->ShowNvramReset = Config->Misc.Security.AllowNvramReset;