X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FCore%2FPei%2FPeiMain.h;h=322e7cd84524b9c6029cfc531ac5de8504e6e160;hb=d0def00d33fa5d4a70c427dfc9a36d826b42967d;hp=277f54a0c6ada0d37ec4e01ee6e807aff6d89e37;hpb=483e2cddfa6b0740ae9d37a808c4451d64c3de2e;p=mirror_edk2.git diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMain.h index 277f54a0c6..322e7cd845 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 @@ -66,37 +66,60 @@ typedef union { } PEI_PPI_LIST_POINTERS; /// -/// PPI database structure which contains two link: PpiList and NotifyList. PpiList -/// is in head of PpiListPtrs array and notify is in end of PpiListPtrs. +/// Number of PEI_PPI_LIST_POINTERS to grow by each time we run out of room /// +#define PPI_GROWTH_STEP 64 +#define CALLBACK_NOTIFY_GROWTH_STEP 32 +#define DISPATCH_NOTIFY_GROWTH_STEP 8 + typedef struct { + UINTN CurrentCount; + UINTN MaxCount; + UINTN LastDispatchedCount; /// - /// index of end of PpiList link list. + /// MaxCount number of entries. /// - INTN PpiListEnd; + PEI_PPI_LIST_POINTERS *PpiPtrs; +} PEI_PPI_LIST; + +typedef struct { + UINTN CurrentCount; + UINTN MaxCount; /// - /// index of end of notify link list. + /// MaxCount number of entries. /// - INTN NotifyListEnd; + PEI_PPI_LIST_POINTERS *NotifyPtrs; +} PEI_CALLBACK_NOTIFY_LIST; + +typedef struct { + UINTN CurrentCount; + UINTN MaxCount; + UINTN LastDispatchedCount; /// - /// index of the dispatched notify list. + /// MaxCount number of entries. /// - INTN DispatchListEnd; + PEI_PPI_LIST_POINTERS *NotifyPtrs; +} PEI_DISPATCH_NOTIFY_LIST; + +/// +/// PPI database structure which contains three links: +/// PpiList, CallbackNotifyList and DispatchNotifyList. +/// +typedef struct { /// - /// index of last installed Ppi description in PpiList link list. + /// PPI List. /// - INTN LastDispatchedInstall; + PEI_PPI_LIST PpiList; /// - /// index of last dispatched notify in Notify link list. - /// - INTN LastDispatchedNotify; + /// Notify List at dispatch level. /// - /// Ppi database has the PcdPeiCoreMaxPpiSupported number of entries. + PEI_CALLBACK_NOTIFY_LIST CallbackNotifyList; /// - PEI_PPI_LIST_POINTERS *PpiListPtrs; + /// Notify List at callback level. + /// + PEI_DISPATCH_NOTIFY_LIST DispatchNotifyList; } PEI_PPI_DATABASE; - // // PEI_CORE_FV_HANDE.PeimState // Do not change these values as there is code doing math to change states. @@ -104,19 +127,25 @@ typedef struct { // #define PEIM_STATE_NOT_DISPATCHED 0x00 #define PEIM_STATE_DISPATCHED 0x01 -#define PEIM_STATE_REGISITER_FOR_SHADOW 0x02 +#define PEIM_STATE_REGISTER_FOR_SHADOW 0x02 #define PEIM_STATE_DONE 0x03 +// +// Number of FV instances to grow by each time we run out of room +// +#define FV_GROWTH_STEP 8 + typedef struct { EFI_FIRMWARE_VOLUME_HEADER *FvHeader; EFI_PEI_FIRMWARE_VOLUME_PPI *FvPpi; EFI_PEI_FV_HANDLE FvHandle; + UINTN PeimCount; // - // Ponter to the buffer with the PcdPeiCoreMaxPeimPerFv number of Entries. + // Ponter to the buffer with the PeimCount number of Entries. // UINT8 *PeimState; // - // Ponter to the buffer with the PcdPeiCoreMaxPeimPerFv number of Entries. + // Ponter to the buffer with the PeimCount number of Entries. // EFI_PEI_FILE_HANDLE *FvFileHandles; BOOLEAN ScanFv; @@ -157,7 +186,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 @@ -176,6 +205,11 @@ EFI_STATUS IN PEI_CORE_INSTANCE *OldCoreData ); +// +// Number of files to grow by each time we run out of room +// +#define TEMP_FILE_GROWTH_STEP 32 + #define PEI_CORE_HANDLE_SIGNATURE SIGNATURE_32('P','e','i','C') /// @@ -183,33 +217,39 @@ 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; - + + /// + /// The max count of FVs which contains FFS and could be dispatched by PeiCore. /// - /// Pointer to the buffer with the PcdPeiCoreMaxFvSupported number of entries. + UINTN MaxFvCount; + + /// + /// Pointer to the buffer with the MaxFvCount number of entries. /// Each entry is for one FV which contains FFS and could be dispatched by PeiCore. /// PEI_CORE_FV_HANDLE *Fv; /// - /// Pointer to the buffer with the PcdPeiCoreMaxFvSupported number of entries. + /// Pointer to the buffer with the MaxUnknownFvInfoCount number of entries. /// Each entry is for one FV which could not be dispatched by PeiCore. /// PEI_CORE_UNKNOW_FORMAT_FV_INFO *UnknownFvInfo; + UINTN MaxUnknownFvInfoCount; UINTN UnknownFvInfoCount; - + /// - /// Pointer to the buffer with the PcdPeiCoreMaxPeimPerFv number of entries. + /// Pointer to the buffer FvFileHandlers in PEI_CORE_FV_HANDLE specified by CurrentPeimFvCount. /// EFI_PEI_FILE_HANDLE *CurrentFvFileHandles; UINTN AprioriCount; @@ -233,18 +273,22 @@ struct _PEI_CORE_INSTANCE { BOOLEAN HeapOffsetPositive; UINTN StackOffset; BOOLEAN StackOffsetPositive; + // + // Information for migrating memory pages allocated in pre-memory phase. + // + HOLE_MEMORY_DATA MemoryPages; 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; // @@ -252,18 +296,20 @@ struct _PEI_CORE_INSTANCE { // PE_COFF_LOADER_READ_FILE ShadowedImageRead; + UINTN TempPeimCount; + // - // Pointer to the temp buffer with the PcdPeiCoreMaxPeimPerFv + 1 number of entries. + // Pointer to the temp buffer with the TempPeimCount number of entries. // - EFI_PEI_FILE_HANDLE *FileHandles; + EFI_PEI_FILE_HANDLE *TempFileHandles; // - // Pointer to the temp buffer with the PcdPeiCoreMaxPeimPerFv number of entries. + // Pointer to the temp buffer with the TempPeimCount number of entries. // - EFI_GUID *FileGuid; + EFI_GUID *TempFileGuid; // // Temp Memory Range is not covered by PeiTempMem and Stack. - // Those Memory Range will be migrated into phisical memory. + // Those Memory Range will be migrated into physical memory. // HOLE_MEMORY_DATA HoleData[HOLE_MAX_NUMBER]; }; @@ -303,7 +349,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 @@ -411,7 +457,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. **/ @@ -423,9 +469,9 @@ InitializePpiServices ( /** - Migrate the Hob list from the temporary memory stack to PEI installed memory. + 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. @@ -532,13 +578,13 @@ PeiNotifyPpi ( **/ VOID -ProcessNotifyList ( +ProcessDispatchNotifyList ( IN PEI_CORE_INSTANCE *PrivateData ); /** - Dispatch notifications. + Process notifications. @param PrivateData PeiCore's private data structure @param NotifyType Type of notify to fire. @@ -549,7 +595,7 @@ ProcessNotifyList ( **/ VOID -DispatchNotify ( +ProcessNotify ( IN PEI_CORE_INSTANCE *PrivateData, IN UINTN NotifyType, IN INTN InstallStartIndex, @@ -843,7 +889,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. @@ -877,30 +923,81 @@ PeiInstallPeiMemory ( ); /** + Migrate memory pages allocated in pre-memory phase. + Copy memory pages at temporary heap top to permanent heap top. - Memory allocation service on permanent memory, - not usable prior to the memory installation. + @param[in] Private Pointer to the private data passed in from caller. + @param[in] TemporaryRamMigrated Temporary memory has been migrated to permanent memory. +**/ +VOID +MigrateMemoryPages ( + IN PEI_CORE_INSTANCE *Private, + IN BOOLEAN TemporaryRamMigrated + ); - @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. - @param MemoryType Type of memory to allocate. - @param Pages Number of pages to allocate. - @param Memory Pointer of memory allocated. +/** + Migrate MemoryBaseAddress in memory allocation HOBs + from the temporary memory to PEI installed memory. - @retval EFI_SUCCESS The allocation was successful - @retval EFI_INVALID_PARAMETER Only AllocateAnyAddress is supported. - @retval EFI_NOT_AVAILABLE_YET Called with permanent memory not available - @retval EFI_OUT_OF_RESOURCES There is not enough HOB heap to satisfy the requirement - to allocate the number of pages. + @param[in] PrivateData Pointer to PeiCore's private data structure. + +**/ +VOID +ConvertMemoryAllocationHobs ( + IN PEI_CORE_INSTANCE *PrivateData + ); + +/** + The purpose of the service is to publish an interface that allows + PEIMs to allocate memory ranges that are managed by the PEI Foundation. + + Prior to InstallPeiMemory() being called, PEI will allocate pages from the heap. + After InstallPeiMemory() is called, PEI will allocate pages within the region + of memory provided by InstallPeiMemory() service in a best-effort fashion. + Location-specific allocations are not managed by the PEI foundation code. + + @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. + @param MemoryType The type of memory to allocate. + @param Pages The number of contiguous 4 KB pages to allocate. + @param Memory Pointer to a physical address. On output, the address is set to the base + of the page range that was allocated. + + @retval EFI_SUCCESS The memory range was successfully allocated. + @retval EFI_OUT_OF_RESOURCES The pages could not be allocated. + @retval EFI_INVALID_PARAMETER Type is not equal to EfiLoaderCode, EfiLoaderData, EfiRuntimeServicesCode, + EfiRuntimeServicesData, EfiBootServicesCode, EfiBootServicesData, + EfiACPIReclaimMemory, EfiReservedMemoryType, or EfiACPIMemoryNVS. **/ EFI_STATUS EFIAPI PeiAllocatePages ( - IN CONST EFI_PEI_SERVICES **PeiServices, - IN EFI_MEMORY_TYPE MemoryType, - IN UINTN Pages, - OUT EFI_PHYSICAL_ADDRESS *Memory + IN CONST EFI_PEI_SERVICES **PeiServices, + IN EFI_MEMORY_TYPE MemoryType, + IN UINTN Pages, + OUT EFI_PHYSICAL_ADDRESS *Memory + ); + +/** + Frees memory pages. + + @param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. + @param[in] Memory The base physical address of the pages to be freed. + @param[in] Pages The number of contiguous 4 KB pages to free. + + @retval EFI_SUCCESS The requested pages were freed. + @retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or Pages is invalid. + @retval EFI_NOT_FOUND The requested memory pages were not allocated with + AllocatePages(). + +**/ +EFI_STATUS +EFIAPI +PeiFreePages ( + IN CONST EFI_PEI_SERVICES **PeiServices, + IN EFI_PHYSICAL_ADDRESS Memory, + IN UINTN Pages ); /** @@ -1103,7 +1200,7 @@ PeiFfsGetFileInfo ( **/ EFI_STATUS -EFIAPI +EFIAPI PeiFfsGetFileInfo2 ( IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO2 *FileInfo @@ -1203,7 +1300,7 @@ SecurityPpiNotifyCallback ( ); /** - Get Fv image from the FV type file, then install FV INFO(2) ppi, Build FV hob. + Get Fv image(s) from the FV type file, then install FV INFO(2) ppi, Build FV(2, 3) hob. @param PrivateData PeiCore's private data structure @param ParentFvCoreHandle Pointer of EFI_CORE_FV_HANDLE to parent Fv image that contain this Fv image. @@ -1214,7 +1311,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 ( @@ -1222,15 +1319,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 * @@ -1238,19 +1335,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. @@ -1260,7 +1357,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 @@ -1272,15 +1369,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. @@ -1290,7 +1387,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 @@ -1302,14 +1399,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. @@ -1331,14 +1428,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. @@ -1360,13 +1457,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. @@ -1380,13 +1477,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. @@ -1400,13 +1497,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. @@ -1420,13 +1517,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. @@ -1440,7 +1537,7 @@ PeiDefaultIoRead64 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** 8-bit I/O write operations. @@ -1457,7 +1554,7 @@ PeiDefaultIoWrite8 ( IN UINT64 Address, IN UINT8 Data ); - + /** 16-bit I/O write operations. @@ -1474,7 +1571,7 @@ PeiDefaultIoWrite16 ( IN UINT64 Address, IN UINT16 Data ); - + /** 32-bit I/O write operations. @@ -1491,7 +1588,7 @@ PeiDefaultIoWrite32 ( IN UINT64 Address, IN UINT32 Data ); - + /** 64-bit I/O write operations. @@ -1508,13 +1605,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. @@ -1529,13 +1626,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. @@ -1550,13 +1647,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. @@ -1571,13 +1668,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. @@ -1592,7 +1689,7 @@ PeiDefaultMemRead64 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** 8-bit memory write operations. @@ -1610,7 +1707,7 @@ PeiDefaultMemWrite8 ( IN UINT64 Address, IN UINT8 Data ); - + /** 16-bit memory write operations. @@ -1646,7 +1743,7 @@ PeiDefaultMemWrite32 ( IN UINT64 Address, IN UINT32 Data ); - + /** 64-bit memory write operations. @@ -1664,19 +1761,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. @@ -1688,7 +1785,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 @@ -1699,13 +1796,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. @@ -1727,7 +1824,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. @@ -1756,21 +1853,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