diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-11-17 02:12:36 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-11-17 02:12:36 +0000 |
commit | 64cd21af352db61f18806f3fd4f58e8c0bd4de9c (patch) | |
tree | 4b67c324507a0ccdcc88c881992e07e7c7ee1adc | |
parent | f3b33289f064619ffd64fcdf124bf68d7403abc6 (diff) | |
download | edk2-platforms-64cd21af352db61f18806f3fd4f58e8c0bd4de9c.tar.xz |
Update ASL build rule, Add PeiLibPciCfgModify into EDKII GlueLib PeiServiceLib to support the modules that uses EDKII Glue Lib
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6551 6f19259b-4bc3-4df7-8a09-765794883524
6 files changed, 136 insertions, 3 deletions
diff --git a/BaseTools/Bin/Win32/Trim.exe b/BaseTools/Bin/Win32/Trim.exe Binary files differindex 1494ad19d4..46de2a1c0b 100755 --- a/BaseTools/Bin/Win32/Trim.exe +++ b/BaseTools/Bin/Win32/Trim.exe diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template index d345f2e0c3..c54c55cafc 100644 --- a/BaseTools/Conf/build_rule.template +++ b/BaseTools/Conf/build_rule.template @@ -251,8 +251,9 @@ $(MAKE_FILE)
<Command.MSFT, Command.INTEL>
- "$(ASLPP)" $(ASLPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
- "$(ASL)" -p ${dst} $(ASL_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
+ Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i ${src}
+ "$(ASLPP)" $(ASLPP_FLAGS) $(INC) /I${s_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
+ "$(ASL)" -p ${dst} $(ASL_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
[C-Code-File.AcpiTable]
<InputFile>
diff --git a/EdkCompatibilityPkg/Compatibility/PciCfg2ToPciCfgThunk/PciCfg2ToPciCfgThunk.inf b/EdkCompatibilityPkg/Compatibility/PciCfg2ToPciCfgThunk/PciCfg2ToPciCfgThunk.inf index f6b7a91402..ea1b5c89dc 100644 --- a/EdkCompatibilityPkg/Compatibility/PciCfg2ToPciCfgThunk/PciCfg2ToPciCfgThunk.inf +++ b/EdkCompatibilityPkg/Compatibility/PciCfg2ToPciCfgThunk/PciCfg2ToPciCfgThunk.inf @@ -17,7 +17,7 @@ # &gEcpPeiPciCfgPpiGuid,
# <*>
# };
-# (**PeiServices).InstallPpi (PeiServices, gEcpPeiPciCfgPpiList);
+# (**PeiServices).InstallPpi (PeiServices, &gEcpPeiPciCfgPpiList);
# }
#
# In addition, the PeiServicesTable definition in PeiApi.h is updated to
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Library/EdkIIGluePeiServicesLib.h b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Library/EdkIIGluePeiServicesLib.h index f9a9dd7c01..912c36bfeb 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Library/EdkIIGluePeiServicesLib.h +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Library/EdkIIGluePeiServicesLib.h @@ -307,5 +307,59 @@ PeiServicesResetSystem ( VOID
);
+/**
+ 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,
+ PciCfg,
+ Width,
+ Address,
+ SetBits,
+ ClearBits
+ );
+
+ @param PeiServices An indirect pointer to the PEI Services Table
+ published by the PEI Foundation.
+ @param PciCfg A pointer to the this pointer of EFI_PEI_PCI_CFG_PPI.
+ This parameter is unused as a place holder to make
+ the parameter list identical to PEI_PCI_CFG_PPI_RW.
+ @param Width The width of the access. Enumerated in bytes. Type
+ EFI_PEI_PCI_CFG_PPI_WIDTH is defined in Read().
+ @param Address The physical address of the access.
+ @param SetBits Points to value to bitwise-OR with the read configuration value.
+ The size of the value is determined by Width.
+ @param ClearBits Points to the value to negate and bitwise-AND with the read configuration value.
+ The size of the value is determined by Width.
+
+ @retval EFI_SUCCESS The function completed successfully.
+ @retval EFI_DEVICE_ERROR There was a problem with the transaction.
+**/
+EFI_STATUS
+EFIAPI
+PeiLibPciCfgModify (
+ IN EFI_PEI_SERVICES **PeiServices,
+ IN PEI_PCI_CFG_PPI *PciCfg,
+ IN PEI_PCI_CFG_PPI_WIDTH Width,
+ IN UINT64 Address,
+ IN UINTN SetBits,
+ IN UINTN ClearBits
+ )
+;
#endif
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesLib/PeiServicesLib.c b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesLib/PeiServicesLib.c index 60143519f8..9efb8c2b15 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesLib/PeiServicesLib.c +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesLib/PeiServicesLib.c @@ -391,3 +391,80 @@ PeiServicesResetSystem ( PeiServices = GetPeiServicesTablePointer ();
return (*PeiServices)->PeiResetSystem (PeiServices);
}
+/**
+ 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,
+ PciCfg,
+ Width,
+ Address,
+ SetBits,
+ ClearBits
+ );
+
+ @param PeiServices An indirect pointer to the PEI Services Table
+ published by the PEI Foundation.
+ @param PciCfg A pointer to the this pointer of EFI_PEI_PCI_CFG_PPI.
+ This parameter is unused as a place holder to make
+ the parameter list identical to PEI_PCI_CFG_PPI_RW.
+ @param Width The width of the access. Enumerated in bytes. Type
+ EFI_PEI_PCI_CFG_PPI_WIDTH is defined in Read().
+ @param Address The physical address of the access.
+ @param SetBits Points to value to bitwise-OR with the read configuration value.
+ The size of the value is determined by Width.
+ @param ClearBits Points to the value to negate and bitwise-AND with the read configuration value.
+ The size of the value is determined by Width.
+
+ @retval EFI_SUCCESS The function completed successfully.
+ @retval EFI_DEVICE_ERROR There was a problem with the transaction.
+**/
+EFI_STATUS
+EFIAPI
+PeiLibPciCfgModify (
+ IN EFI_PEI_SERVICES **PeiServices,
+ IN PEI_PCI_CFG_PPI *PciCfg,
+ IN PEI_PCI_CFG_PPI_WIDTH Width,
+ IN UINT64 Address,
+ IN UINTN SetBits,
+ IN UINTN ClearBits
+ )
+{
+ EFI_STATUS Status;
+ EFI_PEI_PCI_CFG2_PPI *PciCfg2;
+
+ Status = (*PeiServices)->LocatePpi (
+ PeiServices,
+ &gPeiPciCfg2PpiGuid,
+ 0,
+ NULL,
+ (VOID **) &PciCfg2
+ );
+ ASSERT_EFI_ERROR (Status);
+
+ Status = PciCfg2->Modify (
+ (CONST EFI_PEI_SERVICES **) PeiServices,
+ PciCfg2,
+ (EFI_PEI_PCI_CFG_PPI_WIDTH) Width,
+ Address,
+ &SetBits,
+ &ClearBits
+ );
+
+ return Status;
+}
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesLib/PeiServicesLib.inf b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesLib/PeiServicesLib.inf index 1b604d1f74..3c9e469066 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesLib/PeiServicesLib.inf +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiServicesLib/PeiServicesLib.inf @@ -57,6 +57,7 @@ COMPONENT_TYPE = LIBRARY # used to replace EdkIIGluePeiServicesTablePointerLibMm7 or
# EdkIIGluePeiServicesTablePointerLibKr1
#
+ EdkFrameworkPpiLib
[libraries.ia32]
EdkIIGluePeiServicesTablePointerLibMm7
|