2007-08-13 19:47:57 +02:00
|
|
|
/** @file
|
2010-03-16 02:53:11 +01:00
|
|
|
The Include file for definitions in the Intel Platform Innovation Framework for EFI
|
2009-07-03 03:33:47 +02:00
|
|
|
Pre-EFI Initialization Core Interface Specification (PEI CIS) Version 0.91.
|
2007-08-13 19:47:57 +02:00
|
|
|
|
2010-04-23 17:52:13 +02:00
|
|
|
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
2010-03-16 02:53:11 +01:00
|
|
|
This program and the accompanying materials are licensed and made available under
|
|
|
|
the terms and conditions of the BSD License that accompanies this distribution.
|
|
|
|
The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php.
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
2007-08-13 19:47:57 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef __PEICIS_H__
|
|
|
|
#define __PEICIS_H__
|
|
|
|
|
2007-08-13 20:24:00 +02:00
|
|
|
#include <Ppi/PciCfg.h>
|
2009-07-08 11:38:08 +02:00
|
|
|
//
|
|
|
|
// Framework PEI Specification Revision information
|
|
|
|
//
|
|
|
|
#define FRAMEWORK_PEI_SPECIFICATION_MAJOR_REVISION 0
|
|
|
|
#define FRAMEWORK_PEI_SPECIFICATION_MINOR_REVISION 91
|
|
|
|
|
2009-07-09 04:19:02 +02:00
|
|
|
|
2009-07-08 11:38:08 +02:00
|
|
|
//
|
|
|
|
// PEI services signature and Revision defined in Framework PEI spec
|
|
|
|
//
|
|
|
|
#define FRAMEWORK_PEI_SERVICES_SIGNATURE 0x5652455320494550ULL
|
|
|
|
#define FRAMEWORK_PEI_SERVICES_REVISION ((FRAMEWORK_PEI_SPECIFICATION_MAJOR_REVISION<<16) | (FRAMEWORK_PEI_SPECIFICATION_MINOR_REVISION))
|
|
|
|
|
|
|
|
|
2007-08-13 20:24:00 +02:00
|
|
|
|
|
|
|
typedef struct _FRAMEWORK_EFI_PEI_SERVICES FRAMEWORK_EFI_PEI_SERVICES;
|
2007-08-13 19:47:57 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
The PEI Dispatcher will invoke each PEIM one time. During this pass, the PEI
|
|
|
|
Dispatcher will pass control to the PEIM at the AddressOfEntryPoint in the PE Header.
|
|
|
|
|
2010-03-16 02:53:11 +01:00
|
|
|
@param FfsHeader The pointer to the FFS file header.
|
2007-08-13 19:47:57 +02:00
|
|
|
@param PeiServices Describes the list of possible PEI Services.
|
|
|
|
|
|
|
|
@return Status code
|
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
|
|
|
(EFIAPI *EFI_PEIM_ENTRY_POINT)(
|
2009-03-16 11:29:27 +01:00
|
|
|
IN EFI_FFS_FILE_HEADER *FfsHeader,
|
|
|
|
IN EFI_PEI_SERVICES **PeiServices
|
2007-08-13 19:47:57 +02:00
|
|
|
);
|
|
|
|
|
2007-08-13 20:24:00 +02:00
|
|
|
/**
|
2009-07-28 15:25:37 +02:00
|
|
|
This service abstracts the capability of the PEI
|
2007-08-13 20:24:00 +02:00
|
|
|
Foundation to discover instances of firmware volumes in the system.
|
|
|
|
Given the input file pointer, this service searches for the next
|
|
|
|
matching file in the Firmware File System (FFS) volume.
|
|
|
|
|
|
|
|
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
|
|
|
|
@param Instance This instance of the firmware volume to find. The value 0 is the Boot Firmware Volume (BFV).
|
2010-03-16 02:53:11 +01:00
|
|
|
@param FwVolHeader The pointer to the firmware volume header of the volume to return.
|
2007-08-13 20:24:00 +02:00
|
|
|
|
|
|
|
@retval EFI_SUCCESS The volume was found.
|
|
|
|
@retval EFI_NOT_FOUND The volume was not found.
|
|
|
|
@retval EFI_INVALID_PARAMETER FwVolHeader is NULL
|
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-07-31 09:44:54 +02:00
|
|
|
(EFIAPI *EFI_PEI_FFS_FIND_NEXT_VOLUME)(
|
2009-03-16 11:29:27 +01:00
|
|
|
IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices,
|
|
|
|
IN UINTN Instance,
|
|
|
|
IN OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader
|
2007-08-13 20:24:00 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
2009-07-28 15:25:37 +02:00
|
|
|
This service abstracts the capability of the PEI
|
2007-08-13 20:24:00 +02:00
|
|
|
Foundation to discover instances of firmware files in the system.
|
|
|
|
Given the input file pointer, this service searches for the next matching
|
|
|
|
file in the Firmware File System (FFS) volume.
|
|
|
|
|
|
|
|
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
|
|
|
|
@param SearchType A filter to find files only of this type.
|
2010-03-16 02:53:11 +01:00
|
|
|
@param FwVolHeader The pointer to the firmware volume header of the volume to search. This parameter
|
2007-08-13 20:24:00 +02:00
|
|
|
must point to a valid FFS volume.
|
2010-03-16 02:53:11 +01:00
|
|
|
@param FileHeader The pointer to the current file from which to begin searching. Upon return this pointer will be
|
|
|
|
updated to reflect the file found.
|
2007-08-13 20:24:00 +02:00
|
|
|
|
2009-03-16 11:29:27 +01:00
|
|
|
@retval EFI_SUCCESS The file was found.
|
|
|
|
@retval EFI_NOT_FOUND The file was not found.
|
|
|
|
@retval EFI_NOT_FOUND The header checksum was not zero.
|
2007-08-13 20:24:00 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-07-31 09:44:54 +02:00
|
|
|
(EFIAPI *EFI_PEI_FFS_FIND_NEXT_FILE)(
|
2009-03-16 11:29:27 +01:00
|
|
|
IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices,
|
|
|
|
IN EFI_FV_FILETYPE SearchType,
|
|
|
|
IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader,
|
|
|
|
IN OUT EFI_FFS_FILE_HEADER **FileHeader
|
2007-08-13 20:24:00 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Given the input file pointer, this service searches for the next
|
|
|
|
matching file in the Firmware File System (FFS) volume.
|
|
|
|
|
|
|
|
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
|
|
|
|
@param SectionType The value of the section type to find.
|
|
|
|
@param FfsFileHeader A pointer to the file header that contains the set of sections to be searched.
|
|
|
|
@param SectionData A pointer to the discovered section, if successful.
|
|
|
|
|
2009-03-16 11:29:27 +01:00
|
|
|
@retval EFI_SUCCESS The section was found.
|
|
|
|
@retval EFI_NOT_FOUND The section was not found.
|
2007-08-13 20:24:00 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-07-31 09:44:54 +02:00
|
|
|
(EFIAPI *EFI_PEI_FFS_FIND_SECTION_DATA)(
|
2009-03-16 11:29:27 +01:00
|
|
|
IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices,
|
|
|
|
IN EFI_SECTION_TYPE SectionType,
|
|
|
|
IN EFI_FFS_FILE_HEADER *FfsFileHeader,
|
|
|
|
IN OUT VOID **SectionData
|
2007-08-13 20:24:00 +02:00
|
|
|
);
|
2009-07-03 03:33:47 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
/// FRAMEWORK_EFI_PEI_SERVICES is a collection of functions whose implementation is provided by the PEI
|
2010-03-16 02:53:11 +01:00
|
|
|
/// Foundation. The table may be located in the temporary or permanent memory, depending upon the capabilities
|
2009-07-03 03:33:47 +02:00
|
|
|
/// and phase of execution of PEI.
|
|
|
|
///
|
|
|
|
/// These services fall into various classes, including the following:
|
2010-03-16 02:53:11 +01:00
|
|
|
/// - Managing the boot mode.
|
|
|
|
/// - Allocating both early and permanent memory.
|
|
|
|
/// - Supporting the Firmware File System (FFS).
|
|
|
|
/// - Abstracting the PPI database abstraction.
|
|
|
|
/// - Creating Hand-Off Blocks (HOBs).
|
2009-07-03 03:33:47 +02:00
|
|
|
///
|
2007-08-13 20:24:00 +02:00
|
|
|
struct _FRAMEWORK_EFI_PEI_SERVICES {
|
2009-03-16 11:29:27 +01:00
|
|
|
EFI_TABLE_HEADER Hdr;
|
2007-08-13 20:24:00 +02:00
|
|
|
//
|
|
|
|
// PPI Functions
|
|
|
|
//
|
2009-03-16 11:29:27 +01:00
|
|
|
EFI_PEI_INSTALL_PPI InstallPpi;
|
|
|
|
EFI_PEI_REINSTALL_PPI ReInstallPpi;
|
|
|
|
EFI_PEI_LOCATE_PPI LocatePpi;
|
|
|
|
EFI_PEI_NOTIFY_PPI NotifyPpi;
|
2007-08-13 20:24:00 +02:00
|
|
|
//
|
|
|
|
// Boot Mode Functions
|
|
|
|
//
|
2009-03-16 11:29:27 +01:00
|
|
|
EFI_PEI_GET_BOOT_MODE GetBootMode;
|
|
|
|
EFI_PEI_SET_BOOT_MODE SetBootMode;
|
2007-08-13 20:24:00 +02:00
|
|
|
//
|
|
|
|
// HOB Functions
|
|
|
|
//
|
2009-03-16 11:29:27 +01:00
|
|
|
EFI_PEI_GET_HOB_LIST GetHobList;
|
|
|
|
EFI_PEI_CREATE_HOB CreateHob;
|
2007-08-13 20:24:00 +02:00
|
|
|
//
|
|
|
|
// Firmware Volume Functions
|
|
|
|
//
|
2009-03-16 11:29:27 +01:00
|
|
|
EFI_PEI_FFS_FIND_NEXT_VOLUME FfsFindNextVolume;
|
|
|
|
EFI_PEI_FFS_FIND_NEXT_FILE FfsFindNextFile;
|
|
|
|
EFI_PEI_FFS_FIND_SECTION_DATA FfsFindSectionData;
|
2007-08-13 20:24:00 +02:00
|
|
|
//
|
|
|
|
// PEI Memory Functions
|
|
|
|
//
|
2009-03-16 11:29:27 +01:00
|
|
|
EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory;
|
|
|
|
EFI_PEI_ALLOCATE_PAGES AllocatePages;
|
|
|
|
EFI_PEI_ALLOCATE_POOL AllocatePool;
|
|
|
|
EFI_PEI_COPY_MEM CopyMem;
|
|
|
|
EFI_PEI_SET_MEM SetMem;
|
2007-08-13 20:24:00 +02:00
|
|
|
//
|
2009-07-08 11:38:08 +02:00
|
|
|
// (the following interfaces are installed by publishing PEIM)
|
2007-08-13 20:24:00 +02:00
|
|
|
// Status Code
|
2009-03-16 11:29:27 +01:00
|
|
|
//
|
|
|
|
EFI_PEI_REPORT_STATUS_CODE ReportStatusCode;
|
2007-08-13 20:24:00 +02:00
|
|
|
//
|
|
|
|
// Reset
|
|
|
|
//
|
2009-03-16 11:29:27 +01:00
|
|
|
EFI_PEI_RESET_SYSTEM ResetSystem;
|
2009-07-09 04:19:02 +02:00
|
|
|
///
|
|
|
|
/// Inconsistent with specification here:
|
2010-03-16 02:53:11 +01:00
|
|
|
/// In Framework Spec, PeiCis0.91, CpuIo and PciCfg are NOT pointers.
|
2009-07-09 04:19:02 +02:00
|
|
|
///
|
2009-07-09 11:17:18 +02:00
|
|
|
|
2007-08-13 20:24:00 +02:00
|
|
|
//
|
|
|
|
// I/O Abstractions
|
|
|
|
//
|
2009-03-16 11:29:27 +01:00
|
|
|
EFI_PEI_CPU_IO_PPI *CpuIo;
|
|
|
|
EFI_PEI_PCI_CFG_PPI *PciCfg;
|
2007-08-13 20:24:00 +02:00
|
|
|
};
|
2009-07-08 11:38:08 +02:00
|
|
|
///
|
2010-03-16 02:53:11 +01:00
|
|
|
/// Enumeration of reset types defined in the Framework Specification PeiCis.
|
2009-07-08 11:38:08 +02:00
|
|
|
///
|
|
|
|
typedef enum {
|
|
|
|
///
|
|
|
|
/// Used to induce a system-wide reset. This sets all circuitry within the
|
|
|
|
/// system to its initial state. This type of reset is asynchronous to system
|
|
|
|
/// operation and operates withgout regard to cycle boundaries. EfiColdReset
|
|
|
|
/// is tantamount to a system power cycle.
|
|
|
|
///
|
|
|
|
EfiPeiResetCold,
|
|
|
|
///
|
|
|
|
/// Used to induce a system-wide initialization. The processors are set to their
|
|
|
|
/// initial state, and pending cycles are not corrupted. If the system does
|
|
|
|
/// not support this reset type, then an EfiResetCold must be performed.
|
|
|
|
///
|
|
|
|
EfiPeiResetWarm,
|
|
|
|
} EFI_PEI_RESET_TYPE;
|
2007-10-16 04:46:31 +02:00
|
|
|
|
2007-08-24 15:34:32 +02:00
|
|
|
#endif
|
2007-10-16 04:46:31 +02:00
|
|
|
|