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