X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FCore%2FPei%2FPeiMain.h;h=e2f8cd9c775841213b6ec98ed8beb0da802ae2ba;hp=a1cdbc15d98a72072ce48bc245f4163d274a5c16;hb=d1102dba7210b95e41d06c2338a22ba6af248645;hpb=ca79bab7af4770c5eb578f6d495af01705aedb79 diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMain.h index a1cdbc15d9..e2f8cd9c77 100644 --- a/MdeModulePkg/Core/Pei/PeiMain.h +++ b/MdeModulePkg/Core/Pei/PeiMain.h @@ -1,7 +1,7 @@ /** @file Definition of Pei Core Structures and Services - -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, 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 @@ -88,7 +88,7 @@ typedef struct { INTN LastDispatchedInstall; /// /// index of last dispatched notify in Notify link list. - /// + /// INTN LastDispatchedNotify; /// /// Ppi database has the PcdPeiCoreMaxPpiSupported number of entries. @@ -157,7 +157,7 @@ typedef struct _PEI_CORE_INSTANCE PEI_CORE_INSTANCE; /** Function Pointer type for PeiCore function. - @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size + @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size and location of temporary RAM, the stack location and the BFV location. @param PpiList Points to a list of one or more PPI descriptors to be installed initially by the PEI core. An empty PPI list consists of a single descriptor with the end-tag @@ -183,18 +183,18 @@ EFI_STATUS /// struct _PEI_CORE_INSTANCE { UINTN Signature; - + /// /// Point to ServiceTableShadow /// EFI_PEI_SERVICES *Ps; PEI_PPI_DATABASE PpiData; - + /// /// The count of FVs which contains FFS and could be dispatched by PeiCore. /// UINTN FvCount; - + /// /// Pointer to the buffer with the PcdPeiCoreMaxFvSupported number of entries. /// Each entry is for one FV which contains FFS and could be dispatched by PeiCore. @@ -207,7 +207,7 @@ struct _PEI_CORE_INSTANCE { /// PEI_CORE_UNKNOW_FORMAT_FV_INFO *UnknownFvInfo; UINTN UnknownFvInfoCount; - + /// /// Pointer to the buffer with the PcdPeiCoreMaxPeimPerFv number of entries. /// @@ -240,15 +240,15 @@ struct _PEI_CORE_INSTANCE { PEICORE_FUNCTION_POINTER ShadowedPeiCore; CACHE_SECTION_DATA CacheSection; // - // For Loading modules at fixed address feature to cache the top address below which the - // Runtime code, boot time code and PEI memory will be placed. Please note that the offset between this field - // and Ps should not be changed since maybe user could get this top address by using the offet to Ps. + // For Loading modules at fixed address feature to cache the top address below which the + // Runtime code, boot time code and PEI memory will be placed. Please note that the offset between this field + // and Ps should not be changed since maybe user could get this top address by using the offet to Ps. // EFI_PHYSICAL_ADDRESS LoadModuleAtFixAddressTopAddress; // // The field is define for Loading modules at fixed address feature to tracker the PEI code // memory range usage. It is a bit mapped array in which every bit indicates the correspoding memory page - // available or not. + // available or not. // UINT64 *PeiCodeMemoryRangeUsageBitMap; // @@ -307,7 +307,7 @@ typedef struct { with the old core data. - @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size + @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size and location of temporary RAM, the stack location and the BFV location. @param PpiList Points to a list of one or more PPI descriptors to be installed initially by the PEI core. An empty PPI list consists of a single descriptor with the end-tag @@ -415,7 +415,7 @@ DepexSatisfied ( Initialize PPI services. @param PrivateData Pointer to the PEI Core data. - @param OldCoreData Pointer to old PEI Core data. + @param OldCoreData Pointer to old PEI Core data. NULL if being run in non-permament memory mode. **/ @@ -429,7 +429,7 @@ InitializePpiServices ( Migrate the Hob list from the temporary memory to PEI installed memory. - @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size + @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size and location of temporary RAM, the stack location and the BFV location. @param PrivateData Pointer to PeiCore's private data structure. @@ -847,7 +847,7 @@ PeiFfsFindNextVolume ( Initialize the memory services. @param PrivateData PeiCore's private data structure - @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size + @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size and location of temporary RAM, the stack location and the BFV location. @param OldCoreData Pointer to the PEI Core data. NULL if being run in non-permament memory mode. @@ -1158,7 +1158,7 @@ PeiFfsGetFileInfo ( **/ EFI_STATUS -EFIAPI +EFIAPI PeiFfsGetFileInfo2 ( IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO2 *FileInfo @@ -1269,7 +1269,7 @@ SecurityPpiNotifyCallback ( @retval EFI_OUT_OF_RESOURCES Can not allocate page when aligning FV image @retval EFI_SECURITY_VIOLATION Image is illegal @retval Others Can not find EFI_SECTION_FIRMWARE_VOLUME_IMAGE section - + **/ EFI_STATUS ProcessFvFile ( @@ -1277,15 +1277,15 @@ ProcessFvFile ( IN PEI_CORE_FV_HANDLE *ParentFvCoreHandle, IN EFI_PEI_FILE_HANDLE ParentFvFileHandle ); - + /** Get instance of PEI_CORE_FV_HANDLE for next volume according to given index. - + This routine also will install FvInfo ppi for FV hob in PI ways. - + @param Private Pointer of PEI_CORE_INSTANCE @param Instance The index of FV want to be searched. - + @return Instance of PEI_CORE_FV_HANDLE. **/ PEI_CORE_FV_HANDLE * @@ -1293,19 +1293,19 @@ FindNextCoreFvHandle ( IN PEI_CORE_INSTANCE *Private, IN UINTN Instance ); - + // // Default EFI_PEI_CPU_IO_PPI support for EFI_PEI_SERVICES table when PeiCore initialization. -// +// /** Memory-based read services. - - This function is to perform the Memory Access Read service based on installed - instance of the EFI_PEI_CPU_IO_PPI. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + + This function is to perform the Memory Access Read service based on installed + instance of the EFI_PEI_CPU_IO_PPI. + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @@ -1315,7 +1315,7 @@ FindNextCoreFvHandle ( @param Buffer A pointer to the buffer of data. @retval EFI_SUCCESS The function completed successfully. - @retval EFI_NOT_YET_AVAILABLE The service has not been installed. + @retval EFI_NOT_YET_AVAILABLE The service has not been installed. **/ EFI_STATUS EFIAPI @@ -1327,15 +1327,15 @@ PeiDefaultMemRead ( IN UINTN Count, IN OUT VOID *Buffer ); - + /** Memory-based write services. - - This function is to perform the Memory Access Write service based on installed - instance of the EFI_PEI_CPU_IO_PPI. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + + This function is to perform the Memory Access Write service based on installed + instance of the EFI_PEI_CPU_IO_PPI. + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @@ -1345,7 +1345,7 @@ PeiDefaultMemRead ( @param Buffer A pointer to the buffer of data. @retval EFI_SUCCESS The function completed successfully. - @retval EFI_NOT_YET_AVAILABLE The service has not been installed. + @retval EFI_NOT_YET_AVAILABLE The service has not been installed. **/ EFI_STATUS EFIAPI @@ -1357,14 +1357,14 @@ PeiDefaultMemWrite ( IN UINTN Count, IN OUT VOID *Buffer ); - + /** IO-based read services. - + This function is to perform the IO-base read service for the EFI_PEI_CPU_IO_PPI. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @@ -1386,14 +1386,14 @@ PeiDefaultIoRead ( IN UINTN Count, IN OUT VOID *Buffer ); - + /** IO-based write services. - + This function is to perform the IO-base write service for the EFI_PEI_CPU_IO_PPI. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @@ -1415,13 +1415,13 @@ PeiDefaultIoWrite ( IN UINTN Count, IN OUT VOID *Buffer ); - + /** 8-bit I/O read operations. - - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -1435,13 +1435,13 @@ PeiDefaultIoRead8 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** Reads an 16-bit I/O port. - - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -1455,13 +1455,13 @@ PeiDefaultIoRead16 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** Reads an 32-bit I/O port. - - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -1475,13 +1475,13 @@ PeiDefaultIoRead32 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** Reads an 64-bit I/O port. - - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -1495,7 +1495,7 @@ PeiDefaultIoRead64 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** 8-bit I/O write operations. @@ -1512,7 +1512,7 @@ PeiDefaultIoWrite8 ( IN UINT64 Address, IN UINT8 Data ); - + /** 16-bit I/O write operations. @@ -1529,7 +1529,7 @@ PeiDefaultIoWrite16 ( IN UINT64 Address, IN UINT16 Data ); - + /** 32-bit I/O write operations. @@ -1546,7 +1546,7 @@ PeiDefaultIoWrite32 ( IN UINT64 Address, IN UINT32 Data ); - + /** 64-bit I/O write operations. @@ -1563,13 +1563,13 @@ PeiDefaultIoWrite64 ( IN UINT64 Address, IN UINT64 Data ); - + /** 8-bit memory read operations. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -1584,13 +1584,13 @@ PeiDefaultMemRead8 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** 16-bit memory read operations. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -1605,13 +1605,13 @@ PeiDefaultMemRead16 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** 32-bit memory read operations. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -1626,13 +1626,13 @@ PeiDefaultMemRead32 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** 64-bit memory read operations. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -1647,7 +1647,7 @@ PeiDefaultMemRead64 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** 8-bit memory write operations. @@ -1665,7 +1665,7 @@ PeiDefaultMemWrite8 ( IN UINT64 Address, IN UINT8 Data ); - + /** 16-bit memory write operations. @@ -1701,7 +1701,7 @@ PeiDefaultMemWrite32 ( IN UINT64 Address, IN UINT32 Data ); - + /** 64-bit memory write operations. @@ -1719,19 +1719,19 @@ PeiDefaultMemWrite64 ( IN UINT64 Address, IN UINT64 Data ); - -extern EFI_PEI_CPU_IO_PPI gPeiDefaultCpuIoPpi; + +extern EFI_PEI_CPU_IO_PPI gPeiDefaultCpuIoPpi; // // Default EFI_PEI_PCI_CFG2_PPI support for EFI_PEI_SERVICES table when PeiCore initialization. -// +// /** Reads from a given location in the PCI configuration space. - If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Width The width of the access. Enumerated in bytes. @@ -1743,7 +1743,7 @@ extern EFI_PEI_CPU_IO_PPI gPeiDefaultCpuIoPpi; @retval EFI_SUCCESS The function completed successfully. @retval EFI_INVALID_PARAMETER The invalid access width. @retval EFI_NOT_YET_AVAILABLE If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM. - + **/ EFI_STATUS EFIAPI @@ -1754,13 +1754,13 @@ PeiDefaultPciCfg2Read ( IN UINT64 Address, IN OUT VOID *Buffer ); - + /** Write to a given location in the PCI configuration space. - If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Width The width of the access. Enumerated in bytes. @@ -1782,7 +1782,7 @@ PeiDefaultPciCfg2Write ( IN UINT64 Address, IN OUT VOID *Buffer ); - + /** This function performs a read-modify-write operation on the contents from a given location in the PCI configuration space. @@ -1811,21 +1811,21 @@ PeiDefaultPciCfg2Modify ( IN UINT64 Address, IN VOID *SetBits, IN VOID *ClearBits - ); - + ); + extern EFI_PEI_PCI_CFG2_PPI gPeiDefaultPciCfg2Ppi; /** After PeiCore image is shadowed into permanent memory, all build-in FvPpi should - be re-installed with the instance in permanent memory and all cached FvPpi pointers in + be re-installed with the instance in permanent memory and all cached FvPpi pointers in PrivateData->Fv[] array should be fixed up to be pointed to the one in permanent memory. - + @param PrivateData Pointer to PEI_CORE_INSTANCE. -**/ +**/ VOID PeiReinitializeFv ( IN PEI_CORE_INSTANCE *PrivateData ); - + #endif