summaryrefslogtreecommitdiffstats
path: root/EdkCompatibilityPkg/Foundation/Library/Pei/Include
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-05-21 07:21:30 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-05-21 07:21:30 +0000
commit1e55f6a46baee8540ecef845593eb41201cb7c7a (patch)
tree6e55038cbe76aa1ebc3ae58f341d0896939966c1 /EdkCompatibilityPkg/Foundation/Library/Pei/Include
parentbf6d2af43438d1470d87a3c38e3e5816f80a80f1 (diff)
downloadedk2-1e55f6a46baee8540ecef845593eb41201cb7c7a.tar.gz
edk2-1e55f6a46baee8540ecef845593eb41201cb7c7a.tar.bz2
edk2-1e55f6a46baee8540ecef845593eb41201cb7c7a.zip
1) Change Framework version of PeiServiceTable's PciCfg from PEI_PCI_CFG_PPI to ECP_PEI_PCI_CFG_PPI. This help to detect if user is calling PeiServiceTable->PciCfg->Modify in a PI platform. Modify between Framework spec and PI spec is not compatible.
2) Add ECP_PEI_PCI_CFG_PPI to EdkFrameworkPpiLib 3) Add PeiLibPciCfgModify which call PciCfg2. This function will used by modified Framework Module which will be working with a PI platform. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5260 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Library/Pei/Include')
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Pei/Include/PeiLib.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/Include/PeiLib.h b/EdkCompatibilityPkg/Foundation/Library/Pei/Include/PeiLib.h
index bbd3713b90..e3afb4341f 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Pei/Include/PeiLib.h
+++ b/EdkCompatibilityPkg/Foundation/Library/Pei/Include/PeiLib.h
@@ -1301,4 +1301,75 @@ Returns:
--*/
;
+
+
+EFI_STATUS
+EFIAPI
+PeiLibPciCfgModify (
+ IN EFI_PEI_SERVICES **PeiServices,
+ IN PEI_PCI_CFG_PPI_WIDTH Width,
+ IN UINT64 Address,
+ IN UINTN SetBits,
+ IN UINTN ClearBits
+ )
+/*++
+
+Routine Description:
+
+ PCI read-modify-write operations.
+
+ PIWG's PI specification replaces Inte's EFI Specification 1.10.
+ EFI_PEI_PCI_CFG_PPI defined in Inte's EFI Specification 1.10 is replaced by
+ EFI_PEI_PCI_CFG2_PPI in PI 1.0. "Modify" function in these two PPI are not
+ compatibile with each other.
+
+
+ For Framework code that make the following call:
+
+ PciCfg->Modify (
+ PeiServices,
+ PciCfg,
+ Width,
+ Address,
+ SetBits,
+ ClearBits
+ );
+ it will be updated to the following code which call this library API:
+ PeiLibPciCfgModify (
+ PeiServices,
+ Width,
+ Address,
+ SetBits,
+ ClearBits
+ );
+
+ The
+
+Arguments:
+
+ PeiServices An indirect pointer to the PEI Services Table
+ published by the PEI Foundation.
+
+ Width The width of the access. Enumerated in bytes. Type
+ EFI_PEI_PCI_CFG_PPI_WIDTH is defined in Read().
+
+ Address The physical address of the access.
+
+ SetBits Points to value to bitwise-OR with the read configuration value.
+
+ The size of the value is determined by Width.
+
+ ClearBits Points to the value to negate and bitwise-AND with the read configuration value.
+ The size of the value is determined by Width.
+
+
+Returns:
+
+ EFI_SUCCESS The function completed successfully.
+
+ EFI_DEVICE_ERROR There was a problem with the transaction.
+
+--*/
+;
+
#endif