]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: Add a new API ResetSystem for PEI ResetSystemLib
authorZhichao Gao <zhichao.gao@intel.com>
Thu, 21 Feb 2019 00:59:42 +0000 (08:59 +0800)
committerLiming Gao <liming.gao@intel.com>
Fri, 22 Feb 2019 01:45:44 +0000 (09:45 +0800)
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1460

Add a new API ResetSystem for PEI ResetSystemLib to be in accord with
DXE instance.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.c

index d8219775d1f798c9c368ad1ef8f4e2d2da2042c2..f35acb3c6e4bdc5d16963f0a92e92b98ac5c7c04 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   PEI Reset System Library instance that calls the ResetSystem2() PEI Service.\r
 \r
-  Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>\r
   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
@@ -96,3 +96,29 @@ ResetPlatformSpecific (
 {\r
   PeiServicesResetSystem2 (EfiResetPlatformSpecific, EFI_SUCCESS, DataSize, ResetData);\r
 }\r
+\r
+/**\r
+  The ResetSystem function resets the entire platform.\r
+\r
+  @param[in] ResetType      The type of reset to perform.\r
+  @param[in] ResetStatus    The status code for the reset.\r
+  @param[in] DataSize       The size, in bytes, of ResetData.\r
+  @param[in] ResetData      For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown\r
+                            the data buffer starts with a Null-terminated string, optionally\r
+                            followed by additional binary data. The string is a description\r
+                            that the caller may use to further indicate the reason for the\r
+                            system reset. ResetData is only valid if ResetStatus is something\r
+                            other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific\r
+                            where a minimum amount of ResetData is always required.\r
+**/\r
+VOID\r
+EFIAPI\r
+ResetSystem (\r
+  IN EFI_RESET_TYPE               ResetType,\r
+  IN EFI_STATUS                   ResetStatus,\r
+  IN UINTN                        DataSize,\r
+  IN VOID                         *ResetData OPTIONAL\r
+  )\r
+{\r
+  PeiServicesResetSystem2 (ResetType, ResetStatus, DataSize, ResetData);\r
+}\r