From nobody Tue May 7 00:33:26 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 1522708830160409.24755194127533; Mon, 2 Apr 2018 15:40:30 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id BB5CD224AE8B9; Mon, 2 Apr 2018 15:40:28 -0700 (PDT) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 C3E0321F85E6C for ; Mon, 2 Apr 2018 15:40:27 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Apr 2018 15:40:26 -0700 Received: from mdkinney-mobl2.amr.corp.intel.com ([10.241.98.37]) by fmsmga006.fm.intel.com with ESMTP; 02 Apr 2018 15:40: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.136; helo=mga12.intel.com; envelope-from=michael.d.kinney@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.48,397,1517904000"; d="scan'208";a="216956924" From: "Kinney, Michael D" To: edk2-devel@lists.01.org Date: Mon, 2 Apr 2018 15:40:24 -0700 Message-Id: <20180402224024.20848-1-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.14.2.windows.3 Subject: [edk2] [Patch] MdeModulePkg/Gcd: Filter gCpu->SetMemoryAttributes() calls 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: Ruiyu Ni , Yi Li , Eric Dong , Renhao Liang , Liming Gao , Heyi Guo , Michael D Kinney , 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" This patch fixes an issue with VlvTbltDevicePkg introduced by commit: https://github.com/tianocore/edk2/commit/5b91bf82c67b586b9588cbe4bbffa1588f= 6b5926 This patch filters the call to gCpu->SetMemoryAttributes() if the requested attributes is 0. It also removes the #define INVALID_CPU_ARCH_ATTRIBUTES that is no longer used. Cc: Heyi Guo Cc: Yi Li Cc: Renhao Liang Cc: Star Zeng Cc: Eric Dong Cc: Liming Gao Cc: Jian J Wang Cc: Ruiyu Ni Signed-off-by: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 --- MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gc= d.c index 907245a3f5..45ed6280db 100644 --- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c +++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c @@ -48,8 +48,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER= EXPRESS OR IMPLIED. #define NONEXCLUSIVE_MEMORY_ATTRIBUTES (EFI_MEMORY_XP | EFI_MEMORY_RP | \ EFI_MEMORY_RO) =20 -#define INVALID_CPU_ARCH_ATTRIBUTES 0xffffffff - // // Module Variables // @@ -873,7 +871,7 @@ CoreConvertSpace ( // Call CPU Arch Protocol to attempt to set attributes on the range // CpuArchAttributes =3D ConverToCpuArchAttributes (Attributes); - if (CpuArchAttributes !=3D INVALID_CPU_ARCH_ATTRIBUTES) { + if (CpuArchAttributes !=3D 0) { if (gCpu =3D=3D NULL) { Status =3D EFI_NOT_AVAILABLE_YET; } else { --=20 2.14.2.windows.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel