From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com []) by mx.groups.io with SMTP id smtpd.web08.22208.1604975079377218235 for ; Mon, 09 Nov 2020 18:24:39 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: w.sheng@intel.com) IronPort-SDR: bjM4KpcJSUWmtiPDD4i6AEAMM1ns77WnKOYy3XczEHAKlz/lEng6+GSfx21xPaDbYX5uKVQP3/ 2EPMY3xHOMnQ== X-IronPort-AV: E=McAfee;i="6000,8403,9800"; a="149755501" X-IronPort-AV: E=Sophos;i="5.77,465,1596524400"; d="scan'208";a="149755501" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2020 18:24:38 -0800 IronPort-SDR: 7gi5HnCLCQoBADmuHTdGlXqoH1JT+sIxhh0HEcW9WHMDutxnzgfGLWREqpsrfLamqVhtIvpjvn cfPNaJimJ8Bw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,465,1596524400"; d="scan'208";a="541136711" Received: from shwdesssddpdwei.ccr.corp.intel.com ([10.239.157.46]) by orsmga005.jf.intel.com with ESMTP; 09 Nov 2020 18:24:36 -0800 From: "Sheng Wei" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Laszlo Ersek , Rahul Kumar , Jiewen Yao Subject: [PATCH v6 1/2] UefiCpuPkg/PiSmmCpuDxeSmm: Correct the Cr3 typo Date: Tue, 10 Nov 2020 10:24:29 +0800 Message-Id: <20201110022430.19560-2-w.sheng@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20201110022430.19560-1-w.sheng@intel.com> References: <20201110022430.19560-1-w.sheng@intel.com> Change the variable name from mInternalGr3 to mInternalCr3. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3015 Signed-off-by: Sheng Wei Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Cc: Rahul Kumar Cc: Jiewen Yao --- UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c index ebfc46ad45..d67f036aea 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c @@ -32,7 +32,7 @@ PAGE_ATTRIBUTE_TABLE mPageAttributeTable[] = { {Page1G, SIZE_1GB, PAGING_1G_ADDRESS_MASK_64}, }; -UINTN mInternalGr3; +UINTN mInternalCr3; /** Set the internal page table base address. @@ -46,7 +46,7 @@ SetPageTableBase ( IN UINTN Cr3 ) { - mInternalGr3 = Cr3; + mInternalCr3 = Cr3; } /** @@ -59,8 +59,8 @@ GetPageTableBase ( VOID ) { - if (mInternalGr3 != 0) { - return mInternalGr3; + if (mInternalCr3 != 0) { + return mInternalCr3; } return (AsmReadCr3 () & PAGING_4K_ADDRESS_MASK_64); } @@ -252,7 +252,7 @@ ConvertPageEntryAttribute ( if ((Attributes & EFI_MEMORY_RO) != 0) { if (IsSet) { NewPageEntry &= ~(UINT64)IA32_PG_RW; - if (mInternalGr3 != 0) { + if (mInternalCr3 != 0) { // Environment setup // ReadOnly page need set Dirty bit for shadow stack NewPageEntry |= IA32_PG_D; -- 2.16.2.windows.1