]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Universal/DevicePath/Dxe/DevicePath.c
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1436 6f19259b...
[mirror_edk2.git] / EdkModulePkg / Universal / DevicePath / Dxe / DevicePath.c
1 /*++
2
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
8
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.
11
12 Module Name:
13
14 DevicePathDriver.c
15
16 Abstract:
17
18 Device Path Driver to produce DevPathUtilities Protocol, DevPathFromText Protocol
19 and DevPathToText Protocol.
20
21 --*/
22
23 #include "DevicePath.h"
24
25 DEVICE_PATH_DRIVER_PRIVATE_DATA mPrivateData;
26
27 EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid = DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL;
28 EFI_GUID mEfiDevicePathMessagingSASGuid = DEVICE_PATH_MESSAGING_SAS;
29
30 EFI_STATUS
31 EFIAPI
32 DevicePathEntryPoint (
33 IN EFI_HANDLE ImageHandle,
34 IN EFI_SYSTEM_TABLE *SystemTable
35 )
36 /*++
37
38 Routine Description:
39 Entry point for EFI drivers.
40
41 Arguments:
42 ImageHandle - EFI_HANDLE
43 SystemTable - EFI_SYSTEM_TABLE
44
45 Returns:
46 EFI_SUCCESS
47 others
48
49 --*/
50 {
51 EFI_STATUS Status;
52
53 mPrivateData.Signature = DEVICE_PATH_DRIVER_SIGNATURE;
54
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;
63
64 mPrivateData.DevicePathToText.ConvertDeviceNodeToText = ConvertDeviceNodeToText;
65 mPrivateData.DevicePathToText.ConvertDevicePathToText = ConvertDevicePathToText;
66
67 mPrivateData.DevicePathFromText.ConvertTextToDeviceNode = ConvertTextToDeviceNode;
68 mPrivateData.DevicePathFromText.ConvertTextToDevicePath = ConvertTextToDevicePath;
69
70 mPrivateData.Handle = NULL;
71
72 Status = gBS->InstallMultipleProtocolInterfaces (
73 &mPrivateData.Handle,
74 &gEfiDevicePathUtilitiesProtocolGuid,
75 &mPrivateData.DevicePathUtilities,
76 &gEfiDevicePathToTextProtocolGuid,
77 &mPrivateData.DevicePathToText,
78 &gEfiDevicePathFromTextProtocolGuid,
79 &mPrivateData.DevicePathFromText,
80 NULL
81 );
82
83 return Status;
84 }