1*f439973dSWarner Losh /** @file 2*f439973dSWarner Losh EFI Component Name Protocol as defined in the EFI 1.1 specification. 3*f439973dSWarner Losh This protocol is used to retrieve user readable names of EFI Drivers 4*f439973dSWarner Losh and controllers managed by EFI Drivers. 5*f439973dSWarner Losh 6*f439973dSWarner Losh Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> 7*f439973dSWarner Losh SPDX-License-Identifier: BSD-2-Clause-Patent 8*f439973dSWarner Losh 9*f439973dSWarner Losh **/ 10*f439973dSWarner Losh 11*f439973dSWarner Losh #ifndef __EFI_COMPONENT_NAME_H__ 12*f439973dSWarner Losh #define __EFI_COMPONENT_NAME_H__ 13*f439973dSWarner Losh 14*f439973dSWarner Losh /// 15*f439973dSWarner Losh /// The global ID for the Component Name Protocol. 16*f439973dSWarner Losh /// 17*f439973dSWarner Losh #define EFI_COMPONENT_NAME_PROTOCOL_GUID \ 18*f439973dSWarner Losh { \ 19*f439973dSWarner Losh 0x107a772c, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ 20*f439973dSWarner Losh } 21*f439973dSWarner Losh 22*f439973dSWarner Losh typedef struct _EFI_COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL; 23*f439973dSWarner Losh 24*f439973dSWarner Losh /** 25*f439973dSWarner Losh Retrieves a Unicode string that is the user-readable name of the EFI Driver. 26*f439973dSWarner Losh 27*f439973dSWarner Losh @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. 28*f439973dSWarner Losh @param Language A pointer to a three-character ISO 639-2 language identifier. 29*f439973dSWarner Losh This is the language of the driver name that that the caller 30*f439973dSWarner Losh is requesting, and it must match one of the languages specified 31*f439973dSWarner Losh in SupportedLanguages. The number of languages supported by a 32*f439973dSWarner Losh driver is up to the driver writer. 33*f439973dSWarner Losh @param DriverName A pointer to the Unicode string to return. This Unicode string 34*f439973dSWarner Losh is the name of the driver specified by This in the language 35*f439973dSWarner Losh specified by Language. 36*f439973dSWarner Losh 37*f439973dSWarner Losh @retval EFI_SUCCESS The Unicode string for the Driver specified by This 38*f439973dSWarner Losh and the language specified by Language was returned 39*f439973dSWarner Losh in DriverName. 40*f439973dSWarner Losh @retval EFI_INVALID_PARAMETER Language is NULL. 41*f439973dSWarner Losh @retval EFI_INVALID_PARAMETER DriverName is NULL. 42*f439973dSWarner Losh @retval EFI_UNSUPPORTED The driver specified by This does not support the 43*f439973dSWarner Losh language specified by Language. 44*f439973dSWarner Losh 45*f439973dSWarner Losh **/ 46*f439973dSWarner Losh typedef 47*f439973dSWarner Losh EFI_STATUS 48*f439973dSWarner Losh (EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME)( 49*f439973dSWarner Losh IN EFI_COMPONENT_NAME_PROTOCOL *This, 50*f439973dSWarner Losh IN CHAR8 *Language, 51*f439973dSWarner Losh OUT CHAR16 **DriverName 52*f439973dSWarner Losh ); 53*f439973dSWarner Losh 54*f439973dSWarner Losh /** 55*f439973dSWarner Losh Retrieves a Unicode string that is the user readable name of the controller 56*f439973dSWarner Losh that is being managed by an EFI Driver. 57*f439973dSWarner Losh 58*f439973dSWarner Losh @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. 59*f439973dSWarner Losh @param ControllerHandle The handle of a controller that the driver specified by 60*f439973dSWarner Losh This is managing. This handle specifies the controller 61*f439973dSWarner Losh whose name is to be returned. 62*f439973dSWarner Losh @param ChildHandle The handle of the child controller to retrieve the name 63*f439973dSWarner Losh of. This is an optional parameter that may be NULL. It 64*f439973dSWarner Losh will be NULL for device drivers. It will also be NULL 65*f439973dSWarner Losh for a bus drivers that wish to retrieve the name of the 66*f439973dSWarner Losh bus controller. It will not be NULL for a bus driver 67*f439973dSWarner Losh that wishes to retrieve the name of a child controller. 68*f439973dSWarner Losh @param Language A pointer to a three character ISO 639-2 language 69*f439973dSWarner Losh identifier. This is the language of the controller name 70*f439973dSWarner Losh that the caller is requesting, and it must match one 71*f439973dSWarner Losh of the languages specified in SupportedLanguages. The 72*f439973dSWarner Losh number of languages supported by a driver is up to the 73*f439973dSWarner Losh driver writer. 74*f439973dSWarner Losh @param ControllerName A pointer to the Unicode string to return. This Unicode 75*f439973dSWarner Losh string is the name of the controller specified by 76*f439973dSWarner Losh ControllerHandle and ChildHandle in the language specified 77*f439973dSWarner Losh by Language, from the point of view of the driver specified 78*f439973dSWarner Losh by This. 79*f439973dSWarner Losh 80*f439973dSWarner Losh @retval EFI_SUCCESS The Unicode string for the user-readable name in the 81*f439973dSWarner Losh language specified by Language for the driver 82*f439973dSWarner Losh specified by This was returned in DriverName. 83*f439973dSWarner Losh @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. 84*f439973dSWarner Losh @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 85*f439973dSWarner Losh @retval EFI_INVALID_PARAMETER Language is NULL. 86*f439973dSWarner Losh @retval EFI_INVALID_PARAMETER ControllerName is NULL. 87*f439973dSWarner Losh @retval EFI_UNSUPPORTED The driver specified by This is not currently managing 88*f439973dSWarner Losh the controller specified by ControllerHandle and 89*f439973dSWarner Losh ChildHandle. 90*f439973dSWarner Losh @retval EFI_UNSUPPORTED The driver specified by This does not support the 91*f439973dSWarner Losh language specified by Language. 92*f439973dSWarner Losh 93*f439973dSWarner Losh **/ 94*f439973dSWarner Losh typedef 95*f439973dSWarner Losh EFI_STATUS 96*f439973dSWarner Losh (EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)( 97*f439973dSWarner Losh IN EFI_COMPONENT_NAME_PROTOCOL *This, 98*f439973dSWarner Losh IN EFI_HANDLE ControllerHandle, 99*f439973dSWarner Losh IN EFI_HANDLE ChildHandle OPTIONAL, 100*f439973dSWarner Losh IN CHAR8 *Language, 101*f439973dSWarner Losh OUT CHAR16 **ControllerName 102*f439973dSWarner Losh ); 103*f439973dSWarner Losh 104*f439973dSWarner Losh /// 105*f439973dSWarner Losh /// This protocol is used to retrieve user readable names of drivers 106*f439973dSWarner Losh /// and controllers managed by UEFI Drivers. 107*f439973dSWarner Losh /// 108*f439973dSWarner Losh struct _EFI_COMPONENT_NAME_PROTOCOL { 109*f439973dSWarner Losh EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName; 110*f439973dSWarner Losh EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName; 111*f439973dSWarner Losh /// 112*f439973dSWarner Losh /// A Null-terminated ASCII string that contains one or more 113*f439973dSWarner Losh /// ISO 639-2 language codes. This is the list of language codes 114*f439973dSWarner Losh /// that this protocol supports. 115*f439973dSWarner Losh /// 116*f439973dSWarner Losh CHAR8 *SupportedLanguages; 117*f439973dSWarner Losh }; 118*f439973dSWarner Losh 119*f439973dSWarner Losh extern EFI_GUID gEfiComponentNameProtocolGuid; 120*f439973dSWarner Losh 121*f439973dSWarner Losh #endif 122