+++ /dev/null
-/*++\r
-\r
-Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-Module Name:\r
-\r
- GetImage.h\r
-\r
-Abstract:\r
-\r
- Image data retrieval support for common use.\r
-\r
---*/\r
-\r
-#ifndef _GET_IMAGE_H_\r
-#define _GET_IMAGE_H_\r
-#include "EfiImageFormat.h"\r
-\r
-EFI_STATUS\r
-GetImage (\r
- IN EFI_GUID *NameGuid,\r
- IN EFI_SECTION_TYPE SectionType,\r
- OUT VOID **Buffer,\r
- OUT UINTN *Size\r
- )\r
-/*++\r
-\r
-Routine Description:\r
- Enumerate all the FVs, and fill Buffer with the SectionType section content in NameGuid file.\r
-\r
- Note:\r
- 1. when SectionType is EFI_SECTION_PE32, it tries to read NameGuid file after failure on \r
- reading EFI_SECTION_PE32 section.\r
- 2. when SectionType is EFI_SECTION_TE, it tries to get EFI_SECTION_PE32 section after failure on\r
- reading EFI_SECTION_TE section. If it's failed again, it tries to read NameGuid file.\r
- 3. Callee allocates memory, which caller is responsible to free.\r
-\r
-Arguments:\r
-\r
- NameGuid - Pointer to EFI_GUID, which is file name.\r
- SectionType - Required section type.\r
- Buffer - Pointer to a pointer in which the read content is returned.\r
- Caller is responsible to free Buffer.\r
- Size - Pointer to a UINTN, which indicates the size of returned *Buffer.\r
-\r
-Returns:\r
- EFI_NOT_FOUND - Required content can not be found.\r
- EFI_SUCCESS - Required content can be found, but whether the Buffer is filled \r
- with section content or not depends on the Buffer and Size.\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-GetImageEx (\r
- IN EFI_HANDLE ImageHandle,\r
- IN EFI_GUID *NameGuid,\r
- IN EFI_SECTION_TYPE SectionType,\r
- OUT VOID **Buffer,\r
- OUT UINTN *Size,\r
- BOOLEAN WithinImageFv\r
- )\r
-/*++\r
-\r
-Routine Description:\r
- Search FVs, and fill Buffer with the SectionType section content in NameGuid file.\r
- If ImageHandle is not NULL, the FV from which the ImageHandle is loaded is searched\r
- first. If WithinImageFv is TRUE, only the FV from which the ImageHandle is loaded\r
- is searched. If ImageHandle is NULL or WithinImageFv is FALSE, all FVs in the system\r
- is searched.\r
-\r
- Note:\r
- 1. when SectionType is EFI_SECTION_PE32, it tries to read NameGuid file after failure on \r
- reading EFI_SECTION_PE32 section.\r
- 2. when SectionType is EFI_SECTION_TE, it tries to get EFI_SECTION_PE32 section after failure on\r
- reading EFI_SECTION_TE section. If it's failed again, it tries to read NameGuid file.\r
- 3. Callee allocates memory, which caller is responsible to free.\r
-\r
-Arguments:\r
-\r
- ImageHandle - The caller's driver image handle.\r
- NameGuid - Pointer to EFI_GUID, which is file name.\r
- SectionType - Required section type.\r
- Buffer - Pointer to a pointer in which the read content is returned.\r
- Caller is responsible to free Buffer.\r
- Size - Pointer to a UINTN, which indicates the size of returned *Buffer.\r
- WithinImageFv - Whether the search only performs on the FV from which the caller's\r
- driver image is loaded.\r
-\r
-Returns:\r
- EFI_INVALID_PARAMETER - ImageHandle is NULL and WithinImageFv is TRUE.\r
- EFI_NOT_FOUND - Required content can not be found.\r
- EFI_SUCCESS - Required content can be found, but whether the Buffer is filled \r
- with section content or not depends on the Buffer and Size.\r
---*/\r
-;\r
-\r
-#endif //_GET_IMAGE_H_\r