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 DEVICE_PATH_DRIVER_PRIVATE_DATA mPrivateData
;
27 EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid
= DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL
;
28 EFI_GUID mEfiDevicePathMessagingSASGuid
= DEVICE_PATH_MESSAGING_SAS
;
32 DevicePathEntryPoint (
33 IN EFI_HANDLE ImageHandle
,
34 IN EFI_SYSTEM_TABLE
*SystemTable
39 Entry point for EFI drivers.
42 ImageHandle - EFI_HANDLE
43 SystemTable - EFI_SYSTEM_TABLE
53 mPrivateData
.Signature
= DEVICE_PATH_DRIVER_SIGNATURE
;
55 mPrivateData
.DevicePathUtilities
.GetDevicePathSize
= GetDevicePathSizeProtocolInterface
;
56 mPrivateData
.DevicePathUtilities
.DuplicateDevicePath
= DuplicateDevicePathProtocolInterface
;
57 mPrivateData
.DevicePathUtilities
.AppendDevicePath
= AppendDevicePathProtocolInterface
;
58 mPrivateData
.DevicePathUtilities
.AppendDeviceNode
= AppendDeviceNodeProtocolInterface
;
59 mPrivateData
.DevicePathUtilities
.AppendDevicePathInstance
= AppendDevicePathInstanceProtocolInterface
;
60 mPrivateData
.DevicePathUtilities
.GetNextDevicePathInstance
= GetNextDevicePathInstanceProtocolInterface
;
61 mPrivateData
.DevicePathUtilities
.IsDevicePathMultiInstance
= IsDevicePathMultiInstanceProtocolInterface
;
62 mPrivateData
.DevicePathUtilities
.CreateDeviceNode
= CreateDeviceNodeProtocolInterface
;
64 mPrivateData
.DevicePathToText
.ConvertDeviceNodeToText
= ConvertDeviceNodeToText
;
65 mPrivateData
.DevicePathToText
.ConvertDevicePathToText
= ConvertDevicePathToText
;
67 mPrivateData
.DevicePathFromText
.ConvertTextToDeviceNode
= ConvertTextToDeviceNode
;
68 mPrivateData
.DevicePathFromText
.ConvertTextToDevicePath
= ConvertTextToDevicePath
;
70 mPrivateData
.Handle
= NULL
;
72 Status
= gBS
->InstallMultipleProtocolInterfaces (
74 &gEfiDevicePathUtilitiesProtocolGuid
,
75 &mPrivateData
.DevicePathUtilities
,
76 &gEfiDevicePathToTextProtocolGuid
,
77 &mPrivateData
.DevicePathToText
,
78 &gEfiDevicePathFromTextProtocolGuid
,
79 &mPrivateData
.DevicePathFromText
,