2 Device Path Driver to produce DevPathUtilities Protocol, DevPathFromText Protocol
3 and DevPathToText Protocol.
5 Copyright (c) 2006 - 2008, Intel Corporation. <BR>
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include "DevicePath.h"
18 EFI_HANDLE mDevicePathHandle
= NULL
;
20 GLOBAL_REMOVE_IF_UNREFERENCED
const EFI_DEVICE_PATH_UTILITIES_PROTOCOL mDevicePathUtilities
= {
21 GetDevicePathSizeProtocolInterface
,
22 DuplicateDevicePathProtocolInterface
,
23 AppendDevicePathProtocolInterface
,
24 AppendDeviceNodeProtocolInterface
,
25 AppendDevicePathInstanceProtocolInterface
,
26 GetNextDevicePathInstanceProtocolInterface
,
27 IsDevicePathMultiInstanceProtocolInterface
,
28 CreateDeviceNodeProtocolInterface
31 GLOBAL_REMOVE_IF_UNREFERENCED
const EFI_DEVICE_PATH_TO_TEXT_PROTOCOL mDevicePathToText
= {
32 ConvertDeviceNodeToText
,
33 ConvertDevicePathToText
36 GLOBAL_REMOVE_IF_UNREFERENCED
const EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL mDevicePathFromText
= {
37 ConvertTextToDeviceNode
,
38 ConvertTextToDevicePath
41 GLOBAL_REMOVE_IF_UNREFERENCED
const EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid
= DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL
;
42 GLOBAL_REMOVE_IF_UNREFERENCED
const EFI_GUID mEfiDevicePathMessagingSASGuid
= DEVICE_PATH_MESSAGING_SAS
;
46 DevicePathEntryPoint (
47 IN EFI_HANDLE ImageHandle
,
48 IN EFI_SYSTEM_TABLE
*SystemTable
53 Entry point for EFI drivers.
56 ImageHandle - EFI_HANDLE
57 SystemTable - EFI_SYSTEM_TABLE
67 Status
= EFI_UNSUPPORTED
;
68 if (FeaturePcdGet (PcdDevicePathSupportDevicePathToText
)) {
69 if (FeaturePcdGet (PcdDevicePathSupportDevicePathFromText
)) {
70 Status
= gBS
->InstallMultipleProtocolInterfaces (
72 &gEfiDevicePathUtilitiesProtocolGuid
, &mDevicePathUtilities
,
73 &gEfiDevicePathToTextProtocolGuid
, &mDevicePathToText
,
74 &gEfiDevicePathFromTextProtocolGuid
, &mDevicePathFromText
,
78 Status
= gBS
->InstallMultipleProtocolInterfaces (
80 &gEfiDevicePathUtilitiesProtocolGuid
, &mDevicePathUtilities
,
81 &gEfiDevicePathToTextProtocolGuid
, &mDevicePathToText
,
86 if (FeaturePcdGet (PcdDevicePathSupportDevicePathFromText
)) {
87 Status
= gBS
->InstallMultipleProtocolInterfaces (
89 &gEfiDevicePathUtilitiesProtocolGuid
, &mDevicePathUtilities
,
90 &gEfiDevicePathFromTextProtocolGuid
, &mDevicePathFromText
,
94 Status
= gBS
->InstallMultipleProtocolInterfaces (
96 &gEfiDevicePathUtilitiesProtocolGuid
, &mDevicePathUtilities
,