]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Library/ResetUtilityLib.h
MdeModulePkg: Add Capsule On Disk APIs into CapsuleLib.
[mirror_edk2.git] / MdeModulePkg / Include / Library / ResetUtilityLib.h
index c556dca729cf5efb16622931484579a21b4f1f1e..656703e7825851c5138ab96439e09589debe26b0 100644 (file)
@@ -1,25 +1,45 @@
 /** @file\r
   This header describes various helper functions for resetting the system.\r
 \r
-  Copyright (c) 2017 Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2017 - 2019 Intel Corporation. All rights reserved.<BR>\r
   Copyright (c) 2016 Microsoft Corporation. All rights reserved.<BR>\r
 \r
-  This program and the accompanying materials are licensed and made available under\r
-  the terms and conditions of the BSD License that accompanies this distribution.\r
-  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
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 #ifndef _RESET_UTILITY_LIB_H_\r
 #define _RESET_UTILITY_LIB_H_\r
 \r
+#include <Uefi/UefiMultiPhase.h>\r
+\r
+/**\r
+  This is a shorthand helper function to reset with reset type and a subtype\r
+  so that the caller doesn't have to bother with a function that has half\r
+  a dozen parameters.\r
+\r
+  This will generate a reset with status EFI_SUCCESS, a NULL string, and\r
+  no custom data. The subtype will be formatted in such a way that it can be\r
+  picked up by notification registrations and custom handlers.\r
+\r
+  NOTE: This call will fail if the architectural ResetSystem underpinnings\r
+        are not initialized. For DXE, you can add gEfiResetArchProtocolGuid\r
+        to your DEPEX.\r
+\r
+  @param[in]  ResetType     The default EFI_RESET_TYPE of the reset.\r
+  @param[in]  ResetSubtype  GUID pointer for the reset subtype to be used.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+ResetSystemWithSubtype (\r
+  IN EFI_RESET_TYPE     ResetType,\r
+  IN CONST  GUID        *ResetSubtype\r
+  );\r
+\r
 /**\r
-  This is a shorthand helper function to reset with a subtype so that\r
-  the caller doesn't have to bother with a function that has half a dozen\r
-  parameters.\r
+  This is a shorthand helper function to reset with the reset type\r
+  'EfiResetPlatformSpecific' and a subtype so that the caller doesn't\r
+  have to bother with a function that has half a dozen parameters.\r
 \r
   This will generate a reset with status EFI_SUCCESS, a NULL string, and\r
   no custom data. The subtype will be formatted in such a way that it can be\r
@@ -41,7 +61,7 @@ ResetPlatformSpecificGuid (
 /**\r
   This function examines the DataSize and ResetData parameters passed to\r
   to ResetSystem() and detemrines if the ResetData contains a Null-terminated\r
-  Unicode string followed by a GUID specific subtype.  If the GUID specific \r
+  Unicode string followed by a GUID specific subtype.  If the GUID specific\r
   subtype is present, then a pointer to the GUID value in ResetData is returned.\r
 \r
   @param[in]  DataSize    The size, in bytes, of ResetData.\r
@@ -64,7 +84,7 @@ GetResetPlatformSpecificGuid (
   );\r
 \r
 /**\r
-  This is a helper function that creates the reset data buffer that can be \r
+  This is a helper function that creates the reset data buffer that can be\r
   passed into ResetSystem().\r
 \r
   The reset data buffer is returned in ResetData and contains ResetString\r