]>
Commit | Line | Data |
---|---|---|
a42e6d44 AB |
1 | /** @file\r |
2 | \r | |
3 | Copyright (C) 2016, Linaro Ltd. All rights reserved.<BR>\r | |
4 | \r | |
5 | This program and the accompanying materials are licensed and made available\r | |
6 | under the terms and conditions of the BSD License which accompanies this\r | |
7 | distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r | |
11 | WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #include "NonDiscoverablePciDeviceIo.h"\r | |
16 | \r | |
17 | //\r | |
18 | // The purpose of the following scaffolding (EFI_COMPONENT_NAME_PROTOCOL and\r | |
19 | // EFI_COMPONENT_NAME2_PROTOCOL implementation) is to format the driver's name\r | |
20 | // in English, for display on standard console devices. This is recommended for\r | |
21 | // UEFI drivers that follow the UEFI Driver Model. Refer to the Driver Writer's\r | |
22 | // Guide for UEFI 2.3.1 v1.01, 11 UEFI Driver and Controller Names.\r | |
23 | //\r | |
24 | \r | |
25 | STATIC\r | |
26 | EFI_UNICODE_STRING_TABLE mDriverNameTable[] = {\r | |
27 | { "eng;en", L"PCI I/O protocol emulation driver for non-discoverable devices" },\r | |
28 | { NULL, NULL }\r | |
29 | };\r | |
30 | \r | |
31 | EFI_COMPONENT_NAME_PROTOCOL gComponentName;\r | |
32 | \r | |
33 | STATIC\r | |
34 | EFI_STATUS\r | |
35 | EFIAPI\r | |
36 | NonDiscoverablePciGetDriverName (\r | |
37 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
38 | IN CHAR8 *Language,\r | |
39 | OUT CHAR16 **DriverName\r | |
40 | )\r | |
41 | {\r | |
42 | return LookupUnicodeString2 (\r | |
43 | Language,\r | |
44 | This->SupportedLanguages,\r | |
45 | mDriverNameTable,\r | |
46 | DriverName,\r | |
47 | (BOOLEAN)(This == &gComponentName) // Iso639Language\r | |
48 | );\r | |
49 | }\r | |
50 | \r | |
51 | STATIC\r | |
52 | EFI_STATUS\r | |
53 | EFIAPI\r | |
54 | NonDiscoverablePciGetDeviceName (\r | |
55 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
56 | IN EFI_HANDLE DeviceHandle,\r | |
57 | IN EFI_HANDLE ChildHandle,\r | |
58 | IN CHAR8 *Language,\r | |
59 | OUT CHAR16 **ControllerName\r | |
60 | )\r | |
61 | {\r | |
62 | return EFI_UNSUPPORTED;\r | |
63 | }\r | |
64 | \r | |
65 | EFI_COMPONENT_NAME_PROTOCOL gComponentName = {\r | |
66 | &NonDiscoverablePciGetDriverName,\r | |
67 | &NonDiscoverablePciGetDeviceName,\r | |
68 | "eng" // SupportedLanguages, ISO 639-2 language codes\r | |
69 | };\r | |
70 | \r | |
71 | EFI_COMPONENT_NAME2_PROTOCOL gComponentName2 = {\r | |
72 | (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) &NonDiscoverablePciGetDriverName,\r | |
73 | (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) &NonDiscoverablePciGetDeviceName,\r | |
74 | "en" // SupportedLanguages, RFC 4646 language codes\r | |
75 | };\r |