TianoCore EDK2 master
|
#include "PciSegmentLibCommon.h"
#include <PiDxe.h>
#include <Guid/EventGroup.h>
#include <Library/UefiRuntimeLib.h>
#include <Library/DxeServicesTableLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PciSegmentInfoLib.h>
Go to the source code of this file.
Data Structures | |
struct | PCI_SEGMENT_RUNTIME_REGISTRATION_TABLE |
Functions | |
VOID EFIAPI | DxeRuntimePciSegmentLibVirtualNotify (IN EFI_EVENT Event, IN VOID *Context) |
EFI_STATUS EFIAPI | DxeRuntimePciSegmentLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
EFI_STATUS EFIAPI | DxeRuntimePciSegmentLibDestructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
RETURN_STATUS EFIAPI | PciSegmentRegisterForRuntimeAccess (IN UINTN Address) |
UINTN | PciSegmentLibVirtualAddress (IN UINTN Address) |
Instance of Runtime PCI Segment Library that support multi-segment PCI configuration access.
PCI Segment Library that consumes segment information provided by PciSegmentInfoLib to support multi-segment PCI configuration access through enhanced configuration access mechanism.
Copyright (c) 2017, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file DxeRuntimePciSegmentLib.c.
EFI_STATUS EFIAPI DxeRuntimePciSegmentLibConstructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
The constructor function caches the PCI Express Base Address and creates a Set Virtual Address Map event to convert physical address to virtual addresses.
ImageHandle | The firmware allocated handle for the EFI image. |
SystemTable | A pointer to the EFI System Table. |
EFI_SUCCESS | The constructor completed successfully. |
Other | value The constructor did not complete successfully. |
Definition at line 102 of file DxeRuntimePciSegmentLib.c.
EFI_STATUS EFIAPI DxeRuntimePciSegmentLibDestructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
The destructor function frees any allocated buffers and closes the Set Virtual Address Map event.
ImageHandle | The firmware allocated handle for the EFI image. |
SystemTable | A pointer to the EFI System Table. |
EFI_SUCCESS | The destructor completed successfully. |
Other | value The destructor did not complete successfully. |
Definition at line 137 of file DxeRuntimePciSegmentLib.c.
Convert the physical PCI Express MMIO addresses for all registered PCI devices to virtual addresses.
[in] | Event | The event that is being processed. |
[in] | Context | The Event Context. |
Definition at line 58 of file DxeRuntimePciSegmentLib.c.
Return the linear address for the physical address.
Address | The physical address. |
The | linear address. |
Definition at line 268 of file DxeRuntimePciSegmentLib.c.
Register a PCI device so PCI configuration registers may be accessed after SetVirtualAddressMap().
If any reserved bits in Address are set, then ASSERT().
Address | The address that encodes the PCI Bus, Device, Function and Register. |
RETURN_SUCCESS | The PCI device was registered for runtime access. |
RETURN_UNSUPPORTED | An attempt was made to call this function after ExitBootServices(). |
RETURN_UNSUPPORTED | The resources required to access the PCI device at runtime could not be mapped. |
RETURN_OUT_OF_RESOURCES | There are not enough resources available to complete the registration. |
Definition at line 181 of file DxeRuntimePciSegmentLib.c.
UINTN mDxeRuntimePciSegmentLibLastRuntimeRange = 0 |
The table index of the most recent virtual address lookup.
Definition at line 47 of file DxeRuntimePciSegmentLib.c.
UINTN mDxeRuntimePciSegmentLibNumberOfRuntimeRanges = 0 |
The number of PCI devices that have been registered for runtime access.
Definition at line 37 of file DxeRuntimePciSegmentLib.c.
PCI_SEGMENT_RUNTIME_REGISTRATION_TABLE* mDxeRuntimePciSegmentLibRegistrationTable = NULL |
The table of PCI devices that have been registered for runtime access.
Definition at line 42 of file DxeRuntimePciSegmentLib.c.
Set Virtual Address Map Event
Definition at line 32 of file DxeRuntimePciSegmentLib.c.