X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FLibrary%2FDebugLib.h;h=47ac3dc4f2441e6779d789b7403120ceaff17362;hb=b0d803fe3e5c55a9a0c75bc90ccf40ebbbc9ffa3;hp=b1d320057fa2eb623523ba90bd7f360ae905aa3c;hpb=8960cdebac8c75f13f1cb6afa932f0ae323a138b;p=mirror_edk2.git diff --git a/MdePkg/Include/Library/DebugLib.h b/MdePkg/Include/Library/DebugLib.h index b1d320057f..47ac3dc4f2 100644 --- a/MdePkg/Include/Library/DebugLib.h +++ b/MdePkg/Include/Library/DebugLib.h @@ -28,21 +28,40 @@ // // Declare bits for PcdDebugPrintErrorLevel and the ErrorLevel parameter of DebugPrint() // -#define EFI_D_INIT 0x00000001 // Initialization style messages -#define EFI_D_WARN 0x00000002 // Warnings -#define EFI_D_LOAD 0x00000004 // Load events -#define EFI_D_FS 0x00000008 // EFI File system -#define EFI_D_POOL 0x00000010 // Alloc & Free's -#define EFI_D_PAGE 0x00000020 // Alloc & Free's -#define EFI_D_INFO 0x00000040 // Verbose -#define EFI_D_VARIABLE 0x00000100 // Variable -#define EFI_D_BM 0x00000400 // Boot Manager (BDS) -#define EFI_D_BLKIO 0x00001000 // BlkIo Driver -#define EFI_D_NET 0x00004000 // SNI Driver -#define EFI_D_UNDI 0x00010000 // UNDI Driver -#define EFI_D_LOADFILE 0x00020000 // UNDI Driver -#define EFI_D_EVENT 0x00080000 // Event messages -#define EFI_D_ERROR 0x80000000 // Error +#define DEBUG_INIT 0x00000001 // Initialization +#define DEBUG_WARN 0x00000002 // Warnings +#define DEBUG_LOAD 0x00000004 // Load events +#define DEBUG_FS 0x00000008 // EFI File system +#define DEBUG_POOL 0x00000010 // Alloc & Free's +#define DEBUG_PAGE 0x00000020 // Alloc & Free's +#define DEBUG_INFO 0x00000040 // Verbose +#define DEBUG_VARIABLE 0x00000100 // Variable +#define DEBUG_BM 0x00000400 // Boot Manager +#define DEBUG_BLKIO 0x00001000 // BlkIo Driver +#define DEBUG_NET 0x00004000 // SNI Driver +#define DEBUG_UNDI 0x00010000 // UNDI Driver +#define DEBUG_LOADFILE 0x00020000 // UNDI Driver +#define DEBUG_EVENT 0x00080000 // Event messages +#define DEBUG_ERROR 0x80000000 // Error + +// +// Aliases of debug message mask bits +// +#define EFI_D_INIT DEBUG_INIT +#define EFI_D_WARN DEBUG_WARN +#define EFI_D_LOAD DEBUG_LOAD +#define EFI_D_FS DEBUG_FS +#define EFI_D_POOL DEBUG_POOL +#define EFI_D_PAGE DEBUG_PAGE +#define EFI_D_INFO DEBUG_INFO +#define EFI_D_VARIABLE DEBUG_VARIABLE +#define EFI_D_BM DEBUG_BM +#define EFI_D_BLKIO DEBUG_BLKIO +#define EFI_D_NET DEBUG_NET +#define EFI_D_UNDI DEBUG_UNDI +#define EFI_D_LOADFILE DEBUG_LOADFILE +#define EFI_D_EVENT DEBUG_EVENT +#define EFI_D_ERROR DEBUG_ERROR /** @@ -94,7 +113,7 @@ VOID EFIAPI DebugAssert ( IN CONST CHAR8 *FileName, - IN INTN LineNumber, + IN UINTN LineNumber, IN CONST CHAR8 *Description ); @@ -311,21 +330,21 @@ DebugClearMemoryEnabled ( @param Guid Pointer to a protocol GUID. **/ -#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid) \ - do { \ - if (DebugAssertEnabled ()) { \ - VOID *Instance; \ - ASSERT (Guid != NULL); \ - if (Handle == NULL) { \ - if (!EFI_ERROR (gBS->LocateProtocol (Guid, NULL, &Instance))) { \ - _ASSERT (Guid already installed in database); \ - } \ - } else { \ - if (!EFI_ERROR (gBS->HandleProtocol (Handle, Guid, &Instance))) { \ - _ASSERT (Guid already installed on Handle); \ - } \ - } \ - } \ +#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid) \ + do { \ + if (DebugAssertEnabled ()) { \ + VOID *Instance; \ + ASSERT (Guid != NULL); \ + if (Handle == NULL) { \ + if (!EFI_ERROR (gBS->LocateProtocol ((EFI_GUID *)Guid, NULL, &Instance))) { \ + _ASSERT (Guid already installed in database); \ + } \ + } else { \ + if (!EFI_ERROR (gBS->HandleProtocol (Handle, (EFI_GUID *)Guid, &Instance))) { \ + _ASSERT (Guid already installed on Handle); \ + } \ + } \ + } \ } while (FALSE) @@ -351,7 +370,7 @@ DebugClearMemoryEnabled ( are not included in a module. **/ -#define DEBUG_CODE_END() __DebugCodeLocal = 0; } } while (FALSE) +#define DEBUG_CODE_END() __DebugCodeLocal = 0; __DebugCodeLocal++; } } while (FALSE) /**