summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/ResetVector/Vtf0/Ia32/PageTables64.asm
diff options
context:
space:
mode:
authorLiu, Zhiguang <Zhiguang.Liu@intel.com>2023-05-08 16:15:01 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-05-30 05:55:44 +0000
commitc19e3f578f51f9ce6645a319c83b7476c081fcbb (patch)
tree558da93b09811b9d4e20ebf2fcc7d2ab2246b2cb /UefiCpuPkg/ResetVector/Vtf0/Ia32/PageTables64.asm
parentcc62b85a4ac61c553a3ff1a1e68b8fe3d8515476 (diff)
downloadedk2-c19e3f578f51f9ce6645a319c83b7476c081fcbb.tar.gz
edk2-c19e3f578f51f9ce6645a319c83b7476c081fcbb.tar.bz2
edk2-c19e3f578f51f9ce6645a319c83b7476c081fcbb.zip
UefiCpuPkg/ResetVector: Simplify page table creation in ResetVector
Currently, page table creation has many hard-code values about the offset to the start of page table. To simplify it, add Labels such as Pml4, Pdp and Pd, so that we can remove many hard-code values Cc: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Cc: Debkumar De <debkumar.de@intel.com> Cc: Catharine West <catharine.west@intel.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Diffstat (limited to 'UefiCpuPkg/ResetVector/Vtf0/Ia32/PageTables64.asm')
-rw-r--r--UefiCpuPkg/ResetVector/Vtf0/Ia32/PageTables64.asm4
1 files changed, 2 insertions, 2 deletions
diff --git a/UefiCpuPkg/ResetVector/Vtf0/Ia32/PageTables64.asm b/UefiCpuPkg/ResetVector/Vtf0/Ia32/PageTables64.asm
index 87a4125d4b..f188da20ba 100644
--- a/UefiCpuPkg/ResetVector/Vtf0/Ia32/PageTables64.asm
+++ b/UefiCpuPkg/ResetVector/Vtf0/Ia32/PageTables64.asm
@@ -2,7 +2,7 @@
; @file
; Sets the CR3 register for 64-bit paging
;
-; Copyright (c) 2008 - 2013, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2008 - 2023, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;
;------------------------------------------------------------------------------
@@ -17,7 +17,7 @@ SetCr3ForPageTables64:
;
; These pages are built into the ROM image in X64/PageTables.asm
;
- mov eax, ADDR_OF(TopLevelPageDirectory)
+ mov eax, ADDR_OF(Pml4)
mov cr3, eax
OneTimeCallRet SetCr3ForPageTables64