From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 211F42034C5DD for ; Wed, 22 Nov 2017 18:08:24 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Nov 2017 18:12:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,438,1505804400"; d="scan'208";a="179537624" Received: from jwang36-mobl2.ccr.corp.intel.com ([10.239.192.52]) by fmsmga006.fm.intel.com with ESMTP; 22 Nov 2017 18:12:39 -0800 From: Jian J Wang To: edk2-devel@lists.01.org Date: Thu, 23 Nov 2017 10:12:35 +0800 Message-Id: <20171123021237.15396-1-jian.j.wang@intel.com> X-Mailer: git-send-email 2.14.1.windows.1 Subject: [PATCH v8 0/2] Fix multiple entries of RT_CODE in memory map X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Nov 2017 02:08:24 -0000 > v8: > Remove merge code but keep code to remain MemoryMapStart > v7: > Merge memory map after filtering paging attributes > v6: > Add ExecuteDisable feature check to include/exclude EFI_MEMORY_XP > v5: > Coding style clean-up > v4: > a. Remove DoUpdate and check attributes mismatch all the time to avoid > a logic hole > b. Add warning message if failed to update capability > c. Add local variable to hold new attributes to make code cleaner > v3: > a. Add comment to explain more on updating memory capabilities > b. Fix logic hole in updating attributes > c. Instead of checking illegal memory space address and size, use return > status of gDS->SetMemorySpaceCapabilities() to skip memory block which > cannot be updated with new capabilities. > v2 > a. Fix an issue which will cause setting capability failure if size is smaller > than a page. More than one entry of RT_CODE memory might cause boot problem for some old OSs. This patch will fix this issue to keep OS compatibility as much as possible. More detailed information, please refer to https://bugzilla.tianocore.org/show_bug.cgi?id=753 Laszlo did a thorough test on OVMF emulated platform. The details can be found at https://bugzilla.tianocore.org/show_bug.cgi?id=753#c10 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang Tested-by: Laszlo Ersek Jian J Wang (2): UefiCpuPkg/CpuDxe: Fix multiple entries of RT_CODE in memory map MdeModulePkg/DxeCore: Filter out all paging capabilities MdeModulePkg/Core/Dxe/Mem/Page.c | 20 +++++++++ UefiCpuPkg/CpuDxe/CpuPageTable.c | 94 +++++++++++++++++++++++++++++++--------- 2 files changed, 93 insertions(+), 21 deletions(-) -- 2.14.1.windows.1