EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverDiagnostics/DriverDiagnostics.h

Go to the documentation of this file.
00001 /*++
00002 
00003 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
00004 This program and the accompanying materials                          
00005 are licensed and made available under the terms and conditions of the BSD License         
00006 which accompanies this distribution.  The full text of the license may be found at        
00007 http://opensource.org/licenses/bsd-license.php                                            
00008                                                                                           
00009 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
00010 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
00011 
00012 Module Name:
00013 
00014     DriverDiagnostics.h
00015     
00016 Abstract:
00017 
00018     EFI Driver Diagnostics Protocol
00019 
00020 Revision History
00021 
00022 --*/
00023 
00024 #ifndef _EFI_DRIVER_DIAGNOSTICS_H_
00025 #define _EFI_DRIVER_DIAGNOSTICS_H_
00026 
00027 //
00028 // Global ID for the Driver Diagnostics Protocol
00029 //
00030 #define EFI_DRIVER_DIAGNOSTICS_PROTOCOL_GUID \
00031   { \
00032     0x0784924f, 0xe296, 0x11d4, {0x9a, 0x49, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} \
00033   }
00034 
00035 EFI_FORWARD_DECLARATION (EFI_DRIVER_DIAGNOSTICS_PROTOCOL);
00036 
00037 typedef enum {
00038   EfiDriverDiagnosticTypeStandard     = 0,
00039   EfiDriverDiagnosticTypeExtended     = 1,
00040   EfiDriverDiagnosticTypeManufacturing= 2,
00041   EfiDriverDiagnosticTypeMaximum
00042 } EFI_DRIVER_DIAGNOSTIC_TYPE;
00043 
00044 typedef
00045 EFI_STATUS
00046 (EFIAPI *EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS) (
00047   IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL                        * This,
00048   IN  EFI_HANDLE                                            ControllerHandle,
00049   IN  EFI_HANDLE                                            ChildHandle  OPTIONAL,
00050   IN  EFI_DRIVER_DIAGNOSTIC_TYPE                            DiagnosticType,
00051   IN  CHAR8                                                 *Language,
00052   OUT EFI_GUID                                              **ErrorType,
00053   OUT UINTN                                                 *BufferSize,
00054   OUT CHAR16                                                **Buffer
00055   );
00056 
00057 /*++
00058 
00059   Routine Description:
00060     Runs diagnostics on a controller.
00061 
00062   Arguments:
00063     This             - A pointer to the EFI_DRIVER_DIAGNOSTICS_PROTOCOL instance.
00064     ControllerHandle - The handle of the controller to run diagnostics on.
00065     ChildHandle      - The handle of the child controller to run diagnostics on  
00066                        This is an optional parameter that may be NULL.  It will 
00067                        be NULL for device drivers.  It will also be NULL for a 
00068                        bus drivers that wish to run diagnostics on the bus 
00069                        controller.  It will not be NULL for a bus driver that 
00070                        wishes to run diagnostics on one of its child controllers.
00071     DiagnosticType   - Indicates type of diagnostics to perform on the controller 
00072                        specified by ControllerHandle and ChildHandle.   See 
00073                        "Related Definitions" for the list of supported types.
00074     Language         - A pointer to a three character ISO 639-2 language 
00075                        identifier.  This is the language in which the optional 
00076                        error message should be returned in Buffer, and it must 
00077                        match one of the languages specified in SupportedLanguages.
00078                        The number of languages supported by a driver is up to 
00079                        the driver writer.  
00080     ErrorType        - A GUID that defines the format of the data returned in 
00081                        Buffer.  
00082     BufferSize       - The size, in bytes, of the data returned in Buffer.  
00083     Buffer           - A buffer that contains a Null-terminated Unicode string 
00084                        plus some additional data whose format is defined by 
00085                        ErrorType.  Buffer is allocated by this function with 
00086                        AllocatePool(), and it is the caller's responsibility 
00087                        to free it with a call to FreePool().  
00088 
00089   Returns:
00090     EFI_SUCCESS           - The controller specified by ControllerHandle and 
00091                             ChildHandle passed the diagnostic.
00092     EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
00093     EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid 
00094                             EFI_HANDLE.
00095     EFI_INVALID_PARAMETER - Language is NULL.
00096     EFI_INVALID_PARAMETER - ErrorType is NULL.
00097     EFI_INVALID_PARAMETER - BufferType is NULL.
00098     EFI_INVALID_PARAMETER - Buffer is NULL.
00099     EFI_UNSUPPORTED       - The driver specified by This does not support 
00100                             running diagnostics for the controller specified 
00101                             by ControllerHandle and ChildHandle.
00102     EFI_UNSUPPORTED       - The driver specified by This does not support the 
00103                             type of diagnostic specified by DiagnosticType.
00104     EFI_UNSUPPORTED       - The driver specified by This does not support the 
00105                             language specified by Language.
00106     EFI_OUT_OF_RESOURCES  - There are not enough resources available to complete
00107                             the diagnostics.
00108     EFI_OUT_OF_RESOURCES  - There are not enough resources available to return
00109                             the status information in ErrorType, BufferSize, 
00110                             and Buffer.
00111     EFI_DEVICE_ERROR      - The controller specified by ControllerHandle and 
00112                             ChildHandle did not pass the diagnostic.
00113 
00114 --*/
00115 
00116 //
00117 // Interface structure for the Driver Diagnostics Protocol
00118 //
00119 struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL {
00120   EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS  RunDiagnostics;
00121   CHAR8                                   *SupportedLanguages;
00122 };
00123 
00124 /*++
00125 
00126   Protocol Description:
00127     Used to perform diagnostics on a controller that an EFI Driver is managing.
00128 
00129   Parameters:
00130     RunDiagnostics     - Runs diagnostics on a controller.
00131     SupportedLanguages - A Null-terminated ASCII string that contains one or more
00132                          ISO 639-2 language codes.  This is the list of language 
00133                          codes that this protocol supports.
00134 
00135 --*/
00136 extern EFI_GUID gEfiDriverDiagnosticsProtocolGuid;
00137 
00138 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines