]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /** @file\r |
2 | Entry point to a DXE Boot Services Driver\r | |
3 | \r | |
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 | |
9 | \r | |
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 | |
12 | \r | |
13 | Module Name: DevicePathLib.h\r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
17 | #ifndef __DEVICE_PATH_LIB_H__\r | |
18 | #define __DEVICE_PATH_LIB_H__\r | |
19 | \r | |
20 | /**\r | |
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 | |
24 | \r | |
25 | @param DevicePath A pointer to a device path data structure.\r | |
26 | \r | |
27 | @return The size of a device path in bytes.\r | |
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 | |
38 | This function allocates space for a new copy of the device path\r | |
39 | specified by DevicePath.\r | |
40 | \r | |
41 | @param DevicePath A pointer to a device path data structure.\r | |
42 | \r | |
43 | @return The duplicated device path.\r | |
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 | |
54 | This function appends the device path SecondDevicePath\r | |
55 | to every device path instance in FirstDevicePath. \r | |
56 | \r | |
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 | |
60 | \r | |
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 | |
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 | |
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 | |
100 | \r | |
101 | @param Source A pointer to a device path data structure.\r | |
102 | @param Instance A pointer to a device path instance.\r | |
103 | \r | |
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 | |
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 | |
119 | Function retrieves the next device path instance from a device path data structure.\r | |
120 | \r | |
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 | |
124 | \r | |
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 | |
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 | |
141 | Return TRUE is this is a multi instance device path.\r | |
142 | \r | |
143 | @param DevicePath A pointer to a device path data structure.\r | |
144 | \r | |
145 | @retval TRUE If DevicePath is multi-instance.\r | |
146 | @retval FALSE If DevicePath is not multi-instance or DevicePath is NULL.\r | |
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 | |
157 | This function retrieves the device path protocol from a handle.\r | |
158 | \r | |
159 | @param Handle The handle from which to retrieve the device path protocol.\r | |
160 | \r | |
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 | |
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 | |
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 | |
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 |