]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Include/Protocol/DebugAssert.h
added EFIAPI for those constructor functions
[mirror_edk2.git] / EdkModulePkg / Include / Protocol / DebugAssert.h
CommitLineData
878ddf1f 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 DebugAssert.h\r
15\r
16Abstract:\r
17\r
18 This protocol allows provides debug services to a driver. This is not \r
19 debugger support, but things like ASSERT() and DEBUG() macros\r
20\r
21--*/\r
22\r
23#ifndef _DEBUG_ASSERT_H_\r
24#define _DEBUG_ASSERT_H_\r
25\r
26\r
27#define EFI_DEBUG_ASSERT_PROTOCOL_GUID \\r
28 { 0xbe499c92, 0x7d4b, 0x11d4, {0xbc, 0xee, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }\r
29\r
30//\r
31// Forward reference for pure ANSI compatability\r
32//\r
33typedef struct _EFI_DEBUG_ASSERT_PROTOCOL EFI_DEBUG_ASSERT_PROTOCOL;\r
34\r
35\r
36typedef\r
37EFI_STATUS\r
38(EFIAPI *EFI_DEBUG_ASSERT) (\r
39 IN EFI_DEBUG_ASSERT_PROTOCOL *This,\r
40 IN CHAR8 *FileName,\r
41 IN INTN LineNumber,\r
42 IN CHAR8 *Description\r
43 );\r
44\r
45typedef\r
46EFI_STATUS\r
47(EFIAPI *EFI_DEBUG_PRINT) (\r
48 IN EFI_DEBUG_ASSERT_PROTOCOL *This,\r
49 IN UINTN ErrorLevel,\r
50 IN CHAR8 *Format,\r
51 IN VA_LIST Marker\r
52 );\r
53\r
54typedef\r
55EFI_STATUS\r
56(EFIAPI *EFI_POST_CODE) (\r
57 IN EFI_DEBUG_ASSERT_PROTOCOL *This,\r
58 IN UINT16 PostCode,\r
59 IN CHAR8 *PostCodeString OPTIONAL\r
60 );\r
61\r
62typedef\r
63EFI_STATUS\r
64(EFIAPI *EFI_GET_ERROR_LEVEL) (\r
65 IN EFI_DEBUG_ASSERT_PROTOCOL *This,\r
66 IN UINTN *ErrorLevel\r
67 );\r
68\r
69typedef\r
70EFI_STATUS\r
71(EFIAPI *EFI_SET_ERROR_LEVEL) (\r
72 IN EFI_DEBUG_ASSERT_PROTOCOL *This,\r
73 IN UINTN ErrorLevel\r
74 );\r
75\r
76struct _EFI_DEBUG_ASSERT_PROTOCOL {\r
77 \r
78 EFI_DEBUG_ASSERT Assert;\r
79 EFI_DEBUG_PRINT Print;\r
80 EFI_POST_CODE PostCode;\r
81\r
82 EFI_GET_ERROR_LEVEL GetErrorLevel;\r
83 EFI_SET_ERROR_LEVEL SetErrorLevel;\r
84\r
85};\r
86\r
87extern EFI_GUID gEfiDebugAssertProtocolGuid;\r
88\r
89#endif\r