3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 #ifndef _EFI_PCI_OP_ROM_SUPPORT_H_
15 #define _EFI_PCI_OP_ROM_SUPPORT_H_
17 #include <Protocol/LoadFile2.h>
20 Initialize a PCI LoadFile2 instance
22 @param PciIoDevice - PCI IO Device
26 InitializePciLoadFile2 (
27 PCI_IO_DEVICE
*PciIoDevice
31 Causes the driver to load a specified file.
33 @param This Indicates a pointer to the calling context.
34 @param FilePath The device specific path of the file to load.
35 @param BootPolicy Should always be FALSE.
36 @param BufferSize On input the size of Buffer in bytes. On output with a return
37 code of EFI_SUCCESS, the amount of data transferred to Buffer.
38 On output with a return code of EFI_BUFFER_TOO_SMALL,
39 the size of Buffer required to retrieve the requested file.
40 @param Buffer The memory buffer to transfer the file to. If Buffer is NULL,
41 then no the size of the requested file is returned in BufferSize.
43 @retval EFI_SUCCESS The file was loaded.
44 @retval EFI_UNSUPPORTED BootPolicy is TRUE.
45 @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small to read the current directory entry.
46 BufferSize has been updated with the size needed to complete the request.
52 IN EFI_LOAD_FILE2_PROTOCOL
*This
,
53 IN EFI_DEVICE_PATH_PROTOCOL
*FilePath
,
54 IN BOOLEAN BootPolicy
,
55 IN OUT UINTN
*BufferSize
,
56 IN VOID
*Buffer OPTIONAL
61 Check if the RomImage contains EFI Images.
63 @param RomImage The ROM address of Image for check.
64 @param RomSize Size of ROM for check.
66 @retval TRUE ROM contain EFI Image.
67 @retval FALSE ROM not contain EFI Image.
78 Get Pci device's oprom infor bits.
80 @param PciIoDevice Pci device instance
82 @retval EFI_NOT_FOUND Pci device has not oprom
83 @retval EFI_SUCCESS Pci device has oprom
87 IN PCI_IO_DEVICE
*PciIoDevice
91 Load option rom image for specified PCI device
93 @param PciDevice Pci device instance
94 @param RomBase Base address of oprom.
96 @retval EFI_OUT_OF_RESOURCES not enough memory to hold image
97 @retval EFI_SUCESS Success
101 IN PCI_IO_DEVICE
*PciDevice
,
106 enable/disable oprom decode
108 @param PciDevice pci device instance
109 @param RomBarIndex The BAR index of the standard PCI Configuration header to use as the
110 base address for resource range. The legal range for this field is 0..5.
111 @param RomBar Base address of rom
112 @param Enable Flag for enable/disable decode.
114 @retval EFI_SUCCESS Success
118 IN PCI_IO_DEVICE
*PciDevice
,
119 IN UINT8 RomBarIndex
,
125 Process the oprom image.
127 @param PciDevice Pci device instance
131 PCI_IO_DEVICE
*PciDevice