From nobody Fri Nov 1 12:35:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1517553937900216.5488755626858; Thu, 1 Feb 2018 22:45:37 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 577CC22393643; Thu, 1 Feb 2018 22:39:57 -0800 (PST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B226322393634 for ; Thu, 1 Feb 2018 22:39:55 -0800 (PST) Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Feb 2018 22:45:33 -0800 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.19]) by fmsmga008.fm.intel.com with ESMTP; 01 Feb 2018 22:45:33 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,447,1511856000"; d="scan'208";a="14900481" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Fri, 2 Feb 2018 14:45:21 +0800 Message-Id: <20180202064530.407028-2-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.15.1.windows.2 In-Reply-To: <20180202064530.407028-1-ruiyu.ni@intel.com> References: <20180202064530.407028-1-ruiyu.ni@intel.com> Subject: [edk2] [PATCH 01/10] MdePkg/PeiServicesLib: Add PeiServicesResetSystem2() X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael D Kinney , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Michael D Kinney Add the PeiServicesResetSytstem2() function to the PeiServiesLib to call the ResetSystem2() services in the PEI Services Table. Cc: Liming Gao Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney Signed-off-by: Ruiyu Ni Reviewed-by: Star Zeng --- MdePkg/Include/Library/PeiServicesLib.h | 24 ++++++++++++++++++++++= ++ MdePkg/Library/PeiServicesLib/PeiServicesLib.c | 26 ++++++++++++++++++++++= ++++ 2 files changed, 50 insertions(+) diff --git a/MdePkg/Include/Library/PeiServicesLib.h b/MdePkg/Include/Libra= ry/PeiServicesLib.h index 9fc22a10c1..0be72237f2 100644 --- a/MdePkg/Include/Library/PeiServicesLib.h +++ b/MdePkg/Include/Library/PeiServicesLib.h @@ -540,4 +540,28 @@ PeiServicesInstallFvInfo2Ppi ( IN UINT32 AuthenticationStatus ); =20 +/** + Resets the entire platform. + + @param[in] ResetType The type of reset to perform. + @param[in] ResetStatus The status code for the reset. + @param[in] DataSize The size, in bytes, of ResetData. + @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm,= or EfiResetShutdown + the data buffer starts with a Null-terminated = string, optionally + followed by additional binary data. The string= is a description + that the caller may use to further indicate th= e reason for the + system reset. ResetData is only valid if Reset= Status is something + other than EFI_SUCCESS unless the ResetType is= EfiResetPlatformSpecific + where a minimum amount of ResetData is always = required. + +**/ +VOID +EFIAPI +PeiServicesResetSystem2 ( + IN EFI_RESET_TYPE ResetType, + IN EFI_STATUS ResetStatus, + IN UINTN DataSize, + IN VOID *ResetData OPTIONAL + ); + #endif diff --git a/MdePkg/Library/PeiServicesLib/PeiServicesLib.c b/MdePkg/Librar= y/PeiServicesLib/PeiServicesLib.c index 89166ccd38..d0838ed709 100644 --- a/MdePkg/Library/PeiServicesLib/PeiServicesLib.c +++ b/MdePkg/Library/PeiServicesLib/PeiServicesLib.c @@ -789,3 +789,29 @@ PeiServicesInstallFvInfo2Ppi ( InternalPeiServicesInstallFvInfoPpi (FALSE, FvFormat, FvInfo, FvInfoSize= , ParentFvName, ParentFileName, AuthenticationStatus); } =20 +/** + Resets the entire platform. + + @param[in] ResetType The type of reset to perform. + @param[in] ResetStatus The status code for the reset. + @param[in] DataSize The size, in bytes, of ResetData. + @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm,= or EfiResetShutdown + the data buffer starts with a Null-terminated = string, optionally + followed by additional binary data. The string= is a description + that the caller may use to further indicate th= e reason for the + system reset. ResetData is only valid if Reset= Status is something + other than EFI_SUCCESS unless the ResetType is= EfiResetPlatformSpecific + where a minimum amount of ResetData is always = required. + +**/ +VOID +EFIAPI +PeiServicesResetSystem2 ( + IN EFI_RESET_TYPE ResetType, + IN EFI_STATUS ResetStatus, + IN UINTN DataSize, + IN VOID *ResetData OPTIONAL + ) +{ + (*GetPeiServicesTablePointer())->ResetSystem2 (ResetType, ResetStatus, D= ataSize, ResetData); +} --=20 2.15.1.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel