From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web11.57515.1679971455383645096 for ; Mon, 27 Mar 2023 19:44:19 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ghsKkgZB; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: dun.tan@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679971459; x=1711507459; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wJiZa79SD8aF/ugxXFZzBTIcMFdo51JwYF69AX7pRxM=; b=ghsKkgZBbbFaBr+9X2ZA2TvYH43RrXSiQX89fHRUOUNGivzo44IMOmbN f9mZp1V49yqEvk1po7BCZVpxJys1rGsTuen9AzZ79aN8+TfuT/krkfPE3 SM+sC4Vg+JWmN8CHEaSgKrelYeP29x0ptwJPAS6nWTa5z818uoOeoNtGU CQ3cB1mX7AK0FXfZXgCd1b2R0HdwqHoBgZ1chwhZO6K1GWs4Jb3m2pYLS iEZpauPjJ+UfL1ReLmSSejjBWfa+M2kEnqeK0vJpO4vqJigU4QN3oI3XX Nad0qpnwLlB+4g1UyE/mqtsEq1O5z/3rR4nbpaaPKFetAGYQoT5Uo4tcE A==; X-IronPort-AV: E=McAfee;i="6600,9927,10662"; a="320852729" X-IronPort-AV: E=Sophos;i="5.98,296,1673942400"; d="scan'208";a="320852729" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2023 19:44:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10662"; a="807700390" X-IronPort-AV: E=Sophos;i="5.98,296,1673942400"; d="scan'208";a="807700390" Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.92]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2023 19:44:18 -0700 From: "duntan" To: devel@edk2.groups.io Cc: Dandan Bi , Liming Gao , Ray Ni , Jian J Wang Subject: [PATCH 8/9] MdeModulePkg/DxeIpl: Remove duplicated code to enable NX Date: Tue, 28 Mar 2023 10:43:01 +0800 Message-Id: <20230328024302.2085-9-dun.tan@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20230328024302.2085-1-dun.tan@intel.com> References: <20230328024302.2085-1-dun.tan@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In IA32 code, remove the duplicated code to enable NX. In the previous patch, IA32 code also uses the new CreateIdentityMappingPageTables() to create PAE page table. This function calls EnableExecuteDisableBit if needed. Signed-off-by: Dun Tan Cc: Dandan Bi Cc: Liming Gao Cc: Ray Ni Cc: Jian J Wang --- MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c index e0e2601637..4b97e4ea80 100644 --- a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c +++ b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c @@ -322,9 +322,6 @@ HandOffToDxeCore ( BuildPageTablesIa32Pae = ToBuildPageTable (); if (BuildPageTablesIa32Pae) { PageTables = CreateIdentityMappingPageTables (TRUE, BaseOfStack, STACK_SIZE, 0, 0); - if (IsEnableNonExecNeeded ()) { - EnableExecuteDisableBit (); - } } // -- 2.31.1.windows.1