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.
23 #include "DevicePath.h"
25 EFI_HANDLE mDevicePathHandle
= NULL
;
27 GLOBAL_REMOVE_IF_UNREFERENCED
const EFI_DEVICE_PATH_UTILITIES_PROTOCOL mDevicePathUtilities
= {
28 GetDevicePathSizeProtocolInterface
,
29 DuplicateDevicePathProtocolInterface
,
30 AppendDevicePathProtocolInterface
,
31 AppendDeviceNodeProtocolInterface
,
32 AppendDevicePathInstanceProtocolInterface
,
33 GetNextDevicePathInstanceProtocolInterface
,
34 IsDevicePathMultiInstanceProtocolInterface
,
35 CreateDeviceNodeProtocolInterface
38 GLOBAL_REMOVE_IF_UNREFERENCED
const EFI_DEVICE_PATH_TO_TEXT_PROTOCOL mDevicePathToText
= {
39 ConvertDeviceNodeToText
,
40 ConvertDevicePathToText
43 GLOBAL_REMOVE_IF_UNREFERENCED
const EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL mDevicePathFromText
= {
44 ConvertTextToDeviceNode
,
45 ConvertTextToDevicePath
48 GLOBAL_REMOVE_IF_UNREFERENCED
const EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid
= DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL
;
49 GLOBAL_REMOVE_IF_UNREFERENCED
const EFI_GUID mEfiDevicePathMessagingSASGuid
= DEVICE_PATH_MESSAGING_SAS
;
53 DevicePathEntryPoint (
54 IN EFI_HANDLE ImageHandle
,
55 IN EFI_SYSTEM_TABLE
*SystemTable
60 Entry point for EFI drivers.
63 ImageHandle - EFI_HANDLE
64 SystemTable - EFI_SYSTEM_TABLE
74 Status
= EFI_UNSUPPORTED
;
75 if (FeaturePcdGet (PcdDevicePathSupportDevicePathToText
)) {
76 if (FeaturePcdGet (PcdDevicePathSupportDevicePathFromText
)) {
77 Status
= gBS
->InstallMultipleProtocolInterfaces (
79 &gEfiDevicePathUtilitiesProtocolGuid
, &mDevicePathUtilities
,
80 &gEfiDevicePathToTextProtocolGuid
, &mDevicePathToText
,
81 &gEfiDevicePathFromTextProtocolGuid
, &mDevicePathFromText
,
85 Status
= gBS
->InstallMultipleProtocolInterfaces (
87 &gEfiDevicePathUtilitiesProtocolGuid
, &mDevicePathUtilities
,
88 &gEfiDevicePathToTextProtocolGuid
, &mDevicePathToText
,
93 if (FeaturePcdGet (PcdDevicePathSupportDevicePathFromText
)) {
94 Status
= gBS
->InstallMultipleProtocolInterfaces (
96 &gEfiDevicePathUtilitiesProtocolGuid
, &mDevicePathUtilities
,
97 &gEfiDevicePathFromTextProtocolGuid
, &mDevicePathFromText
,
101 Status
= gBS
->InstallMultipleProtocolInterfaces (
103 &gEfiDevicePathUtilitiesProtocolGuid
, &mDevicePathUtilities
,