]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Universal/DevicePath/Dxe/DevicePath.c
Check in patch to refine DevicePath Module and USB2HostController Module.
[mirror_edk2.git] / EdkModulePkg / Universal / DevicePath / Dxe / DevicePath.c
CommitLineData
562d2849 1/*++
2
3Copyright (c) 2006, Intel Corporation
4All rights reserved. This program and the accompanying materials
5are licensed and made available under the terms and conditions of the BSD License
6which accompanies this distribution. The full text of the license may be found at
7http://opensource.org/licenses/bsd-license.php
8
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12Module Name:
13
14 DevicePathDriver.c
15
16Abstract:
17
18 Device Path Driver to produce DevPathUtilities Protocol, DevPathFromText Protocol
19 and DevPathToText Protocol.
20
21--*/
22
562d2849 23#include "DevicePath.h"
24
25DEVICE_PATH_DRIVER_PRIVATE_DATA mPrivateData;
26
27EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid = DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL;
28EFI_GUID mEfiDevicePathMessagingSASGuid = DEVICE_PATH_MESSAGING_SAS;
29
562d2849 30EFI_STATUS
31EFIAPI
32DevicePathEntryPoint (
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
ffac4bcb 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;
562d2849 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}