diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-06-28 07:00:39 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-06-28 07:00:39 +0000 |
commit | 3eb9473ea9a949badfe06ae61d2d3fcfa53651c7 (patch) | |
tree | e9d8c368dbb1e58794b2c00acefe4bbad270f8c4 /EdkCompatibilityPkg/Foundation/Protocol/DebugAssert | |
parent | 30d4a0c7ec19938196b1308006b990e0945150da (diff) | |
download | edk2-platforms-3eb9473ea9a949badfe06ae61d2d3fcfa53651c7.tar.xz |
Add in the 1st version of ECP.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2832 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Protocol/DebugAssert')
-rw-r--r-- | EdkCompatibilityPkg/Foundation/Protocol/DebugAssert/DebugAssert.c | 30 | ||||
-rw-r--r-- | EdkCompatibilityPkg/Foundation/Protocol/DebugAssert/DebugAssert.h | 89 |
2 files changed, 119 insertions, 0 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Protocol/DebugAssert/DebugAssert.c b/EdkCompatibilityPkg/Foundation/Protocol/DebugAssert/DebugAssert.c new file mode 100644 index 0000000000..3303fc3dca --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Protocol/DebugAssert/DebugAssert.c @@ -0,0 +1,30 @@ +/*++
+
+Copyright (c) 2004, Intel Corporation
+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.
+
+Module Name:
+
+ DebugAssert.c
+
+Abstract:
+
+ This protocol allows provides debug services to a driver. This is not
+ debugger support, but things like ASSERT() and DEBUG() macros
+
+--*/
+
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION(DebugAssert)
+
+
+EFI_GUID gEfiDebugAssertProtocolGuid = EFI_DEBUG_ASSERT_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiDebugAssertProtocolGuid, "EFI Debug Assert", "Efi Debug Assert Protocol");
+
diff --git a/EdkCompatibilityPkg/Foundation/Protocol/DebugAssert/DebugAssert.h b/EdkCompatibilityPkg/Foundation/Protocol/DebugAssert/DebugAssert.h new file mode 100644 index 0000000000..174869329e --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Protocol/DebugAssert/DebugAssert.h @@ -0,0 +1,89 @@ +/*++
+
+Copyright (c) 2004, Intel Corporation
+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.
+
+Module Name:
+
+ DebugAssert.h
+
+Abstract:
+
+ This protocol allows provides debug services to a driver. This is not
+ debugger support, but things like ASSERT() and DEBUG() macros
+
+--*/
+
+#ifndef _DEBUG_ASSERT_H_
+#define _DEBUG_ASSERT_H_
+
+
+#define EFI_DEBUG_ASSERT_PROTOCOL_GUID \
+ { 0xbe499c92, 0x7d4b, 0x11d4, 0xbc, 0xee, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }
+
+//
+// Forward reference for pure ANSI compatability
+//
+EFI_FORWARD_DECLARATION (EFI_DEBUG_ASSERT_PROTOCOL);
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DEBUG_ASSERT) (
+ IN EFI_DEBUG_ASSERT_PROTOCOL *This,
+ IN CHAR8 *FileName,
+ IN INTN LineNumber,
+ IN CHAR8 *Description
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DEBUG_PRINT) (
+ IN EFI_DEBUG_ASSERT_PROTOCOL *This,
+ IN UINTN ErrorLevel,
+ IN CHAR8 *Format,
+ IN VA_LIST Marker
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_POST_CODE) (
+ IN EFI_DEBUG_ASSERT_PROTOCOL *This,
+ IN UINT16 PostCode,
+ IN CHAR8 *PostCodeString OPTIONAL
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_GET_ERROR_LEVEL) (
+ IN EFI_DEBUG_ASSERT_PROTOCOL *This,
+ IN UINTN *ErrorLevel
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SET_ERROR_LEVEL) (
+ IN EFI_DEBUG_ASSERT_PROTOCOL *This,
+ IN UINTN ErrorLevel
+ );
+
+typedef struct _EFI_DEBUG_ASSERT_PROTOCOL {
+
+ EFI_DEBUG_ASSERT Assert;
+ EFI_DEBUG_PRINT Print;
+ EFI_POST_CODE PostCode;
+
+ EFI_GET_ERROR_LEVEL GetErrorLevel;
+ EFI_SET_ERROR_LEVEL SetErrorLevel;
+
+} EFI_DEBUG_ASSERT_PROTOCOL;
+
+extern EFI_GUID gEfiDebugAssertProtocolGuid;
+
+#endif
|