diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-11-26 00:44:07 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-11-26 00:44:07 +0000 |
commit | 847166140a0385228435428c208e4f6b1ad4fb6a (patch) | |
tree | 86d5a69176d407dcb8134fa1d3486ac23a11eb01 /MdePkg/Include | |
parent | 2474e48aa74eda346f7bb35fb19225d48dc9dc82 (diff) | |
download | edk2-847166140a0385228435428c208e4f6b1ad4fb6a.zip edk2-847166140a0385228435428c208e4f6b1ad4fb6a.tar.gz edk2-847166140a0385228435428c208e4f6b1ad4fb6a.tar.bz2 |
Add new GetFileBufferByFilePath API into DxeServicesLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9486 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include')
-rw-r--r-- | MdePkg/Include/Library/DxeServicesLib.h | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/MdePkg/Include/Library/DxeServicesLib.h b/MdePkg/Include/Library/DxeServicesLib.h index 8987933..944535d 100644 --- a/MdePkg/Include/Library/DxeServicesLib.h +++ b/MdePkg/Include/Library/DxeServicesLib.h @@ -1,8 +1,8 @@ /** @file
MDE DXE Services Library provides functions that simplify the development of DXE Drivers.
- These functions help access data from sections of FFS files.
+ These functions help access data from sections of FFS files or from file path.
- Copyright (c) 2008, Intel Corporation<BR>
+ Copyright (c) 2008 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -154,5 +154,41 @@ GetSectionFromFfs ( OUT UINTN *Size
);
+
+/**
+ Get the image file buffer data and buffer size by its device path.
+
+ Access the file either from a firmware volume, from a file system interface,
+ or from the load file interface.
+
+ Allocate memory to store the found image. The caller is responsible to free memory.
+
+ If File is NULL, then NULL is returned.
+ If FileSize is NULL, then NULL is returned.
+ If AuthenticationStatus is NULL, then NULL is returned.
+
+ @param[in] BootPolicy
+ Policy for Open Image File.If TRUE, indicates that the request
+ originates from the boot manager, and that the boot manager is
+ attempting to load FilePath as a boot selection. If FALSE,
+ then FilePath must match an exact file to be loaded.
+ @param[in] File Pointer to the device path of the file that is absracted to the file buffer.
+ @param[out] FileSize Pointer to the size of the abstracted file buffer.
+ @param[out] AuthenticationStatus
+ Pointer to a caller-allocated UINT32 in which
+ the authentication status is returned.
+
+ @retval NULL File is NULL, or FileSize is NULL. Or the file can't be found.
+ @retval other The abstracted file buffer. The caller is responsible to free memory.
+**/
+VOID *
+EFIAPI
+GetFileBufferByFilePath (
+ IN BOOLEAN BootPolicy,
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *FilePath,
+ OUT UINTN *FileSize,
+ OUT UINT32 *AuthenticationStatus
+ );
+
#endif
|