TianoCore EDK2 master
|
#include "PciBus.h"
Go to the source code of this file.
Functions | |
EFI_STATUS | LocalLoadFile2 (IN PCI_IO_DEVICE *PciIoDevice, IN EFI_DEVICE_PATH_PROTOCOL *FilePath, IN OUT UINTN *BufferSize, IN VOID *Buffer OPTIONAL) |
VOID | InitializePciLoadFile2 (IN PCI_IO_DEVICE *PciIoDevice) |
EFI_STATUS EFIAPI | LoadFile2 (IN EFI_LOAD_FILE2_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *FilePath, IN BOOLEAN BootPolicy, IN OUT UINTN *BufferSize, IN VOID *Buffer OPTIONAL) |
EFI_STATUS | GetOpRomInfo (IN OUT PCI_IO_DEVICE *PciIoDevice) |
BOOLEAN | ContainEfiImage (IN VOID *RomImage, IN UINT64 RomSize) |
EFI_STATUS | LoadOpRomImage (IN PCI_IO_DEVICE *PciDevice, IN UINT64 RomBase) |
VOID | RomDecode (IN PCI_IO_DEVICE *PciDevice, IN UINT8 RomBarIndex, IN UINT32 RomBar, IN BOOLEAN Enable) |
EFI_STATUS | ProcessOpRomImage (IN PCI_IO_DEVICE *PciDevice) |
PCI Rom supporting funtions implementation for PCI Bus module.
Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PciOptionRomSupport.c.
Check if the RomImage contains EFI Images.
RomImage | The ROM address of Image for check. |
RomSize | Size of ROM for check. |
TRUE | ROM contain EFI Image. |
FALSE | ROM not contain EFI Image. |
Definition at line 320 of file PciOptionRomSupport.c.
EFI_STATUS GetOpRomInfo | ( | IN OUT PCI_IO_DEVICE * | PciIoDevice | ) |
Get Pci device's oprom information.
PciIoDevice | Input Pci device instance. Output Pci device instance with updated OptionRom size. |
EFI_NOT_FOUND | Pci device has not Option Rom. |
EFI_SUCCESS | Pci device has Option Rom. |
Definition at line 231 of file PciOptionRomSupport.c.
VOID InitializePciLoadFile2 | ( | IN PCI_IO_DEVICE * | PciIoDevice | ) |
Initialize a PCI LoadFile2 instance.
PciIoDevice | PCI IO Device. |
Definition at line 164 of file PciOptionRomSupport.c.
EFI_STATUS EFIAPI LoadFile2 | ( | IN EFI_LOAD_FILE2_PROTOCOL * | This, |
IN EFI_DEVICE_PATH_PROTOCOL * | FilePath, | ||
IN BOOLEAN | BootPolicy, | ||
IN OUT UINTN * | BufferSize, | ||
IN VOID *Buffer | OPTIONAL | ||
) |
Causes the driver to load a specified file.
This | Indicates a pointer to the calling context. |
FilePath | The device specific path of the file to load. |
BootPolicy | Should always be FALSE. |
BufferSize | On input the size of Buffer in bytes. On output with a return code of EFI_SUCCESS, the amount of data transferred to Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL, the size of Buffer required to retrieve the requested file. |
Buffer | The memory buffer to transfer the file to. If Buffer is NULL, then no the size of the requested file is returned in BufferSize. |
EFI_SUCCESS | The file was loaded. |
EFI_UNSUPPORTED | BootPolicy is TRUE. |
EFI_INVALID_PARAMETER | FilePath is not a valid device path, or BufferSize is NULL. |
EFI_NOT_FOUND | Not found PCI Option Rom on PCI device. |
EFI_DEVICE_ERROR | Failed to decompress PCI Option Rom image. |
EFI_BUFFER_TOO_SMALL | The BufferSize is too small to read the current directory entry. BufferSize has been updated with the size needed to complete the request. |
Definition at line 196 of file PciOptionRomSupport.c.
EFI_STATUS LoadOpRomImage | ( | IN PCI_IO_DEVICE * | PciDevice, |
IN UINT64 | RomBase | ||
) |
Load Option Rom image for specified PCI device.
PciDevice | Pci device instance. |
RomBase | Base address of Option Rom. |
EFI_OUT_OF_RESOURCES | No enough memory to hold image. |
EFI_SUCESS | Successfully loaded Option Rom. |
Definition at line 378 of file PciOptionRomSupport.c.
EFI_STATUS LocalLoadFile2 | ( | IN PCI_IO_DEVICE * | PciIoDevice, |
IN EFI_DEVICE_PATH_PROTOCOL * | FilePath, | ||
IN OUT UINTN * | BufferSize, | ||
IN VOID *Buffer | OPTIONAL | ||
) |
Load the EFI Image from Option ROM
PciIoDevice | PCI IO device instance. |
FilePath | The file path of the EFI Image |
BufferSize | On input the size of Buffer in bytes. On output with a return code of EFI_SUCCESS, the amount of data transferred to Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL, the size of Buffer required to retrieve the requested file. |
Buffer | The memory buffer to transfer the file to. If Buffer is NULL, then no the size of the requested file is returned in BufferSize. |
EFI_SUCCESS | The file was loaded. |
EFI_INVALID_PARAMETER | FilePath is not a valid device path, or BufferSize is NULL. |
EFI_NOT_FOUND | Not found PCI Option Rom on PCI device. |
EFI_DEVICE_ERROR | Failed to decompress PCI Option Rom image. |
EFI_BUFFER_TOO_SMALL | The BufferSize is too small to read the current directory entry. BufferSize has been updated with the size needed to complete the request. |
Definition at line 32 of file PciOptionRomSupport.c.
EFI_STATUS ProcessOpRomImage | ( | IN PCI_IO_DEVICE * | PciDevice | ) |
Load and start the Option Rom image.
PciDevice | Pci device instance. |
EFI_SUCCESS | Successfully loaded and started PCI Option Rom image. |
EFI_NOT_FOUND | Failed to process PCI Option Rom image. |
Definition at line 651 of file PciOptionRomSupport.c.
VOID RomDecode | ( | IN PCI_IO_DEVICE * | PciDevice, |
IN UINT8 | RomBarIndex, | ||
IN UINT32 | RomBar, | ||
IN BOOLEAN | Enable | ||
) |
Enable/Disable Option Rom decode.
PciDevice | Pci device instance. |
RomBarIndex | The BAR index of the standard PCI Configuration header to use as the base address for resource range. The legal range for this field is 0..5. |
RomBar | Base address of Option Rom. |
Enable | Flag for enable/disable decode. |
Definition at line 582 of file PciOptionRomSupport.c.