/** @file\r
+ PCI Rom supporting funtions declaration for PCI Bus module.\r
\r
-Copyright (c) 2006, 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
-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
+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
+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
**/\r
\r
-#ifndef _EFI_PCI_OP_ROM_SUPPORT_H_\r
-#define _EFI_PCI_OP_ROM_SUPPORT_H_\r
+#ifndef _EFI_PCI_OPTION_ROM_SUPPORT_H_\r
+#define _EFI_PCI_OPTION_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
+ Initialize a PCI LoadFile2 instance.\r
+\r
+ @param PciIoDevice PCI IO Device.\r
\r
**/\r
VOID\r
InitializePciLoadFile2 (\r
- PCI_IO_DEVICE *PciIoDevice\r
+ IN PCI_IO_DEVICE *PciIoDevice\r
);\r
\r
/**\r
Causes the driver to load a specified file.\r
- \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
+ @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_INVALID_PARAMETER FilePath is not a valid device path, or\r
+ BufferSize is NULL.\r
+ @retval EFI_NOT_FOUND Not found PCI Option Rom on PCI device.\r
+ @retval EFI_DEVICE_ERROR Failed to decompress PCI Option Rom image.\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
**/\r
EFI_STATUS\r
EFIAPI\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 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
**/\r
BOOLEAN\r
ContainEfiImage (\r
IN VOID *RomImage,\r
IN UINT64 RomSize\r
- ); \r
+ );\r
\r
\r
/**\r
- Get Pci device's oprom infor bits.\r
- \r
- @param PciIoDevice Pci device instance\r
+ Get Pci device's oprom information.\r
+\r
+ @param PciIoDevice Input Pci device instance.\r
+ Output Pci device instance with updated OptionRom size.\r
+\r
+ @retval EFI_NOT_FOUND Pci device has not Option Rom.\r
+ @retval EFI_SUCCESS Pci device has Option Rom.\r
\r
- @retval EFI_NOT_FOUND Pci device has not oprom\r
- @retval EFI_SUCCESS Pci device has oprom\r
**/\r
EFI_STATUS\r
GetOpRomInfo (\r
- IN PCI_IO_DEVICE *PciIoDevice\r
+ IN OUT PCI_IO_DEVICE *PciIoDevice\r
);\r
\r
/**\r
- Load option rom image for specified PCI device\r
- \r
- @param PciDevice Pci device instance\r
- @param RomBase Base address of oprom.\r
- \r
- @retval EFI_OUT_OF_RESOURCES not enough memory to hold image\r
- @retval EFI_SUCESS Success\r
+ Load Option Rom image for specified PCI device.\r
+\r
+ @param PciDevice Pci device instance.\r
+ @param RomBase Base address of Option Rom.\r
+\r
+ @retval EFI_OUT_OF_RESOURCES No enough memory to hold image.\r
+ @retval EFI_SUCESS Successfully loaded Option Rom.\r
+\r
**/\r
EFI_STATUS\r
LoadOpRomImage (\r
);\r
\r
/**\r
- enable/disable oprom decode\r
- \r
- @param PciDevice pci device instance\r
+ Enable/Disable Option Rom decode.\r
+\r
+ @param PciDevice Pci device instance.\r
@param RomBarIndex The BAR index of the standard PCI Configuration header to use as the\r
base address for resource range. The legal range for this field is 0..5.\r
- @param RomBar Base address of rom\r
+ @param RomBar Base address of Option Rom.\r
@param Enable Flag for enable/disable decode.\r
- \r
- @retval EFI_SUCCESS Success\r
+\r
**/\r
-EFI_STATUS\r
+VOID\r
RomDecode (\r
IN PCI_IO_DEVICE *PciDevice,\r
IN UINT8 RomBarIndex,\r
);\r
\r
/**\r
- Process the oprom image.\r
- \r
- @param PciDevice Pci device instance\r
+ Load and start the Option Rom image.\r
+\r
+ @param PciDevice Pci device instance.\r
+\r
+ @retval EFI_SUCCESS Successfully loaded and started PCI Option Rom image.\r
+ @retval EFI_NOT_FOUND Failed to process PCI Option Rom image.\r
+\r
**/\r
EFI_STATUS\r
ProcessOpRomImage (\r
- PCI_IO_DEVICE *PciDevice\r
+ IN PCI_IO_DEVICE *PciDevice\r
);\r
\r
#endif\r