/** @file\r
PI PEI master include file. This file should match the PI spec.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation \r
+ Copyright (c) 2006 - 2009, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
@par Revision Reference:\r
- Version 1.0.\r
+ PI Version 1.0\r
\r
**/\r
\r
#ifndef __PI_PEICIS_H__\r
#define __PI_PEICIS_H__\r
\r
+#include <Uefi/UefiMultiPhase.h>\r
#include <Pi/PiMultiPhase.h>\r
\r
///\r
/// The data structure through which a PEIM describes available services to the PEI Foundation.\r
/// \r
typedef struct {\r
+ ///\r
+ /// This field is a set of flags describing the characteristics of this imported table entry.\r
+ /// All flags are defined as EFI_PEI_PPI_DESCRIPTOR_***, which can also be combined into one.\r
+ ///\r
UINTN Flags;\r
+ ///\r
+ /// The address of the EFI_GUID that names the interface.\r
+ ///\r
EFI_GUID *Guid;\r
+ ///\r
+ /// A pointer to the PPI. It contains the information necessary to install a service.\r
+ ///\r
VOID *Ppi;\r
} EFI_PEI_PPI_DESCRIPTOR;\r
\r
/// Foundation where to invoke the notification service.\r
/// \r
struct _EFI_PEI_NOTIFY_DESCRIPTOR {\r
+ ///\r
+ /// Details if the type of notification is callback or dispatch.\r
+ ///\r
UINTN Flags;\r
+ ///\r
+ /// The address of the EFI_GUID that names the interface.\r
+ ///\r
EFI_GUID *Guid;\r
+ ///\r
+ /// Address of the notification callback function itself within the PEIM.\r
+ ///\r
EFI_PEIM_NOTIFY_ENTRY_POINT Notify;\r
};\r
\r
-///\r
-/// Describes request of the module to be loaded to \r
-/// the permanent memory once it is available. Unlike most of the other HOBs, \r
-/// this HOB is produced and consumed during the HOB producer phase.\r
-/// \r
-typedef struct _EFI_HOB_LOAD_PEIM {\r
- EFI_HOB_GENERIC_HEADER Header;\r
- EFI_PEI_FILE_HANDLE FileHandle;\r
- EFI_PEIM_ENTRY_POINT2 EntryPoint;\r
- EFI_PEIM_ENTRY_POINT2 InMemEntryPoint;\r
-} EFI_HOB_LOAD_PEIM;\r
-\r
-\r
/**\r
This service is the first one provided by the PEI Foundation. This function \r
installs an interface in the PEI PPI database by GUID. The purpose of the \r
///\r
VOID *Buffer;\r
///\r
- /// Size of the file\92s data.\r
+ /// Size of the file's data.\r
///\r
UINT32 BufferSize;\r
} EFI_FV_FILE_INFO;\r
//\r
#define PEI_SPECIFICATION_MAJOR_REVISION 1\r
#define PEI_SPECIFICATION_MINOR_REVISION 0\r
-\r
+///\r
+/// Inconsistent with specification here: \r
+/// In PI1.0 spec, PEI_SERVICES_SIGNATURE is defined as 0x5652455320494550. But \r
+/// to pass multiple tool chain, it is append a ULL.\r
+///\r
//\r
// PEI Services Table\r
//\r
#define PEI_SERVICES_SIGNATURE 0x5652455320494550ULL\r
+///\r
+/// Inconsistent with specification here: \r
+/// In PI1.0 spec, There is a typo error in PEI_SERVICES_REVISION. In the spec. the defintion is \r
+/// #define ((PEI_SPECIFICATION_MAJOR_REVISION<<16) |(PEI_SPECIFICATION_MINOR_REVISION))\r
+/// and it should be as follow:\r
+///\r
#define PEI_SERVICES_REVISION ((PEI_SPECIFICATION_MAJOR_REVISION<<16) | (PEI_SPECIFICATION_MINOR_REVISION))\r
\r
/// \r
///\r
/// The table header for the PEI Services Table.\r
///\r
- EFI_TABLE_HEADER Hdr;\r
- ///\r
- /// Installs an interface in the PEI PEIM-to-PEIM\r
- /// Interface (PPI) database by GUID.\r
- ///\r
- EFI_PEI_INSTALL_PPI InstallPpi;\r
- ///\r
- /// Reinstalls an interface in the PEI PPI database by GUID.\r
- ///\r
- EFI_PEI_REINSTALL_PPI ReInstallPpi;\r
- ///\r
- /// Locates an interface in the PEI PPI database by GUID.\r
- ///\r
- EFI_PEI_LOCATE_PPI LocatePpi;\r
- ///\r
- /// Installs the notification service to be called back\r
- /// upon the installation or reinstallation of a given interface.\r
- ///\r
- EFI_PEI_NOTIFY_PPI NotifyPpi;\r
- ///\r
- /// Returns the present value of the boot mode.\r
- ///\r
- EFI_PEI_GET_BOOT_MODE GetBootMode;\r
- ///\r
- /// Sets the value of the boot mode.\r
- ///\r
- EFI_PEI_SET_BOOT_MODE SetBootMode;\r
- ///\r
- /// Returns the pointer to the list of Hand-Off Blocks (HOBs) in memory.\r
- ///\r
- EFI_PEI_GET_HOB_LIST GetHobList;\r
- ///\r
- /// Abstracts the creation of HOB headers.\r
- ///\r
- EFI_PEI_CREATE_HOB CreateHob;\r
- ///\r
- /// Discovers instances of firmware volumes in the system.\r
- ///\r
+ EFI_TABLE_HEADER Hdr;\r
+\r
+ //\r
+ // PPI Functions\r
+ //\r
+ EFI_PEI_INSTALL_PPI InstallPpi;\r
+ EFI_PEI_REINSTALL_PPI ReInstallPpi;\r
+ EFI_PEI_LOCATE_PPI LocatePpi;\r
+ EFI_PEI_NOTIFY_PPI NotifyPpi;\r
+\r
+ //\r
+ // Boot Mode Functions\r
+ //\r
+ EFI_PEI_GET_BOOT_MODE GetBootMode;\r
+ EFI_PEI_SET_BOOT_MODE SetBootMode;\r
+\r
+ //\r
+ // HOB Functions\r
+ //\r
+ EFI_PEI_GET_HOB_LIST GetHobList;\r
+ EFI_PEI_CREATE_HOB CreateHob;\r
+\r
+ //\r
+ // Firmware Volume Functions\r
+ //\r
EFI_PEI_FFS_FIND_NEXT_VOLUME2 FfsFindNextVolume;\r
- ///\r
- /// Discovers instances of firmware files in the system.\r
- ///\r
EFI_PEI_FFS_FIND_NEXT_FILE2 FfsFindNextFile;\r
- ///\r
- /// Searches for a section in a firmware file.\r
- ///\r
EFI_PEI_FFS_FIND_SECTION_DATA2 FfsFindSectionData;\r
- ///\r
- /// Registers the found memory configuration with the PEI Foundation.\r
- ///\r
- EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory;\r
- ///\r
- /// Allocates memory ranges that are managed by the PEI Foundation.\r
- ///\r
- EFI_PEI_ALLOCATE_PAGES AllocatePages;\r
- ///\r
- /// Allocate memory ranges that are managed by the PEI Foundation.\r
- ///\r
- EFI_PEI_ALLOCATE_POOL AllocatePool;\r
- ///\r
- /// Copies the contents of one buffer to another buffer.\r
- ///\r
- EFI_PEI_COPY_MEM CopyMem;\r
- ///\r
- /// Fills a buffer with a specified value.\r
- ///\r
- EFI_PEI_SET_MEM SetMem;\r
- ///\r
- /// Provides an interface that a PEIM can call to report a status code.\r
- ///\r
- EFI_PEI_REPORT_STATUS_CODE ReportStatusCode;\r
- ///\r
- /// Resets the entire platform.\r
- ///\r
- EFI_PEI_RESET_SYSTEM ResetSystem;\r
- ///\r
- /// Provides an interface that a PEIM can call to execute\r
- /// an I/O transaction. This interface is installed by provider\r
- /// PEIM by copying the interface into the PEI Service table.\r
- ///\r
- EFI_PEI_CPU_IO_PPI *CpuIo;\r
- ///\r
- /// Provides an interface that a PEIM can call to execute PCI\r
- /// Configuration transactions. This interface is installed by\r
- /// provider PEIM by copying the interface into the EFI_PEI_SERVICES table.\r
- ///\r
- EFI_PEI_PCI_CFG2_PPI *PciCfg;\r
- ///\r
- /// Discovers firmware files within a volume by name.\r
- ///\r
- EFI_PEI_FFS_FIND_BY_NAME FfsFindFileByName;\r
- ///\r
- /// Return information about a particular file.\r
- ///\r
- EFI_PEI_FFS_GET_FILE_INFO FfsGetFileInfo;\r
- ///\r
- /// Return information about a particular volume.\r
- ///\r
- EFI_PEI_FFS_GET_VOLUME_INFO FfsGetVolumeInfo;\r
- ///\r
- /// Register a driver to be re-loaded when memory is available.\r
- ///\r
- EFI_PEI_REGISTER_FOR_SHADOW RegisterForShadow;\r
+\r
+ //\r
+ // PEI Memory Functions\r
+ //\r
+ EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory;\r
+ EFI_PEI_ALLOCATE_PAGES AllocatePages;\r
+ EFI_PEI_ALLOCATE_POOL AllocatePool;\r
+ EFI_PEI_COPY_MEM CopyMem;\r
+ EFI_PEI_SET_MEM SetMem;\r
+\r
+ //\r
+ // Status Code\r
+ //\r
+ EFI_PEI_REPORT_STATUS_CODE ReportStatusCode;\r
+\r
+ //\r
+ // Reset\r
+ //\r
+ EFI_PEI_RESET_SYSTEM ResetSystem;\r
+\r
+ //\r
+ // (the following interfaces are installed by publishing PEIM)\r
+ // I/O Abstractions\r
+ //\r
+ EFI_PEI_CPU_IO_PPI *CpuIo;\r
+ EFI_PEI_PCI_CFG2_PPI *PciCfg;\r
+\r
+ //\r
+ // Future Installed Services\r
+ //\r
+ EFI_PEI_FFS_FIND_BY_NAME FfsFindFileByName;\r
+ EFI_PEI_FFS_GET_FILE_INFO FfsGetFileInfo;\r
+ EFI_PEI_FFS_GET_VOLUME_INFO FfsGetVolumeInfo;\r
+ EFI_PEI_REGISTER_FOR_SHADOW RegisterForShadow;\r
};\r
\r
\r