]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverDiagnostics/DriverDiagnostics.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Efi / Protocol / DriverDiagnostics / DriverDiagnostics.h
CommitLineData
3eb9473e 1/*++\r
2\r
f57387d5
HT
3Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 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 DriverDiagnostics.h\r
15 \r
16Abstract:\r
17\r
18 EFI Driver Diagnostics Protocol\r
19\r
20Revision History\r
21\r
22--*/\r
23\r
24#ifndef _EFI_DRIVER_DIAGNOSTICS_H_\r
25#define _EFI_DRIVER_DIAGNOSTICS_H_\r
26\r
27//\r
28// Global ID for the Driver Diagnostics Protocol\r
29//\r
30#define EFI_DRIVER_DIAGNOSTICS_PROTOCOL_GUID \\r
31 { \\r
7ccf38a3 32 0x0784924f, 0xe296, 0x11d4, {0x9a, 0x49, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} \\r
3eb9473e 33 }\r
34\r
35EFI_FORWARD_DECLARATION (EFI_DRIVER_DIAGNOSTICS_PROTOCOL);\r
36\r
37typedef enum {\r
38 EfiDriverDiagnosticTypeStandard = 0,\r
39 EfiDriverDiagnosticTypeExtended = 1,\r
40 EfiDriverDiagnosticTypeManufacturing= 2,\r
41 EfiDriverDiagnosticTypeMaximum\r
42} EFI_DRIVER_DIAGNOSTIC_TYPE;\r
43\r
44typedef\r
45EFI_STATUS\r
46(EFIAPI *EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS) (\r
47 IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL * This,\r
48 IN EFI_HANDLE ControllerHandle,\r
49 IN EFI_HANDLE ChildHandle OPTIONAL,\r
50 IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType,\r
51 IN CHAR8 *Language,\r
52 OUT EFI_GUID **ErrorType,\r
53 OUT UINTN *BufferSize,\r
54 OUT CHAR16 **Buffer\r
55 );\r
56\r
57/*++\r
58\r
59 Routine Description:\r
60 Runs diagnostics on a controller.\r
61\r
62 Arguments:\r
63 This - A pointer to the EFI_DRIVER_DIAGNOSTICS_PROTOCOL instance.\r
64 ControllerHandle - The handle of the controller to run diagnostics on.\r
65 ChildHandle - The handle of the child controller to run diagnostics on \r
66 This is an optional parameter that may be NULL. It will \r
67 be NULL for device drivers. It will also be NULL for a \r
68 bus drivers that wish to run diagnostics on the bus \r
69 controller. It will not be NULL for a bus driver that \r
70 wishes to run diagnostics on one of its child controllers.\r
71 DiagnosticType - Indicates type of diagnostics to perform on the controller \r
72 specified by ControllerHandle and ChildHandle. See \r
73 "Related Definitions" for the list of supported types.\r
74 Language - A pointer to a three character ISO 639-2 language \r
75 identifier. This is the language in which the optional \r
76 error message should be returned in Buffer, and it must \r
77 match one of the languages specified in SupportedLanguages.\r
78 The number of languages supported by a driver is up to \r
79 the driver writer. \r
80 ErrorType - A GUID that defines the format of the data returned in \r
81 Buffer. \r
82 BufferSize - The size, in bytes, of the data returned in Buffer. \r
83 Buffer - A buffer that contains a Null-terminated Unicode string \r
84 plus some additional data whose format is defined by \r
85 ErrorType. Buffer is allocated by this function with \r
86 AllocatePool(), and it is the caller's responsibility \r
87 to free it with a call to FreePool(). \r
88\r
89 Returns:\r
90 EFI_SUCCESS - The controller specified by ControllerHandle and \r
91 ChildHandle passed the diagnostic.\r
92 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
93 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid \r
94 EFI_HANDLE.\r
95 EFI_INVALID_PARAMETER - Language is NULL.\r
96 EFI_INVALID_PARAMETER - ErrorType is NULL.\r
97 EFI_INVALID_PARAMETER - BufferType is NULL.\r
98 EFI_INVALID_PARAMETER - Buffer is NULL.\r
99 EFI_UNSUPPORTED - The driver specified by This does not support \r
100 running diagnostics for the controller specified \r
101 by ControllerHandle and ChildHandle.\r
102 EFI_UNSUPPORTED - The driver specified by This does not support the \r
103 type of diagnostic specified by DiagnosticType.\r
104 EFI_UNSUPPORTED - The driver specified by This does not support the \r
105 language specified by Language.\r
106 EFI_OUT_OF_RESOURCES - There are not enough resources available to complete\r
107 the diagnostics.\r
108 EFI_OUT_OF_RESOURCES - There are not enough resources available to return\r
109 the status information in ErrorType, BufferSize, \r
110 and Buffer.\r
111 EFI_DEVICE_ERROR - The controller specified by ControllerHandle and \r
112 ChildHandle did not pass the diagnostic.\r
113\r
114--*/\r
115\r
116//\r
117// Interface structure for the Driver Diagnostics Protocol\r
118//\r
e5bce275 119struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL {\r
3eb9473e 120 EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS RunDiagnostics;\r
121 CHAR8 *SupportedLanguages;\r
e5bce275 122};\r
3eb9473e 123\r
124/*++\r
125\r
126 Protocol Description:\r
127 Used to perform diagnostics on a controller that an EFI Driver is managing.\r
128\r
129 Parameters:\r
130 RunDiagnostics - Runs diagnostics on a controller.\r
131 SupportedLanguages - A Null-terminated ASCII string that contains one or more\r
132 ISO 639-2 language codes. This is the list of language \r
133 codes that this protocol supports.\r
134\r
135--*/\r
136extern EFI_GUID gEfiDriverDiagnosticsProtocolGuid;\r
137\r
138#endif\r