iPXE
ComponentName2.h
Go to the documentation of this file.
1/** @file
2 UEFI Component Name 2 Protocol as defined in the UEFI 2.1 specification.
3 This protocol is used to retrieve user readable names of drivers
4 and controllers managed by UEFI Drivers.
5
6 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
7 SPDX-License-Identifier: BSD-2-Clause-Patent
8
9**/
10
11#ifndef __EFI_COMPONENT_NAME2_H__
12#define __EFI_COMPONENT_NAME2_H__
13
14FILE_LICENCE ( BSD2_PATENT );
15FILE_SECBOOT ( PERMITTED );
16
17///
18/// Global ID for the Component Name Protocol
19///
20#define EFI_COMPONENT_NAME2_PROTOCOL_GUID \
21 {0x6a7a5cff, 0xe8d9, 0x4f70, { 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14 } }
22
24
25/**
26 Retrieves a string that is the user readable name of
27 the EFI Driver.
28
29 @param This A pointer to the
30 EFI_COMPONENT_NAME2_PROTOCOL instance.
31
32 @param Language A pointer to a Null-terminated ASCII string
33 array indicating the language. This is the
34 language of the driver name that the caller
35 is requesting, and it must match one of the
36 languages specified in SupportedLanguages.
37 The number of languages supported by a
38 driver is up to the driver writer. Language
39 is specified in RFC 4646 language code
40 format.
41
42 @param DriverName A pointer to the string to return.
43 This string is the name of the
44 driver specified by This in the language
45 specified by Language.
46
47 @retval EFI_SUCCESS The string for the
48 Driver specified by This and the
49 language specified by Language
50 was returned in DriverName.
51
52 @retval EFI_INVALID_PARAMETER Language is NULL.
53
54 @retval EFI_INVALID_PARAMETER DriverName is NULL.
55
56 @retval EFI_UNSUPPORTED The driver specified by This
57 does not support the language
58 specified by Language.
59
60**/
61typedef
65 IN CHAR8 *Language,
66 OUT CHAR16 **DriverName
67 );
68
69/**
70 Retrieves a string that is the user readable name of
71 the controller that is being managed by an EFI Driver.
72
73 @param This A pointer to the
74 EFI_COMPONENT_NAME2_PROTOCOL instance.
75
76 @param ControllerHandle The handle of a controller that the
77 driver specified by This is managing.
78 This handle specifies the controller
79 whose name is to be returned.
80
81 @param ChildHandle The handle of the child controller to
82 retrieve the name of. This is an
83 optional parameter that may be NULL.
84 It will be NULL for device drivers.
85 It will also be NULL for bus
86 drivers that wish to retrieve the
87 name of the bus controller. It will
88 not be NULL for a bus driver that
89 wishes to retrieve the name of a
90 child controller.
91
92 @param Language A pointer to a Null-terminated ASCII
93 string array indicating the language.
94 This is the language of the driver
95 name that the caller is requesting,
96 and it must match one of the
97 languages specified in
98 SupportedLanguages. The number of
99 languages supported by a driver is up
100 to the driver writer. Language is
101 specified in RFC 4646 language code
102 format.
103
104 @param ControllerName A pointer to the string to return.
105 This string is the name of the controller
106 specified by ControllerHandle and ChildHandle
107 in the language specified by Language
108 from the point of view of the driver
109 specified by This.
110
111 @retval EFI_SUCCESS The string for the user
112 readable name in the language
113 specified by Language for the
114 driver specified by This was
115 returned in DriverName.
116
117 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
118
119 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it
120 is not a valid EFI_HANDLE.
121
122 @retval EFI_INVALID_PARAMETER Language is NULL.
123
124 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
125
126 @retval EFI_UNSUPPORTED The driver specified by This is
127 not currently managing the
128 controller specified by
129 ControllerHandle and
130 ChildHandle.
131
132 @retval EFI_UNSUPPORTED The driver specified by This
133 does not support the language
134 specified by Language.
135
136**/
137typedef
142 IN EFI_HANDLE ChildHandle OPTIONAL,
143 IN CHAR8 *Language,
144 OUT CHAR16 **ControllerName
145 );
146
147///
148/// This protocol is used to retrieve user readable names of drivers
149/// and controllers managed by UEFI Drivers.
150///
154
155 ///
156 /// A Null-terminated ASCII string array that contains one or more
157 /// supported language codes. This is the list of language codes that
158 /// this protocol supports. The number of languages supported by a
159 /// driver is up to the driver writer. SupportedLanguages is
160 /// specified in RFC 4646 format.
161 ///
163};
164
166
167#endif
char CHAR8
1-byte Character
unsigned short CHAR16
2-byte Character.
#define EFIAPI
#define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
Definition Base.h:293
EFI_STATUS(EFIAPI * EFI_COMPONENT_NAME2_GET_DRIVER_NAME)(IN EFI_COMPONENT_NAME2_PROTOCOL *This, IN CHAR8 *Language, OUT CHAR16 **DriverName)
Retrieves a string that is the user readable name of the EFI Driver.
struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL
EFI_GUID gEfiComponentName2ProtocolGuid
EFI_STATUS(EFIAPI * EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)(IN EFI_COMPONENT_NAME2_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle OPTIONAL, IN CHAR8 *Language, OUT CHAR16 **ControllerName)
Retrieves a string that is the user readable name of the controller that is being managed by an EFI D...
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
GUID EFI_GUID
128-bit buffer containing a unique identifier value.
EFI_HANDLE ControllerHandle
Definition efi_bofm.c:110
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
#define EFI_HANDLE
Definition efi.h:53
#define IN
Definition mlx_utils.h:28
#define OUT
Definition mlx_utils.h:29
This protocol is used to retrieve user readable names of drivers and controllers managed by UEFI Driv...
EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName
CHAR8 * SupportedLanguages
A Null-terminated ASCII string array that contains one or more supported language codes.
EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName