#ifndef _EFI_DEBUG_H1#define _EFI_DEBUG_H23/*++45Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved6This software and associated documentation (if any) is furnished7under a license and may only be used or copied in accordance8with the terms of the license. Except as permitted by such9license, no part of this software or documentation may be10reproduced, stored in a retrieval system, or transmitted in any11form or by any means without the express written consent of12Intel Corporation.1314Module Name:1516efidebug.h1718Abstract:1920EFI library debug functions21222324Revision History2526--*/2728extern UINTN EFIDebug;2930#if EFI_DEBUG3132#define DBGASSERT(a) DbgAssert(__FILE__, __LINE__, #a)33#define DEBUG(a) DbgPrint a3435#else3637#define DBGASSERT(a)38#define DEBUG(a)3940#endif4142#if EFI_DEBUG_CLEAR_MEMORY4344#define DBGSETMEM(a,l) SetMem(a,l,(CHAR8)BAD_POINTER)4546#else4748#define DBGSETMEM(a,l)4950#endif5152#define D_INIT 0x00000001 // Initialization style messages53#define D_WARN 0x00000002 // Warnings54#define D_LOAD 0x00000004 // Load events55#define D_FS 0x00000008 // EFI File system56#define D_POOL 0x00000010 // Alloc & Free's57#define D_PAGE 0x00000020 // Alloc & Free's58#define D_INFO 0x00000040 // Verbose59#define D_VARIABLE 0x00000100 // Variable60#define D_VAR 0x00000100 // Variable61#define D_BM 0x00000400 // Boot Manager62#define D_BLKIO 0x00001000 // BlkIo Driver63#define D_BLKIO_ULTRA 0x00002000 // BlkIo Driver64#define D_NET 0x00004000 // SNI Driver65#define D_NET_ULTRA 0x00008000 // SNI Driver66#define D_UNDI 0x00010000 // UNDI Driver67#define D_LOADFILE 0x00020000 // UNDI Driver68#define D_EVENT 0x00080000 // Event messages6970#define D_ERROR 0x80000000 // Error7172#define D_RESERVED 0x7ff40A80 // Bits not reserved above7374//75// Current Debug level of the system, value of EFIDebug76//77//#define EFI_DBUG_MASK (D_ERROR | D_WARN | D_LOAD | D_BLKIO | D_INIT)78#define EFI_DBUG_MASK (D_ERROR)7980//81//82//8384#if EFI_DEBUG8586#define ASSERT(a) if(!(a)) DBGASSERT(a)87#define ASSERT_LOCKED(l) if(!(l)->Lock) DBGASSERT(l not locked)88#define ASSERT_STRUCT(p,t) DBGASSERT(t not structure), p8990#else9192#define ASSERT(a)93#define ASSERT_LOCKED(l)94#define ASSERT_STRUCT(p,t)9596#endif9798//99// Prototypes100//101102INTN103DbgAssert (104CHAR8 *file,105INTN lineno,106CHAR8 *string107);108109INTN110DbgPrint (111INTN mask,112CHAR8 *format,113...114);115116#endif117118119