From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: zhichao.gao@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Sun, 14 Apr 2019 20:08:12 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Apr 2019 20:07:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,351,1549958400"; d="scan'208";a="150867000" Received: from gaozhic-mobl.ccr.corp.intel.com ([10.239.198.173]) by orsmga002.jf.intel.com with ESMTP; 14 Apr 2019 20:07:08 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Bret Barkelew , Jian J Wang , Hao Wu , Ray Ni , Star Zeng , Liming Gao , Sean Brogan , Michael Turner Subject: [PATCH 24/25] MdeModulePkg/ResetUtilityLib: Add a new API ResetSystemWithSubtype Date: Mon, 15 Apr 2019 11:06:10 +0800 Message-Id: <20190415030611.12464-25-zhichao.gao@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20190415030611.12464-1-zhichao.gao@intel.com> References: <20190415030611.12464-1-zhichao.gao@intel.com> From: Bret Barkelew 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 Cc: Hao Wu Cc: Ray Ni Cc: Star Zeng Cc: Liming Gao Cc: Sean Brogan Cc: Michael Turner Cc: Bret Barkelew Signed-off-by: Zhichao Gao --- .../Include/Library/ResetUtilityLib.h | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/MdeModulePkg/Include/Library/ResetUtilityLib.h b/MdeModulePkg/Include/Library/ResetUtilityLib.h index ca310cdb01..9bb4adc1ad 100644 --- a/MdeModulePkg/Include/Library/ResetUtilityLib.h +++ b/MdeModulePkg/Include/Library/ResetUtilityLib.h @@ -10,6 +10,28 @@ #ifndef _RESET_UTILITY_LIB_H_ #define _RESET_UTILITY_LIB_H_ +#include + +/** + 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 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. + + @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 -- 2.21.0.windows.1