From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com []) by mx.groups.io with SMTP id smtpd.web12.29704.1605496726136635553 for ; Sun, 15 Nov 2020 19:18:46 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: w.sheng@intel.com) IronPort-SDR: eD945c5tfLwqvaJ901zi/v1AFc+asfMGvB5M+o0nlZQEcJPBsjvnWK94p+a9hoLEDoAuhHKVmJ fyIZ1yKwLZ4Q== X-IronPort-AV: E=McAfee;i="6000,8403,9806"; a="157720774" X-IronPort-AV: E=Sophos;i="5.77,481,1596524400"; d="scan'208";a="157720774" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Nov 2020 19:18:45 -0800 IronPort-SDR: ksUim0ErIofEVw5A1qMIlMn5Mar/0oBqV/pRLKknU0Zue3ZHFxkw39IqErwSx09qdGgXsVOqbw O4HKsTvxDb6Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,481,1596524400"; d="scan'208";a="475389808" Received: from shwdesssddpdwei.ccr.corp.intel.com ([10.239.157.46]) by orsmga004.jf.intel.com with ESMTP; 15 Nov 2020 19:18:43 -0800 From: "Sheng Wei" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Laszlo Ersek , Rahul Kumar , Jiewen Yao Subject: [PATCH v8 1/2] UefiCpuPkg/PiSmmCpuDxeSmm: Correct the Cr3 typo Date: Mon, 16 Nov 2020 11:18:32 +0800 Message-Id: <20201116031833.14324-2-w.sheng@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20201116031833.14324-1-w.sheng@intel.com> References: <20201116031833.14324-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 Reviewed-by: Laszlo Ersek Reviewed-by: Ray Ni --- 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