summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-05-21 07:24:14 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-05-21 07:24:14 +0000
commit0004d1401e8341d0beeb8f7d3849f57c4482ecf6 (patch)
treebe693804ac6d7d91e521a25dec3dd6054dacb938 /EdkCompatibilityPkg
parent1e55f6a46baee8540ecef845593eb41201cb7c7a (diff)
downloadedk2-0004d1401e8341d0beeb8f7d3849f57c4482ecf6.zip
edk2-0004d1401e8341d0beeb8f7d3849f57c4482ecf6.tar.gz
edk2-0004d1401e8341d0beeb8f7d3849f57c4482ecf6.tar.bz2
Update the comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5261 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg')
-rw-r--r--EdkCompatibilityPkg/Compatibility/PciCfg2ToPciCfgThunk/PciCfg2ToPciCfgThunk.c66
-rw-r--r--EdkCompatibilityPkg/Compatibility/PciCfg2ToPciCfgThunk/PciCfg2ToPciCfgThunk.inf40
2 files changed, 86 insertions, 20 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/PciCfg2ToPciCfgThunk/PciCfg2ToPciCfgThunk.c b/EdkCompatibilityPkg/Compatibility/PciCfg2ToPciCfgThunk/PciCfg2ToPciCfgThunk.c
index 727cc68..bc36050 100644
--- a/EdkCompatibilityPkg/Compatibility/PciCfg2ToPciCfgThunk/PciCfg2ToPciCfgThunk.c
+++ b/EdkCompatibilityPkg/Compatibility/PciCfg2ToPciCfgThunk/PciCfg2ToPciCfgThunk.c
@@ -1,20 +1,54 @@
/** @file
-Module produces PciCfgPpi2 on top of PciCfgPpi. It also updates the
-PciCfg2Ppi pointer in the EFI_PEI_SERVICES upon a installation of
-EcpPeiPciCfgPpi. EcpPeiPciCfgPpi is installed in a framework module which
-produce PciCfgPpi originally. This framework module is updated based on the
-following rule:
-Search pattern:
- PeiServices->PciCfg = <*>;
-Replace pattern:
- {
- static EFI_PEI_PPI_DESCRIPTOR gEcpPeiPciCfgPpiList = {
- (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
- &gEcpPeiPciCfgPpiGuid,
- <*>
- };
- (**PeiServices).InstallPpi (PeiServices, gEcpPeiPciCfgPpiList);
- }
+ Module produces PciCfgPpi2 on top of PciCfgPpi. It also updates the
+ PciCfg2Ppi pointer in the EFI_PEI_SERVICES upon a installation of
+ EcpPeiPciCfgPpi.
+
+ EcpPeiPciCfgPpi is installed by a framework module which
+ produce PciCfgPpi originally. Such framework module is updated based on the
+ following rule to install EcpPeiPciCfgPpi instead of updating the PciCfg pointer
+ in the Framework PeiServicesTable:
+
+ Search pattern:
+ PeiServices->PciCfg = <*>;
+ Replace pattern:
+ {
+ static EFI_PEI_PPI_DESCRIPTOR gEcpPeiPciCfgPpiList = {
+ (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
+ &gEcpPeiPciCfgPpiGuid,
+ <*>
+ };
+ (**PeiServices).InstallPpi (PeiServices, gEcpPeiPciCfgPpiList);
+ }
+
+ In addition, the PeiServicesTable definition in PeiApi.h is updated to
+
+ struct _EFI_PEI_SERVICES {
+ EFI_TABLE_HEADER Hdr;
+ ...
+
+ //
+ // Pointer to PPI interface
+ //
+ if (PI_SPECIFICATION_VERSION < 0x00010000)
+
+ PEI_CPU_IO_PPI *CpuIo;
+ ECP_PEI_PCI_CFG_PPI *PciCfg; //Changed.
+ else
+ ...
+ endif
+
+ };
+
+ This change enable the detection of code segment which invokes PeiServices->PciCfg->Modify.
+ Such code causes a build break as ECP_PEI_PCI_CFG_PPI does not has "Modify" field.
+ This should be updated to a call to PeiLibPciCfgModify as shown below:
+
+ Search pattern:
+ *->Modify(<*>);
+ Replace pattern:
+ PeiLibPciCfgModify(<*>);
+
+
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
diff --git a/EdkCompatibilityPkg/Compatibility/PciCfg2ToPciCfgThunk/PciCfg2ToPciCfgThunk.inf b/EdkCompatibilityPkg/Compatibility/PciCfg2ToPciCfgThunk/PciCfg2ToPciCfgThunk.inf
index 2a0e77a..f6b7a91 100644
--- a/EdkCompatibilityPkg/Compatibility/PciCfg2ToPciCfgThunk/PciCfg2ToPciCfgThunk.inf
+++ b/EdkCompatibilityPkg/Compatibility/PciCfg2ToPciCfgThunk/PciCfg2ToPciCfgThunk.inf
@@ -1,9 +1,13 @@
#/** @file
# Module produces PciCfgPpi2 on top of PciCfgPpi. It also updates the
# PciCfg2Ppi pointer in the EFI_PEI_SERVICES upon a installation of
-# EcpPeiPciCfgPpi. EcpPeiPciCfgPpi is installed in a framework module which
-# produce PciCfgPpi originally. This framework module is updated based on the
-# following rule:
+# EcpPeiPciCfgPpi.
+#
+# EcpPeiPciCfgPpi is installed by a framework module which
+# produce PciCfgPpi originally. Such framework module is updated based on the
+# following rule to install EcpPeiPciCfgPpi instead of updating the PciCfg pointer
+# in the Framework PeiServicesTable:
+#
# Search pattern:
# PeiServices->PciCfg = <*>;
# Replace pattern:
@@ -15,7 +19,35 @@
# };
# (**PeiServices).InstallPpi (PeiServices, gEcpPeiPciCfgPpiList);
# }
-
+#
+# In addition, the PeiServicesTable definition in PeiApi.h is updated to
+#
+# struct _EFI_PEI_SERVICES {
+# EFI_TABLE_HEADER Hdr;
+# ...
+#
+# //
+# // Pointer to PPI interface
+# //
+# #if (PI_SPECIFICATION_VERSION < 0x00010000)
+#
+# PEI_CPU_IO_PPI *CpuIo;
+# ECP_PEI_PCI_CFG_PPI *PciCfg; //Changed.
+# #else
+# ...
+# #endif
+#
+# };
+#
+# This change enable the detection of code segment which invokes PeiServices->PciCfg->Modify.
+# Such code causes a build break as ECP_PEI_PCI_CFG_PPI does not has "Modify" field.
+# This should be updated to a call to PeiLibPciCfgModify as shown below:
+#
+# Search pattern:
+# *->Modify(<*>);
+# Replace pattern:
+# PeiLibPciCfgModify(<*>);
+#
# 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.