1 | /** @file
|
---|
2 | UEFI Driver Diagnostics2 Protocol
|
---|
3 |
|
---|
4 | Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
---|
5 | 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_DIAGNOSTICS2_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
|
---|
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 the 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 Null-terminated ASCII string
|
---|
42 | array indicating the language. This is the
|
---|
43 | language of the driver name that the caller
|
---|
44 | is requesting, and it must match one of the
|
---|
45 | languages specified in SupportedLanguages.
|
---|
46 | The number of languages supported by a
|
---|
47 | driver is up to the driver writer. Language
|
---|
48 | is specified in RFC 4646 language code format.
|
---|
49 | @param ErrorType A GUID that defines the format of the data returned in Buffer.
|
---|
50 | @param BufferSize The size, in bytes, of the data returned in Buffer.
|
---|
51 | @param Buffer A buffer that contains a Null-terminated Unicode string
|
---|
52 | plus some additional data whose format is defined by
|
---|
53 | ErrorType. Buffer is allocated by this function with
|
---|
54 | AllocatePool(), and it is the caller's responsibility
|
---|
55 | to free it with a call to FreePool().
|
---|
56 |
|
---|
57 | @retval EFI_SUCCESS The controller specified by ControllerHandle and
|
---|
58 | ChildHandle passed the diagnostic.
|
---|
59 | @retval EFI_ACCESS_DENIED The request for initiating diagnostics was unable
|
---|
60 | to be complete due to some underlying hardware or
|
---|
61 | software state.
|
---|
62 | @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
|
---|
63 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
---|
64 | @retval EFI_INVALID_PARAMETER Language is NULL.
|
---|
65 | @retval EFI_INVALID_PARAMETER ErrorType is NULL.
|
---|
66 | @retval EFI_INVALID_PARAMETER BufferType is NULL.
|
---|
67 | @retval EFI_INVALID_PARAMETER Buffer is NULL.
|
---|
68 | @retval EFI_UNSUPPORTED The driver specified by This does not support
|
---|
69 | running diagnostics for the controller specified
|
---|
70 | by ControllerHandle and ChildHandle.
|
---|
71 | @retval EFI_UNSUPPORTED The driver specified by This does not support the
|
---|
72 | type of diagnostic specified by DiagnosticType.
|
---|
73 | @retval EFI_UNSUPPORTED The driver specified by This does not support the
|
---|
74 | language specified by Language.
|
---|
75 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete
|
---|
76 | the diagnostics.
|
---|
77 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to return
|
---|
78 | the status information in ErrorType, BufferSize,
|
---|
79 | and Buffer.
|
---|
80 | @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and
|
---|
81 | ChildHandle did not pass the diagnostic.
|
---|
82 |
|
---|
83 | **/
|
---|
84 | typedef
|
---|
85 | EFI_STATUS
|
---|
86 | (EFIAPI *EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS)(
|
---|
87 | IN EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *This,
|
---|
88 | IN EFI_HANDLE ControllerHandle,
|
---|
89 | IN EFI_HANDLE ChildHandle OPTIONAL,
|
---|
90 | IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType,
|
---|
91 | IN CHAR8 *Language,
|
---|
92 | OUT EFI_GUID **ErrorType,
|
---|
93 | OUT UINTN *BufferSize,
|
---|
94 | OUT CHAR16 **Buffer
|
---|
95 | );
|
---|
96 |
|
---|
97 | ///
|
---|
98 | /// Used to perform diagnostics on a controller that an EFI Driver is managing.
|
---|
99 | ///
|
---|
100 | struct _EFI_DRIVER_DIAGNOSTICS2_PROTOCOL {
|
---|
101 | EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS RunDiagnostics;
|
---|
102 | ///
|
---|
103 | /// A Null-terminated ASCII string that contains one or more RFC 4646
|
---|
104 | /// language codes. This is the list of language codes that this protocol supports.
|
---|
105 | ///
|
---|
106 | CHAR8 *SupportedLanguages;
|
---|
107 | };
|
---|
108 |
|
---|
109 | extern EFI_GUID gEfiDriverDiagnostics2ProtocolGuid;
|
---|
110 |
|
---|
111 | #endif
|
---|