f8cd287b |
1 | /**@file\r |
637ff819 |
2 | \r |
f8cd287b |
3 | \r |
4 | Copyright (c) 2006 - 2007, Intel Corporation.<BR>\r |
5 | All rights reserved. This program and the accompanying materials\r |
6 | are licensed and made available under the terms and conditions of the BSD License\r |
7 | which accompanies this distribution. The full text of the license may be found at\r |
8 | http://opensource.org/licenses/bsd-license.php\r |
366565e0 |
9 | \r |
f8cd287b |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r |
637ff819 |
12 | \r |
f8cd287b |
13 | **/\r |
637ff819 |
14 | \r |
15 | #ifndef _SERIAL_COMPONENT_NAME_H\r |
16 | #define _SERIAL_COMPONENT_NAME_H\r |
17 | \r |
18 | #define SERIAL_PORT_NAME "ISA Serial Port # "\r |
19 | #define ADD_SERIAL_NAME(x, y) AddName ((x), (y))\r |
20 | \r |
21 | extern EFI_COMPONENT_NAME_PROTOCOL gIsaSerialComponentName;\r |
22 | \r |
23 | //\r |
24 | // EFI Component Name Functions\r |
25 | //\r |
26 | EFI_STATUS\r |
27 | EFIAPI\r |
28 | IsaSerialComponentNameGetDriverName (\r |
29 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r |
30 | IN CHAR8 *Language,\r |
31 | OUT CHAR16 **DriverName\r |
32 | )\r |
33 | /*++\r |
34 | \r |
35 | Routine Description:\r |
36 | \r |
37 | Retrieves a Unicode string that is the user readable name of the EFI Driver.\r |
38 | \r |
39 | Arguments:\r |
40 | \r |
41 | This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r |
42 | Language - A pointer to a three character ISO 639-2 language identifier.\r |
43 | This is the language of the driver name that that the caller\r |
44 | is requesting, and it must match one of the languages specified\r |
45 | in SupportedLanguages. The number of languages supported by a\r |
46 | driver is up to the driver writer.\r |
47 | DriverName - A pointer to the Unicode string to return. This Unicode string\r |
48 | is the name of the driver specified by This in the language\r |
49 | specified by Language.\r |
50 | \r |
51 | Returns:\r |
52 | \r |
53 | EFI_SUCCESS - The Unicode string for the Driver specified by This\r |
54 | and the language specified by Language was returned\r |
55 | in DriverName.\r |
56 | EFI_INVALID_PARAMETER - Language is NULL.\r |
57 | EFI_INVALID_PARAMETER - DriverName is NULL.\r |
58 | EFI_UNSUPPORTED - The driver specified by This does not support the\r |
59 | language specified by Language.\r |
60 | \r |
61 | --*/\r |
62 | ;\r |
63 | \r |
64 | EFI_STATUS\r |
65 | EFIAPI\r |
66 | IsaSerialComponentNameGetControllerName (\r |
67 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r |
68 | IN EFI_HANDLE ControllerHandle,\r |
69 | IN EFI_HANDLE ChildHandle OPTIONAL,\r |
70 | IN CHAR8 *Language,\r |
71 | OUT CHAR16 **ControllerName\r |
72 | )\r |
73 | /*++\r |
74 | \r |
75 | Routine Description:\r |
76 | \r |
77 | Retrieves a Unicode string that is the user readable name of the controller\r |
78 | that is being managed by an EFI Driver.\r |
79 | \r |
80 | Arguments:\r |
81 | \r |
82 | This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r |
83 | ControllerHandle - The handle of a controller that the driver specified by\r |
84 | This is managing. This handle specifies the controller\r |
85 | whose name is to be returned.\r |
86 | ChildHandle - The handle of the child controller to retrieve the name\r |
87 | of. This is an optional parameter that may be NULL. It\r |
88 | will be NULL for device drivers. It will also be NULL\r |
89 | for a bus drivers that wish to retrieve the name of the\r |
90 | bus controller. It will not be NULL for a bus driver\r |
91 | that wishes to retrieve the name of a child controller.\r |
92 | Language - A pointer to a three character ISO 639-2 language\r |
93 | identifier. This is the language of the controller name\r |
94 | that that the caller is requesting, and it must match one\r |
95 | of the languages specified in SupportedLanguages. The\r |
96 | number of languages supported by a driver is up to the\r |
97 | driver writer.\r |
98 | ControllerName - A pointer to the Unicode string to return. This Unicode\r |
99 | string is the name of the controller specified by\r |
100 | ControllerHandle and ChildHandle in the language\r |
101 | specified by Language from the point of view of the\r |
102 | driver specified by This.\r |
103 | \r |
104 | Returns:\r |
105 | \r |
106 | EFI_SUCCESS - The Unicode string for the user readable name in the\r |
107 | language specified by Language for the driver\r |
108 | specified by This was returned in DriverName.\r |
109 | EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r |
110 | EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid\r |
111 | EFI_HANDLE.\r |
112 | EFI_INVALID_PARAMETER - Language is NULL.\r |
113 | EFI_INVALID_PARAMETER - ControllerName is NULL.\r |
114 | EFI_UNSUPPORTED - The driver specified by This is not currently\r |
115 | managing the controller specified by\r |
116 | ControllerHandle and ChildHandle.\r |
117 | EFI_UNSUPPORTED - The driver specified by This does not support the\r |
118 | language specified by Language.\r |
119 | \r |
120 | --*/\r |
121 | ;\r |
122 | \r |
123 | VOID\r |
124 | AddName (\r |
125 | IN SERIAL_DEV *SerialDevice,\r |
126 | IN EFI_ISA_IO_PROTOCOL *IsaIo\r |
127 | )\r |
128 | /*++\r |
129 | \r |
130 | Routine Description:\r |
131 | \r |
132 | Add the component name for the serial io device\r |
133 | \r |
134 | Arguments:\r |
135 | \r |
136 | SerialDevice - A pointer to the SERIAL_DEV instance.\r |
137 | IsaIo - A pointer to the EFI_ISA_IO_PROTOCOL instance.\r |
138 | \r |
139 | Returns:\r |
140 | \r |
141 | None\r |
142 | \r |
143 | --*/\r |
144 | ;\r |
145 | \r |
146 | #endif\r |