3 Copyright (C) 2016, Linaro Ltd. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available
6 under the terms and conditions of the BSD License which accompanies this
7 distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
11 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #include "NonDiscoverablePciDeviceIo.h"
18 // The purpose of the following scaffolding (EFI_COMPONENT_NAME_PROTOCOL and
19 // EFI_COMPONENT_NAME2_PROTOCOL implementation) is to format the driver's name
20 // in English, for display on standard console devices. This is recommended for
21 // UEFI drivers that follow the UEFI Driver Model. Refer to the Driver Writer's
22 // Guide for UEFI 2.3.1 v1.01, 11 UEFI Driver and Controller Names.
26 EFI_UNICODE_STRING_TABLE mDriverNameTable
[] = {
27 { "eng;en", L
"PCI I/O protocol emulation driver for non-discoverable devices" },
31 EFI_COMPONENT_NAME_PROTOCOL gComponentName
;
36 NonDiscoverablePciGetDriverName (
37 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
39 OUT CHAR16
**DriverName
42 return LookupUnicodeString2 (
44 This
->SupportedLanguages
,
47 (BOOLEAN
)(This
== &gComponentName
) // Iso639Language
54 NonDiscoverablePciGetDeviceName (
55 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
56 IN EFI_HANDLE DeviceHandle
,
57 IN EFI_HANDLE ChildHandle
,
59 OUT CHAR16
**ControllerName
62 return EFI_UNSUPPORTED
;
65 EFI_COMPONENT_NAME_PROTOCOL gComponentName
= {
66 &NonDiscoverablePciGetDriverName
,
67 &NonDiscoverablePciGetDeviceName
,
68 "eng" // SupportedLanguages, ISO 639-2 language codes
71 EFI_COMPONENT_NAME2_PROTOCOL gComponentName2
= {
72 (EFI_COMPONENT_NAME2_GET_DRIVER_NAME
) &NonDiscoverablePciGetDriverName
,
73 (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME
) &NonDiscoverablePciGetDeviceName
,
74 "en" // SupportedLanguages, RFC 4646 language codes