--- /dev/null
+/** @file\r
+ Provides the services required to access a block I/O device during PEI recovery \r
+ boot mode.\r
+\r
+ The Recovery Module PPI and the Device Recovery Module PPI are device neutral. \r
+ This PPI is device specific and addresses the most common form of recovery \r
+ media-block I/O devices such as legacy floppy, CD-ROM, or IDE devices.\r
+\r
+ The Recovery Block I/O PPI is used to access block devices. Because the Recovery \r
+ Block I/O PPIs that are provided by the PEI ATAPI driver and PEI legacy floppy \r
+ driver are the same, here we define a set of general PPIs for both drivers to use.\r
+ \r
+ Copyright (c) 2007 - 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
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+ @par Revision Reference:\r
+ This PPI is defined in UEFI Platform Initialization Specification 1.2 Volume 1: \r
+ Pre-EFI Initalization Core Interface\r
+\r
+**/\r
+\r
+#ifndef _PEI_BLOCK_IO_H_\r
+#define _PEI_BLOCK_IO_H_\r
+\r
+///\r
+/// Global ID for EFI_PEI_RECOVERY_BLOCK_IO_PPI\r
+///\r
+#define EFI_PEI_RECOVERY_BLOCK_IO_PPI_GUID \\r
+ { \\r
+ 0x695d8aa1, 0x42ee, 0x4c46, { 0x80, 0x5c, 0x6e, 0xa6, 0xbc, 0xe7, 0x99, 0xe3 } \\r
+ }\r
+\r
+///\r
+/// Forward declaration for EFI_PEI_RECOVERY_BLOCK_IO_PPI\r
+///\r
+typedef struct _EFI_PEI_RECOVERY_BLOCK_IO_PPI EFI_PEI_RECOVERY_BLOCK_IO_PPI;\r
+\r
+///\r
+/// All blocks on the recovery device are addressed with a 64-bit Logical Block Address (LBA)\r
+///\r
+typedef UINT64 EFI_PEI_LBA;\r
+\r
+///\r
+/// EFI_PEI_BLOCK_DEVICE_TYPE\r
+///\r
+typedef enum {\r
+ LegacyFloppy = 0, ///< The recovery device is a floppy. \r
+ IdeCDROM = 1, ///< The recovery device is an IDE CD-ROM\r
+ IdeLS120 = 2, ///< The recovery device is an IDE LS-120\r
+ UsbMassStorage= 3, ///< The recovery device is a USB Mass Storage device\r
+ MaxDeviceType\r
+} EFI_PEI_BLOCK_DEVICE_TYPE;\r
+\r
+///\r
+/// Inconsistent with specification here: \r
+/// PEI_BLOCK_IO_MEDIA has been changed to EFI_PEI_BLOCK_IO_MEDIA.\r
+/// Inconsistency exists in UEFI Platform Initialization Specification 1.2 \r
+/// Volume 1: Pre-EFI Initalization Core Interface, where all referrences to \r
+/// this structure name are with the "EFI_" prefix, except for the definition \r
+/// which is without "EFI_". So the name of PEI_BLOCK_IO_MEDIA is taken as the \r
+/// exception, and EFI_PEI_BLOCK_IO_MEDIA is used to comply with most part of \r
+/// the specification.\r
+///\r
+typedef struct {\r
+ ///\r
+ /// The type of media device being referenced by DeviceIndex. \r
+ ///\r
+ EFI_PEI_BLOCK_DEVICE_TYPE DeviceType;\r
+ ///\r
+ /// A flag that indicates if media is present. This flag is always set for \r
+ /// nonremovable media devices.\r
+ ///\r
+ BOOLEAN MediaPresent;\r
+ ///\r
+ /// The last logical block that the device supports.\r
+ ///\r
+ UINTN LastBlock;\r
+ ///\r
+ /// The size of a logical block in bytes.\r
+ ///\r
+ UINTN BlockSize;\r
+} EFI_PEI_BLOCK_IO_MEDIA;\r
+\r
+/**\r
+ Gets the count of block I/O devices that one specific block driver detects.\r
+\r
+ This function is used for getting the count of block I/O devices that one \r
+ specific block driver detects. To the PEI ATAPI driver, it returns the number\r
+ of all the detected ATAPI devices it detects during the enumeration process. \r
+ To the PEI legacy floppy driver, it returns the number of all the legacy \r
+ devices it finds during its enumeration process. If no device is detected, \r
+ then the function will return zero. \r
+ \r
+ @param[in] PeiServices General-purpose services that are available \r
+ to every PEIM.\r
+ @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI \r
+ instance.\r
+ @param[out] NumberBlockDevices The number of block I/O devices discovered.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_GET_NUMBER_BLOCK_DEVICES)(\r
+ IN EFI_PEI_SERVICES **PeiServices,\r
+ IN EFI_PEI_RECOVERY_BLOCK_IO_PPI *This,\r
+ OUT UINTN *NumberBlockDevices\r
+ );\r
+\r
+/**\r
+ Gets a block device's media information.\r
+\r
+ This function will provide the caller with the specified block device's media \r
+ information. If the media changes, calling this function will update the media \r
+ information accordingly.\r
+\r
+ @param[in] PeiServices General-purpose services that are available to every\r
+ PEIM\r
+ @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance.\r
+ @param[in] DeviceIndex Specifies the block device to which the function wants \r
+ to talk. Because the driver that implements Block I/O \r
+ PPIs will manage multiple block devices, the PPIs that \r
+ want to talk to a single device must specify the \r
+ device index that was assigned during the enumeration\r
+ process. This index is a number from one to \r
+ NumberBlockDevices.\r
+ @param[out] MediaInfo The media information of the specified block media. \r
+ The caller is responsible for the ownership of this \r
+ data structure.\r
+\r
+ @par Note: \r
+ The MediaInfo structure describes an enumeration of possible block device \r
+ types. This enumeration exists because no device paths are actually passed \r
+ across interfaces that describe the type or class of hardware that is publishing \r
+ the block I/O interface. This enumeration will allow for policy decisions\r
+ in the Recovery PEIM, such as "Try to recover from legacy floppy first, \r
+ LS-120 second, CD-ROM third." If there are multiple partitions abstracted \r
+ by a given device type, they should be reported in ascending order; this \r
+ order also applies to nested partitions, such as legacy MBR, where the \r
+ outermost partitions would have precedence in the reporting order. The \r
+ same logic applies to systems such as IDE that have precedence relationships \r
+ like "Master/Slave" or "Primary/Secondary"; the master device should be \r
+ reported first, the slave second.\r
+ \r
+ @retval EFI_SUCCESS Media information about the specified block device \r
+ was obtained successfully.\r
+ @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware \r
+ error.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_GET_DEVICE_MEDIA_INFORMATION)(\r
+ IN EFI_PEI_SERVICES **PeiServices,\r
+ IN EFI_PEI_RECOVERY_BLOCK_IO_PPI *This,\r
+ IN UINTN DeviceIndex,\r
+ OUT EFI_PEI_BLOCK_IO_MEDIA *MediaInfo\r
+ );\r
+\r
+/**\r
+ Reads the requested number of blocks from the specified block device.\r
+\r
+ The function reads the requested number of blocks from the device. All the \r
+ blocks are read, or an error is returned. If there is no media in the device,\r
+ the function returns EFI_NO_MEDIA.\r
+\r
+ @param[in] PeiServices General-purpose services that are available to \r
+ every PEIM.\r
+ @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance.\r
+ @param[in] DeviceIndex Specifies the block device to which the function wants \r
+ to talk. Because the driver that implements Block I/O \r
+ PPIs will manage multiple block devices, the PPIs that \r
+ want to talk to a single device must specify the device \r
+ index that was assigned during the enumeration process. \r
+ This index is a number from one to NumberBlockDevices.\r
+ @param[in] StartLBA The starting logical block address (LBA) to read from\r
+ on the device\r
+ @param[in] BufferSize The size of the Buffer in bytes. This number must be\r
+ a multiple of the intrinsic block size of the device.\r
+ @param[out] Buffer A pointer to the destination buffer for the data.\r
+ The caller is responsible for the ownership of the \r
+ buffer.\r
+ \r
+ @retval EFI_SUCCESS The data was read correctly from the device.\r
+ @retval EFI_DEVICE_ERROR The device reported an error while attempting \r
+ to perform the read operation.\r
+ @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not \r
+ valid, or the buffer is not properly aligned.\r
+ @retval EFI_NO_MEDIA There is no media in the device.\r
+ @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of\r
+ the intrinsic block size of the device.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_READ_BLOCKS)(\r
+ IN EFI_PEI_SERVICES **PeiServices,\r
+ IN EFI_PEI_RECOVERY_BLOCK_IO_PPI *This,\r
+ IN UINTN DeviceIndex,\r
+ IN EFI_PEI_LBA StartLBA,\r
+ IN UINTN BufferSize,\r
+ OUT VOID *Buffer\r
+ );\r
+\r
+///\r
+/// EFI_PEI_RECOVERY_BLOCK_IO_PPI provides the services that are required\r
+/// to access a block I/O device during PEI recovery boot mode.\r
+///\r
+struct _EFI_PEI_RECOVERY_BLOCK_IO_PPI {\r
+ ///\r
+ /// Gets the number of block I/O devices that the specific block driver manages.\r
+ ///\r
+ EFI_PEI_GET_NUMBER_BLOCK_DEVICES GetNumberOfBlockDevices;\r
+ \r
+ ///\r
+ /// Gets the specified media information.\r
+ ///\r
+ EFI_PEI_GET_DEVICE_MEDIA_INFORMATION GetBlockDeviceMediaInfo;\r
+ \r
+ ///\r
+ /// Reads the requested number of blocks from the specified block device.\r
+ ///\r
+ EFI_PEI_READ_BLOCKS ReadBlocks;\r
+};\r
+\r
+extern EFI_GUID gEfiPeiVirtualBlockIoPpiGuid;\r
+\r
+#endif\r
--- /dev/null
+/** @file\r
+ This file declares the Device Recovery Module PPI.\r
+\r
+ The interface of this PPI does the following:\r
+ - Reports the number of recovery DXE capsules that exist on the associated device(s)\r
+ - Finds the requested firmware binary capsule\r
+ - Loads that capsule into memory\r
+\r
+ A device can be either a group of devices, such as a block device, or an individual device.\r
+ The module determines the internal search order, with capsule number 1 as the highest load\r
+ priority and number N as the lowest priority.\r
+\r
+ Copyright (c) 2007 - 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
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+ @par Revision Reference:\r
+ This PPI is defined in UEFI Platform Initialization Specification 1.2 Volume 1: \r
+ Pre-EFI Initalization Core Interface\r
+\r
+**/\r
+\r
+#ifndef _PEI_DEVICE_RECOVERY_MODULE_PPI_H_\r
+#define _PEI_DEVICE_RECOVERY_MODULE_PPI_H_\r
+\r
+#define EFI_PEI_DEVICE_RECOVERY_MODULE_PPI_GUID \\r
+ { \\r
+ 0x0DE2CE25, 0x446A, 0x45a7, {0xBF, 0xC9, 0x37, 0xDA, 0x26, 0x34, 0x4B, 0x37 } \\r
+ }\r
+\r
+typedef struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI EFI_PEI_DEVICE_RECOVERY_MODULE_PPI;\r
+\r
+/**\r
+ Returns the number of DXE capsules residing on the device.\r
+\r
+ This function searches for DXE capsules from the associated device and returns\r
+ the number and maximum size in bytes of the capsules discovered. Entry 1 is \r
+ assumed to be the highest load priority and entry N is assumed to be the lowest \r
+ priority.\r
+\r
+ @param[in] PeiServices General-purpose services that are available \r
+ to every PEIM\r
+ @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI\r
+ instance.\r
+ @param[out] NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On \r
+ output, *NumberRecoveryCapsules contains \r
+ the number of recovery capsule images \r
+ available for retrieval from this PEIM \r
+ instance.\r
+\r
+ @retval EFI_SUCCESS One or more capsules were discovered.\r
+ @retval EFI_DEVICE_ERROR A device error occurred.\r
+ @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE)(\r
+ IN EFI_PEI_SERVICES **PeiServices,\r
+ IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,\r
+ OUT UINTN *NumberRecoveryCapsules\r
+ );\r
+\r
+/**\r
+ Returns the size and type of the requested recovery capsule.\r
+\r
+ This function gets the size and type of the capsule specified by CapsuleInstance.\r
+\r
+ @param[in] PeiServices General-purpose services that are available to every PEIM\r
+ @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI \r
+ instance.\r
+ @param[in] CapsuleInstance Specifies for which capsule instance to retrieve \r
+ the information. This parameter must be between \r
+ one and the value returned by GetNumberRecoveryCapsules() \r
+ in NumberRecoveryCapsules.\r
+ @param[out] Size A pointer to a caller-allocated UINTN in which \r
+ the size of the requested recovery module is \r
+ returned.\r
+ @param[out] CapsuleType A pointer to a caller-allocated EFI_GUID in which \r
+ the type of the requested recovery capsule is \r
+ returned. The semantic meaning of the value \r
+ returned is defined by the implementation.\r
+\r
+ @retval EFI_SUCCESS One or more capsules were discovered.\r
+ @retval EFI_DEVICE_ERROR A device error occurred.\r
+ @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO)(\r
+ IN EFI_PEI_SERVICES **PeiServices,\r
+ IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,\r
+ IN UINTN CapsuleInstance,\r
+ OUT UINTN *Size,\r
+ OUT EFI_GUID *CapsuleType\r
+ );\r
+\r
+/**\r
+ Loads a DXE capsule from some media into memory.\r
+\r
+ This function, by whatever mechanism, retrieves a DXE capsule from some device\r
+ and loads it into memory. Note that the published interface is device neutral.\r
+\r
+ @param[in,out] PeiServices General-purpose services that are available \r
+ to every PEIM\r
+ @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI\r
+ instance.\r
+ @param[in] CapsuleInstance Specifies which capsule instance to retrieve.\r
+ @param[out] Buffer Specifies a caller-allocated buffer in which \r
+ the requested recovery capsule will be returned.\r
+\r
+ @retval EFI_SUCCESS The capsule was loaded correctly.\r
+ @retval EFI_DEVICE_ERROR A device error occurred.\r
+ @retval EFI_NOT_FOUND A requested recovery DXE capsule cannot be found.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE)(\r
+ IN OUT EFI_PEI_SERVICES **PeiServices,\r
+ IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This,\r
+ IN UINTN CapsuleInstance,\r
+ OUT VOID *Buffer\r
+ );\r
+\r
+///\r
+/// Presents a standard interface to EFI_PEI_DEVICE_RECOVERY_MODULE_PPI,\r
+/// regardless of the underlying device(s).\r
+///\r
+struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI {\r
+ EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE GetNumberRecoveryCapsules; ///< Returns the number of DXE capsules residing on the device.\r
+ EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO GetRecoveryCapsuleInfo; ///< Returns the size and type of the requested recovery capsule.\r
+ EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule; ///< Loads a DXE capsule from some media into memory.\r
+};\r
+\r
+extern EFI_GUID gEfiPeiDeviceRecoveryModulePpiGuid;\r
+\r
+#endif /* _PEI_DEVICE_RECOVERY_MODULE_PPI_H_ */\r
--- /dev/null
+/** @file\r
+ This file declares Recovery Module PPI. This PPI is used to find and load the\r
+ recovery files.\r
+\r
+ A module that produces this PPI has many roles and is responsible for the following:\r
+ -# Calling the driver recovery PPI EFI_PEI_DEVICE_RECOVERY_MODULE_PPI.\r
+ GetNumberRecoveryCapsules() to determine if one or more DXE recovery \r
+ entities exist.\r
+ -# If no capsules exist, then performing appropriate error handling.\r
+ -# Allocating a buffer of MaxRecoveryCapsuleSize as determined by\r
+ EFI_PEI_DEVICE_RECOVERY_MODULE_PPI.GetNumberRecoveryCapsules() or\r
+ larger.\r
+ -# Determining the policy in which DXE recovery capsules are loaded.\r
+ -# Calling the driver recovery PPI EFI_PEI_DEVICE_RECOVERY_MODULE_PPI.\r
+ LoadRecoveryCapsule() for capsule number x.\r
+ -# If the load failed, performing appropriate error handling.\r
+ -# Performing security checks for a loaded DXE recovery capsule.\r
+ -# If the security checks failed, then logging the failure in a data HOB.\r
+ -# If the security checks failed, then determining the next \r
+ EFI_PEI_DEVICE_RECOVERY_MODULE_PPI.LoadRecoveryCapsule()capsule number; \r
+ otherwise, go to step 11.\r
+ -# If more DXE recovery capsules exist, then go to step 5; otherwise, perform \r
+ error handling.\r
+ -# Decomposing the capsule loaded by EFI_PEI_DEVICE_RECOVERY_MODULE_PPI.\r
+ LoadRecoveryCapsule() into its components. It is assumed that the path \r
+ parameters are redundant for recovery and Setup parameters are either \r
+ redundant or canned.\r
+ -# Invalidating all HOB entries for updateable firmware volume entries. \r
+ This invalidation prevents possible errant drivers from being executed.\r
+ -# Updating the HOB table with the recovery DXE firmware volume information \r
+ generated from the capsule decomposition.\r
+ -# Returning to the PEI Dispatcher. \r
+ \r
+ Copyright (c) 2007 - 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
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+ @par Revision Reference:\r
+ This PPI is defined in UEFI Platform Initialization Specification 1.2 Volume 1: \r
+ Pre-EFI Initalization Core Interface\r
+\r
+**/\r
+\r
+#ifndef __PEI_RECOVERY_MODULE_PPI_H__\r
+#define __PEI_RECOVERY_MODULE_PPI_H__\r
+\r
+///\r
+/// Inconsistent with specification here: \r
+/// GUID marco name has been changed to the consistent PPI GUID macro name.\r
+///\r
+#define EFI_PEI_RECOVERY_MODULE_PPI_GUID \\r
+ { \\r
+ 0xFB6D9542, 0x612D, 0x4f45, {0x87, 0x2F, 0x5C, 0xFF, 0x52, 0xE9, 0x3D, 0xCF } \\r
+ }\r
+\r
+typedef struct _EFI_PEI_RECOVERY_MODULE_PPI EFI_PEI_RECOVERY_MODULE_PPI;\r
+\r
+/**\r
+ Loads a DXE capsule from some media into memory and updates the HOB table\r
+ with the DXE firmware volume information.\r
+\r
+ @param PeiServices General-purpose services that are available to every PEIM.\r
+ @param This Indicates the EFI_PEI_RECOVERY_MODULE_PPI instance.\r
+\r
+ @retval EFI_SUCCESS The capsule was loaded correctly.\r
+ @retval EFI_DEVICE_ERROR A device error occurred.\r
+ @retval EFI_NOT_FOUND A recovery DXE capsule cannot be found.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_LOAD_RECOVERY_CAPSULE)(\r
+ IN EFI_PEI_SERVICES **PeiServices,\r
+ IN EFI_PEI_RECOVERY_MODULE_PPI *This\r
+ );\r
+\r
+///\r
+/// Finds and loads the recovery files.\r
+///\r
+struct _EFI_PEI_RECOVERY_MODULE_PPI {\r
+ EFI_PEI_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule; ///< Loads a DXE binary capsule into memory.\r
+};\r
+\r
+extern EFI_GUID gEfiPeiRecoveryModulePpiGuid;\r
+\r
+#endif\r
--- /dev/null
+/** @file\r
+ This PPI produces functions to interpret and execute the PI boot script table.\r
+ \r
+ This PPI is published by a PEIM and provides for the restoration of the platform's\r
+ configuration when resuming from the ACPI S3 power state. The ability to execute \r
+ the boot script may depend on the availability of other PPIs. For example, if \r
+ the boot script includes an SMBus command, this PEIM looks for the relevant PPI \r
+ that is able to execute that command. \r
+ \r
+ Copyright (c) 2007 - 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
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+ @par Revision Reference:\r
+ This PPI is defined in UEFI Platform Initialization Specification 1.2 Volume 5: \r
+ Standards\r
+\r
+**/\r
+\r
+#ifndef __PEI_S3_RESUME_PPI_H__\r
+#define __PEI_S3_RESUME_PPI_H__\r
+\r
+///\r
+/// Global ID for EFI_PEI_S3_RESUME_PPI\r
+///\r
+#define EFI_PEI_S3_RESUME_PPI_GUID \\r
+ { \\r
+ 0x4426CCB2, 0xE684, 0x4a8a, {0xAE, 0x40, 0x20, 0xD4, 0xB0, 0x25, 0xB7, 0x10 } \\r
+ }\r
+\r
+///\r
+/// Forward declaration for EFI_PEI_S3_RESUME_PPI\r
+///\r
+typedef struct _EFI_PEI_S3_RESUME_PPI EFI_PEI_S3_RESUME_PPI;\r
+\r
+/**\r
+ Restores the platform to its preboot configuration for an S3 resume and\r
+ jumps to the OS waking vector.\r
+\r
+ This function will restore the platform to its pre-boot configuration that was \r
+ pre-stored in the boot script table and transfer control to OS waking vector.\r
+ Upon invocation, this function is responsible for locating the following \r
+ information before jumping to OS waking vector:\r
+ - ACPI tables\r
+ - boot script table\r
+ - any other information that it needs\r
+ \r
+ The S3RestoreConfig() function then executes the pre-stored boot script table \r
+ and transitions the platform to the pre-boot state. The boot script is recorded \r
+ during regular boot using the EFI_S3_SAVE_STATE_PROTOCOL.Write() and\r
+ EFI_S3_SMM_SAVE_STATE_PROTOCOL.Write() functions. Finally, this function \r
+ transfers control to the OS waking vector. If the OS supports only a real-mode \r
+ waking vector, this function will switch from flat mode to real mode before \r
+ jumping to the waking vector. If all platform pre-boot configurations are \r
+ successfully restored and all other necessary information is ready, this \r
+ function will never return and instead will directly jump to the OS waking \r
+ vector. If this function returns, it indicates that the attempt to resume \r
+ from the ACPI S3 sleep state failed. \r
+ \r
+ @param[in] PeiServices Pointer to the PEI Services Table\r
+\r
+ @retval EFI_ABORTED Execution of the S3 resume boot script table failed.\r
+ @retval EFI_NOT_FOUND Some necessary information that is used for the S3 \r
+ resume boot path could not be located.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_S3_RESUME_PPI_RESTORE_CONFIG)(\r
+ IN EFI_PEI_SERVICES **PeiServices\r
+ );\r
+\r
+/**\r
+ EFI_PEI_S3_RESUME_PPI accomplishes the firmware S3 resume boot\r
+ path and transfers control to OS.\r
+**/\r
+struct _EFI_PEI_S3_RESUME_PPI {\r
+ ///\r
+ /// Restores the platform to its preboot configuration for an S3 resume and\r
+ /// jumps to the OS waking vector.\r
+ ///\r
+ EFI_PEI_S3_RESUME_PPI_RESTORE_CONFIG S3RestoreConfig;\r
+};\r
+\r
+extern EFI_GUID gEfiPeiS3ResumePpiGuid;\r
+\r
+#endif\r
PACKAGE_VERSION = 1.00\r
\r
\r
-[Includes.common]\r
+[Includes]\r
Include\r
\r
[Includes.Ia32]\r
[Includes.EBC]\r
Include/Ebc\r
\r
-[LibraryClasses.common]\r
+[LibraryClasses]\r
## @libraryclass Provides most usb APIs to support the Hid requests defined in Usb Hid 1.1 spec\r
# and the standard requests defined in Usb 1.1 spec.\r
##\r
## @libraryclass Provides library services to make PAL Calls.\r
PalLib|Include/Library/PalLib.h\r
\r
-[Guids.common]\r
+[Guids]\r
#\r
# GUID defined in UEFI2.1/UEFI2.0/EFI1.1\r
#\r
## Include/Guid/HardwareErrorVariable.h\r
gEfiHardwareErrorVariableGuid = { 0x414E6BDD, 0xE47B, 0x47cc, { 0xB2, 0x44, 0xBB, 0x61, 0x02, 0x0C, 0xF5, 0x16 }}\r
\r
-[Ppis.common]\r
+[Ppis]\r
## Include/Ppi/MasterBootMode.h\r
gEfiPeiMasterBootModePpiGuid = { 0x7408d748, 0xfc8c, 0x4ee6, {0x92, 0x88, 0xc4, 0xbe, 0xc0, 0x92, 0xa4, 0x10 } }\r
\r
## Include/Ppi/Pcd.h\r
gPcdPpiGuid = { 0x6e81c58, 0x4ad7, 0x44bc, { 0x83, 0x90, 0xf1, 0x2, 0x65, 0xf7, 0x24, 0x80 } }\r
\r
+ #\r
+ # PPIs defined in PI 1.2.\r
+ #\r
+\r
+ ## Include/Ppi/RecoveryModule.h\r
+ gEfiPeiRecoveryModulePpiGuid = { 0xFB6D9542, 0x612D, 0x4f45, { 0x87, 0x2f, 0x5c, 0xff, 0x52, 0xe9, 0x3d, 0xcf }}\r
\r
-[Protocols.common]\r
+ ## Include/Ppi/DeviceRecoveryModule.h\r
+ gEfiPeiDeviceRecoveryModulePpiGuid = { 0x0DE2CE25, 0x446A, 0x45a7, { 0xBF, 0xC9, 0x37, 0xDA, 0x26, 0x34, 0x4B, 0x37 }}\r
+\r
+ ## Include/Ppi/BlockIo.h\r
+ gEfiPeiVirtualBlockIoPpiGuid = { 0x695d8aa1, 0x42ee, 0x4c46, { 0x80, 0x5c, 0x6e, 0xa6, 0xbc, 0xe7, 0x99, 0xe3 }}\r
+\r
+ ## Include/Ppi/S3Resume.h\r
+ gEfiPeiS3ResumePpiGuid = { 0x4426CCB2, 0xE684, 0x4a8a, { 0xae, 0x40, 0x20, 0xd4, 0xb0, 0x25, 0xb7, 0x10 }}\r
+ \r
+[Protocols]\r
#\r
# Protocols defined in PI1.0.\r
#\r