summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Include/Library
diff options
context:
space:
mode:
authorBret Barkelew <Bret.Barkelew@microsoft.com>2019-02-22 13:36:24 +0800
committerLiming Gao <liming.gao@intel.com>2019-04-28 09:40:20 +0800
commit06aaf2f82cd1cd6a45e826cf33666cb979cd9950 (patch)
treeb91ac69ebcc24e039986cc8b62cc64870d473606 /MdeModulePkg/Include/Library
parentd943e5ad3b2ba04578eaf71117d365b129ab6a65 (diff)
downloadedk2-06aaf2f82cd1cd6a45e826cf33666cb979cd9950.tar.gz
edk2-06aaf2f82cd1cd6a45e826cf33666cb979cd9950.tar.bz2
edk2-06aaf2f82cd1cd6a45e826cf33666cb979cd9950.zip
MdeModulePkg/ResetUtilityLib: Add a new API ResetSystemWithSubtype
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1458 Add a new API ResetSystemWithSubtype's prototype declaration in header file. Also add the required data type header file. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Turner <Michael.Turner@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg/Include/Library')
-rw-r--r--MdeModulePkg/Include/Library/ResetUtilityLib.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/MdeModulePkg/Include/Library/ResetUtilityLib.h b/MdeModulePkg/Include/Library/ResetUtilityLib.h
index ca310cdb01..656703e782 100644
--- a/MdeModulePkg/Include/Library/ResetUtilityLib.h
+++ b/MdeModulePkg/Include/Library/ResetUtilityLib.h
@@ -1,7 +1,7 @@
/** @file
This header describes various helper functions for resetting the system.
- Copyright (c) 2017 Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2017 - 2019 Intel Corporation. All rights reserved.<BR>
Copyright (c) 2016 Microsoft Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -10,10 +10,36 @@
#ifndef _RESET_UTILITY_LIB_H_
#define _RESET_UTILITY_LIB_H_
+#include <Uefi/UefiMultiPhase.h>
+
+/**
+ This is a shorthand helper function to reset with reset type and a subtype
+ so that the caller doesn't have to bother with a function that has half
+ a dozen parameters.
+
+ This will generate a reset with status EFI_SUCCESS, a NULL string, and
+ no custom data. The subtype will be formatted in such a way that it can be
+ picked up by notification registrations and custom handlers.
+
+ NOTE: This call will fail if the architectural ResetSystem underpinnings
+ are not initialized. For DXE, you can add gEfiResetArchProtocolGuid
+ to your DEPEX.
+
+ @param[in] ResetType The default EFI_RESET_TYPE of the reset.
+ @param[in] ResetSubtype GUID pointer for the reset subtype to be used.
+
+**/
+VOID
+EFIAPI
+ResetSystemWithSubtype (
+ IN EFI_RESET_TYPE ResetType,
+ IN CONST GUID *ResetSubtype
+ );
+
/**
- This is a shorthand helper function to reset with a subtype so that
- the caller doesn't have to bother with a function that has half a dozen
- parameters.
+ This is a shorthand helper function to reset with the reset type
+ 'EfiResetPlatformSpecific' and a subtype so that the caller doesn't
+ have to bother with a function that has half a dozen parameters.
This will generate a reset with status EFI_SUCCESS, a NULL string, and
no custom data. The subtype will be formatted in such a way that it can be