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#pragma once
12
13FILE_LICENCE ( BSD2_PATENT );
14FILE_SECBOOT ( PERMITTED );
15
16///
17/// Global ID for the Component Name Protocol
18///
19#define EFI_COMPONENT_NAME2_PROTOCOL_GUID \
20 {0x6a7a5cff, 0xe8d9, 0x4f70, { 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14 } }
21
23
24/**
25 Retrieves a string that is the user readable name of
26 the EFI Driver.
27
28 @param This A pointer to the
29 EFI_COMPONENT_NAME2_PROTOCOL instance.
30
31 @param Language A pointer to a Null-terminated ASCII string
32 array indicating the language. This is the
33 language of the driver name that the caller
34 is requesting, and it must match one of the
35 languages specified in SupportedLanguages.
36 The number of languages supported by a
37 driver is up to the driver writer. Language
38 is specified in RFC 4646 language code
39 format.
40
41 @param DriverName A pointer to the string to return.
42 This string is the name of the
43 driver specified by This in the language
44 specified by Language.
45
46 @retval EFI_SUCCESS The string for the
47 Driver specified by This and the
48 language specified by Language
49 was returned in DriverName.
50
51 @retval EFI_INVALID_PARAMETER Language is NULL.
52
53 @retval EFI_INVALID_PARAMETER DriverName is NULL.
54
55 @retval EFI_UNSUPPORTED The driver specified by This
56 does not support the language
57 specified by Language.
58
59**/
60typedef
64 IN CHAR8 *Language,
65 OUT CHAR16 **DriverName
66 );
67
68/**
69 Retrieves a string that is the user readable name of
70 the controller that is being managed by an EFI Driver.
71
72 @param This A pointer to the
73 EFI_COMPONENT_NAME2_PROTOCOL instance.
74
75 @param ControllerHandle The handle of a controller that the
76 driver specified by This is managing.
77 This handle specifies the controller
78 whose name is to be returned.
79
80 @param ChildHandle The handle of the child controller to
81 retrieve the name of. This is an
82 optional parameter that may be NULL.
83 It will be NULL for device drivers.
84 It will also be NULL for bus
85 drivers that wish to retrieve the
86 name of the bus controller. It will
87 not be NULL for a bus driver that
88 wishes to retrieve the name of a
89 child controller.
90
91 @param Language A pointer to a Null-terminated ASCII
92 string array indicating the language.
93 This is the language of the driver
94 name that the caller is requesting,
95 and it must match one of the
96 languages specified in
97 SupportedLanguages. The number of
98 languages supported by a driver is up
99 to the driver writer. Language is
100 specified in RFC 4646 language code
101 format.
102
103 @param ControllerName A pointer to the string to return.
104 This string is the name of the controller
105 specified by ControllerHandle and ChildHandle
106 in the language specified by Language
107 from the point of view of the driver
108 specified by This.
109
110 @retval EFI_SUCCESS The string for the user
111 readable name in the language
112 specified by Language for the
113 driver specified by This was
114 returned in DriverName.
115
116 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
117
118 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it
119 is not a valid EFI_HANDLE.
120
121 @retval EFI_INVALID_PARAMETER Language is NULL.
122
123 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
124
125 @retval EFI_UNSUPPORTED The driver specified by This is
126 not currently managing the
127 controller specified by
128 ControllerHandle and
129 ChildHandle.
130
131 @retval EFI_UNSUPPORTED The driver specified by This
132 does not support the language
133 specified by Language.
134
135**/
136typedef
141 IN EFI_HANDLE ChildHandle OPTIONAL,
142 IN CHAR8 *Language,
143 OUT CHAR16 **ControllerName
144 );
145
146///
147/// This protocol is used to retrieve user readable names of drivers
148/// and controllers managed by UEFI Drivers.
149///
153
154 ///
155 /// A Null-terminated ASCII string array that contains one or more
156 /// supported language codes. This is the list of language codes that
157 /// this protocol supports. The number of languages supported by a
158 /// driver is up to the driver writer. SupportedLanguages is
159 /// specified in RFC 4646 format.
160 ///
162};
163
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:292
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:921
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:951
#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