123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- #ifndef _EFI_DEBUG_H
- #define _EFI_DEBUG_H
- extern UINTN EFIDebug;
- #if EFI_DEBUG
- #define DBGASSERT(a) DbgAssert(__FILE__, __LINE__, #a)
- #define DEBUG(a) DbgPrint a
-
- #else
- #define DBGASSERT(a)
- #define DEBUG(a)
-
- #endif
- #if EFI_DEBUG_CLEAR_MEMORY
- #define DBGSETMEM(a,l) SetMem(a,l,(CHAR8)BAD_POINTER)
- #else
- #define DBGSETMEM(a,l)
- #endif
- #define D_INIT 0x00000001
- #define D_WARN 0x00000002
- #define D_LOAD 0x00000004
- #define D_FS 0x00000008
- #define D_POOL 0x00000010
- #define D_PAGE 0x00000020
- #define D_INFO 0x00000040
- #define D_VAR 0x00000100
- #define D_PARSE 0x00000200
- #define D_BM 0x00000400
- #define D_BLKIO 0x00001000
- #define D_BLKIO_ULTRA 0x00002000
- #define D_NET 0x00004000
- #define D_NET_ULTRA 0x00008000
- #define D_TXTIN 0x00010000
- #define D_TXTOUT 0x00020000
- #define D_ERROR_ATA 0x00040000
- #define D_ERROR 0x80000000
- #define D_RESERVED 0x7fffC880
- #define EFI_DBUG_MASK (D_ERROR)
- #if EFI_DEBUG
- #define ASSERT(a) if(!(a)) DBGASSERT(a)
- #define ASSERT_LOCKED(l) if(!(l)->Lock) DBGASSERT(l not locked)
- #define ASSERT_STRUCT(p,t) DBGASSERT(t not structure), p
- #else
- #define ASSERT(a)
- #define ASSERT_LOCKED(l)
- #define ASSERT_STRUCT(p,t)
- #endif
- INTN
- DbgAssert (
- CHAR8 *file,
- INTN lineno,
- CHAR8 *string
- );
- INTN
- DbgPrint (
- INTN mask,
- CHAR8 *format,
- ...
- );
- #endif
|