summaryrefslogtreecommitdiffstats
path: root/MdePkg
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2017-09-01 15:23:11 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2018-02-09 15:29:48 +0800
commitdacf87e885d6bd39a8c97e4bd6d074a7cfc68e02 (patch)
tree1088c3ce09bcc6a722970fedff70130b06293bc3 /MdePkg
parentf412ecc3f45b8d9454d7a450cb67b05c6a6e2715 (diff)
downloadedk2-dacf87e885d6bd39a8c97e4bd6d074a7cfc68e02.tar.gz
edk2-dacf87e885d6bd39a8c97e4bd6d074a7cfc68e02.tar.bz2
edk2-dacf87e885d6bd39a8c97e4bd6d074a7cfc68e02.zip
MdePkg/PeiServicesLib: Add PeiServicesResetSystem2()
Add the PeiServicesResetSytstem2() function to the PeiServiesLib to call the ResetSystem2() services in the PEI Services Table. Cc: Liming Gao <liming.gao@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Include/Library/PeiServicesLib.h24
-rw-r--r--MdePkg/Library/PeiServicesLib/PeiServicesLib.c26
2 files changed, 50 insertions, 0 deletions
diff --git a/MdePkg/Include/Library/PeiServicesLib.h b/MdePkg/Include/Library/PeiServicesLib.h
index 9fc22a10c1..0be72237f2 100644
--- a/MdePkg/Include/Library/PeiServicesLib.h
+++ b/MdePkg/Include/Library/PeiServicesLib.h
@@ -540,4 +540,28 @@ PeiServicesInstallFvInfo2Ppi (
IN UINT32 AuthenticationStatus
);
+/**
+ 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 ResetData.
+ @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.
+
+**/
+VOID
+EFIAPI
+PeiServicesResetSystem2 (
+ IN EFI_RESET_TYPE ResetType,
+ IN EFI_STATUS ResetStatus,
+ IN UINTN DataSize,
+ IN VOID *ResetData OPTIONAL
+ );
+
#endif
diff --git a/MdePkg/Library/PeiServicesLib/PeiServicesLib.c b/MdePkg/Library/PeiServicesLib/PeiServicesLib.c
index 89166ccd38..d0838ed709 100644
--- a/MdePkg/Library/PeiServicesLib/PeiServicesLib.c
+++ b/MdePkg/Library/PeiServicesLib/PeiServicesLib.c
@@ -789,3 +789,29 @@ PeiServicesInstallFvInfo2Ppi (
InternalPeiServicesInstallFvInfoPpi (FALSE, FvFormat, FvInfo, FvInfoSize, ParentFvName, ParentFileName, AuthenticationStatus);
}
+/**
+ 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 ResetData.
+ @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.
+
+**/
+VOID
+EFIAPI
+PeiServicesResetSystem2 (
+ IN EFI_RESET_TYPE ResetType,
+ IN EFI_STATUS ResetStatus,
+ IN UINTN DataSize,
+ IN VOID *ResetData OPTIONAL
+ )
+{
+ (*GetPeiServicesTablePointer())->ResetSystem2 (ResetType, ResetStatus, DataSize, ResetData);
+}