Add DriverDiagnostics2.h.
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 22 Jun 2007 10:35:20 +0000 (10:35 +0000)
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 22 Jun 2007 10:35:20 +0000 (10:35 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2721 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Protocol/DriverDiagnostics.h
MdePkg/Include/Protocol/DriverDiagnostics2.h [new file with mode: 0644]

index c0a0cbc..59e737b 100644 (file)
     0x0784924f, 0xe296, 0x11d4, {0x9a, 0x49, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \\r
   }\r
 \r
-//\r
-// Global ID for the Driver Diagnostics Protocol as defined in UEFI 2.0.\r
-//\r
-#define UEFI_DRIVER_DIAGNOSTICS_PROTOCOL_GUID \\r
-  { \\r
-    0x4d330321, 0x025f, 0x4aac, {0x90, 0xd8, 0x5e, 0xd9, 0x00, 0x17, 0x3b, 0x63 } \\r
-  }\r
-  \r
 typedef struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL  EFI_DRIVER_DIAGNOSTICS_PROTOCOL;\r
 \r
 typedef enum {\r
@@ -129,6 +121,5 @@ struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL {
 };\r
 \r
 extern EFI_GUID gEfiDriverDiagnosticsProtocolGuid;\r
-extern EFI_GUID gUefiDriverDiagnosticsProtocolGuid;\r
 \r
 #endif\r
diff --git a/MdePkg/Include/Protocol/DriverDiagnostics2.h b/MdePkg/Include/Protocol/DriverDiagnostics2.h
new file mode 100644 (file)
index 0000000..2237724
--- /dev/null
@@ -0,0 +1,119 @@
+/** @file\r
+  EFI Driver Diagnostics Protocol\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  DriverDiagnostics2.h\r
+\r
+**/\r
+\r
+#ifndef __EFI_DRIVER_DIAGNOSTICS2_H__\r
+#define __EFI_DRIVER_DIAGNOSTICS2_H__\r
+\r
+#include <Protocol/DriverDiagnostics.h>\r
+\r
+#define EFI_DRIVER_DIAGNOSTICS2_PROTOCOL_GUID \\r
+  { \\r
+    0x4d330321, 0x025f, 0x4aac, {0x90, 0xd8, 0x5e, 0xd9, 0x00, 0x17, 0x3b, 0x63 } \\r
+  }\r
+  \r
+typedef struct _EFI_DRIVER_DIAGNOSTICS2_PROTOCOL  EFI_DRIVER_DIAGNOSTICS2_PROTOCOL;\r
+\r
+/**\r
+  Runs diagnostics on a controller.\r
+\r
+  @param  This             A pointer to the EFI_DRIVER_DIAGNOSTICS_PROTOCOL instance.\r
+  @param  ControllerHandle The handle of the controller to run diagnostics on.\r
+  @param  ChildHandle      The handle of the child controller to run diagnostics on\r
+                           This is an optional parameter that may be NULL.  It will\r
+                           be NULL for device drivers.  It will also be NULL for a\r
+                           bus drivers that wish to run diagnostics on the bus\r
+                           controller.  It will not be NULL for a bus driver that\r
+                           wishes to run diagnostics on one of its child controllers.\r
+  @param  DiagnosticType   Indicates type of diagnostics to perform on the controller\r
+                           specified by ControllerHandle and ChildHandle.   See\r
+                           "Related Definitions" for the list of supported types.\r
+  @param  Language         A pointer to a three character ISO 639-2 language\r
+                           identifier.  This is the language in which the optional\r
+                           error message should be returned in Buffer, and it must\r
+                           match one of the languages specified in SupportedLanguages.\r
+                           The number of languages supported by a driver is up to\r
+                           the driver writer.\r
+  @param  ErrorType        A GUID that defines the format of the data returned in Buffer.\r
+  @param  BufferSize       The size, in bytes, of the data returned in Buffer.\r
+  @param  Buffer           A buffer that contains a Null-terminated Unicode string\r
+                           plus some additional data whose format is defined by\r
+                           ErrorType.  Buffer is allocated by this function with\r
+                           AllocatePool(), and it is the caller's responsibility\r
+                           to free it with a call to FreePool().\r
+\r
+  @retval EFI_SUCCESS           The controller specified by ControllerHandle and\r
+                                ChildHandle passed the diagnostic.\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+  @retval EFI_INVALID_PARAMETER ErrorType is NULL.\r
+  @retval EFI_INVALID_PARAMETER BufferType is NULL.\r
+  @retval EFI_INVALID_PARAMETER Buffer is NULL.\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
+                                running diagnostics for the controller specified\r
+                                by ControllerHandle and ChildHandle.\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support the\r
+                                type of diagnostic specified by DiagnosticType.\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support the\r
+                                language specified by Language.\r
+  @retval EFI_OUT_OF_RESOURCES  There are not enough resources available to complete\r
+                                the diagnostics.\r
+  @retval EFI_OUT_OF_RESOURCES  There are not enough resources available to return\r
+                                the status information in ErrorType, BufferSize,\r
+                                and Buffer.\r
+  @retval EFI_DEVICE_ERROR      The controller specified by ControllerHandle and\r
+                                ChildHandle did not pass the diagnostic.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS) (\r
+  IN EFI_DRIVER_DIAGNOSTICS2_PROTOCOL                       *This,\r
+  IN  EFI_HANDLE                                            ControllerHandle,\r
+  IN  EFI_HANDLE                                            ChildHandle  OPTIONAL,\r
+  IN  EFI_DRIVER_DIAGNOSTIC_TYPE                            DiagnosticType,\r
+  IN  CHAR8                                                 *Language,\r
+  OUT EFI_GUID                                              **ErrorType,\r
+  OUT UINTN                                                 *BufferSize,\r
+  OUT CHAR16                                                **Buffer\r
+  );\r
+\r
+\r
+//\r
+//\r
+\r
+/**\r
+  Interface structure for the Driver Diagnostics Protocol.\r
+\r
+  @par Protocol Description:\r
+  Used to perform diagnostics on a controller that an EFI Driver is managing.\r
+\r
+  @param RunDiagnostics      Runs diagnostics on a controller.\r
+  @param SupportedLanguages  A Null-terminated ASCII string that\r
+                             contains one or more RFC 3066\r
+                             language codes.  This is the list\r
+                             of language codes that this\r
+                             protocol supports.\r
+\r
+**/\r
+struct _EFI_DRIVER_DIAGNOSTICS2_PROTOCOL {\r
+  EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS RunDiagnostics;\r
+  CHAR8                                   *SupportedLanguages;\r
+};\r
+\r
+extern EFI_GUID gEfiDriverDiagnostics2ProtocolGuid;\r
+\r
+#endif\r