Path: blob/main/sys/contrib/edk2/Include/Protocol/DriverDiagnostics2.h
96339 views
/** @file1UEFI Driver Diagnostics2 Protocol23Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>4SPDX-License-Identifier: BSD-2-Clause-Patent56**/78#ifndef __EFI_DRIVER_DIAGNOSTICS2_H__9#define __EFI_DRIVER_DIAGNOSTICS2_H__1011#include <Protocol/DriverDiagnostics.h>1213#define EFI_DRIVER_DIAGNOSTICS2_PROTOCOL_GUID \14{ \150x4d330321, 0x025f, 0x4aac, {0x90, 0xd8, 0x5e, 0xd9, 0x00, 0x17, 0x3b, 0x63 } \16}1718typedef struct _EFI_DRIVER_DIAGNOSTICS2_PROTOCOL EFI_DRIVER_DIAGNOSTICS2_PROTOCOL;1920/**21Runs diagnostics on a controller.2223@param This A pointer to the EFI_DRIVER_DIAGNOSTICS2_PROTOCOL instance.24@param ControllerHandle The handle of the controller to run diagnostics on.25@param ChildHandle The handle of the child controller to run diagnostics on26This is an optional parameter that may be NULL. It will27be NULL for device drivers. It will also be NULL for28bus drivers that wish to run diagnostics on the bus29controller. It will not be NULL for a bus driver that30wishes to run diagnostics on one of its child controllers.31@param DiagnosticType Indicates the type of diagnostics to perform on the controller32specified by ControllerHandle and ChildHandle. See33"Related Definitions" for the list of supported types.34@param Language A pointer to a Null-terminated ASCII string35array indicating the language. This is the36language of the driver name that the caller37is requesting, and it must match one of the38languages specified in SupportedLanguages.39The number of languages supported by a40driver is up to the driver writer. Language41is specified in RFC 4646 language code format.42@param ErrorType A GUID that defines the format of the data returned in Buffer.43@param BufferSize The size, in bytes, of the data returned in Buffer.44@param Buffer A buffer that contains a Null-terminated Unicode string45plus some additional data whose format is defined by46ErrorType. Buffer is allocated by this function with47AllocatePool(), and it is the caller's responsibility48to free it with a call to FreePool().4950@retval EFI_SUCCESS The controller specified by ControllerHandle and51ChildHandle passed the diagnostic.52@retval EFI_ACCESS_DENIED The request for initiating diagnostics was unable53to be complete due to some underlying hardware or54software state.55@retval EFI_INVALID_PARAMETER ControllerHandle is NULL.56@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.57@retval EFI_INVALID_PARAMETER Language is NULL.58@retval EFI_INVALID_PARAMETER ErrorType is NULL.59@retval EFI_INVALID_PARAMETER BufferType is NULL.60@retval EFI_INVALID_PARAMETER Buffer is NULL.61@retval EFI_UNSUPPORTED The driver specified by This does not support62running diagnostics for the controller specified63by ControllerHandle and ChildHandle.64@retval EFI_UNSUPPORTED The driver specified by This does not support the65type of diagnostic specified by DiagnosticType.66@retval EFI_UNSUPPORTED The driver specified by This does not support the67language specified by Language.68@retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete69the diagnostics.70@retval EFI_OUT_OF_RESOURCES There are not enough resources available to return71the status information in ErrorType, BufferSize,72and Buffer.73@retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and74ChildHandle did not pass the diagnostic.7576**/77typedef78EFI_STATUS79(EFIAPI *EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS)(80IN EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *This,81IN EFI_HANDLE ControllerHandle,82IN EFI_HANDLE ChildHandle OPTIONAL,83IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType,84IN CHAR8 *Language,85OUT EFI_GUID **ErrorType,86OUT UINTN *BufferSize,87OUT CHAR16 **Buffer88);8990///91/// Used to perform diagnostics on a controller that an EFI Driver is managing.92///93struct _EFI_DRIVER_DIAGNOSTICS2_PROTOCOL {94EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS RunDiagnostics;95///96/// A Null-terminated ASCII string that contains one or more RFC 464697/// language codes. This is the list of language codes that this protocol supports.98///99CHAR8 *SupportedLanguages;100};101102extern EFI_GUID gEfiDriverDiagnostics2ProtocolGuid;103104#endif105106107