]>
Commit | Line | Data |
---|---|---|
878ddf1f | 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 | |
28 | //\r | |
29 | // Global ID for the Driver Diagnostics Protocol as defined in UEFI 2.0.\r | |
30 | //\r | |
31 | #define UEFI_DRIVER_DIAGNOSTICS_PROTOCOL_GUID \\r | |
32 | { \\r | |
33 | 0x4d330321, 0x025f, 0x4aac, {0x90, 0xd8, 0x5e, 0xd9, 0x00, 0x17, 0x3b, 0x63 } \\r | |
34 | }\r | |
35 | \r | |
36 | typedef struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL EFI_DRIVER_DIAGNOSTICS_PROTOCOL;\r | |
37 | \r | |
38 | typedef enum {\r | |
39 | EfiDriverDiagnosticTypeStandard = 0,\r | |
40 | EfiDriverDiagnosticTypeExtended = 1,\r | |
41 | EfiDriverDiagnosticTypeManufacturing= 2,\r | |
42 | EfiDriverDiagnosticTypeMaximum\r | |
43 | } EFI_DRIVER_DIAGNOSTIC_TYPE;\r | |
44 | \r | |
45 | /**\r | |
46 | Runs diagnostics on a controller.\r | |
47 | \r | |
48 | @param This A pointer to the EFI_DRIVER_DIAGNOSTICS_PROTOCOL instance.\r | |
49 | @param ControllerHandle The handle of the controller to run diagnostics on.\r | |
50 | @param ChildHandle The handle of the child controller to run diagnostics on\r | |
51 | This is an optional parameter that may be NULL. It will\r | |
52 | be NULL for device drivers. It will also be NULL for a\r | |
53 | bus drivers that wish to run diagnostics on the bus\r | |
54 | controller. It will not be NULL for a bus driver that\r | |
55 | wishes to run diagnostics on one of its child controllers.\r | |
56 | @param DiagnosticType Indicates type of diagnostics to perform on the controller\r | |
57 | specified by ControllerHandle and ChildHandle. See\r | |
58 | "Related Definitions" for the list of supported types.\r | |
59 | @param Language A pointer to a three character ISO 639-2 language\r | |
60 | identifier. This is the language in which the optional\r | |
61 | error message should be returned in Buffer, and it must\r | |
62 | match one of the languages specified in SupportedLanguages.\r | |
63 | The number of languages supported by a driver is up to\r | |
64 | the driver writer.\r | |
65 | @param ErrorType A GUID that defines the format of the data returned in Buffer.\r | |
66 | @param BufferSize The size, in bytes, of the data returned in Buffer.\r | |
67 | @param Buffer A buffer that contains a Null-terminated Unicode string\r | |
68 | plus some additional data whose format is defined by\r | |
69 | ErrorType. Buffer is allocated by this function with\r | |
70 | AllocatePool(), and it is the caller's responsibility\r | |
71 | to free it with a call to FreePool().\r | |
72 | \r | |
73 | @retval EFI_SUCCESS The controller specified by ControllerHandle and\r | |
74 | ChildHandle passed the diagnostic.\r | |
75 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r | |
76 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r | |
77 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
78 | @retval EFI_INVALID_PARAMETER ErrorType is NULL.\r | |
79 | @retval EFI_INVALID_PARAMETER BufferType is NULL.\r | |
80 | @retval EFI_INVALID_PARAMETER Buffer is NULL.\r | |
81 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
82 | running diagnostics for the controller specified\r | |
83 | by ControllerHandle and ChildHandle.\r | |
84 | @retval EFI_UNSUPPORTED The driver specified by This does not support the\r | |
85 | type of diagnostic specified by DiagnosticType.\r | |
86 | @retval EFI_UNSUPPORTED The driver specified by This does not support the\r | |
87 | language specified by Language.\r | |
88 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete\r | |
89 | the diagnostics.\r | |
90 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to return\r | |
91 | the status information in ErrorType, BufferSize,\r | |
92 | and Buffer.\r | |
93 | @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and\r | |
94 | ChildHandle did not pass the diagnostic.\r | |
95 | \r | |
96 | **/\r | |
97 | typedef\r | |
98 | EFI_STATUS\r | |
99 | (EFIAPI *EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS) (\r | |
100 | IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL *This,\r | |
101 | IN EFI_HANDLE ControllerHandle,\r | |
102 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
103 | IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType,\r | |
104 | IN CHAR8 *Language,\r | |
105 | OUT EFI_GUID **ErrorType,\r | |
106 | OUT UINTN *BufferSize,\r | |
107 | OUT CHAR16 **Buffer\r | |
108 | );\r | |
109 | \r | |
110 | \r | |
111 | //\r | |
112 | //\r | |
113 | \r | |
114 | /**\r | |
115 | Interface structure for the Driver Diagnostics Protocol.\r | |
116 | \r | |
117 | @par Protocol Description:\r | |
118 | Used to perform diagnostics on a controller that an EFI Driver is managing.\r | |
119 | \r | |
120 | @param RunDiagnostics Runs diagnostics on a controller.\r | |
121 | @param SupportedLanguages A Null-terminated ASCII string that contains one or more\r | |
122 | ISO 639-2 language codes. This is the list of language \r | |
123 | codes that this protocol supports.\r | |
124 | \r | |
125 | **/\r | |
126 | struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL {\r | |
127 | EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS RunDiagnostics;\r | |
128 | CHAR8 *SupportedLanguages;\r | |
129 | };\r | |
130 | \r | |
131 | extern EFI_GUID gEfiDriverDiagnosticsProtocolGuid;\r | |
132 | extern EFI_GUID gUefiDriverDiagnosticsProtocolGuid;\r | |
133 | \r | |
134 | #endif\r |