]>
Commit | Line | Data |
---|---|---|
4b120077 | 1 | /** @file\r |
4ca9b6c4 | 2 | UEFI Driver Diagnostics2 Protocol\r |
4b120077 | 3 | \r |
4ca9b6c4 | 4 | Copyright (c) 2006 - 2008, Intel Corporation \r |
4b120077 | 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 | |
4b120077 | 13 | **/\r |
14 | \r | |
15 | #ifndef __EFI_DRIVER_DIAGNOSTICS2_H__\r | |
16 | #define __EFI_DRIVER_DIAGNOSTICS2_H__\r | |
17 | \r | |
18 | #include <Protocol/DriverDiagnostics.h>\r | |
19 | \r | |
20 | #define EFI_DRIVER_DIAGNOSTICS2_PROTOCOL_GUID \\r | |
21 | { \\r | |
22 | 0x4d330321, 0x025f, 0x4aac, {0x90, 0xd8, 0x5e, 0xd9, 0x00, 0x17, 0x3b, 0x63 } \\r | |
23 | }\r | |
24 | \r | |
25 | typedef struct _EFI_DRIVER_DIAGNOSTICS2_PROTOCOL EFI_DRIVER_DIAGNOSTICS2_PROTOCOL;\r | |
26 | \r | |
27 | /**\r | |
28 | Runs diagnostics on a controller.\r | |
29 | \r | |
4ca9b6c4 | 30 | @param This A pointer to the EFI_DRIVER_DIAGNOSTICS2_PROTOCOL instance.\r |
4b120077 | 31 | @param ControllerHandle The handle of the controller to run diagnostics on.\r |
32 | @param ChildHandle The handle of the child controller to run diagnostics on\r | |
33 | This is an optional parameter that may be NULL. It will\r | |
630b4187 | 34 | be NULL for device drivers. It will also be NULL for \r |
4b120077 | 35 | bus drivers that wish to run diagnostics on the bus\r |
36 | controller. It will not be NULL for a bus driver that\r | |
37 | wishes to run diagnostics on one of its child controllers.\r | |
630b4187 | 38 | @param DiagnosticType Indicates the type of diagnostics to perform on the controller\r |
4b120077 | 39 | specified by ControllerHandle and ChildHandle. See\r |
40 | "Related Definitions" for the list of supported types.\r | |
4ca9b6c4 LG |
41 | @param Language A pointer to a Null-terminated ASCII string\r |
42 | array indicating the language. This is the\r | |
43 | language of the driver name that the caller\r | |
44 | is requesting, and it must match one of the\r | |
45 | languages specified in SupportedLanguages.\r | |
46 | The number of languages supported by a\r | |
47 | driver is up to the driver writer. Language\r | |
7eb05636 | 48 | is specified in RFC 4646 language code format.\r |
4b120077 | 49 | @param ErrorType A GUID that defines the format of the data returned in Buffer.\r |
50 | @param BufferSize The size, in bytes, of the data returned in Buffer.\r | |
51 | @param Buffer A buffer that contains a Null-terminated Unicode string\r | |
52 | plus some additional data whose format is defined by\r | |
53 | ErrorType. Buffer is allocated by this function with\r | |
54 | AllocatePool(), and it is the caller's responsibility\r | |
55 | to free it with a call to FreePool().\r | |
56 | \r | |
57 | @retval EFI_SUCCESS The controller specified by ControllerHandle and\r | |
58 | ChildHandle passed the diagnostic.\r | |
764f4d53 | 59 | @retval EFI_ACCESS_DENIED The request for initiating diagnostics was unable\r |
60 | to be complete due to some underlying hardware or\r | |
61 | software state.\r | |
4b120077 | 62 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r |
63 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r | |
64 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
65 | @retval EFI_INVALID_PARAMETER ErrorType is NULL.\r | |
66 | @retval EFI_INVALID_PARAMETER BufferType is NULL.\r | |
67 | @retval EFI_INVALID_PARAMETER Buffer is NULL.\r | |
68 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
69 | running diagnostics for the controller specified\r | |
70 | by ControllerHandle and ChildHandle.\r | |
71 | @retval EFI_UNSUPPORTED The driver specified by This does not support the\r | |
72 | type of diagnostic specified by DiagnosticType.\r | |
73 | @retval EFI_UNSUPPORTED The driver specified by This does not support the\r | |
74 | language specified by Language.\r | |
75 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete\r | |
76 | the diagnostics.\r | |
77 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to return\r | |
78 | the status information in ErrorType, BufferSize,\r | |
79 | and Buffer.\r | |
80 | @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and\r | |
81 | ChildHandle did not pass the diagnostic.\r | |
82 | \r | |
83 | **/\r | |
84 | typedef\r | |
85 | EFI_STATUS\r | |
8b13229b | 86 | (EFIAPI *EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS)(\r |
4b120077 | 87 | IN EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *This,\r |
88 | IN EFI_HANDLE ControllerHandle,\r | |
89 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
90 | IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType,\r | |
91 | IN CHAR8 *Language,\r | |
92 | OUT EFI_GUID **ErrorType,\r | |
93 | OUT UINTN *BufferSize,\r | |
94 | OUT CHAR16 **Buffer\r | |
95 | );\r | |
96 | \r | |
44717a39 | 97 | ///\r |
98 | /// Used to perform diagnostics on a controller that an EFI Driver is managing.\r | |
99 | ///\r | |
4b120077 | 100 | struct _EFI_DRIVER_DIAGNOSTICS2_PROTOCOL {\r |
101 | EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS RunDiagnostics;\r | |
3354353d | 102 | ///\r |
7eb05636 | 103 | /// A Null-terminated ASCII string that contains one or more RFC 4646\r |
3354353d | 104 | /// language codes. This is the list of language codes that this protocol supports. \r |
105 | /// \r | |
4b120077 | 106 | CHAR8 *SupportedLanguages;\r |
107 | };\r | |
108 | \r | |
109 | extern EFI_GUID gEfiDriverDiagnostics2ProtocolGuid;\r | |
110 | \r | |
111 | #endif\r |