X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EdkCompatibilityPkg%2FFoundation%2FLibrary%2FPei%2FInclude%2FPeiLib.h;h=8fd3f932474a829d4b24260d4036c0ed85d75660;hp=f2cfdb865c54cb2880e85129ce4e426602e11d22;hb=3e99020dbf0a159e34b84e7ae9125f2e368d5390;hpb=3eb9473ea9a949badfe06ae61d2d3fcfa53651c7 diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/Include/PeiLib.h b/EdkCompatibilityPkg/Foundation/Library/Pei/Include/PeiLib.h index f2cfdb865c..8fd3f93247 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Pei/Include/PeiLib.h +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/Include/PeiLib.h @@ -1,7 +1,7 @@ /*++ -Copyright (c) 2004 - 2007, Intel Corporation -All rights reserved. This program and the accompanying materials +Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -24,12 +24,67 @@ Abstract: #include "Tiano.h" #include "Pei.h" -#include "peiHobLib.h" +#include "PeiHobLib.h" +#include "PeiPerf.h" #include EFI_PROTOCOL_DEFINITION (Decompress) #include EFI_PROTOCOL_DEFINITION (TianoDecompress) #include EFI_GUID_DEFINITION (PeiPeCoffLoader) #include EFI_PPI_DEFINITION (FindFv) +#if defined(__GNUC__) && defined(ECP_CPU_IPF) + +VOID +EFIAPI +EcpEfiBreakPoint ( + VOID + ) +/*++ + +Routine Description: + + Generates a breakpoint on the CPU. + + Generates a breakpoint on the CPU. The breakpoint must be implemented such + that code can resume normal execution after the breakpoint. + +Arguments: + + VOID + +Returns: + + VOID + +--*/ +; + +VOID +EFIAPI +EcpMemoryFence ( + VOID + ) +/*++ + +Routine Description: + + Used to serialize load and store operations. + + All loads and stores that proceed calls to this function are guaranteed to be + globally visible when this function returns. + +Arguments: + + VOID + +Returns: + + VOID + +--*/ +; + +#endif + #if (PI_SPECIFICATION_VERSION >= 0x00010000) @@ -140,8 +195,8 @@ EFI_STATUS EFIAPI PeiLibFfsFindNextFile ( IN EFI_FV_FILETYPE SearchType, - IN EFI_PEI_FV_HANDLE FwVolHeader, - IN OUT EFI_PEI_FILE_HANDLE *FileHeader + IN EFI_PEI_FV_HANDLE FvHandle, + IN OUT EFI_PEI_FILE_HANDLE *FileHandle ) /*++ @@ -152,7 +207,7 @@ Routine Description: Arguments: SearchType - Filter to find only file of this type. - FwVolHeader - Pointer to the current FV to search. + FvHandle - Pointer to the current FV to search. FileHandle - Pointer to the file matching SearchType in FwVolHeader. - NULL if file not found @@ -216,7 +271,7 @@ Returns: EFI_STATUS EFIAPI PeiLibFfsGetVolumeInfo ( - IN EFI_PEI_FV_HANDLE *VolumeHandle, + IN EFI_PEI_FV_HANDLE VolumeHandle, OUT EFI_FV_INFO *VolumeInfo ) /*++ @@ -709,37 +764,6 @@ Returns: --*/ ; -VOID -PeiPerfMeasure ( - EFI_PEI_SERVICES **PeiServices, - IN UINT16 *Token, - IN EFI_FFS_FILE_HEADER *FileHeader, - IN BOOLEAN EntryExit, - IN UINT64 Value - ) -/*++ - -Routine Description: - - Log a timestamp count. - -Arguments: - - PeiServices - Pointer to the PEI Core Services table - - Token - Pointer to Token Name - - FileHeader - Pointer to the file header - - EntryExit - Indicates start or stop measurement - - Value - The start time or the stop time - -Returns: - ---*/ -; - EFI_STATUS GetTimerValue ( OUT UINT64 *TimerValue @@ -761,14 +785,6 @@ Returns: --*/ ; -#ifdef EFI_PEI_PERFORMANCE -#define PEI_PERF_START(Ps, Token, FileHeader, Value) PeiPerfMeasure (Ps, Token, FileHeader, FALSE, Value) -#define PEI_PERF_END(Ps, Token, FileHeader, Value) PeiPerfMeasure (Ps, Token, FileHeader, TRUE, Value) -#else -#define PEI_PERF_START(Ps, Token, FileHeader, Value) -#define PEI_PERF_END(Ps, Token, FileHeader, Value) -#endif - #ifdef EFI_NT_EMULATOR EFI_STATUS PeCoffLoaderWinNtLoadAsDll ( @@ -1306,6 +1322,7 @@ Returns: ; EFI_STATUS +EFIAPI FindFv ( IN EFI_FIND_FV_PPI *This, IN EFI_PEI_SERVICES **PeiServices, @@ -1338,4 +1355,79 @@ Returns: --*/ ; + + +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 + ) +/*++ + +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, + PciCfg, + Width, + Address, + SetBits, + ClearBits + ); + + The + +Arguments: + + PeiServices An indirect pointer to the PEI Services Table + published by the PEI Foundation. + 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. + 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