]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /** @file\r |
24e25d11 | 2 | Entry point to a DXE Boot Services Driver\r |
878ddf1f | 3 | \r |
24e25d11 | 4 | Copyright (c) 2006, Intel Corporation \r |
5 | All rights reserved. This program and the accompanying materials \r | |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php \r | |
878ddf1f | 9 | \r |
24e25d11 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
878ddf1f | 12 | \r |
24e25d11 | 13 | Module Name: DevicePathLib.h\r |
878ddf1f | 14 | \r |
15 | **/\r | |
16 | \r | |
17 | #ifndef __DEVICE_PATH_LIB_H__\r | |
18 | #define __DEVICE_PATH_LIB_H__\r | |
19 | \r | |
20 | /**\r | |
24e25d11 | 21 | This function returns the size, in bytes, \r |
22 | of the device path data structure specified by DevicePath.\r | |
23 | If DevicePath is NULL, then 0 is returned.\r | |
878ddf1f | 24 | \r |
24e25d11 | 25 | @param DevicePath A pointer to a device path data structure.\r |
878ddf1f | 26 | \r |
24e25d11 | 27 | @return The size of a device path in bytes.\r |
878ddf1f | 28 | \r |
29 | **/\r | |
30 | UINTN\r | |
31 | EFIAPI\r | |
32 | GetDevicePathSize (\r | |
33 | IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r | |
34 | )\r | |
35 | ;\r | |
36 | \r | |
37 | /**\r | |
24e25d11 | 38 | This function allocates space for a new copy of the device path\r |
39 | specified by DevicePath.\r | |
878ddf1f | 40 | \r |
24e25d11 | 41 | @param DevicePath A pointer to a device path data structure.\r |
878ddf1f | 42 | \r |
24e25d11 | 43 | @return The duplicated device path.\r |
878ddf1f | 44 | \r |
45 | **/\r | |
46 | EFI_DEVICE_PATH_PROTOCOL *\r | |
47 | EFIAPI\r | |
48 | DuplicateDevicePath (\r | |
49 | IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r | |
50 | )\r | |
51 | ;\r | |
52 | \r | |
53 | /**\r | |
24e25d11 | 54 | This function appends the device path SecondDevicePath\r |
55 | to every device path instance in FirstDevicePath. \r | |
878ddf1f | 56 | \r |
24e25d11 | 57 | @param FirstDevicePath A pointer to a device path data structure.\r |
58 | \r | |
59 | @param SecondDevicePath A pointer to a device path data structure.\r | |
878ddf1f | 60 | \r |
24e25d11 | 61 | @return\r |
62 | A pointer to the new device path is returned.\r | |
63 | NULL is returned if space for the new device path could not be allocated from pool.\r | |
64 | It is up to the caller to free the memory used by FirstDevicePath and SecondDevicePath\r | |
65 | if they are no longer needed.\r | |
878ddf1f | 66 | \r |
67 | **/\r | |
68 | EFI_DEVICE_PATH_PROTOCOL *\r | |
69 | EFIAPI\r | |
70 | AppendDevicePath (\r | |
71 | IN CONST EFI_DEVICE_PATH_PROTOCOL *FirstDevicePath,\r | |
72 | IN CONST EFI_DEVICE_PATH_PROTOCOL *SecondDevicePath\r | |
73 | )\r | |
74 | ;\r | |
75 | \r | |
76 | /**\r | |
5f10fa01 | 77 | This function appends the device path node SecondDevicePath\r |
78 | to every device path instance in FirstDevicePath.\r | |
878ddf1f | 79 | \r |
5f10fa01 | 80 | @param DevicePath A pointer to a device path data structure.\r |
81 | \r | |
82 | @param DevicePathNode A pointer to a single device path node.\r | |
878ddf1f | 83 | \r |
5f10fa01 | 84 | @return A pointer to the new device path.\r |
85 | If there is not enough temporary pool memory available to complete this function,\r | |
86 | then NULL is returned.\r | |
878ddf1f | 87 | \r |
88 | **/\r | |
89 | EFI_DEVICE_PATH_PROTOCOL *\r | |
90 | EFIAPI\r | |
91 | AppendDevicePathNode (\r | |
5f10fa01 | 92 | IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r |
93 | IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode\r | |
878ddf1f | 94 | )\r |
95 | ;\r | |
96 | \r | |
97 | /**\r | |
24e25d11 | 98 | This function appends the device path instance Instance to the device path Source.\r |
99 | If Source is NULL, then a new device path with one instance is created. \r | |
878ddf1f | 100 | \r |
24e25d11 | 101 | @param Source A pointer to a device path data structure.\r |
102 | @param Instance A pointer to a device path instance.\r | |
878ddf1f | 103 | \r |
24e25d11 | 104 | @return\r |
105 | A pointer to the new device path.\r | |
106 | If there is not enough temporary pool memory available to complete this function,\r | |
107 | then NULL is returned.\r | |
878ddf1f | 108 | \r |
109 | **/\r | |
110 | EFI_DEVICE_PATH_PROTOCOL *\r | |
111 | EFIAPI\r | |
112 | AppendDevicePathInstance (\r | |
113 | IN CONST EFI_DEVICE_PATH_PROTOCOL *Source,\r | |
114 | IN CONST EFI_DEVICE_PATH_PROTOCOL *Instance\r | |
115 | )\r | |
116 | ;\r | |
117 | \r | |
118 | /**\r | |
24e25d11 | 119 | Function retrieves the next device path instance from a device path data structure.\r |
878ddf1f | 120 | \r |
24e25d11 | 121 | @param DevicePath A pointer to a device path data structure.\r |
122 | \r | |
123 | @param Size A pointer to the size of a device path instance in bytes.\r | |
878ddf1f | 124 | \r |
24e25d11 | 125 | @return\r |
126 | This function returns a pointer to the current device path instance.\r | |
127 | In addition, it returns the size in bytes of the current device path instance in Size,\r | |
128 | and a pointer to the next device path instance in DevicePath.\r | |
129 | If there are no more device path instances in DevicePath, then DevicePath will be set to NULL.\r | |
878ddf1f | 130 | \r |
131 | **/\r | |
132 | EFI_DEVICE_PATH_PROTOCOL *\r | |
133 | EFIAPI\r | |
134 | GetNextDevicePathInstance (\r | |
135 | IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,\r | |
136 | OUT UINTN *Size\r | |
137 | )\r | |
138 | ;\r | |
139 | \r | |
140 | /**\r | |
24e25d11 | 141 | Return TRUE is this is a multi instance device path.\r |
878ddf1f | 142 | \r |
24e25d11 | 143 | @param DevicePath A pointer to a device path data structure.\r |
878ddf1f | 144 | \r |
24e25d11 | 145 | @retval TRUE If DevicePath is multi-instance.\r |
146 | @retval FALSE If DevicePath is not multi-instance or DevicePath is NULL.\r | |
878ddf1f | 147 | \r |
148 | **/\r | |
149 | BOOLEAN\r | |
150 | EFIAPI\r | |
151 | IsDevicePathMultiInstance (\r | |
152 | IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r | |
153 | )\r | |
154 | ;\r | |
155 | \r | |
156 | /**\r | |
24e25d11 | 157 | This function retrieves the device path protocol from a handle.\r |
878ddf1f | 158 | \r |
24e25d11 | 159 | @param Handle The handle from which to retrieve the device path protocol.\r |
878ddf1f | 160 | \r |
24e25d11 | 161 | @return\r |
162 | This function returns the device path protocol from the handle specified by Handle.\r | |
163 | If Handle is NULL or Handle does not contain a device path protocol, then NULL is returned.\r | |
878ddf1f | 164 | \r |
165 | **/\r | |
166 | EFI_DEVICE_PATH_PROTOCOL *\r | |
167 | EFIAPI\r | |
168 | DevicePathFromHandle (\r | |
169 | IN EFI_HANDLE Handle\r | |
170 | )\r | |
171 | ;\r | |
172 | \r | |
173 | /**\r | |
24e25d11 | 174 | This function allocates a device path for a file and appends it to an existing device path.\r |
175 | \r | |
176 | @param Device A pointer to a device handle. This parameter is optional and may be NULL.\r | |
177 | @param FileName A pointer to a Null-terminated Unicode string.\r | |
178 | \r | |
179 | @return\r | |
180 | If Device is a valid device handle that contains a device path protocol,\r | |
181 | then a device path for the file specified by FileName is allocated\r | |
182 | and appended to the device path associated with the handle Device. The allocated device path is returned.\r | |
183 | If Device is NULL or Device is a handle that does not support the device path protocol,\r | |
184 | then a device path containing a single device path node for the file specified by FileName\r | |
185 | is allocated and returned.\r | |
878ddf1f | 186 | \r |
187 | **/\r | |
188 | EFI_DEVICE_PATH_PROTOCOL *\r | |
189 | EFIAPI\r | |
190 | FileDevicePath (\r | |
191 | IN EFI_HANDLE Device, OPTIONAL\r | |
192 | IN CONST CHAR16 *FileName\r | |
193 | )\r | |
194 | ;\r | |
195 | \r | |
196 | #endif\r |