-/**@file\r
+/** @file\r
\r
-Copyright (c) 2006, Intel Corporation \r
+Copyright (c) 2006 - 2009, Intel Corporation \r
All rights reserved. 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
\r
**/\r
\r
-#ifndef _EFI_PCI_OP_ROM_SUPPORT_H\r
-#define _EFI_PCI_OP_ROM_SUPPORT_H\r
+#ifndef _EFI_PCI_OP_ROM_SUPPORT_H_\r
+#define _EFI_PCI_OP_ROM_SUPPORT_H_\r
+\r
+#include <Protocol/LoadFile2.h>\r
+\r
+/**\r
+ Initialize a PCI LoadFile2 instance.\r
+ \r
+ @param PciIoDevice PCI IO Device.\r
+\r
+**/\r
+VOID\r
+InitializePciLoadFile2 (\r
+ PCI_IO_DEVICE *PciIoDevice\r
+ );\r
+\r
+/**\r
+ Causes the driver to load a specified file.\r
+ \r
+ @param This Indicates a pointer to the calling context.\r
+ @param FilePath The device specific path of the file to load.\r
+ @param BootPolicy Should always be FALSE.\r
+ @param BufferSize On input the size of Buffer in bytes. On output with a return \r
+ code of EFI_SUCCESS, the amount of data transferred to Buffer. \r
+ On output with a return code of EFI_BUFFER_TOO_SMALL, \r
+ the size of Buffer required to retrieve the requested file. \r
+ @param Buffer The memory buffer to transfer the file to. If Buffer is NULL, \r
+ then no the size of the requested file is returned in BufferSize.\r
+\r
+ @retval EFI_SUCCESS The file was loaded. \r
+ @retval EFI_UNSUPPORTED BootPolicy is TRUE.\r
+ @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small to read the current directory entry.\r
+ BufferSize has been updated with the size needed to complete the request.\r
+ \r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+LoadFile2 (\r
+ IN EFI_LOAD_FILE2_PROTOCOL *This,\r
+ IN EFI_DEVICE_PATH_PROTOCOL *FilePath,\r
+ IN BOOLEAN BootPolicy,\r
+ IN OUT UINTN *BufferSize,\r
+ IN VOID *Buffer OPTIONAL\r
+ );\r
+\r
+/**\r
+\r
+ Check if the RomImage contains EFI Images.\r
+\r
+ @param RomImage The ROM address of Image for check. \r
+ @param RomSize Size of ROM for check.\r
+\r
+ @retval TRUE ROM contain EFI Image.\r
+ @retval FALSE ROM not contain EFI Image.\r
+ \r
+**/\r
+BOOLEAN\r
+ContainEfiImage (\r
+ IN VOID *RomImage,\r
+ IN UINT64 RomSize\r
+ ); \r
+\r
\r
/**\r
Get Pci device's oprom infor bits.\r
\r
+ @param PciIoDevice Pci device instance\r
+\r
@retval EFI_NOT_FOUND Pci device has not oprom\r
@retval EFI_SUCCESS Pci device has oprom\r
**/\r