From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web10.50603.1680255441226956235 for ; Fri, 31 Mar 2023 02:37:27 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=TuoGqu6Q; spf=pass (domain: intel.com, ip: 192.55.52.120, 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=1680255447; x=1711791447; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jBT3Od2J8RQ4x+4VpYBZ5a1dvqVBslGMqbcT/k2TivY=; b=TuoGqu6Qh7ROwNwnCPhhpkr9pqqi3onRoHu/jRjRoGibFltIiW7jDF0k TCpaOkkOr2YznovS48LOa/X/bsZfR8FsW2CBg63EcHajv4KReSElWzr54 nX2IPM2Wx+de/c9QGmEy5z807p/NhfStcfaCaq01eCvGHxgSnMuLQzMzh jyykyX9+NujjTY84RlJyRyO/yZZyVjtTZd+q0B0Mdlv30x1tO9JaxYFkj Vbx2SeLn2NGIS66zj4oK2b8VLChB85DbuGXeCWBmC1+yOVJyD8XiUtyY/ vKg5F917Yy9M2jkGHCbAeWgn0GtZFpk3Qtq4DY7Y7G+IuCnUlNIZPwXGu A==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="340133880" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="340133880" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2023 02:36:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="635229557" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="635229557" Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.92]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2023 02:36:54 -0700 From: "duntan" To: devel@edk2.groups.io Cc: Dandan Bi , Liming Gao , Ray Ni , Jian J Wang Subject: [Patch V2 7/8] MdeModulePkg/DxeIpl: Remove duplicated code to enable NX Date: Fri, 31 Mar 2023 17:33:43 +0800 Message-Id: <20230331093344.2609-8-dun.tan@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20230331093344.2609-1-dun.tan@intel.com> References: <20230331093344.2609-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 Reviewed-by: 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 af1e1e3d02..83c5478895 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 (FALSE, BaseOfStack, STACK_SIZE, 0, 0); - if (IsEnableNonExecNeeded ()) { - EnableExecuteDisableBit (); - } } // -- 2.31.1.windows.1