mirror of https://github.com/acidanthera/audk.git
Add runtime registration function to all PCI Libs
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6708 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
0a559bb9b2
commit
3e3ae63457
|
@ -60,6 +60,33 @@
|
|||
#define ASSERT_INVALID_PCI_ADDRESS(A,M) \
|
||||
ASSERT (((A) & (~0xffff0ff | (M))) == 0)
|
||||
|
||||
/**
|
||||
Register a PCI device so PCI configuration registers may be accessed after
|
||||
SetVirtualAddressMap().
|
||||
|
||||
If Address > 0x0FFFFFFF, then ASSERT().
|
||||
|
||||
@param Address Address that encodes the PCI Bus, Device, Function and
|
||||
Register.
|
||||
|
||||
@retval RETURN_SUCCESS The PCI device was registered for runtime access.
|
||||
@retval RETURN_UNSUPPORTED An attempt was made to call this function
|
||||
after ExitBootServices().
|
||||
@retval RETURN_UNSUPPORTED The resources required to access the PCI device
|
||||
at runtime could not be mapped.
|
||||
@retval RETURN_OUT_OF_RESOURCES There are not enough resources available to
|
||||
complete the registration.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
PciCf8RegisterForRuntimeAccess (
|
||||
IN UINTN Address
|
||||
)
|
||||
{
|
||||
return RETURN_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
Reads an 8-bit PCI configuration register.
|
||||
|
||||
|
|
|
@ -36,6 +36,32 @@
|
|||
#define ASSERT_INVALID_PCI_ADDRESS(A) \
|
||||
ASSERT (((A) & ~0xfffffff) == 0)
|
||||
|
||||
/**
|
||||
Register a PCI device so PCI configuration registers may be accessed after
|
||||
SetVirtualAddressMap().
|
||||
|
||||
If Address > 0x0FFFFFFF, then ASSERT().
|
||||
|
||||
@param Address Address that encodes the PCI Bus, Device, Function and
|
||||
Register.
|
||||
|
||||
@retval RETURN_SUCCESS The PCI device was registered for runtime access.
|
||||
@retval RETURN_UNSUPPORTED An attempt was made to call this function
|
||||
after ExitBootServices().
|
||||
@retval RETURN_UNSUPPORTED The resources required to access the PCI device
|
||||
at runtime could not be mapped.
|
||||
@retval RETURN_OUT_OF_RESOURCES There are not enough resources available to
|
||||
complete the registration.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
PciExpressRegisterForRuntimeAccess (
|
||||
IN UINTN Address
|
||||
)
|
||||
{
|
||||
return RETURN_UNSUPPORTED;
|
||||
}
|
||||
|
||||
/**
|
||||
Gets the base address of PCI Express.
|
||||
|
|
|
@ -19,6 +19,33 @@
|
|||
#include <Library/PciLib.h>
|
||||
#include <Library/PciCf8Lib.h>
|
||||
|
||||
/**
|
||||
Register a PCI device so PCI configuration registers may be accessed after
|
||||
SetVirtualAddressMap().
|
||||
|
||||
If Address > 0x0FFFFFFF, then ASSERT().
|
||||
|
||||
@param Address Address that encodes the PCI Bus, Device, Function and
|
||||
Register.
|
||||
|
||||
@retval RETURN_SUCCESS The PCI device was registered for runtime access.
|
||||
@retval RETURN_UNSUPPORTED An attempt was made to call this function
|
||||
after ExitBootServices().
|
||||
@retval RETURN_UNSUPPORTED The resources required to access the PCI device
|
||||
at runtime could not be mapped.
|
||||
@retval RETURN_OUT_OF_RESOURCES There are not enough resources available to
|
||||
complete the registration.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
PciRegisterForRuntimeAccess (
|
||||
IN UINTN Address
|
||||
)
|
||||
{
|
||||
return PciCf8RegisterForRuntimeAccess (Address);
|
||||
}
|
||||
|
||||
/**
|
||||
Reads an 8-bit PCI configuration register.
|
||||
|
||||
|
|
|
@ -19,6 +19,33 @@
|
|||
#include <Library/PciLib.h>
|
||||
#include <Library/PciExpressLib.h>
|
||||
|
||||
/**
|
||||
Register a PCI device so PCI configuration registers may be accessed after
|
||||
SetVirtualAddressMap().
|
||||
|
||||
If Address > 0x0FFFFFFF, then ASSERT().
|
||||
|
||||
@param Address Address that encodes the PCI Bus, Device, Function and
|
||||
Register.
|
||||
|
||||
@retval RETURN_SUCCESS The PCI device was registered for runtime access.
|
||||
@retval RETURN_UNSUPPORTED An attempt was made to call this function
|
||||
after ExitBootServices().
|
||||
@retval RETURN_UNSUPPORTED The resources required to access the PCI device
|
||||
at runtime could not be mapped.
|
||||
@retval RETURN_OUT_OF_RESOURCES There are not enough resources available to
|
||||
complete the registration.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
PciRegisterForRuntimeAccess (
|
||||
IN UINTN Address
|
||||
)
|
||||
{
|
||||
return PciExpressRegisterForRuntimeAccess (Address);
|
||||
}
|
||||
|
||||
/**
|
||||
Reads an 8-bit PCI configuration register.
|
||||
|
||||
|
|
|
@ -124,6 +124,33 @@ PeiPciLibPciCfg2WriteWorker (
|
|||
return Data;
|
||||
}
|
||||
|
||||
/**
|
||||
Register a PCI device so PCI configuration registers may be accessed after
|
||||
SetVirtualAddressMap().
|
||||
|
||||
If Address > 0x0FFFFFFF, then ASSERT().
|
||||
|
||||
@param Address Address that encodes the PCI Bus, Device, Function and
|
||||
Register.
|
||||
|
||||
@retval RETURN_SUCCESS The PCI device was registered for runtime access.
|
||||
@retval RETURN_UNSUPPORTED An attempt was made to call this function
|
||||
after ExitBootServices().
|
||||
@retval RETURN_UNSUPPORTED The resources required to access the PCI device
|
||||
at runtime could not be mapped.
|
||||
@retval RETURN_OUT_OF_RESOURCES There are not enough resources available to
|
||||
complete the registration.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
PciRegisterForRuntimeAccess (
|
||||
IN UINTN Address
|
||||
)
|
||||
{
|
||||
return RETURN_UNSUPPORTED;
|
||||
}
|
||||
|
||||
/**
|
||||
Reads an 8-bit PCI configuration register.
|
||||
|
||||
|
|
|
@ -159,6 +159,33 @@ PeiPciSegmentLibPciCfg2WriteWorker (
|
|||
return Data;
|
||||
}
|
||||
|
||||
/**
|
||||
Register a PCI device so PCI configuration registers may be accessed after
|
||||
SetVirtualAddressMap().
|
||||
|
||||
If Address > 0x0FFFFFFF, then ASSERT().
|
||||
|
||||
@param Address Address that encodes the PCI Bus, Device, Function and
|
||||
Register.
|
||||
|
||||
@retval RETURN_SUCCESS The PCI device was registered for runtime access.
|
||||
@retval RETURN_UNSUPPORTED An attempt was made to call this function
|
||||
after ExitBootServices().
|
||||
@retval RETURN_UNSUPPORTED The resources required to access the PCI device
|
||||
at runtime could not be mapped.
|
||||
@retval RETURN_OUT_OF_RESOURCES There are not enough resources available to
|
||||
complete the registration.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
PciSegmentRegisterForRuntimeAccess (
|
||||
IN UINTN Address
|
||||
)
|
||||
{
|
||||
return RETURN_UNSUPPORTED;
|
||||
}
|
||||
|
||||
/**
|
||||
Reads an 8-bit PCI configuration register.
|
||||
|
||||
|
|
|
@ -142,6 +142,33 @@ DxePciLibPciRootBridgeIoWriteWorker (
|
|||
return Data;
|
||||
}
|
||||
|
||||
/**
|
||||
Register a PCI device so PCI configuration registers may be accessed after
|
||||
SetVirtualAddressMap().
|
||||
|
||||
If Address > 0x0FFFFFFF, then ASSERT().
|
||||
|
||||
@param Address Address that encodes the PCI Bus, Device, Function and
|
||||
Register.
|
||||
|
||||
@retval RETURN_SUCCESS The PCI device was registered for runtime access.
|
||||
@retval RETURN_UNSUPPORTED An attempt was made to call this function
|
||||
after ExitBootServices().
|
||||
@retval RETURN_UNSUPPORTED The resources required to access the PCI device
|
||||
at runtime could not be mapped.
|
||||
@retval RETURN_OUT_OF_RESOURCES There are not enough resources available to
|
||||
complete the registration.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
PciRegisterForRuntimeAccess (
|
||||
IN UINTN Address
|
||||
)
|
||||
{
|
||||
return RETURN_UNSUPPORTED;
|
||||
}
|
||||
|
||||
/**
|
||||
Reads an 8-bit PCI configuration register.
|
||||
|
||||
|
|
|
@ -240,6 +240,33 @@ DxePciSegmentLibPciRootBridgeIoWriteWorker (
|
|||
return Data;
|
||||
}
|
||||
|
||||
/**
|
||||
Register a PCI device so PCI configuration registers may be accessed after
|
||||
SetVirtualAddressMap().
|
||||
|
||||
If Address > 0x0FFFFFFF, then ASSERT().
|
||||
|
||||
@param Address Address that encodes the PCI Bus, Device, Function and
|
||||
Register.
|
||||
|
||||
@retval RETURN_SUCCESS The PCI device was registered for runtime access.
|
||||
@retval RETURN_UNSUPPORTED An attempt was made to call this function
|
||||
after ExitBootServices().
|
||||
@retval RETURN_UNSUPPORTED The resources required to access the PCI device
|
||||
at runtime could not be mapped.
|
||||
@retval RETURN_OUT_OF_RESOURCES There are not enough resources available to
|
||||
complete the registration.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
PciSegmentRegisterForRuntimeAccess (
|
||||
IN UINTN Address
|
||||
)
|
||||
{
|
||||
return RETURN_UNSUPPORTED;
|
||||
}
|
||||
|
||||
/**
|
||||
Reads an 8-bit PCI configuration register.
|
||||
|
||||
|
|
Loading…
Reference in New Issue