mirror of https://github.com/acidanthera/audk.git
Add runtime registration functions to the 4 PCI Library classes
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6703 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
ab95d5f223
commit
f926e538ce
|
@ -39,6 +39,30 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#define PCI_CF8_LIB_ADDRESS(Bus,Device,Function,Offset) \
|
#define PCI_CF8_LIB_ADDRESS(Bus,Device,Function,Offset) \
|
||||||
(((Offset) & 0xfff) | (((Function) & 0x07) << 12) | (((Device) & 0x1f) << 15) | (((Bus) & 0xff) << 20))
|
(((Offset) & 0xfff) | (((Function) & 0x07) << 12) | (((Device) & 0x1f) << 15) | (((Bus) & 0xff) << 20))
|
||||||
|
|
||||||
|
/**
|
||||||
|
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
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Reads an 8-bit PCI configuration register.
|
Reads an 8-bit PCI configuration register.
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,30 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#define PCI_EXPRESS_LIB_ADDRESS(Bus,Device,Function,Offset) \
|
#define PCI_EXPRESS_LIB_ADDRESS(Bus,Device,Function,Offset) \
|
||||||
(((Offset) & 0xfff) | (((Function) & 0x07) << 12) | (((Device) & 0x1f) << 15) | (((Bus) & 0xff) << 20))
|
(((Offset) & 0xfff) | (((Function) & 0x07) << 12) | (((Device) & 0x1f) << 15) | (((Bus) & 0xff) << 20))
|
||||||
|
|
||||||
|
/**
|
||||||
|
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
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Reads an 8-bit PCI configuration register.
|
Reads an 8-bit PCI configuration register.
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,30 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#define PCI_LIB_ADDRESS(Bus,Device,Function,Offset) \
|
#define PCI_LIB_ADDRESS(Bus,Device,Function,Offset) \
|
||||||
(((Offset) & 0xfff) | (((Function) & 0x07) << 12) | (((Device) & 0x1f) << 15) | (((Bus) & 0xff) << 20))
|
(((Offset) & 0xfff) | (((Function) & 0x07) << 12) | (((Device) & 0x1f) << 15) | (((Bus) & 0xff) << 20))
|
||||||
|
|
||||||
|
/**
|
||||||
|
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
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Reads an 8-bit PCI configuration register.
|
Reads an 8-bit PCI configuration register.
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,30 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
(LShiftU64((Segment) & 0xffff, 32)) \
|
(LShiftU64((Segment) & 0xffff, 32)) \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
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
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Reads an 8-bit PCI configuration register.
|
Reads an 8-bit PCI configuration register.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue