]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskImpl.h
MdeModulePkg RamDiskDxe: Install Block I/O 2 Protocol on RAM disk devices
[mirror_edk2.git] / MdeModulePkg / Universal / Disk / RamDiskDxe / RamDiskImpl.h
1 /** @file
2 The header file of RamDiskDxe driver.
3
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef _RAM_DISK_IMPL_H_
16 #define _RAM_DISK_IMPL_H_
17
18 #include <Uefi.h>
19 #include <Library/BaseLib.h>
20 #include <Library/BaseMemoryLib.h>
21 #include <Library/DebugLib.h>
22 #include <Library/UefiLib.h>
23 #include <Library/UefiDriverEntryPoint.h>
24 #include <Library/UefiBootServicesTableLib.h>
25 #include <Library/UefiHiiServicesLib.h>
26 #include <Library/MemoryAllocationLib.h>
27 #include <Library/HiiLib.h>
28 #include <Library/FileExplorerLib.h>
29 #include <Library/DevicePathLib.h>
30 #include <Library/PrintLib.h>
31 #include <Protocol/RamDisk.h>
32 #include <Protocol/BlockIo.h>
33 #include <Protocol/BlockIo2.h>
34 #include <Protocol/HiiConfigAccess.h>
35 #include <Protocol/SimpleFileSystem.h>
36 #include <Guid/MdeModuleHii.h>
37 #include <Guid/RamDiskHii.h>
38 #include <Guid/FileInfo.h>
39
40 #include "RamDiskNVData.h"
41
42 ///
43 /// RAM disk general definitions and declarations
44 ///
45
46 //
47 // Block size for RAM disk
48 //
49 #define RAM_DISK_BLOCK_SIZE 512
50
51 //
52 // Iterate through the doule linked list. NOT delete safe
53 //
54 #define EFI_LIST_FOR_EACH(Entry, ListHead) \
55 for(Entry = (ListHead)->ForwardLink; Entry != (ListHead); Entry = Entry->ForwardLink)
56
57 //
58 // Iterate through the doule linked list. This is delete-safe.
59 // Do not touch NextEntry
60 //
61 #define EFI_LIST_FOR_EACH_SAFE(Entry, NextEntry, ListHead) \
62 for(Entry = (ListHead)->ForwardLink, NextEntry = Entry->ForwardLink;\
63 Entry != (ListHead); Entry = NextEntry, NextEntry = Entry->ForwardLink)
64
65 //
66 // RamDiskDxe driver maintains a list of registered RAM disks.
67 //
68 extern LIST_ENTRY RegisteredRamDisks;
69 extern UINTN ListEntryNum;
70
71 //
72 // RAM Disk create method.
73 //
74 typedef enum _RAM_DISK_CREATE_METHOD {
75 RamDiskCreateOthers = 0,
76 RamDiskCreateHii
77 } RAM_DISK_CREATE_METHOD;
78
79 //
80 // RamDiskDxe driver maintains a list of registered RAM disks.
81 // The struct contains the list entry and the information of each RAM
82 // disk
83 //
84 typedef struct {
85 UINTN Signature;
86
87 EFI_HANDLE Handle;
88
89 EFI_BLOCK_IO_PROTOCOL BlockIo;
90 EFI_BLOCK_IO2_PROTOCOL BlockIo2;
91 EFI_BLOCK_IO_MEDIA Media;
92 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
93
94 UINT64 StartingAddr;
95 UINT64 Size;
96 EFI_GUID TypeGuid;
97 UINT16 InstanceNumber;
98 RAM_DISK_CREATE_METHOD CreateMethod;
99
100 LIST_ENTRY ThisInstance;
101 } RAM_DISK_PRIVATE_DATA;
102
103 #define RAM_DISK_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('R', 'D', 'S', 'K')
104 #define RAM_DISK_PRIVATE_FROM_BLKIO(a) CR (a, RAM_DISK_PRIVATE_DATA, BlockIo, RAM_DISK_PRIVATE_DATA_SIGNATURE)
105 #define RAM_DISK_PRIVATE_FROM_BLKIO2(a) CR (a, RAM_DISK_PRIVATE_DATA, BlockIo2, RAM_DISK_PRIVATE_DATA_SIGNATURE)
106 #define RAM_DISK_PRIVATE_FROM_THIS(a) CR (a, RAM_DISK_PRIVATE_DATA, ThisInstance, RAM_DISK_PRIVATE_DATA_SIGNATURE)
107
108 ///
109 /// RAM disk HII-related definitions and declarations
110 ///
111
112 //
113 // Tool generated IFR binary data and String package data
114 //
115 extern UINT8 RamDiskHiiBin[];
116 extern UINT8 RamDiskDxeStrings[];
117
118 typedef struct {
119 VENDOR_DEVICE_PATH VendorDevicePath;
120 EFI_DEVICE_PATH_PROTOCOL End;
121 } HII_VENDOR_DEVICE_PATH;
122
123 typedef struct {
124 UINTN Signature;
125
126 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;
127 EFI_HANDLE DriverHandle;
128 EFI_HII_HANDLE HiiHandle;
129 } RAM_DISK_CONFIG_PRIVATE_DATA;
130
131 extern RAM_DISK_CONFIG_PRIVATE_DATA mRamDiskConfigPrivateDataTemplate;
132
133 #define RAM_DISK_CONFIG_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('R', 'C', 'F', 'G')
134 #define RAM_DISK_CONFIG_PRIVATE_FROM_THIS(a) CR (a, RAM_DISK_CONFIG_PRIVATE_DATA, ConfigAccess, RAM_DISK_CONFIG_PRIVATE_DATA_SIGNATURE)
135
136 #define RAM_DISK_LIST_VAR_OFFSET ((UINT16) OFFSET_OF (RAM_DISK_CONFIGURATION, RamDiskList))
137
138 /**
139 Register a RAM disk with specified address, size and type.
140
141 @param[in] RamDiskBase The base address of registered RAM disk.
142 @param[in] RamDiskSize The size of registered RAM disk.
143 @param[in] RamDiskType The type of registered RAM disk. The GUID can be
144 any of the values defined in section 9.3.6.9, or a
145 vendor defined GUID.
146 @param[in] ParentDevicePath
147 Pointer to the parent device path. If there is no
148 parent device path then ParentDevicePath is NULL.
149 @param[out] DevicePath On return, points to a pointer to the device path
150 of the RAM disk device.
151 If ParentDevicePath is not NULL, the returned
152 DevicePath is created by appending a RAM disk node
153 to the parent device path. If ParentDevicePath is
154 NULL, the returned DevicePath is a RAM disk device
155 path without appending. This function is
156 responsible for allocating the buffer DevicePath
157 with the boot service AllocatePool().
158
159 @retval EFI_SUCCESS The RAM disk is registered successfully.
160 @retval EFI_INVALID_PARAMETER DevicePath or RamDiskType is NULL.
161 RamDiskSize is 0.
162 @retval EFI_ALREADY_STARTED A Device Path Protocol instance to be created
163 is already present in the handle database.
164 @retval EFI_OUT_OF_RESOURCES The RAM disk register operation fails due to
165 resource limitation.
166
167 **/
168 EFI_STATUS
169 EFIAPI
170 RamDiskRegister (
171 IN UINT64 RamDiskBase,
172 IN UINT64 RamDiskSize,
173 IN EFI_GUID *RamDiskType,
174 IN EFI_DEVICE_PATH *ParentDevicePath OPTIONAL,
175 OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
176 );
177
178 /**
179 Unregister a RAM disk specified by DevicePath.
180
181 @param[in] DevicePath A pointer to the device path that describes a RAM
182 Disk device.
183
184 @retval EFI_SUCCESS The RAM disk is unregistered successfully.
185 @retval EFI_INVALID_PARAMETER DevicePath is NULL.
186 @retval EFI_UNSUPPORTED The device specified by DevicePath is not a
187 valid ramdisk device path and not supported
188 by the driver.
189 @retval EFI_NOT_FOUND The RAM disk pointed by DevicePath doesn't
190 exist.
191
192 **/
193 EFI_STATUS
194 EFIAPI
195 RamDiskUnregister (
196 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
197 );
198
199 /**
200 Initialize the BlockIO protocol of a RAM disk device.
201
202 @param[in] PrivateData Points to RAM disk private data.
203
204 **/
205 VOID
206 RamDiskInitBlockIo (
207 IN RAM_DISK_PRIVATE_DATA *PrivateData
208 );
209
210 /**
211 Reset the Block Device.
212
213 @param[in] This Indicates a pointer to the calling context.
214 @param[in] ExtendedVerification
215 Driver may perform diagnostics on reset.
216
217 @retval EFI_SUCCESS The device was reset.
218 @retval EFI_DEVICE_ERROR The device is not functioning properly and
219 could not be reset.
220
221 **/
222 EFI_STATUS
223 EFIAPI
224 RamDiskBlkIoReset (
225 IN EFI_BLOCK_IO_PROTOCOL *This,
226 IN BOOLEAN ExtendedVerification
227 );
228
229 /**
230 Read BufferSize bytes from Lba into Buffer.
231
232 @param[in] This Indicates a pointer to the calling context.
233 @param[in] MediaId Id of the media, changes every time the media is
234 replaced.
235 @param[in] Lba The starting Logical Block Address to read from.
236 @param[in] BufferSize Size of Buffer, must be a multiple of device block
237 size.
238 @param[out] Buffer A pointer to the destination buffer for the data.
239 The caller is responsible for either having
240 implicit or explicit ownership of the buffer.
241
242 @retval EFI_SUCCESS The data was read correctly from the device.
243 @retval EFI_DEVICE_ERROR The device reported an error while performing
244 the read.
245 @retval EFI_NO_MEDIA There is no media in the device.
246 @retval EFI_MEDIA_CHANGED The MediaId does not matched the current
247 device.
248 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block
249 size of the device.
250 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not
251 valid, or the buffer is not on proper alignment.
252
253 **/
254 EFI_STATUS
255 EFIAPI
256 RamDiskBlkIoReadBlocks (
257 IN EFI_BLOCK_IO_PROTOCOL *This,
258 IN UINT32 MediaId,
259 IN EFI_LBA Lba,
260 IN UINTN BufferSize,
261 OUT VOID *Buffer
262 );
263
264 /**
265 Write BufferSize bytes from Lba into Buffer.
266
267 @param[in] This Indicates a pointer to the calling context.
268 @param[in] MediaId The media ID that the write request is for.
269 @param[in] Lba The starting logical block address to be written.
270 The caller is responsible for writing to only
271 legitimate locations.
272 @param[in] BufferSize Size of Buffer, must be a multiple of device block
273 size.
274 @param[in] Buffer A pointer to the source buffer for the data.
275
276 @retval EFI_SUCCESS The data was written correctly to the device.
277 @retval EFI_WRITE_PROTECTED The device can not be written to.
278 @retval EFI_DEVICE_ERROR The device reported an error while performing
279 the write.
280 @retval EFI_NO_MEDIA There is no media in the device.
281 @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current
282 device.
283 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block
284 size of the device.
285 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not
286 valid, or the buffer is not on proper alignment.
287
288 **/
289 EFI_STATUS
290 EFIAPI
291 RamDiskBlkIoWriteBlocks (
292 IN EFI_BLOCK_IO_PROTOCOL *This,
293 IN UINT32 MediaId,
294 IN EFI_LBA Lba,
295 IN UINTN BufferSize,
296 IN VOID *Buffer
297 );
298
299 /**
300 Flush the Block Device.
301
302 @param[in] This Indicates a pointer to the calling context.
303
304 @retval EFI_SUCCESS All outstanding data was written to the device.
305 @retval EFI_DEVICE_ERROR The device reported an error while writting
306 back the data
307 @retval EFI_NO_MEDIA There is no media in the device.
308
309 **/
310 EFI_STATUS
311 EFIAPI
312 RamDiskBlkIoFlushBlocks (
313 IN EFI_BLOCK_IO_PROTOCOL *This
314 );
315
316 /**
317 Resets the block device hardware.
318
319 @param[in] This The pointer of EFI_BLOCK_IO2_PROTOCOL.
320 @param[in] ExtendedVerification The flag about if extend verificate.
321
322 @retval EFI_SUCCESS The device was reset.
323 @retval EFI_DEVICE_ERROR The block device is not functioning correctly
324 and could not be reset.
325
326 **/
327 EFI_STATUS
328 EFIAPI
329 RamDiskBlkIo2Reset (
330 IN EFI_BLOCK_IO2_PROTOCOL *This,
331 IN BOOLEAN ExtendedVerification
332 );
333
334 /**
335 Reads the requested number of blocks from the device.
336
337 @param[in] This Indicates a pointer to the calling context.
338 @param[in] MediaId The media ID that the read request is for.
339 @param[in] Lba The starting logical block address to read
340 from on the device.
341 @param[in, out] Token A pointer to the token associated with the
342 transaction.
343 @param[in] BufferSize The size of the Buffer in bytes. This must be
344 a multiple of the intrinsic block size of the
345 device.
346 @param[out] Buffer A pointer to the destination buffer for the
347 data. The caller is responsible for either
348 having implicit or explicit ownership of the
349 buffer.
350
351 @retval EFI_SUCCESS The read request was queued if Token->Event
352 is not NULL. The data was read correctly from
353 the device if the Token->Event is NULL.
354 @retval EFI_DEVICE_ERROR The device reported an error while attempting
355 to perform the read operation.
356 @retval EFI_NO_MEDIA There is no media in the device.
357 @retval EFI_MEDIA_CHANGED The MediaId is not for the current media.
358 @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of
359 the intrinsic block size of the device.
360 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not
361 valid, or the buffer is not on proper
362 alignment.
363 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
364 lack of resources.
365
366 **/
367 EFI_STATUS
368 EFIAPI
369 RamDiskBlkIo2ReadBlocksEx (
370 IN EFI_BLOCK_IO2_PROTOCOL *This,
371 IN UINT32 MediaId,
372 IN EFI_LBA Lba,
373 IN OUT EFI_BLOCK_IO2_TOKEN *Token,
374 IN UINTN BufferSize,
375 OUT VOID *Buffer
376 );
377
378 /**
379 Writes a specified number of blocks to the device.
380
381 @param[in] This Indicates a pointer to the calling context.
382 @param[in] MediaId The media ID that the write request is for.
383 @param[in] Lba The starting logical block address to be
384 written. The caller is responsible for
385 writing to only legitimate locations.
386 @param[in, out] Token A pointer to the token associated with the
387 transaction.
388 @param[in] BufferSize The size in bytes of Buffer. This must be a
389 multiple of the intrinsic block size of the
390 device.
391 @param[in] Buffer A pointer to the source buffer for the data.
392
393 @retval EFI_SUCCESS The write request was queued if Event is not
394 NULL. The data was written correctly to the
395 device if the Event is NULL.
396 @retval EFI_WRITE_PROTECTED The device cannot be written to.
397 @retval EFI_NO_MEDIA There is no media in the device.
398 @retval EFI_MEDIA_CHANGED The MediaId is not for the current media.
399 @retval EFI_DEVICE_ERROR The device reported an error while attempting
400 to perform the write operation.
401 @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of
402 the intrinsic block size of the device.
403 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not
404 valid, or the buffer is not on proper
405 alignment.
406 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
407 lack of resources.
408
409 **/
410 EFI_STATUS
411 EFIAPI
412 RamDiskBlkIo2WriteBlocksEx (
413 IN EFI_BLOCK_IO2_PROTOCOL *This,
414 IN UINT32 MediaId,
415 IN EFI_LBA Lba,
416 IN OUT EFI_BLOCK_IO2_TOKEN *Token,
417 IN UINTN BufferSize,
418 IN VOID *Buffer
419 );
420
421 /**
422 Flushes all modified data to a physical block device.
423
424 @param[in] This Indicates a pointer to the calling context.
425 @param[in, out] Token A pointer to the token associated with the
426 transaction.
427
428 @retval EFI_SUCCESS The flush request was queued if Event is not
429 NULL. All outstanding data was written
430 correctly to the device if the Event is NULL.
431 @retval EFI_DEVICE_ERROR The device reported an error while attempting
432 to write data.
433 @retval EFI_WRITE_PROTECTED The device cannot be written to.
434 @retval EFI_NO_MEDIA There is no media in the device.
435 @retval EFI_MEDIA_CHANGED The MediaId is not for the current media.
436 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
437 lack of resources.
438
439 **/
440 EFI_STATUS
441 EFIAPI
442 RamDiskBlkIo2FlushBlocksEx (
443 IN EFI_BLOCK_IO2_PROTOCOL *This,
444 IN OUT EFI_BLOCK_IO2_TOKEN *Token
445 );
446
447 /**
448 This function publish the RAM disk configuration Form.
449
450 @param[in, out] ConfigPrivateData
451 Points to RAM disk configuration private data.
452
453 @retval EFI_SUCCESS HII Form is installed successfully.
454 @retval EFI_OUT_OF_RESOURCES Not enough resource for HII Form installation.
455 @retval Others Other errors as indicated.
456
457 **/
458 EFI_STATUS
459 InstallRamDiskConfigForm (
460 IN OUT RAM_DISK_CONFIG_PRIVATE_DATA *ConfigPrivateData
461 );
462
463 /**
464 This function removes RAM disk configuration Form.
465
466 @param[in, out] ConfigPrivateData
467 Points to RAM disk configuration private data.
468
469 **/
470 VOID
471 UninstallRamDiskConfigForm (
472 IN OUT RAM_DISK_CONFIG_PRIVATE_DATA *ConfigPrivateData
473 );
474
475 /**
476 Unregister all registered RAM disks.
477
478 **/
479 VOID
480 UnregisterAllRamDisks (
481 VOID
482 );
483
484 /**
485 This function allows a caller to extract the current configuration for one
486 or more named elements from the target driver.
487
488 @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
489 @param[in] Request A null-terminated Unicode string in
490 <ConfigRequest> format.
491 @param[out] Progress On return, points to a character in the Request
492 string. Points to the string's null terminator if
493 request was successful. Points to the most recent
494 '&' before the first failing name/value pair (or
495 the beginning of the string if the failure is in
496 the first name/value pair) if the request was not
497 successful.
498 @param[out] Results A null-terminated Unicode string in
499 <ConfigAltResp> format which has all values filled
500 in for the names in the Request string. String to
501 be allocated by the called function.
502
503 @retval EFI_SUCCESS The Results is filled with the requested
504 values.
505 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the results.
506 @retval EFI_INVALID_PARAMETER Request is illegal syntax, or unknown name.
507 @retval EFI_NOT_FOUND Routing data doesn't match any storage in
508 this driver.
509
510 **/
511 EFI_STATUS
512 EFIAPI
513 RamDiskExtractConfig (
514 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
515 IN CONST EFI_STRING Request,
516 OUT EFI_STRING *Progress,
517 OUT EFI_STRING *Results
518 );
519
520 /**
521 This function processes the results of changes in configuration.
522
523 @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
524 @param[in] Configuration A null-terminated Unicode string in <ConfigResp>
525 format.
526 @param[out] Progress A pointer to a string filled in with the offset of
527 the most recent '&' before the first failing
528 name/value pair (or the beginning of the string if
529 the failure is in the first name/value pair) or
530 the terminating NULL if all was successful.
531
532 @retval EFI_SUCCESS The Results is processed successfully.
533 @retval EFI_INVALID_PARAMETER Configuration is NULL.
534 @retval EFI_NOT_FOUND Routing data doesn't match any storage in
535 this driver.
536
537 **/
538 EFI_STATUS
539 EFIAPI
540 RamDiskRouteConfig (
541 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
542 IN CONST EFI_STRING Configuration,
543 OUT EFI_STRING *Progress
544 );
545
546 /**
547 This function processes the results of changes in configuration.
548
549 @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
550 @param[in] Action Specifies the type of action taken by the browser.
551 @param[in] QuestionId A unique value which is sent to the original
552 exporting driver so that it can identify the type
553 of data to expect.
554 @param[in] Type The type of value for the question.
555 @param[in] Value A pointer to the data being sent to the original
556 exporting driver.
557 @param[out] ActionRequest On return, points to the action requested by the
558 callback function.
559
560 @retval EFI_SUCCESS The callback successfully handled the action.
561 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the
562 variable and its data.
563 @retval EFI_DEVICE_ERROR The variable could not be saved.
564 @retval EFI_UNSUPPORTED The specified Action is not supported by the
565 callback.
566
567 **/
568 EFI_STATUS
569 EFIAPI
570 RamDiskCallback (
571 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
572 IN EFI_BROWSER_ACTION Action,
573 IN EFI_QUESTION_ID QuestionId,
574 IN UINT8 Type,
575 IN EFI_IFR_TYPE_VALUE *Value,
576 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
577 );
578
579
580 /**
581 This function gets the file information from an open file descriptor,
582 and stores it in a buffer allocated from pool.
583
584 @param[in] FHand File Handle.
585
586 @return A pointer to a buffer with file information or NULL is returned.
587
588 **/
589 EFI_FILE_INFO *
590 FileInfo (
591 IN EFI_FILE_HANDLE FHand
592 );
593
594
595 /**
596 This function will open a file or directory referenced by DevicePath.
597
598 This function opens a file with the open mode according to the file path. The
599 Attributes is valid only for EFI_FILE_MODE_CREATE.
600
601 @param[in, out] FilePath On input, the device path to the file.
602 On output, the remaining device path.
603 @param[out] FileHandle Pointer to the file handle.
604 @param[in] OpenMode The mode to open the file with.
605 @param[in] Attributes The file's file attributes.
606
607 @retval EFI_SUCCESS The information was set.
608 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
609 @retval EFI_UNSUPPORTED Could not open the file path.
610 @retval EFI_NOT_FOUND The specified file could not be found on the
611 device or the file system could not be found
612 on the device.
613 @retval EFI_NO_MEDIA The device has no medium.
614 @retval EFI_MEDIA_CHANGED The device has a different medium in it or
615 the medium is no longer supported.
616 @retval EFI_DEVICE_ERROR The device reported an error.
617 @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
618 @retval EFI_WRITE_PROTECTED The file or medium is write protected.
619 @retval EFI_ACCESS_DENIED The file was opened read only.
620 @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open
621 the file.
622 @retval EFI_VOLUME_FULL The volume is full.
623 **/
624 EFI_STATUS
625 EFIAPI
626 OpenFileByDevicePath(
627 IN OUT EFI_DEVICE_PATH_PROTOCOL **FilePath,
628 OUT EFI_FILE_HANDLE *FileHandle,
629 IN UINT64 OpenMode,
630 IN UINT64 Attributes
631 );
632
633 #endif