]>
Commit | Line | Data |
---|---|---|
adbcbf8f | 1 | /** @file\r |
d1102dba | 2 | Partition driver that produces logical BlockIo devices from a physical\r |
adbcbf8f | 3 | BlockIo device. The logical BlockIo devices are based on the format\r |
8aafec2c | 4 | of the raw block devices media. Currently "El Torito CD-ROM", UDF, Legacy\r |
adbcbf8f | 5 | MBR, and GPT partition schemes are supported.\r |
6 | \r | |
709c9fd5 | 7 | Copyright (c) 2018 Qualcomm Datacenter Technologies, Inc.\r |
d1102dba | 8 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9d510e61 | 9 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
adbcbf8f | 10 | \r |
11 | **/\r | |
12 | \r | |
d1102dba LG |
13 | #ifndef _PARTITION_H_\r |
14 | #define _PARTITION_H_\r | |
adbcbf8f | 15 | \r |
16 | #include <Uefi.h>\r | |
17 | #include <Protocol/BlockIo.h>\r | |
490b5ea1 | 18 | #include <Protocol/BlockIo2.h>\r |
adbcbf8f | 19 | #include <Guid/Gpt.h>\r |
20 | #include <Protocol/ComponentName.h>\r | |
21 | #include <Protocol/DevicePath.h>\r | |
22 | #include <Protocol/DriverBinding.h>\r | |
23 | #include <Protocol/DiskIo.h>\r | |
493d8e3a | 24 | #include <Protocol/DiskIo2.h>\r |
3a3d62d2 | 25 | #include <Protocol/PartitionInfo.h>\r |
adbcbf8f | 26 | #include <Library/DebugLib.h>\r |
27 | #include <Library/UefiDriverEntryPoint.h>\r | |
28 | #include <Library/BaseLib.h>\r | |
29 | #include <Library/UefiLib.h>\r | |
30 | #include <Library/BaseMemoryLib.h>\r | |
31 | #include <Library/MemoryAllocationLib.h>\r | |
32 | #include <Library/UefiBootServicesTableLib.h>\r | |
33 | #include <Library/DevicePathLib.h>\r | |
34 | \r | |
35 | #include <IndustryStandard/Mbr.h>\r | |
36 | #include <IndustryStandard/ElTorito.h>\r | |
8aafec2c | 37 | #include <IndustryStandard/Udf.h>\r |
adbcbf8f | 38 | \r |
39 | //\r | |
40 | // Partition private data\r | |
41 | //\r | |
f3f2e05d | 42 | #define PARTITION_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('P', 'a', 'r', 't')\r |
adbcbf8f | 43 | typedef struct {\r |
1436aea4 MK |
44 | UINT64 Signature;\r |
45 | \r | |
46 | EFI_HANDLE Handle;\r | |
47 | EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r | |
48 | EFI_BLOCK_IO_PROTOCOL BlockIo;\r | |
49 | EFI_BLOCK_IO2_PROTOCOL BlockIo2;\r | |
50 | EFI_BLOCK_IO_MEDIA Media;\r | |
51 | EFI_BLOCK_IO_MEDIA Media2;// For BlockIO2\r | |
52 | EFI_PARTITION_INFO_PROTOCOL PartitionInfo;\r | |
53 | \r | |
54 | EFI_DISK_IO_PROTOCOL *DiskIo;\r | |
55 | EFI_DISK_IO2_PROTOCOL *DiskIo2;\r | |
56 | EFI_BLOCK_IO_PROTOCOL *ParentBlockIo;\r | |
57 | EFI_BLOCK_IO2_PROTOCOL *ParentBlockIo2;\r | |
58 | UINT64 Start;\r | |
59 | UINT64 End;\r | |
60 | UINT32 BlockSize;\r | |
61 | BOOLEAN InStop;\r | |
62 | \r | |
63 | EFI_GUID TypeGuid;\r | |
adbcbf8f | 64 | } PARTITION_PRIVATE_DATA;\r |
65 | \r | |
493d8e3a | 66 | typedef struct {\r |
1436aea4 MK |
67 | EFI_DISK_IO2_TOKEN DiskIo2Token;\r |
68 | EFI_BLOCK_IO2_TOKEN *BlockIo2Token;\r | |
493d8e3a RN |
69 | } PARTITION_ACCESS_TASK;\r |
70 | \r | |
1436aea4 MK |
71 | #define PARTITION_DEVICE_FROM_BLOCK_IO_THIS(a) CR (a, PARTITION_PRIVATE_DATA, BlockIo, PARTITION_PRIVATE_DATA_SIGNATURE)\r |
72 | #define PARTITION_DEVICE_FROM_BLOCK_IO2_THIS(a) CR (a, PARTITION_PRIVATE_DATA, BlockIo2, PARTITION_PRIVATE_DATA_SIGNATURE)\r | |
adbcbf8f | 73 | \r |
74 | //\r | |
75 | // Global Variables\r | |
76 | //\r | |
d38a0f44 | 77 | extern EFI_DRIVER_BINDING_PROTOCOL gPartitionDriverBinding;\r |
78 | extern EFI_COMPONENT_NAME_PROTOCOL gPartitionComponentName;\r | |
79 | extern EFI_COMPONENT_NAME2_PROTOCOL gPartitionComponentName2;\r | |
adbcbf8f | 80 | \r |
81 | //\r | |
82 | // Extract INT32 from char array\r | |
83 | //\r | |
1436aea4 | 84 | #define UNPACK_INT32(a) (INT32)( (((UINT8 *) a)[0] << 0) | \\r |
adbcbf8f | 85 | (((UINT8 *) a)[1] << 8) | \\r |
86 | (((UINT8 *) a)[2] << 16) | \\r | |
87 | (((UINT8 *) a)[3] << 24) )\r | |
88 | \r | |
89 | //\r | |
90 | // Extract UINT32 from char array\r | |
91 | //\r | |
1436aea4 | 92 | #define UNPACK_UINT32(a) (UINT32)( (((UINT8 *) a)[0] << 0) | \\r |
adbcbf8f | 93 | (((UINT8 *) a)[1] << 8) | \\r |
94 | (((UINT8 *) a)[2] << 16) | \\r | |
95 | (((UINT8 *) a)[3] << 24) )\r | |
96 | \r | |
4f06d35a | 97 | //\r |
98 | // GPT Partition Entry Status\r | |
99 | //\r | |
100 | typedef struct {\r | |
1436aea4 MK |
101 | BOOLEAN OutOfRange;\r |
102 | BOOLEAN Overlap;\r | |
103 | BOOLEAN OsSpecific;\r | |
4f06d35a | 104 | } EFI_PARTITION_ENTRY_STATUS;\r |
105 | \r | |
adbcbf8f | 106 | //\r |
107 | // Function Prototypes\r | |
108 | //\r | |
1436aea4 | 109 | \r |
a8d0c20e | 110 | /**\r |
111 | Test to see if this driver supports ControllerHandle. Any ControllerHandle\r | |
112 | than contains a BlockIo and DiskIo protocol can be supported.\r | |
113 | \r | |
114 | @param This Protocol instance pointer.\r | |
115 | @param ControllerHandle Handle of device to test\r | |
116 | @param RemainingDevicePath Optional parameter use to pick a specific child\r | |
117 | device to start.\r | |
118 | \r | |
119 | @retval EFI_SUCCESS This driver supports this device\r | |
120 | @retval EFI_ALREADY_STARTED This driver is already running on this device\r | |
121 | @retval other This driver does not support this device\r | |
122 | \r | |
123 | **/\r | |
adbcbf8f | 124 | EFI_STATUS\r |
125 | EFIAPI\r | |
126 | PartitionDriverBindingSupported (\r | |
127 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
128 | IN EFI_HANDLE ControllerHandle,\r | |
129 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
130 | );\r | |
131 | \r | |
a8d0c20e | 132 | /**\r |
133 | Start this driver on ControllerHandle by opening a Block IO and Disk IO\r | |
134 | protocol, reading Device Path, and creating a child handle with a\r | |
135 | Disk IO and device path protocol.\r | |
136 | \r | |
137 | @param This Protocol instance pointer.\r | |
138 | @param ControllerHandle Handle of device to bind driver to\r | |
139 | @param RemainingDevicePath Optional parameter use to pick a specific child\r | |
140 | device to start.\r | |
141 | \r | |
142 | @retval EFI_SUCCESS This driver is added to ControllerHandle\r | |
143 | @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle\r | |
144 | @retval other This driver does not support this device\r | |
145 | \r | |
146 | **/\r | |
adbcbf8f | 147 | EFI_STATUS\r |
148 | EFIAPI\r | |
149 | PartitionDriverBindingStart (\r | |
150 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
151 | IN EFI_HANDLE ControllerHandle,\r | |
152 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
153 | );\r | |
154 | \r | |
a8d0c20e | 155 | /**\r |
48557c65 | 156 | Stop this driver on ControllerHandle. Support stopping any child handles\r |
a8d0c20e | 157 | created by this driver.\r |
158 | \r | |
159 | @param This Protocol instance pointer.\r | |
160 | @param ControllerHandle Handle of device to stop driver on\r | |
161 | @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r | |
162 | children is zero stop the entire bus driver.\r | |
163 | @param ChildHandleBuffer List of Child Handles to Stop.\r | |
164 | \r | |
165 | @retval EFI_SUCCESS This driver is removed ControllerHandle\r | |
166 | @retval other This driver was not removed from this device\r | |
167 | \r | |
168 | **/\r | |
adbcbf8f | 169 | EFI_STATUS\r |
170 | EFIAPI\r | |
171 | PartitionDriverBindingStop (\r | |
1436aea4 MK |
172 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r |
173 | IN EFI_HANDLE ControllerHandle,\r | |
174 | IN UINTN NumberOfChildren,\r | |
175 | IN EFI_HANDLE *ChildHandleBuffer\r | |
adbcbf8f | 176 | );\r |
177 | \r | |
178 | //\r | |
179 | // EFI Component Name Functions\r | |
180 | //\r | |
1436aea4 | 181 | \r |
d38a0f44 | 182 | /**\r |
183 | Retrieves a Unicode string that is the user readable name of the driver.\r | |
184 | \r | |
185 | This function retrieves the user readable name of a driver in the form of a\r | |
186 | Unicode string. If the driver specified by This has a user readable name in\r | |
187 | the language specified by Language, then a pointer to the driver name is\r | |
188 | returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r | |
189 | by This does not support the language specified by Language,\r | |
190 | then EFI_UNSUPPORTED is returned.\r | |
191 | \r | |
192 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
193 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
194 | \r | |
195 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
196 | array indicating the language. This is the\r | |
197 | language of the driver name that the caller is\r | |
198 | requesting, and it must match one of the\r | |
199 | languages specified in SupportedLanguages. The\r | |
200 | number of languages supported by a driver is up\r | |
201 | to the driver writer. Language is specified\r | |
0254efc0 | 202 | in RFC 4646 or ISO 639-2 language code format.\r |
d38a0f44 | 203 | \r |
204 | @param DriverName[out] A pointer to the Unicode string to return.\r | |
205 | This Unicode string is the name of the\r | |
206 | driver specified by This in the language\r | |
207 | specified by Language.\r | |
208 | \r | |
209 | @retval EFI_SUCCESS The Unicode string for the Driver specified by\r | |
210 | This and the language specified by Language was\r | |
211 | returned in DriverName.\r | |
212 | \r | |
213 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
214 | \r | |
215 | @retval EFI_INVALID_PARAMETER DriverName is NULL.\r | |
216 | \r | |
217 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
218 | the language specified by Language.\r | |
219 | \r | |
220 | **/\r | |
adbcbf8f | 221 | EFI_STATUS\r |
222 | EFIAPI\r | |
223 | PartitionComponentNameGetDriverName (\r | |
224 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
225 | IN CHAR8 *Language,\r | |
226 | OUT CHAR16 **DriverName\r | |
227 | );\r | |
228 | \r | |
d38a0f44 | 229 | /**\r |
230 | Retrieves a Unicode string that is the user readable name of the controller\r | |
231 | that is being managed by a driver.\r | |
232 | \r | |
233 | This function retrieves the user readable name of the controller specified by\r | |
234 | ControllerHandle and ChildHandle in the form of a Unicode string. If the\r | |
235 | driver specified by This has a user readable name in the language specified by\r | |
236 | Language, then a pointer to the controller name is returned in ControllerName,\r | |
237 | and EFI_SUCCESS is returned. If the driver specified by This is not currently\r | |
238 | managing the controller specified by ControllerHandle and ChildHandle,\r | |
239 | then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r | |
240 | support the language specified by Language, then EFI_UNSUPPORTED is returned.\r | |
241 | \r | |
242 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
243 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
244 | \r | |
245 | @param ControllerHandle[in] The handle of a controller that the driver\r | |
246 | specified by This is managing. This handle\r | |
247 | specifies the controller whose name is to be\r | |
248 | returned.\r | |
249 | \r | |
250 | @param ChildHandle[in] The handle of the child controller to retrieve\r | |
251 | the name of. This is an optional parameter that\r | |
252 | may be NULL. It will be NULL for device\r | |
253 | drivers. It will also be NULL for a bus drivers\r | |
254 | that wish to retrieve the name of the bus\r | |
255 | controller. It will not be NULL for a bus\r | |
256 | driver that wishes to retrieve the name of a\r | |
257 | child controller.\r | |
258 | \r | |
259 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
260 | array indicating the language. This is the\r | |
261 | language of the driver name that the caller is\r | |
262 | requesting, and it must match one of the\r | |
263 | languages specified in SupportedLanguages. The\r | |
264 | number of languages supported by a driver is up\r | |
265 | to the driver writer. Language is specified in\r | |
0254efc0 | 266 | RFC 4646 or ISO 639-2 language code format.\r |
d38a0f44 | 267 | \r |
268 | @param ControllerName[out] A pointer to the Unicode string to return.\r | |
269 | This Unicode string is the name of the\r | |
270 | controller specified by ControllerHandle and\r | |
271 | ChildHandle in the language specified by\r | |
272 | Language from the point of view of the driver\r | |
273 | specified by This.\r | |
274 | \r | |
275 | @retval EFI_SUCCESS The Unicode string for the user readable name in\r | |
276 | the language specified by Language for the\r | |
277 | driver specified by This was returned in\r | |
278 | DriverName.\r | |
279 | \r | |
280 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r | |
281 | \r | |
282 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r | |
283 | EFI_HANDLE.\r | |
284 | \r | |
285 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
286 | \r | |
287 | @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r | |
288 | \r | |
289 | @retval EFI_UNSUPPORTED The driver specified by This is not currently\r | |
290 | managing the controller specified by\r | |
291 | ControllerHandle and ChildHandle.\r | |
292 | \r | |
293 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
294 | the language specified by Language.\r | |
295 | \r | |
296 | **/\r | |
adbcbf8f | 297 | EFI_STATUS\r |
298 | EFIAPI\r | |
299 | PartitionComponentNameGetControllerName (\r | |
1436aea4 MK |
300 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r |
301 | IN EFI_HANDLE ControllerHandle,\r | |
302 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
303 | IN CHAR8 *Language,\r | |
304 | OUT CHAR16 **ControllerName\r | |
adbcbf8f | 305 | );\r |
306 | \r | |
a8d0c20e | 307 | /**\r |
308 | Create a child handle for a logical block device that represents the\r | |
309 | bytes Start to End of the Parent Block IO device.\r | |
310 | \r | |
490b5ea1 | 311 | @param[in] This Protocol instance pointer.\r |
312 | @param[in] ParentHandle Parent Handle for new child.\r | |
313 | @param[in] ParentDiskIo Parent DiskIo interface.\r | |
493d8e3a | 314 | @param[in] ParentDiskIo2 Parent DiskIo2 interface.\r |
490b5ea1 | 315 | @param[in] ParentBlockIo Parent BlockIo interface.\r |
316 | @param[in] ParentBlockIo2 Parent BlockIo2 interface.\r | |
317 | @param[in] ParentDevicePath Parent Device Path.\r | |
318 | @param[in] DevicePathNode Child Device Path node.\r | |
3a3d62d2 | 319 | @param[in] PartitionInfo Child Partition Information interface.\r |
490b5ea1 | 320 | @param[in] Start Start Block.\r |
321 | @param[in] End End Block.\r | |
322 | @param[in] BlockSize Child block size.\r | |
709c9fd5 | 323 | @param[in] TypeGuid Parition Type Guid.\r |
a8d0c20e | 324 | \r |
490b5ea1 | 325 | @retval EFI_SUCCESS A child handle was added.\r |
326 | @retval other A child handle was not added.\r | |
a8d0c20e | 327 | \r |
328 | **/\r | |
adbcbf8f | 329 | EFI_STATUS\r |
330 | PartitionInstallChildHandle (\r | |
331 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
332 | IN EFI_HANDLE ParentHandle,\r | |
333 | IN EFI_DISK_IO_PROTOCOL *ParentDiskIo,\r | |
493d8e3a | 334 | IN EFI_DISK_IO2_PROTOCOL *ParentDiskIo2,\r |
adbcbf8f | 335 | IN EFI_BLOCK_IO_PROTOCOL *ParentBlockIo,\r |
490b5ea1 | 336 | IN EFI_BLOCK_IO2_PROTOCOL *ParentBlockIo2,\r |
adbcbf8f | 337 | IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath,\r |
338 | IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode,\r | |
3a3d62d2 | 339 | IN EFI_PARTITION_INFO_PROTOCOL *PartitionInfo,\r |
ea7cb08c | 340 | IN EFI_LBA Start,\r |
341 | IN EFI_LBA End,\r | |
709c9fd5 JB |
342 | IN UINT32 BlockSize,\r |
343 | IN EFI_GUID *TypeGuid\r | |
ea7cb08c | 344 | );\r |
adbcbf8f | 345 | \r |
e3325721 HW |
346 | /**\r |
347 | Test to see if there is any child on ControllerHandle.\r | |
348 | \r | |
349 | @param[in] ControllerHandle Handle of device to test.\r | |
350 | \r | |
351 | @retval TRUE There are children on the ControllerHandle.\r | |
352 | @retval FALSE No child is on the ControllerHandle.\r | |
353 | \r | |
354 | **/\r | |
355 | BOOLEAN\r | |
356 | HasChildren (\r | |
1436aea4 | 357 | IN EFI_HANDLE ControllerHandle\r |
e3325721 HW |
358 | );\r |
359 | \r | |
a8d0c20e | 360 | /**\r |
361 | Install child handles if the Handle supports GPT partition structure.\r | |
362 | \r | |
490b5ea1 | 363 | @param[in] This Calling context.\r |
364 | @param[in] Handle Parent Handle.\r | |
365 | @param[in] DiskIo Parent DiskIo interface.\r | |
493d8e3a | 366 | @param[in] DiskIo2 Parent DiskIo2 interface.\r |
490b5ea1 | 367 | @param[in] BlockIo Parent BlockIo interface.\r |
368 | @param[in] BlockIo2 Parent BlockIo2 interface.\r | |
369 | @param[in] DevicePath Parent Device Path.\r | |
a8d0c20e | 370 | \r |
490b5ea1 | 371 | @retval EFI_SUCCESS Valid GPT disk.\r |
372 | @retval EFI_MEDIA_CHANGED Media changed Detected.\r | |
373 | @retval EFI_INVALID_PARAMETER If both BlockIo and BlockIo2 are NULL;\r | |
374 | @retval other Not a valid GPT disk.\r | |
a8d0c20e | 375 | \r |
376 | **/\r | |
adbcbf8f | 377 | EFI_STATUS\r |
378 | PartitionInstallGptChildHandles (\r | |
379 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
380 | IN EFI_HANDLE Handle,\r | |
381 | IN EFI_DISK_IO_PROTOCOL *DiskIo,\r | |
493d8e3a | 382 | IN EFI_DISK_IO2_PROTOCOL *DiskIo2,\r |
adbcbf8f | 383 | IN EFI_BLOCK_IO_PROTOCOL *BlockIo,\r |
490b5ea1 | 384 | IN EFI_BLOCK_IO2_PROTOCOL *BlockIo2,\r |
adbcbf8f | 385 | IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r |
ea7cb08c | 386 | );\r |
adbcbf8f | 387 | \r |
a8d0c20e | 388 | /**\r |
389 | Install child handles if the Handle supports El Torito format.\r | |
390 | \r | |
391 | @param[in] This Calling context.\r | |
490b5ea1 | 392 | @param[in] Handle Parent Handle.\r |
393 | @param[in] DiskIo Parent DiskIo interface.\r | |
493d8e3a | 394 | @param[in] DiskIo2 Parent DiskIo2 interface.\r |
490b5ea1 | 395 | @param[in] BlockIo Parent BlockIo interface.\r |
396 | @param[in] BlockIo2 Parent BlockIo2 interface.\r | |
a8d0c20e | 397 | @param[in] DevicePath Parent Device Path\r |
398 | \r | |
399 | \r | |
490b5ea1 | 400 | @retval EFI_SUCCESS Child handle(s) was added.\r |
401 | @retval EFI_MEDIA_CHANGED Media changed Detected.\r | |
402 | @retval other no child handle was added.\r | |
a8d0c20e | 403 | \r |
404 | **/\r | |
adbcbf8f | 405 | EFI_STATUS\r |
406 | PartitionInstallElToritoChildHandles (\r | |
407 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
408 | IN EFI_HANDLE Handle,\r | |
409 | IN EFI_DISK_IO_PROTOCOL *DiskIo,\r | |
493d8e3a | 410 | IN EFI_DISK_IO2_PROTOCOL *DiskIo2,\r |
adbcbf8f | 411 | IN EFI_BLOCK_IO_PROTOCOL *BlockIo,\r |
490b5ea1 | 412 | IN EFI_BLOCK_IO2_PROTOCOL *BlockIo2,\r |
adbcbf8f | 413 | IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r |
ea7cb08c | 414 | );\r |
adbcbf8f | 415 | \r |
a8d0c20e | 416 | /**\r |
417 | Install child handles if the Handle supports MBR format.\r | |
418 | \r | |
490b5ea1 | 419 | @param[in] This Calling context.\r |
420 | @param[in] Handle Parent Handle.\r | |
421 | @param[in] DiskIo Parent DiskIo interface.\r | |
493d8e3a | 422 | @param[in] DiskIo2 Parent DiskIo2 interface.\r |
490b5ea1 | 423 | @param[in] BlockIo Parent BlockIo interface.\r |
424 | @param[in] BlockIo2 Parent BlockIo2 interface.\r | |
425 | @param[in] DevicePath Parent Device Path.\r | |
d1102dba | 426 | \r |
a8d0c20e | 427 | @retval EFI_SUCCESS A child handle was added.\r |
428 | @retval EFI_MEDIA_CHANGED Media change was detected.\r | |
429 | @retval Others MBR partition was not found.\r | |
430 | \r | |
431 | **/\r | |
adbcbf8f | 432 | EFI_STATUS\r |
433 | PartitionInstallMbrChildHandles (\r | |
434 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
435 | IN EFI_HANDLE Handle,\r | |
436 | IN EFI_DISK_IO_PROTOCOL *DiskIo,\r | |
493d8e3a | 437 | IN EFI_DISK_IO2_PROTOCOL *DiskIo2,\r |
adbcbf8f | 438 | IN EFI_BLOCK_IO_PROTOCOL *BlockIo,\r |
490b5ea1 | 439 | IN EFI_BLOCK_IO2_PROTOCOL *BlockIo2,\r |
adbcbf8f | 440 | IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r |
ea7cb08c | 441 | );\r |
adbcbf8f | 442 | \r |
8aafec2c PA |
443 | /**\r |
444 | Install child handles if the Handle supports UDF/ECMA-167 volume format.\r | |
445 | \r | |
446 | @param[in] This Calling context.\r | |
447 | @param[in] Handle Parent Handle.\r | |
448 | @param[in] DiskIo Parent DiskIo interface.\r | |
449 | @param[in] DiskIo2 Parent DiskIo2 interface.\r | |
450 | @param[in] BlockIo Parent BlockIo interface.\r | |
451 | @param[in] BlockIo2 Parent BlockIo2 interface.\r | |
452 | @param[in] DevicePath Parent Device Path\r | |
453 | \r | |
454 | \r | |
455 | @retval EFI_SUCCESS Child handle(s) was added.\r | |
456 | @retval EFI_MEDIA_CHANGED Media changed Detected.\r | |
457 | @retval other no child handle was added.\r | |
458 | \r | |
459 | **/\r | |
460 | EFI_STATUS\r | |
461 | PartitionInstallUdfChildHandles (\r | |
462 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
463 | IN EFI_HANDLE Handle,\r | |
464 | IN EFI_DISK_IO_PROTOCOL *DiskIo,\r | |
465 | IN EFI_DISK_IO2_PROTOCOL *DiskIo2,\r | |
466 | IN EFI_BLOCK_IO_PROTOCOL *BlockIo,\r | |
467 | IN EFI_BLOCK_IO2_PROTOCOL *BlockIo2,\r | |
468 | IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r | |
469 | );\r | |
470 | \r | |
adbcbf8f | 471 | typedef\r |
472 | EFI_STATUS\r | |
473 | (*PARTITION_DETECT_ROUTINE) (\r | |
474 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
475 | IN EFI_HANDLE Handle,\r | |
476 | IN EFI_DISK_IO_PROTOCOL *DiskIo,\r | |
493d8e3a | 477 | IN EFI_DISK_IO2_PROTOCOL *DiskIo2,\r |
adbcbf8f | 478 | IN EFI_BLOCK_IO_PROTOCOL *BlockIo,\r |
490b5ea1 | 479 | IN EFI_BLOCK_IO2_PROTOCOL *BlockIo2,\r |
adbcbf8f | 480 | IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r |
481 | );\r | |
482 | \r | |
483 | #endif\r |