]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverDiagnostics/DriverDiagnostics.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Efi / Protocol / DriverDiagnostics / DriverDiagnostics.h
1 /*++
2
3 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
4 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
8
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.
11
12 Module Name:
13
14 DriverDiagnostics.h
15
16 Abstract:
17
18 EFI Driver Diagnostics Protocol
19
20 Revision History
21
22 --*/
23
24 #ifndef _EFI_DRIVER_DIAGNOSTICS_H_
25 #define _EFI_DRIVER_DIAGNOSTICS_H_
26
27 //
28 // Global ID for the Driver Diagnostics Protocol
29 //
30 #define EFI_DRIVER_DIAGNOSTICS_PROTOCOL_GUID \
31 { \
32 0x0784924f, 0xe296, 0x11d4, {0x9a, 0x49, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} \
33 }
34
35 EFI_FORWARD_DECLARATION (EFI_DRIVER_DIAGNOSTICS_PROTOCOL);
36
37 typedef enum {
38 EfiDriverDiagnosticTypeStandard = 0,
39 EfiDriverDiagnosticTypeExtended = 1,
40 EfiDriverDiagnosticTypeManufacturing= 2,
41 EfiDriverDiagnosticTypeMaximum
42 } EFI_DRIVER_DIAGNOSTIC_TYPE;
43
44 typedef
45 EFI_STATUS
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,
51 IN CHAR8 *Language,
52 OUT EFI_GUID **ErrorType,
53 OUT UINTN *BufferSize,
54 OUT CHAR16 **Buffer
55 );
56
57 /*++
58
59 Routine Description:
60 Runs diagnostics on a controller.
61
62 Arguments:
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
79 the driver writer.
80 ErrorType - A GUID that defines the format of the data returned in
81 Buffer.
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().
88
89 Returns:
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
94 EFI_HANDLE.
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
107 the diagnostics.
108 EFI_OUT_OF_RESOURCES - There are not enough resources available to return
109 the status information in ErrorType, BufferSize,
110 and Buffer.
111 EFI_DEVICE_ERROR - The controller specified by ControllerHandle and
112 ChildHandle did not pass the diagnostic.
113
114 --*/
115
116 //
117 // Interface structure for the Driver Diagnostics Protocol
118 //
119 struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL {
120 EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS RunDiagnostics;
121 CHAR8 *SupportedLanguages;
122 };
123
124 /*++
125
126 Protocol Description:
127 Used to perform diagnostics on a controller that an EFI Driver is managing.
128
129 Parameters:
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.
134
135 --*/
136 extern EFI_GUID gEfiDriverDiagnosticsProtocolGuid;
137
138 #endif