From 4c995bb1ba8f73d4eca511589e73c860ac43395e Mon Sep 17 00:00:00 2001 From: PMheart <17109513+PMheart@users.noreply.github.com> Date: Wed, 2 Mar 2022 13:04:20 +0100 Subject: [PATCH] OcDebugLogLib: Split into OcLogAggregatorLib and OcDebugLibProtocol (#325) --- Docs/Configuration.tex | 4 +- Include/Acidanthera/Library/OcDebugLogLib.h | 77 +-------------- .../Acidanthera/Library/OcLogAggregatorLib.h | 97 +++++++++++++++++++ .../OcAfterBootCompatLib/ServiceOverrides.c | 3 +- .../OcDebugLibNull.c} | 2 +- .../OcDebugLibNull.inf} | 4 +- .../DebugHelp.c | 2 +- .../DebugPrint.c | 0 .../OcDebugLibProtocol.c} | 29 +++++- .../OcDebugLibProtocol/OcDebugLibProtocol.inf | 63 ++++++++++++ Library/OcDebugSerialLib/OcDebugSerialLib.c | 22 ++--- .../OcAppleLog.c | 0 .../OcLog.c | 0 .../OcLogAggregatorLib.inf} | 11 +-- .../OcLogInternal.h | 0 Library/OcMainLib/OcMainLib.inf | 1 + Library/OcMainLib/OpenCoreMisc.c | 1 + Library/OcMainLib/OpenCoreUefi.c | 1 + OpenCorePkg.dec | 5 +- OpenCorePkg.dsc | 8 +- OpenDuetPkg.dsc | 2 +- Utilities/TestBmf/Makefile | 2 +- 22 files changed, 222 insertions(+), 112 deletions(-) create mode 100644 Include/Acidanthera/Library/OcLogAggregatorLib.h rename Library/{OcDebugNullLib/OcDebugNullLib.c => OcDebugLibNull/OcDebugLibNull.c} (99%) rename Library/{OcDebugNullLib/OcDebugNullLib.inf => OcDebugLibNull/OcDebugLibNull.inf} (93%) rename Library/{OcDebugLogLib => OcDebugLibProtocol}/DebugHelp.c (98%) rename Library/{OcDebugLogLib => OcDebugLibProtocol}/DebugPrint.c (100%) rename Library/{OcDebugLogLib/OcDebugLogLib.c => OcDebugLibProtocol/OcDebugLibProtocol.c} (95%) create mode 100644 Library/OcDebugLibProtocol/OcDebugLibProtocol.inf rename Library/{OcDebugLogLib => OcLogAggregatorLib}/OcAppleLog.c (100%) rename Library/{OcDebugLogLib => OcLogAggregatorLib}/OcLog.c (100%) mode change 100755 => 100644 rename Library/{OcDebugLogLib/OcDebugLogLib.inf => OcLogAggregatorLib/OcLogAggregatorLib.inf} (91%) rename Library/{OcDebugLogLib => OcLogAggregatorLib}/OcLogInternal.h (100%) mode change 100755 => 100644 diff --git a/Docs/Configuration.tex b/Docs/Configuration.tex index ee2cf409..46629e9f 100755 --- a/Docs/Configuration.tex +++ b/Docs/Configuration.tex @@ -3843,7 +3843,7 @@ nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:boot-log | \textbf{Libraries}: \begin{itemize} \tightlist - \item \texttt{AAPL} --- OcDebugLogLib, Apple EfiBoot logging + \item \texttt{AAPL} --- OcLogAggregatorLib, Apple EfiBoot logging \item \texttt{OCABC} --- OcAfterBootCompatLib \item \texttt{OCAE} --- OcAppleEventLib \item \texttt{OCAK} --- OcAppleKernelLib @@ -3867,7 +3867,7 @@ nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:boot-log | \item \texttt{OCII} --- OcInputLib \item \texttt{OCJS} --- OcApfsLib \item \texttt{OCKM} --- OcAppleKeyMapLib - \item \texttt{OCL} --- OcDebugLogLib + \item \texttt{OCL} --- OcLogAggregatorLib \item \texttt{OCM} --- OcMiscLib \item \texttt{OCMCO} --- OcMachoLib \item \texttt{OCME} --- OcHeciLib diff --git a/Include/Acidanthera/Library/OcDebugLogLib.h b/Include/Acidanthera/Library/OcDebugLogLib.h index 9698aa9d..2fdb0492 100644 --- a/Include/Acidanthera/Library/OcDebugLogLib.h +++ b/Include/Acidanthera/Library/OcDebugLogLib.h @@ -51,81 +51,6 @@ #error "Define target macro: OC_TARGET_!" #endif -/** - Install or update the OcLog protocol with specified options. - - @param[in] Options Logging options. - @param[in] DisplayDelay Delay in microseconds after each log entry. - @param[in] DisplayLevel Console visible error level. - @param[in] HaltLevel Error level causing CPU halt. - @param[in] LogPrefixPath Log path (without timestamp). - @param[in] LogFileSystem Log filesystem, optional. - - Note: If LogFileSystem is specified, and it is not writable, then - the first writable file system is chosen. - - @retval EFI_SUCCESS The entry point is executed successfully. -**/ -EFI_STATUS -OcConfigureLogProtocol ( - IN OC_LOG_OPTIONS Options, - IN CONST CHAR8 *LogModules, - IN UINT32 DisplayDelay, - IN UINTN DisplayLevel, - IN UINTN HaltLevel, - IN CONST CHAR16 *LogPrefixPath OPTIONAL, - IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *LogFileSystem OPTIONAL - ); - -/** - Install and initialise the Apple Debug Log protocol. - - @param[in] Reinstall Replace any installed protocol. - - @returns Installed or located protocol. - @retval NULL There was an error locating or installing the protocol. -**/ -APPLE_DEBUG_LOG_PROTOCOL * -OcAppleDebugLogInstallProtocol ( - IN BOOLEAN Reinstall - ); - -/** - Configure Apple Debug Log protocol. - - @param[in] Enable Enable logging to OcLog. -**/ -VOID -OcAppleDebugLogConfigure ( - IN BOOLEAN Enable - ); - -/** - Configure Apple performance log location. - - @param[in,out] PerfBuffer Performance buffer location. - @param[in] PerfBufferSize Performance buffer size. -**/ -VOID -OcAppleDebugLogPerfAllocated ( - IN OUT VOID *PerfBuffer, - IN UINTN PerfBufferSize - ); - -/** - Prints via gST->ConOut without any pool allocations. - Otherwise equivalent to Print. - Note: EFIAPI must be present for VA_ARGS forwarding (causes bugs with gcc). - - @param[in] Format Formatted string. -**/ -VOID -EFIAPI -OcPrintScreen ( - IN CONST CHAR16 *Format, - ... - ); - /** Dummy function that debuggers may break on. **/ @@ -141,7 +66,7 @@ DebugBreak ( **/ VOID WaitForKeyPress ( - CONST CHAR16 *Message + IN CONST CHAR16 *Message ); /** diff --git a/Include/Acidanthera/Library/OcLogAggregatorLib.h b/Include/Acidanthera/Library/OcLogAggregatorLib.h new file mode 100644 index 00000000..535dcd8e --- /dev/null +++ b/Include/Acidanthera/Library/OcLogAggregatorLib.h @@ -0,0 +1,97 @@ +/** @file + Copyright (C) 2019, vit9696. All rights reserved. + + All rights reserved. + + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +**/ + +#ifndef OC_LOG_AGGREGATOR_LIB_H +#define OC_LOG_AGGREGATOR_LIB_H + +#include +#include +#include + +/** + Install or update the OcLog protocol with specified options. + + @param[in] Options Logging options. + @param[in] DisplayDelay Delay in microseconds after each log entry. + @param[in] DisplayLevel Console visible error level. + @param[in] HaltLevel Error level causing CPU halt. + @param[in] LogPrefixPath Log path (without timestamp). + @param[in] LogFileSystem Log filesystem, optional. + + Note: If LogFileSystem is specified, and it is not writable, then + the first writable file system is chosen. + + @retval EFI_SUCCESS The entry point is executed successfully. +**/ +EFI_STATUS +OcConfigureLogProtocol ( + IN OC_LOG_OPTIONS Options, + IN CONST CHAR8 *LogModules, + IN UINT32 DisplayDelay, + IN UINTN DisplayLevel, + IN UINTN HaltLevel, + IN CONST CHAR16 *LogPrefixPath OPTIONAL, + IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *LogFileSystem OPTIONAL + ); + +/** + Install and initialise the Apple Debug Log protocol. + + @param[in] Reinstall Replace any installed protocol. + + @returns Installed or located protocol. + @retval NULL There was an error locating or installing the protocol. +**/ +APPLE_DEBUG_LOG_PROTOCOL * +OcAppleDebugLogInstallProtocol ( + IN BOOLEAN Reinstall + ); + +/** + Configure Apple Debug Log protocol. + + @param[in] Enable Enable logging to OcLog. +**/ +VOID +OcAppleDebugLogConfigure ( + IN BOOLEAN Enable + ); + +/** + Configure Apple performance log location. + + @param[in,out] PerfBuffer Performance buffer location. + @param[in] PerfBufferSize Performance buffer size. +**/ +VOID +OcAppleDebugLogPerfAllocated ( + IN OUT VOID *PerfBuffer, + IN UINTN PerfBufferSize + ); + +/** + Prints via gST->ConOut without any pool allocations. + Otherwise equivalent to Print. + Note: EFIAPI must be present for VA_ARGS forwarding (causes bugs with gcc). + + @param[in] Format Formatted string. +**/ +VOID +EFIAPI +OcPrintScreen ( + IN CONST CHAR16 *Format, + ... + ); + +#endif // OC_LOG_AGGREGATOR_LIB_H diff --git a/Library/OcAfterBootCompatLib/ServiceOverrides.c b/Library/OcAfterBootCompatLib/ServiceOverrides.c index f9c84bea..2be8549b 100644 --- a/Library/OcAfterBootCompatLib/ServiceOverrides.c +++ b/Library/OcAfterBootCompatLib/ServiceOverrides.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -528,7 +529,7 @@ OcAllocatePages ( // Called from boot.efi. // New perf data, it can be reallocated multiple times. // - OcAppleDebugLogPerfAllocated ((VOID *)(UINTN) *Memory, EFI_PAGES_TO_SIZE (NumberOfPages)); + OcAppleDebugLogPerfAllocated ((VOID *) (UINTN) *Memory, EFI_PAGES_TO_SIZE (NumberOfPages)); } } } diff --git a/Library/OcDebugNullLib/OcDebugNullLib.c b/Library/OcDebugLibNull/OcDebugLibNull.c similarity index 99% rename from Library/OcDebugNullLib/OcDebugNullLib.c rename to Library/OcDebugLibNull/OcDebugLibNull.c index 54d04829..4eec30ae 100755 --- a/Library/OcDebugNullLib/OcDebugNullLib.c +++ b/Library/OcDebugLibNull/OcDebugLibNull.c @@ -1,5 +1,5 @@ /** @file - Null OcDebugLogLib instance. + Null OcDebugProtocolLib instance. Copyright (C) 2020, Goldfish64. All rights reserved. diff --git a/Library/OcDebugNullLib/OcDebugNullLib.inf b/Library/OcDebugLibNull/OcDebugLibNull.inf similarity index 93% rename from Library/OcDebugNullLib/OcDebugNullLib.inf rename to Library/OcDebugLibNull/OcDebugLibNull.inf index 86c044b6..3a8f2c73 100755 --- a/Library/OcDebugNullLib/OcDebugNullLib.inf +++ b/Library/OcDebugLibNull/OcDebugLibNull.inf @@ -16,7 +16,7 @@ [Defines] INF_VERSION = 0x00010005 - BASE_NAME = OcDebugNullLib + BASE_NAME = OcDebugLibNull FILE_GUID = 3D2B1682-100F-49E5-A9C3-EA3FCEA3CFA1 MODULE_TYPE = BASE VERSION_STRING = 1.0 @@ -29,4 +29,4 @@ MdePkg/MdePkg.dec [Sources] - OcDebugNullLib.c + OcDebugLibNull.c diff --git a/Library/OcDebugLogLib/DebugHelp.c b/Library/OcDebugLibProtocol/DebugHelp.c similarity index 98% rename from Library/OcDebugLogLib/DebugHelp.c rename to Library/OcDebugLibProtocol/DebugHelp.c index 91693221..3ec5a9ad 100644 --- a/Library/OcDebugLogLib/DebugHelp.c +++ b/Library/OcDebugLibProtocol/DebugHelp.c @@ -34,7 +34,7 @@ DebugBreak ( VOID WaitForKeyPress ( - CONST CHAR16 *Message + IN CONST CHAR16 *Message ) { EFI_STATUS Status; diff --git a/Library/OcDebugLogLib/DebugPrint.c b/Library/OcDebugLibProtocol/DebugPrint.c similarity index 100% rename from Library/OcDebugLogLib/DebugPrint.c rename to Library/OcDebugLibProtocol/DebugPrint.c diff --git a/Library/OcDebugLogLib/OcDebugLogLib.c b/Library/OcDebugLibProtocol/OcDebugLibProtocol.c similarity index 95% rename from Library/OcDebugLogLib/OcDebugLogLib.c rename to Library/OcDebugLibProtocol/OcDebugLibProtocol.c index be1a3883..23899eb5 100755 --- a/Library/OcDebugLogLib/OcDebugLogLib.c +++ b/Library/OcDebugLibProtocol/OcDebugLibProtocol.c @@ -25,17 +25,37 @@ #include #include -#include "OcLogInternal.h" +STATIC +OC_LOG_PROTOCOL * +InternalGetOcLog ( + VOID + ) +{ + EFI_STATUS Status; + + STATIC OC_LOG_PROTOCOL *mInternalOcLog = NULL; + + if (mInternalOcLog == NULL) { + Status = gBS->LocateProtocol ( + &gOcLogProtocolGuid, + NULL, + (VOID **) &mInternalOcLog + ); + + if (EFI_ERROR (Status) || mInternalOcLog->Revision != OC_LOG_REVISION) { + mInternalOcLog = NULL; + } + } + + return mInternalOcLog; +} /** Prints a debug message to the debug output device if the specified error level is enabled. - If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function GetDebugPrintErrorLevel (), then print the message specified by Format and the associated variable argument list to the debug output device. - If Format is NULL, then ASSERT(). - @param ErrorLevel The error level of the debug message. @param Format Format string for the debug message to print. @param ... A variable argument list whose contents are accessed @@ -69,7 +89,6 @@ DebugPrint ( VA_END (Marker); } - /** Prints an assert message containing a filename, line number, and description. This may be followed by a breakpoint or a dead loop. diff --git a/Library/OcDebugLibProtocol/OcDebugLibProtocol.inf b/Library/OcDebugLibProtocol/OcDebugLibProtocol.inf new file mode 100644 index 00000000..137fbd61 --- /dev/null +++ b/Library/OcDebugLibProtocol/OcDebugLibProtocol.inf @@ -0,0 +1,63 @@ +## @file +# +# Component description file for Debug Library using the OcLog protocol. +# +# Copyright (C) 2016, The HermitCrabs Lab. All rights reserved.
+# +# All rights reserved. +# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = OcDebugLibProtocol + FILE_GUID = 1A9C36A7-36F8-47D6-A028-A92D17127096 + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = DebugLib + +# VALID_ARCHITECTURES = IA32 X64 IPF EBC + +[Packages] + OpenCorePkg/OpenCorePkg.dec + MdePkg/MdePkg.dec + UefiCpuPkg/UefiCpuPkg.dec + +[Guids] + gEfiMiscSubClassGuid + gOcVendorVariableGuid + gApplePlatformProducerNameGuid + +[Protocols] + gOcLogProtocolGuid + gAppleDebugLogProtocolGuid + +[LibraryClasses] + BaseLib + BaseMemoryLib + DebugPrintErrorLevelLib + DevicePathLib + MemoryAllocationLib + OcCpuLib + OcDataHubLib + OcFlexArrayLib + SerialPortLib + UefiRuntimeServicesTableLib + +[Pcd] + gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask + gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel + +[Sources] + DebugHelp.c + DebugPrint.c + OcDebugLibProtocol.c diff --git a/Library/OcDebugSerialLib/OcDebugSerialLib.c b/Library/OcDebugSerialLib/OcDebugSerialLib.c index 571ad1e7..c9628fd1 100755 --- a/Library/OcDebugSerialLib/OcDebugSerialLib.c +++ b/Library/OcDebugSerialLib/OcDebugSerialLib.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -132,7 +132,7 @@ DebugPrintMarker ( // // Send the print string to a Serial Port // - SerialPortWrite ((UINT8 *)Buffer, AsciiStrLen (Buffer)); + SerialPortWrite ((UINT8 *) Buffer, AsciiStrLen (Buffer)); } @@ -233,14 +233,14 @@ DebugAssert ( // // Send the print string to the Console Output device // - SerialPortWrite ((UINT8 *)Buffer, AsciiStrLen (Buffer)); + SerialPortWrite ((UINT8 *) Buffer, AsciiStrLen (Buffer)); // // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings // - if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { + if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { CpuBreakpoint (); - } else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { + } else if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { CpuDeadLoop (); } } @@ -275,7 +275,7 @@ DebugClearMemory ( // // SetMem() checks for the the ASSERT() condition on Length and returns Buffer // - return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue)); + return SetMem (Buffer, Length, PcdGet8 (PcdDebugClearMemoryValue)); } @@ -295,7 +295,7 @@ DebugAssertEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0); + return (BOOLEAN) ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0); } @@ -315,7 +315,7 @@ DebugPrintEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0); + return (BOOLEAN) ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0); } @@ -335,7 +335,7 @@ DebugCodeEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0); + return (BOOLEAN) ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0); } @@ -355,7 +355,7 @@ DebugClearMemoryEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0); + return (BOOLEAN) ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0); } @@ -374,7 +374,7 @@ DebugPrintLevelEnabled ( IN CONST UINTN ErrorLevel ) { - return (BOOLEAN) ((ErrorLevel & PcdGet32(PcdFixedDebugPrintErrorLevel)) != 0); + return (BOOLEAN) ((ErrorLevel & PcdGet32 (PcdFixedDebugPrintErrorLevel)) != 0); } /** diff --git a/Library/OcDebugLogLib/OcAppleLog.c b/Library/OcLogAggregatorLib/OcAppleLog.c similarity index 100% rename from Library/OcDebugLogLib/OcAppleLog.c rename to Library/OcLogAggregatorLib/OcAppleLog.c diff --git a/Library/OcDebugLogLib/OcLog.c b/Library/OcLogAggregatorLib/OcLog.c old mode 100755 new mode 100644 similarity index 100% rename from Library/OcDebugLogLib/OcLog.c rename to Library/OcLogAggregatorLib/OcLog.c diff --git a/Library/OcDebugLogLib/OcDebugLogLib.inf b/Library/OcLogAggregatorLib/OcLogAggregatorLib.inf similarity index 91% rename from Library/OcDebugLogLib/OcDebugLogLib.inf rename to Library/OcLogAggregatorLib/OcLogAggregatorLib.inf index 13f48ca4..0af7ef6e 100755 --- a/Library/OcDebugLogLib/OcDebugLogLib.inf +++ b/Library/OcLogAggregatorLib/OcLogAggregatorLib.inf @@ -18,8 +18,8 @@ [Defines] INF_VERSION = 0x00010005 - BASE_NAME = OcDebugLogLib - FILE_GUID = 85E15002-397B-441B-AC5C-BF952B0E7331 + BASE_NAME = OcLogAggregatorLib + FILE_GUID = 2D7559C7-CB17-426A-927D-69BBCD270A9A MODULE_TYPE = BASE VERSION_STRING = 1.0 LIBRARY_CLASS = DebugLib @@ -58,9 +58,6 @@ gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel [Sources] - OcAppleLog.c - OcDebugLogLib.c - OcLog.c OcLogInternal.h - DebugPrint.c - DebugHelp.c + OcAppleLog.c + OcLog.c diff --git a/Library/OcDebugLogLib/OcLogInternal.h b/Library/OcLogAggregatorLib/OcLogInternal.h old mode 100755 new mode 100644 similarity index 100% rename from Library/OcDebugLogLib/OcLogInternal.h rename to Library/OcLogAggregatorLib/OcLogInternal.h diff --git a/Library/OcMainLib/OcMainLib.inf b/Library/OcMainLib/OcMainLib.inf index b147068c..a3a15953 100644 --- a/Library/OcMainLib/OcMainLib.inf +++ b/Library/OcMainLib/OcMainLib.inf @@ -80,6 +80,7 @@ OcFirmwareVolumeLib OcGuardLib OcHashServicesLib + OcLogAggregatorLib OcMachoLib OcMiscLib OcOSInfoLib diff --git a/Library/OcMainLib/OpenCoreMisc.c b/Library/OcMainLib/OpenCoreMisc.c index 9b32523e..c4172f65 100644 --- a/Library/OcMainLib/OpenCoreMisc.c +++ b/Library/OcMainLib/OpenCoreMisc.c @@ -31,6 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include +#include #include #include #include diff --git a/Library/OcMainLib/OpenCoreUefi.c b/Library/OcMainLib/OpenCoreUefi.c index 2838026e..fa4a5642 100644 --- a/Library/OcMainLib/OpenCoreUefi.c +++ b/Library/OcMainLib/OpenCoreUefi.c @@ -36,6 +36,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include +#include #include #include #include diff --git a/OpenCorePkg.dec b/OpenCorePkg.dec index e738d235..7e4cbda1 100755 --- a/OpenCorePkg.dec +++ b/OpenCorePkg.dec @@ -846,7 +846,7 @@ OcDataHubLib|Include/Acidanthera/Library/OcDataHubLib.h ## @libraryclass - OcDebugLogLib|Include/Acidanthera/Library/OcDebugLogLib.h + OcDebugLibProtocol|Include/Acidanthera/Library/OcDebugLogLib.h ## @libraryclass OcDeviceMiscLib|Include/Acidanthera/Library/OcDeviceMiscLib.h @@ -887,6 +887,9 @@ ## @libraryclass OcInputLib|Include/Acidanthera/Library/OcInputLib.h + ## @libraryclass + OcLogAggregatorLib|Include/Acidanthera/Library/OcLogAggregatorLib.h + ## @libraryclass OcMainLib|Include/Acidanthera/Library/OcMainLib.h diff --git a/OpenCorePkg.dsc b/OpenCorePkg.dsc index 4a2a17bb..d7e28540 100755 --- a/OpenCorePkg.dsc +++ b/OpenCorePkg.dsc @@ -37,7 +37,7 @@ BaseRngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf - DebugLib|OpenCorePkg/Library/OcDebugLogLib/OcDebugLogLib.inf + DebugLib|OpenCorePkg/Library/OcDebugLibProtocol/OcDebugLibProtocol.inf DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf @@ -93,6 +93,7 @@ OcHeciLib|OpenCorePkg/Library/OcHeciLib/OcHeciLib.inf OcHiiDatabaseLocalLib|OpenCorePkg/Library/OcHiiDatabaseLib/OcHiiDatabaseLocalLib.inf OcInputLib|OpenCorePkg/Library/OcInputLib/OcInputLib.inf + OcLogAggregatorLib|OpenCorePkg/Library/OcLogAggregatorLib/OcLogAggregatorLib.inf OcMachoLib|OpenCorePkg/Library/OcMachoLib/OcMachoLib.inf OcMacInfoLib|OpenCorePkg/Library/OcMacInfoLib/OcMacInfoLib.inf OcMainLib|OpenCorePkg/Library/OcMainLib/OcMainLib.inf @@ -222,8 +223,8 @@ OpenCorePkg/Library/OcCryptoLib/OcCryptoLib.inf OpenCorePkg/Library/OcDataHubLib/OcDataHubLib.inf OpenCorePkg/Library/OcDebugSerialLib/OcDebugSerialLib.inf - OpenCorePkg/Library/OcDebugLogLib/OcDebugLogLib.inf - OpenCorePkg/Library/OcDebugNullLib/OcDebugNullLib.inf + OpenCorePkg/Library/OcDebugLibProtocol/OcDebugLibProtocol.inf + OpenCorePkg/Library/OcDebugLibNull/OcDebugLibNull.inf OpenCorePkg/Library/OcDeviceMiscLib/OcDeviceMiscLib.inf OpenCorePkg/Library/OcDevicePathLib/OcDevicePathLib.inf OpenCorePkg/Library/OcDevicePropertyLib/OcDevicePropertyLib.inf @@ -239,6 +240,7 @@ OpenCorePkg/Library/OcHeciLib/OcHeciLib.inf OpenCorePkg/Library/OcHiiDatabaseLib/OcHiiDatabaseLocalLib.inf OpenCorePkg/Library/OcInputLib/OcInputLib.inf + OpenCorePkg/Library/OcLogAggregatorLib/OcLogAggregatorLib.inf OpenCorePkg/Library/OcMachoLib/OcMachoLib.inf OpenCorePkg/Library/OcMainLib/OcMainLib.inf OpenCorePkg/Library/OcMemoryLib/OcMemoryLib.inf diff --git a/OpenDuetPkg.dsc b/OpenDuetPkg.dsc index f7794b13..5ff9fdad 100644 --- a/OpenDuetPkg.dsc +++ b/OpenDuetPkg.dsc @@ -112,7 +112,7 @@ # To save size, use NULL library for DebugLib and ReportStatusCodeLib. # If need status code output, do library instance overriden. # - DebugLib|OpenCorePkg/Library/OcDebugNullLib/OcDebugNullLib.inf + DebugLib|OpenCorePkg/Library/OcDebugLibNull/OcDebugLibNull.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf diff --git a/Utilities/TestBmf/Makefile b/Utilities/TestBmf/Makefile index 23a78b25..c4adf63f 100644 --- a/Utilities/TestBmf/Makefile +++ b/Utilities/TestBmf/Makefile @@ -26,8 +26,8 @@ VPATH = ../../Platform/OpenCanopy:$\ ../../Library/OcBootManagementLib:$\ ../../Library/OcAppleBootPolicyLib:$\ ../../Library/OcDevicePathLib:$\ + ../../Library/OcDebugLibProtocol:$\ ../../Library/OcStringLib:$\ - ../../Library/OcDebugLogLib:$\ ../../Library/OcFileLib:$\ ../../Library/OcStorageLib:$\ ../../Library/OcTemplateLib:$\