3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Device Path Driver to produce DevPathUtilities Protocol, DevPathFromText Protocol
19 and DevPathToText Protocol.
24 // Include common header file for this module.
26 #include "CommonHeader.h"
28 #include "DevicePath.h"
30 EFI_HANDLE mDevicePathHandle
= NULL
;
32 GLOBAL_REMOVE_IF_UNREFERENCED
const EFI_DEVICE_PATH_UTILITIES_PROTOCOL mDevicePathUtilities
= {
33 GetDevicePathSizeProtocolInterface
,
34 DuplicateDevicePathProtocolInterface
,
35 AppendDevicePathProtocolInterface
,
36 AppendDeviceNodeProtocolInterface
,
37 AppendDevicePathInstanceProtocolInterface
,
38 GetNextDevicePathInstanceProtocolInterface
,
39 IsDevicePathMultiInstanceProtocolInterface
,
40 CreateDeviceNodeProtocolInterface
43 GLOBAL_REMOVE_IF_UNREFERENCED
const EFI_DEVICE_PATH_TO_TEXT_PROTOCOL mDevicePathToText
= {
44 ConvertDeviceNodeToText
,
45 ConvertDevicePathToText
48 GLOBAL_REMOVE_IF_UNREFERENCED
const EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL mDevicePathFromText
= {
49 ConvertTextToDeviceNode
,
50 ConvertTextToDevicePath
53 GLOBAL_REMOVE_IF_UNREFERENCED
const EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid
= DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL
;
54 GLOBAL_REMOVE_IF_UNREFERENCED
const EFI_GUID mEfiDevicePathMessagingSASGuid
= DEVICE_PATH_MESSAGING_SAS
;
58 DevicePathEntryPoint (
59 IN EFI_HANDLE ImageHandle
,
60 IN EFI_SYSTEM_TABLE
*SystemTable
65 Entry point for EFI drivers.
68 ImageHandle - EFI_HANDLE
69 SystemTable - EFI_SYSTEM_TABLE
79 Status
= EFI_UNSUPPORTED
;
80 if (FeaturePcdGet (PcdDevicePathSupportDevicePathToText
)) {
81 if (FeaturePcdGet (PcdDevicePathSupportDevicePathFromText
)) {
82 Status
= gBS
->InstallMultipleProtocolInterfaces (
84 &gEfiDevicePathUtilitiesProtocolGuid
, &mDevicePathUtilities
,
85 &gEfiDevicePathToTextProtocolGuid
, &mDevicePathToText
,
86 &gEfiDevicePathFromTextProtocolGuid
, &mDevicePathFromText
,
90 Status
= gBS
->InstallMultipleProtocolInterfaces (
92 &gEfiDevicePathUtilitiesProtocolGuid
, &mDevicePathUtilities
,
93 &gEfiDevicePathToTextProtocolGuid
, &mDevicePathToText
,
98 if (FeaturePcdGet (PcdDevicePathSupportDevicePathFromText
)) {
99 Status
= gBS
->InstallMultipleProtocolInterfaces (
101 &gEfiDevicePathUtilitiesProtocolGuid
, &mDevicePathUtilities
,
102 &gEfiDevicePathFromTextProtocolGuid
, &mDevicePathFromText
,
106 Status
= gBS
->InstallMultipleProtocolInterfaces (
108 &gEfiDevicePathUtilitiesProtocolGuid
, &mDevicePathUtilities
,