MdePkg: Add Reset2 ppi definition.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17388 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Star Zeng 2015-05-11 02:05:52 +00:00 committed by lzeng14
parent db906063a7
commit ddcf46b2eb
5 changed files with 100 additions and 34 deletions

View File

@ -1,7 +1,7 @@
/** @file
PI PEI master include file. This file should match the PI spec.
Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
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
@ -584,6 +584,30 @@ EFI_STATUS
IN CONST EFI_PEI_SERVICES **PeiServices
);
/**
Resets the entire platform.
@param[in] ResetType The type of reset to perform.
@param[in] ResetStatus The status code for the reset.
@param[in] DataSize The size, in bytes, of WatchdogData.
@param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown
the data buffer starts with a Null-terminated string, optionally
followed by additional binary data. The string is a description
that the caller may use to further indicate the reason for the
system reset. ResetData is only valid if ResetStatus is something
other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific
where a minimum amount of ResetData is always required.
**/
typedef
VOID
(EFIAPI *EFI_PEI_RESET2_SYSTEM) (
IN EFI_RESET_TYPE ResetType,
IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN VOID *ResetData OPTIONAL
);
/**
Find a file within a volume by its name.
@ -903,6 +927,7 @@ struct _EFI_PEI_SERVICES {
EFI_PEI_REGISTER_FOR_SHADOW RegisterForShadow;
EFI_PEI_FFS_FIND_SECTION_DATA3 FindSectionData3;
EFI_PEI_FFS_GET_FILE_INFO2 FfsGetFileInfo2;
EFI_PEI_RESET2_SYSTEM ResetSystem2;
};

View File

@ -0,0 +1,38 @@
/** @file
This file declares Reset2 PPI used to reset the platform.
This PPI is installed by some platform- or chipset-specific PEIM that
abstracts the Reset Service to other agents.
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
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
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.
@par Revision Reference:
This PPI is introduced in PI Version 1.4.
**/
#ifndef __RESET2_PPI_H__
#define __RESET2_PPI_H__
#define EFI_PEI_RESET2_PPI_GUID \
{ \
0x6cc45765, 0xcce4, 0x42fd, {0xbc, 0x56, 0x1, 0x1a, 0xaa, 0xc6, 0xc9, 0xa8 } \
}
///
/// This PPI provides provide a simple reset service.
///
typedef struct _EFI_PEI_RESET2_PPI {
EFI_PEI_RESET2_SYSTEM ResetSystem;
} EFI_PEI_RESET2_PPI;
extern EFI_GUID gEfiPeiReset2PpiGuid;
#endif

View File

@ -90,6 +90,39 @@ typedef enum {
EfiMaxMemoryType
} EFI_MEMORY_TYPE;
///
/// Enumeration of reset types.
///
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.
///
EfiResetCold,
///
/// 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.
///
EfiResetWarm,
///
/// Used to induce an entry into a power state equivalent to the ACPI G2/S5 or G3
/// state. If the system does not support this reset type, then when the system
/// is rebooted, it should exhibit the EfiResetCold attributes.
///
EfiResetShutdown,
///
/// Used to induce a system-wide reset. The exact type of the reset is defined by
/// the EFI_GUID that follows the Null-terminated Unicode string passed into
/// ResetData. If the platform does not recognize the EFI_GUID in ResetData the
/// platform must pick a supported reset type to perform. The platform may
/// optionally log the parameters from any non-normal reset that occurs.
///
EfiResetPlatformSpecific
} EFI_RESET_TYPE;
///
/// Data structure that precedes all of the standard EFI table types.
///

View File

@ -980,39 +980,6 @@ EFI_STATUS
IN CHAR16 *WatchdogData OPTIONAL
);
///
/// Enumeration of reset types.
///
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.
///
EfiResetCold,
///
/// 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.
///
EfiResetWarm,
///
/// Used to induce an entry into a power state equivalent to the ACPI G2/S5 or G3
/// state. If the system does not support this reset type, then when the system
/// is rebooted, it should exhibit the EfiResetCold attributes.
///
EfiResetShutdown,
///
/// Used to induce a system-wide reset. The exact type of the reset is defined by
/// the EFI_GUID that follows the Null-terminated Unicode string passed into
/// ResetData. If the platform does not recognize the EFI_GUID in ResetData the
/// platform must pick a supported reset type to perform. The platform may
/// optionally log the parameters from any non-normal reset that occurs.
///
EfiResetPlatformSpecific
} EFI_RESET_TYPE;
/**
Resets the entire platform.

View File

@ -825,6 +825,9 @@
## Keep name backwards compatible before PI Version 1.4
gPeiCapsulePpiGuid = { 0x3acf33ee, 0xd892, 0x40f4, { 0xa2, 0xfc, 0x38, 0x54, 0xd2, 0xe1, 0x32, 0x3d }}
## Include/Ppi/Reset2.h
gEfiPeiReset2PpiGuid = { 0x6cc45765, 0xcce4, 0x42fd, {0xbc, 0x56, 0x1, 0x1a, 0xaa, 0xc6, 0xc9, 0xa8 } }
[Protocols]
## Include/Protocol/Pcd.h
gPcdProtocolGuid = { 0x11B34006, 0xD85B, 0x4D0A, { 0xA2, 0x90, 0xD5, 0xA5, 0x71, 0x31, 0x0E, 0xF7 }}