3 Copyright (c) 2004, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 EFI Driver Diagnostics Protocol
24 #ifndef _EFI_DRIVER_DIAGNOSTICS_H_
25 #define _EFI_DRIVER_DIAGNOSTICS_H_
28 // Global ID for the Driver Diagnostics Protocol
30 #define EFI_DRIVER_DIAGNOSTICS_PROTOCOL_GUID \
32 0x0784924f, 0xe296, 0x11d4, 0x9a, 0x49, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
35 EFI_FORWARD_DECLARATION (EFI_DRIVER_DIAGNOSTICS_PROTOCOL
);
38 EfiDriverDiagnosticTypeStandard
= 0,
39 EfiDriverDiagnosticTypeExtended
= 1,
40 EfiDriverDiagnosticTypeManufacturing
= 2,
41 EfiDriverDiagnosticTypeMaximum
42 } EFI_DRIVER_DIAGNOSTIC_TYPE
;
46 (EFIAPI
*EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS
) (
47 IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL
* This
,
48 IN EFI_HANDLE ControllerHandle
,
49 IN EFI_HANDLE ChildHandle OPTIONAL
,
50 IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType
,
52 OUT EFI_GUID
**ErrorType
,
53 OUT UINTN
*BufferSize
,
60 Runs diagnostics on a controller.
63 This - A pointer to the EFI_DRIVER_DIAGNOSTICS_PROTOCOL instance.
64 ControllerHandle - The handle of the controller to run diagnostics on.
65 ChildHandle - The handle of the child controller to run diagnostics on
66 This is an optional parameter that may be NULL. It will
67 be NULL for device drivers. It will also be NULL for a
68 bus drivers that wish to run diagnostics on the bus
69 controller. It will not be NULL for a bus driver that
70 wishes to run diagnostics on one of its child controllers.
71 DiagnosticType - Indicates type of diagnostics to perform on the controller
72 specified by ControllerHandle and ChildHandle. See
73 "Related Definitions" for the list of supported types.
74 Language - A pointer to a three character ISO 639-2 language
75 identifier. This is the language in which the optional
76 error message should be returned in Buffer, and it must
77 match one of the languages specified in SupportedLanguages.
78 The number of languages supported by a driver is up to
80 ErrorType - A GUID that defines the format of the data returned in
82 BufferSize - The size, in bytes, of the data returned in Buffer.
83 Buffer - A buffer that contains a Null-terminated Unicode string
84 plus some additional data whose format is defined by
85 ErrorType. Buffer is allocated by this function with
86 AllocatePool(), and it is the caller's responsibility
87 to free it with a call to FreePool().
90 EFI_SUCCESS - The controller specified by ControllerHandle and
91 ChildHandle passed the diagnostic.
92 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
93 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
95 EFI_INVALID_PARAMETER - Language is NULL.
96 EFI_INVALID_PARAMETER - ErrorType is NULL.
97 EFI_INVALID_PARAMETER - BufferType is NULL.
98 EFI_INVALID_PARAMETER - Buffer is NULL.
99 EFI_UNSUPPORTED - The driver specified by This does not support
100 running diagnostics for the controller specified
101 by ControllerHandle and ChildHandle.
102 EFI_UNSUPPORTED - The driver specified by This does not support the
103 type of diagnostic specified by DiagnosticType.
104 EFI_UNSUPPORTED - The driver specified by This does not support the
105 language specified by Language.
106 EFI_OUT_OF_RESOURCES - There are not enough resources available to complete
108 EFI_OUT_OF_RESOURCES - There are not enough resources available to return
109 the status information in ErrorType, BufferSize,
111 EFI_DEVICE_ERROR - The controller specified by ControllerHandle and
112 ChildHandle did not pass the diagnostic.
117 // Interface structure for the Driver Diagnostics Protocol
119 struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL
{
120 EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS RunDiagnostics
;
121 CHAR8
*SupportedLanguages
;
126 Protocol Description:
127 Used to perform diagnostics on a controller that an EFI Driver is managing.
130 RunDiagnostics - Runs diagnostics on a controller.
131 SupportedLanguages - A Null-terminated ASCII string that contains one or more
132 ISO 639-2 language codes. This is the list of language
133 codes that this protocol supports.
136 extern EFI_GUID gEfiDriverDiagnosticsProtocolGuid
;