From nobody Sun May 5 00:39:59 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; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1530501645225939.5008592400716; Sun, 1 Jul 2018 20:20:45 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 1397521CB74A4; Sun, 1 Jul 2018 20:20:37 -0700 (PDT) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 A02B2203369C6 for ; Sun, 1 Jul 2018 20:20:35 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jul 2018 20:20:35 -0700 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.4]) by FMSMGA003.fm.intel.com with ESMTP; 01 Jul 2018 20:20:26 -0700 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.151; helo=mga17.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.51,297,1526367600"; d="scan'208";a="61591308" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Mon, 2 Jul 2018 11:20:46 +0800 Message-Id: <20180702032048.286200-2-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.16.1.windows.1 In-Reply-To: <20180702032048.286200-1-ruiyu.ni@intel.com> References: <20180702032048.286200-1-ruiyu.ni@intel.com> Subject: [edk2] [PATCH 1/3] MdeModulePkg/ResetUtilityLib: Add pack(1) for reset data structure X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Star Zeng 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" RESET_UTILITY_GUID_SPECIFIC_RESET_DATA structure should be declared as pack(1). The patch adds the missing pack(1) pragma. (GUID *)((UINT8 *)&ResetData + OFFSET_OF (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, ResetSubtype)) is used to replace &ResetData.ResetSubType to resolve C4366 VS compiler warning. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Star Zeng Reviewed-by: Star Zeng --- MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c b/MdeModul= ePkg/Library/ResetUtilityLib/ResetUtility.c index e3de4f117a..46a9ac6648 100644 --- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c +++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c @@ -19,10 +19,14 @@ #include #include =20 +#pragma pack(1) typedef struct { CHAR16 NullTerminator; GUID ResetSubtype; } RESET_UTILITY_GUID_SPECIFIC_RESET_DATA; +#pragma pack() + +VERIFY_SIZE_OF (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, 18); =20 /** This is a shorthand helper function to reset with a subtype so that @@ -49,7 +53,10 @@ ResetPlatformSpecificGuid ( RESET_UTILITY_GUID_SPECIFIC_RESET_DATA ResetData; =20 ResetData.NullTerminator =3D CHAR_NULL; - CopyGuid (&ResetData.ResetSubtype, ResetSubtype); + CopyGuid ( + (GUID *)((UINT8 *)&ResetData + OFFSET_OF (RESET_UTILITY_GUID_SPECIFIC_= RESET_DATA, ResetSubtype)), + ResetSubtype + ); ResetPlatformSpecific (sizeof (ResetData), &ResetData); } =20 --=20 2.16.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun May 5 00:39:59 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; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1530501641724971.2442047636061; Sun, 1 Jul 2018 20:20:41 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DA39021BADAB9; Sun, 1 Jul 2018 20:20:36 -0700 (PDT) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 84E28202E5477 for ; Sun, 1 Jul 2018 20:20:35 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jul 2018 20:20:35 -0700 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.4]) by FMSMGA003.fm.intel.com with ESMTP; 01 Jul 2018 20:20:27 -0700 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.151; helo=mga17.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.51,297,1526367600"; d="scan'208";a="61591314" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Mon, 2 Jul 2018 11:20:47 +0800 Message-Id: <20180702032048.286200-3-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.16.1.windows.1 In-Reply-To: <20180702032048.286200-1-ruiyu.ni@intel.com> References: <20180702032048.286200-1-ruiyu.ni@intel.com> Subject: [edk2] [PATCH 2/3] MdeModulePkg/[Pei|Dxe]ResetSystemLib: Add PPI/Protocol dependency X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Star Zeng 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" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Star Zeng Reviewed-by: Star Zeng --- MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.inf | 3 +++ MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.inf | 2 ++ 2 files changed, 5 insertions(+) diff --git a/MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.inf b= /MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.inf index 5cd52d8859..e25c3e7d55 100644 --- a/MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.inf +++ b/MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.inf @@ -36,3 +36,6 @@ [Packages] =20 [LibraryClasses] UefiRuntimeServicesTableLib + +[Depex] + gEfiResetArchProtocolGuid diff --git a/MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.inf b= /MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.inf index b1b9388c63..5af03f305c 100644 --- a/MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.inf +++ b/MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.inf @@ -37,3 +37,5 @@ [Packages] [LibraryClasses] PeiServicesLib =20 +[Depex] + gEfiPeiReset2PpiGuid --=20 2.16.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun May 5 00:39:59 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; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 153050163902554.91749676357972; Sun, 1 Jul 2018 20:20:39 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id AC79D203B8CFF; Sun, 1 Jul 2018 20:20:36 -0700 (PDT) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 68B61202E5483 for ; Sun, 1 Jul 2018 20:20:35 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jul 2018 20:20:35 -0700 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.4]) by FMSMGA003.fm.intel.com with ESMTP; 01 Jul 2018 20:20:28 -0700 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.151; helo=mga17.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.51,297,1526367600"; d="scan'208";a="61591319" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Mon, 2 Jul 2018 11:20:48 +0800 Message-Id: <20180702032048.286200-4-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.16.1.windows.1 In-Reply-To: <20180702032048.286200-1-ruiyu.ni@intel.com> References: <20180702032048.286200-1-ruiyu.ni@intel.com> Subject: [edk2] [PATCH 3/3] MdeModulePkg/ResetSystemRuntimeDxe: Add more info in debug message X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Star Zeng 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" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Star Zeng Reviewed-by: Star Zeng --- MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c b/M= deModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c index f23b5e86f9..afc35587fc 100644 --- a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c +++ b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c @@ -266,7 +266,10 @@ ResetSystem ( } =20 mResetNotifyDepth++; - DEBUG ((DEBUG_INFO, "DXE ResetSystem2: Reset call depth =3D %d.\n", mRes= etNotifyDepth)); + DEBUG (( + DEBUG_INFO, "DXE ResetSystem2: ResetType %s, Call Depth =3D %d.\n", + mResetTypeStr[ResetType], mResetNotifyDepth + )); =20 if (mResetNotifyDepth <=3D MAX_RESET_NOTIFY_DEPTH) { if (!EfiAtRuntime ()) { --=20 2.16.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel