]>
Commit | Line | Data |
---|---|---|
d1f95000 | 1 | /** @file\r |
2 | EFI Driver Diagnostics Protocol\r | |
3 | \r | |
4 | Copyright (c) 2006, Intel Corporation \r | |
5 | All rights reserved. This program and the accompanying materials \r | |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php \r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
12 | \r | |
13 | Module Name: DriverDiagnostics.h\r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
17 | #ifndef __EFI_DRIVER_DIAGNOSTICS_H__\r | |
18 | #define __EFI_DRIVER_DIAGNOSTICS_H__\r | |
19 | \r | |
20 | //\r | |
21 | // Global ID for the Driver Diagnostics Protocol as defined in EFI 1.10.\r | |
22 | //\r | |
23 | #define EFI_DRIVER_DIAGNOSTICS_PROTOCOL_GUID \\r | |
24 | { \\r | |
25 | 0x0784924f, 0xe296, 0x11d4, {0x9a, 0x49, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \\r | |
26 | }\r | |
27 | \r | |
d1f95000 | 28 | typedef struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL EFI_DRIVER_DIAGNOSTICS_PROTOCOL;\r |
29 | \r | |
30 | typedef enum {\r | |
31 | EfiDriverDiagnosticTypeStandard = 0,\r | |
32 | EfiDriverDiagnosticTypeExtended = 1,\r | |
33 | EfiDriverDiagnosticTypeManufacturing= 2,\r | |
34 | EfiDriverDiagnosticTypeMaximum\r | |
35 | } EFI_DRIVER_DIAGNOSTIC_TYPE;\r | |
36 | \r | |
37 | /**\r | |
38 | Runs diagnostics on a controller.\r | |
39 | \r | |
40 | @param This A pointer to the EFI_DRIVER_DIAGNOSTICS_PROTOCOL instance.\r | |
41 | @param ControllerHandle The handle of the controller to run diagnostics on.\r | |
42 | @param ChildHandle The handle of the child controller to run diagnostics on\r | |
43 | This is an optional parameter that may be NULL. It will\r | |
44 | be NULL for device drivers. It will also be NULL for a\r | |
45 | bus drivers that wish to run diagnostics on the bus\r | |
46 | controller. It will not be NULL for a bus driver that\r | |
47 | wishes to run diagnostics on one of its child controllers.\r | |
48 | @param DiagnosticType Indicates type of diagnostics to perform on the controller\r | |
49 | specified by ControllerHandle and ChildHandle. See\r | |
50 | "Related Definitions" for the list of supported types.\r | |
51 | @param Language A pointer to a three character ISO 639-2 language\r | |
52 | identifier. This is the language in which the optional\r | |
53 | error message should be returned in Buffer, and it must\r | |
54 | match one of the languages specified in SupportedLanguages.\r | |
55 | The number of languages supported by a driver is up to\r | |
56 | the driver writer.\r | |
57 | @param ErrorType A GUID that defines the format of the data returned in Buffer.\r | |
58 | @param BufferSize The size, in bytes, of the data returned in Buffer.\r | |
59 | @param Buffer A buffer that contains a Null-terminated Unicode string\r | |
60 | plus some additional data whose format is defined by\r | |
61 | ErrorType. Buffer is allocated by this function with\r | |
62 | AllocatePool(), and it is the caller's responsibility\r | |
63 | to free it with a call to FreePool().\r | |
64 | \r | |
65 | @retval EFI_SUCCESS The controller specified by ControllerHandle and\r | |
66 | ChildHandle passed the diagnostic.\r | |
67 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r | |
68 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r | |
69 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
70 | @retval EFI_INVALID_PARAMETER ErrorType is NULL.\r | |
71 | @retval EFI_INVALID_PARAMETER BufferType is NULL.\r | |
72 | @retval EFI_INVALID_PARAMETER Buffer is NULL.\r | |
73 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
74 | running diagnostics for the controller specified\r | |
75 | by ControllerHandle and ChildHandle.\r | |
76 | @retval EFI_UNSUPPORTED The driver specified by This does not support the\r | |
77 | type of diagnostic specified by DiagnosticType.\r | |
78 | @retval EFI_UNSUPPORTED The driver specified by This does not support the\r | |
79 | language specified by Language.\r | |
80 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete\r | |
81 | the diagnostics.\r | |
82 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to return\r | |
83 | the status information in ErrorType, BufferSize,\r | |
84 | and Buffer.\r | |
85 | @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and\r | |
86 | ChildHandle did not pass the diagnostic.\r | |
87 | \r | |
88 | **/\r | |
89 | typedef\r | |
90 | EFI_STATUS\r | |
91 | (EFIAPI *EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS) (\r | |
92 | IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL *This,\r | |
93 | IN EFI_HANDLE ControllerHandle,\r | |
94 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
95 | IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType,\r | |
96 | IN CHAR8 *Language,\r | |
97 | OUT EFI_GUID **ErrorType,\r | |
98 | OUT UINTN *BufferSize,\r | |
99 | OUT CHAR16 **Buffer\r | |
100 | );\r | |
101 | \r | |
102 | \r | |
103 | //\r | |
104 | //\r | |
105 | \r | |
106 | /**\r | |
107 | Interface structure for the Driver Diagnostics Protocol.\r | |
108 | \r | |
109 | @par Protocol Description:\r | |
110 | Used to perform diagnostics on a controller that an EFI Driver is managing.\r | |
111 | \r | |
112 | @param RunDiagnostics Runs diagnostics on a controller.\r | |
113 | @param SupportedLanguages A Null-terminated ASCII string that contains one or more\r | |
114 | ISO 639-2 language codes. This is the list of language \r | |
115 | codes that this protocol supports.\r | |
116 | \r | |
117 | **/\r | |
118 | struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL {\r | |
119 | EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS RunDiagnostics;\r | |
120 | CHAR8 *SupportedLanguages;\r | |
121 | };\r | |
122 | \r | |
123 | extern EFI_GUID gEfiDriverDiagnosticsProtocolGuid;\r | |
d1f95000 | 124 | \r |
125 | #endif\r |