+ @return Always success\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SecurityPpiNotifyCallback (\r
+ IN EFI_PEI_SERVICES **PeiServices,\r
+ IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r
+ IN VOID *Ppi\r
+ );\r
+\r
+/**\r
+ Get Fv image from the FV type file, then install FV INFO(2) ppi, Build FV hob.\r
+\r
+ @param PrivateData PeiCore's private data structure\r
+ @param ParentFvCoreHandle Pointer of EFI_CORE_FV_HANDLE to parent Fv image that contain this Fv image.\r
+ @param ParentFvFileHandle File handle of a Fv type file that contain this Fv image.\r
+\r
+ @retval EFI_NOT_FOUND FV image can't be found.\r
+ @retval EFI_SUCCESS Successfully to process it.\r
+ @retval EFI_OUT_OF_RESOURCES Can not allocate page when aligning FV image\r
+ @retval EFI_SECURITY_VIOLATION Image is illegal\r
+ @retval Others Can not find EFI_SECTION_FIRMWARE_VOLUME_IMAGE section\r
+ \r
+**/\r
+EFI_STATUS\r
+ProcessFvFile (\r
+ IN PEI_CORE_INSTANCE *PrivateData,\r
+ IN PEI_CORE_FV_HANDLE *ParentFvCoreHandle,\r
+ IN EFI_PEI_FILE_HANDLE ParentFvFileHandle\r
+ );\r
+ \r
+/**\r
+ Get instance of PEI_CORE_FV_HANDLE for next volume according to given index.\r
+ \r
+ This routine also will install FvInfo ppi for FV hob in PI ways.\r
+ \r
+ @param Private Pointer of PEI_CORE_INSTANCE\r
+ @param Instance The index of FV want to be searched.\r
+ \r
+ @return Instance of PEI_CORE_FV_HANDLE.\r
+**/\r
+PEI_CORE_FV_HANDLE *\r
+FindNextCoreFvHandle (\r
+ IN PEI_CORE_INSTANCE *Private,\r
+ IN UINTN Instance\r
+ );\r
+ \r
+//\r
+// Default EFI_PEI_CPU_IO_PPI support for EFI_PEI_SERVICES table when PeiCore initialization.\r
+// \r
+\r
+/**\r
+ Memory-based read services.\r
+ \r
+ This function is to perform the Memory Access Read service based on installed \r
+ instance of the EFI_PEI_CPU_IO_PPI. \r
+ If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
+ return EFI_NOT_YET_AVAILABLE. \r
+ \r
+ @param PeiServices An indirect pointer to the PEI Services Table\r
+ published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Width The width of the access. Enumerated in bytes.\r
+ @param Address The physical address of the access.\r
+ @param Count The number of accesses to perform.\r
+ @param Buffer A pointer to the buffer of data.\r
+\r
+ @retval EFI_SUCCESS The function completed successfully.\r
+ @retval EFI_NOT_YET_AVAILABLE The service has not been installed. \r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PeiDefaultMemRead (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN EFI_PEI_CPU_IO_PPI_WIDTH Width,\r
+ IN UINT64 Address,\r
+ IN UINTN Count,\r
+ IN OUT VOID *Buffer\r
+ );\r
+ \r
+/**\r
+ Memory-based write services.\r
+ \r
+ This function is to perform the Memory Access Write service based on installed \r
+ instance of the EFI_PEI_CPU_IO_PPI. \r
+ If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
+ return EFI_NOT_YET_AVAILABLE. \r
+ \r
+ @param PeiServices An indirect pointer to the PEI Services Table\r
+ published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Width The width of the access. Enumerated in bytes.\r
+ @param Address The physical address of the access.\r
+ @param Count The number of accesses to perform.\r
+ @param Buffer A pointer to the buffer of data.\r
+\r
+ @retval EFI_SUCCESS The function completed successfully.\r
+ @retval EFI_NOT_YET_AVAILABLE The service has not been installed. \r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PeiDefaultMemWrite (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN EFI_PEI_CPU_IO_PPI_WIDTH Width,\r
+ IN UINT64 Address,\r
+ IN UINTN Count,\r
+ IN OUT VOID *Buffer\r
+ );\r
+ \r
+/**\r
+ IO-based read services.\r
+ \r
+ This function is to perform the IO-base read service for the EFI_PEI_CPU_IO_PPI.\r
+ If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
+ return EFI_NOT_YET_AVAILABLE. \r
+ \r
+ @param PeiServices An indirect pointer to the PEI Services Table\r
+ published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Width The width of the access. Enumerated in bytes.\r
+ @param Address The physical address of the access.\r
+ @param Count The number of accesses to perform.\r
+ @param Buffer A pointer to the buffer of data.\r
+\r
+ @retval EFI_SUCCESS The function completed successfully.\r
+ @retval EFI_NOT_YET_AVAILABLE The service has not been installed.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PeiDefaultIoRead (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN EFI_PEI_CPU_IO_PPI_WIDTH Width,\r
+ IN UINT64 Address,\r
+ IN UINTN Count,\r
+ IN OUT VOID *Buffer\r
+ );\r
+ \r
+/**\r
+ IO-based write services.\r
+ \r
+ This function is to perform the IO-base write service for the EFI_PEI_CPU_IO_PPI.\r
+ If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
+ return EFI_NOT_YET_AVAILABLE. \r
+ \r
+ @param PeiServices An indirect pointer to the PEI Services Table\r
+ published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Width The width of the access. Enumerated in bytes.\r
+ @param Address The physical address of the access.\r
+ @param Count The number of accesses to perform.\r
+ @param Buffer A pointer to the buffer of data.\r
+\r
+ @retval EFI_SUCCESS The function completed successfully.\r
+ @retval EFI_NOT_YET_AVAILABLE The service has not been installed.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PeiDefaultIoWrite (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN EFI_PEI_CPU_IO_PPI_WIDTH Width,\r
+ IN UINT64 Address,\r
+ IN UINTN Count,\r
+ IN OUT VOID *Buffer\r
+ );\r
+ \r
+/**\r
+ 8-bit I/O read operations.\r
+ \r
+ If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
+ return 0.\r
+ \r
+ @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Address The physical address of the access.\r
+\r
+ @return An 8-bit value returned from the I/O space.\r
+**/\r
+UINT8\r
+EFIAPI\r
+PeiDefaultIoRead8 (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN UINT64 Address\r
+ );\r
+ \r
+/**\r
+ Reads an 16-bit I/O port.\r
+ \r
+ If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
+ return 0.\r
+ \r
+ @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Address The physical address of the access.\r
+\r
+ @return A 16-bit value returned from the I/O space.\r
+**/\r
+UINT16\r
+EFIAPI\r
+PeiDefaultIoRead16 (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN UINT64 Address\r
+ );\r
+ \r
+/**\r
+ Reads an 32-bit I/O port.\r
+ \r
+ If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
+ return 0.\r
+ \r
+ @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Address The physical address of the access.\r
+\r
+ @return A 32-bit value returned from the I/O space.\r
+**/\r
+UINT32\r
+EFIAPI\r
+PeiDefaultIoRead32 (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN UINT64 Address\r
+ );\r
+ \r
+/**\r
+ Reads an 64-bit I/O port.\r
+ \r
+ If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
+ return 0.\r
+ \r
+ @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Address The physical address of the access.\r
+\r
+ @return A 64-bit value returned from the I/O space.\r
+**/\r
+UINT64\r
+EFIAPI\r
+PeiDefaultIoRead64 (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN UINT64 Address\r
+ );\r
+ \r
+/**\r
+ 8-bit I/O write operations.\r
+\r
+ @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Address The physical address of the access.\r
+ @param Data The data to write.\r
+**/\r
+VOID\r
+EFIAPI\r
+PeiDefaultIoWrite8 (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN UINT64 Address,\r
+ IN UINT8 Data\r
+ );\r
+ \r
+/**\r
+ 16-bit I/O write operations.\r
+\r
+ @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Address The physical address of the access.\r
+ @param Data The data to write.\r
+**/\r
+VOID\r
+EFIAPI\r
+PeiDefaultIoWrite16 (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN UINT64 Address,\r
+ IN UINT16 Data\r
+ );\r
+ \r
+/**\r
+ 32-bit I/O write operations.\r
+\r
+ @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Address The physical address of the access.\r
+ @param Data The data to write.\r
+**/\r
+VOID\r
+EFIAPI\r
+PeiDefaultIoWrite32 (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN UINT64 Address,\r
+ IN UINT32 Data\r
+ );\r
+ \r
+/**\r
+ 64-bit I/O write operations.\r
+\r
+ @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Address The physical address of the access.\r
+ @param Data The data to write.\r
+**/\r
+VOID\r
+EFIAPI\r
+PeiDefaultIoWrite64 (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN UINT64 Address,\r
+ IN UINT64 Data\r
+ );\r
+ \r
+/**\r
+ 8-bit memory read operations.\r
+\r
+ If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
+ return 0.\r
+ \r
+ @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Address The physical address of the access.\r
+\r
+ @return An 8-bit value returned from the memory space.\r
+\r
+**/\r
+UINT8\r
+EFIAPI\r
+PeiDefaultMemRead8 (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN UINT64 Address\r
+ );\r
+ \r
+/**\r
+ 16-bit memory read operations.\r
+\r
+ If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
+ return 0.\r
+ \r
+ @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Address The physical address of the access.\r
+\r
+ @return An 16-bit value returned from the memory space.\r
+\r
+**/\r
+UINT16\r
+EFIAPI\r
+PeiDefaultMemRead16 (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN UINT64 Address\r
+ );\r
+ \r
+/**\r
+ 32-bit memory read operations.\r
+\r
+ If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
+ return 0.\r
+ \r
+ @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Address The physical address of the access.\r
+\r
+ @return An 32-bit value returned from the memory space.\r
+\r
+**/\r
+UINT32\r
+EFIAPI\r
+PeiDefaultMemRead32 (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN UINT64 Address\r
+ );\r
+ \r
+/**\r
+ 64-bit memory read operations.\r
+\r
+ If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
+ return 0.\r
+ \r
+ @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Address The physical address of the access.\r
+\r
+ @return An 64-bit value returned from the memory space.\r
+\r
+**/\r
+UINT64\r
+EFIAPI\r
+PeiDefaultMemRead64 (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN UINT64 Address\r
+ );\r
+ \r
+/**\r
+ 8-bit memory write operations.\r
+\r
+ @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Address The physical address of the access.\r
+ @param Data The data to write.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+PeiDefaultMemWrite8 (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN UINT64 Address,\r
+ IN UINT8 Data\r
+ );\r
+ \r
+/**\r
+ 16-bit memory write operations.\r
+\r
+ @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Address The physical address of the access.\r
+ @param Data The data to write.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+PeiDefaultMemWrite16 (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN UINT64 Address,\r
+ IN UINT16 Data\r
+ );\r
+\r
+/**\r
+ 32-bit memory write operations.\r
+\r
+ @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Address The physical address of the access.\r
+ @param Data The data to write.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+PeiDefaultMemWrite32 (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ IN CONST EFI_PEI_CPU_IO_PPI *This,\r
+ IN UINT64 Address,\r
+ IN UINT32 Data\r
+ );\r
+ \r
+/**\r
+ 64-bit memory write operations.\r
+\r
+ @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
+ @param This Pointer to local data for the interface.\r
+ @param Address The physical address of the access.\r
+ @param Data The data to write.\r