diff options
author | Min Xu <min.m.xu@intel.com> | 2021-09-27 08:29:01 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-10-24 02:09:27 +0000 |
commit | 5a2411784b309661536033c009ad0ead55b60b24 (patch) | |
tree | 2180ed2d858039a57227ef06e5c15566f6622154 /OvmfPkg/ResetVector/Ia32 | |
parent | f079e9b450b3896bb00eb7a9fed3a6ec7ed3cd04 (diff) | |
download | edk2-5a2411784b309661536033c009ad0ead55b60b24.tar.gz edk2-5a2411784b309661536033c009ad0ead55b60b24.tar.bz2 edk2-5a2411784b309661536033c009ad0ead55b60b24.zip |
OvmfPkg: Clear WORK_AREA_GUEST_TYPE in Main.asm
RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429
Previously WORK_AREA_GUEST_TYPE was cleared in SetCr3ForPageTables64.
This is workable for Legacy guest and SEV guest. But it doesn't work
after Intel TDX is introduced. It is because all TDX CPUs (BSP and APs)
start to run from 0xfffffff0, thus WORK_AREA_GUEST_TYPE will be cleared
multi-times if it is TDX guest. So the clearance of WORK_AREA_GUEST_TYPE
is moved to Main16 entry point in Main.asm.
Note: WORK_AREA_GUEST_TYPE is only defined for ARCH_X64.
For Intel TDX, its corresponding entry point is Main32 (which will be
introduced in next commit in this patch-set). WORK_AREA_GUEST_TYPE will
be cleared there.
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'OvmfPkg/ResetVector/Ia32')
-rw-r--r-- | OvmfPkg/ResetVector/Ia32/PageTables64.asm | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/OvmfPkg/ResetVector/Ia32/PageTables64.asm b/OvmfPkg/ResetVector/Ia32/PageTables64.asm index 07b6ca0709..02528221e5 100644 --- a/OvmfPkg/ResetVector/Ia32/PageTables64.asm +++ b/OvmfPkg/ResetVector/Ia32/PageTables64.asm @@ -42,10 +42,6 @@ BITS 32 ;
SetCr3ForPageTables64:
- ; Clear the WorkArea header. The SEV probe routines will populate the
- ; work area when detected.
- mov byte[WORK_AREA_GUEST_TYPE], 0
-
; Check whether the SEV is active and populate the SevEsWorkArea
OneTimeCall CheckSevFeatures
|