From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.7675.1681195769961994646 for ; Mon, 10 Apr 2023 23:49:30 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=CRkL3T1n; spf=pass (domain: intel.com, ip: 192.55.52.43, 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=1681195769; x=1712731769; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=RYRRGTL0ZD3Zzge6JmtLUCcKLTJ4j8xc9x1mzsnCn9Q=; b=CRkL3T1nWnZTZuhnWzBlAYxHfkrHtPxqQH+3uACpD/nBu7sM7FjjkkZO BbkY5kkEBr+9RY4g/MVO64XldnHyULqtLRFvKxe36TrLMK0MO0ihZH+uA MZf36wzL5AK02lWr5EQSvikvPPMKdlN/uovWDdS8w8q61BG1y2vOrYtpB UwCFYmTuEhqTJZ+xSt3tF+CrLW4psomZ+1IJlyD7aZthGLGorO2PXfKZp Z+0tYE3wZQ4Eo7Q0r4r3MWHo2ixXXOgUOOsvgd1z3AQL+uebXh0Yxvm3v eAfSEKD3ww7SkzT+/IgfckFSTaJ8/H/nXWUS8hKEv4ynakl2KSuLx/Fl7 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10676"; a="429829050" X-IronPort-AV: E=Sophos;i="5.98,336,1673942400"; d="scan'208";a="429829050" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2023 23:49:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10676"; a="757704519" X-IronPort-AV: E=Sophos;i="5.98,336,1673942400"; d="scan'208";a="757704519" Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.92]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2023 23:49:28 -0700 From: "duntan" To: devel@edk2.groups.io Subject: [PATCH 0/7] Use CpuPageTableLib to create and update smm page table Date: Tue, 11 Apr 2023 14:49:05 +0800 Message-Id: <20230411064912.978-1-dun.tan@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch set is to use CpuPageTableLib to create and update smm page table. With the CpuPageTableLib, we can create or update page table by calling PageTableMap() in CpuPageTableLib multiple times. Then the original page table manipulating code can be removed. Dun Tan (7): UefiCpuPkg: Use CpuPageTableLib to convert SMM paging attribute. UefiCpuPkg/PiSmmCpuDxeSmm: Avoid setting non-present range to RO/NX UefiCpuPkg: Extern mSmmShadowStackSize in PiSmmCpuDxeSmm.h UefiCpuPkg: Refinement to current smm page table generation code UefiCpuPkg: Add SortLib required by PiSmmCpuDxe in DSC UefiCpuPkg: Refinement to code about updating smm page table UefiCpuPkg/PiSmmCpuDxeSmm: Remove unnecessary function UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c | 5 +++-- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c | 3 +-- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmProfileArch.c | 2 +- UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 132 ------------------------------------------------------------------------------------------------------------------------------------ UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 8 ++++++-- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 2 ++ UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 629 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 343 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c | 229 ++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c | 3 +-- UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmProfileArch.c | 19 ++----------------- UefiCpuPkg/UefiCpuPkg.dsc | 3 ++- 13 files changed, 502 insertions(+), 974 deletions(-) -- 2.39.1.windows.1