]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Library/ResetUtilityLib.h
MdeModulePkg/ResetUtilityLib: Add a new API ResetSystemWithSubtype
[mirror_edk2.git] / MdeModulePkg / Include / Library / ResetUtilityLib.h
index ca310cdb01f8d3747d536f7f8ecdaa3bec68f93f..656703e7825851c5138ab96439e09589debe26b0 100644 (file)
@@ -1,7 +1,7 @@
 /** @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
   SPDX-License-Identifier: BSD-2-Clause-Patent\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