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