summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/TdxDxe/X64
diff options
context:
space:
mode:
authorIsaku Yamahata <isaku.yamahata@intel.com>2022-05-24 15:53:46 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-05-25 12:34:46 +0000
commit9c733f0b90b31a7e3711f60da314f2a5cfe5fe8a (patch)
treef48fef5930519d468cbb9b131d34163fa37cd42a /OvmfPkg/TdxDxe/X64
parenta21a3438f795deecb24e1843c1636f95c485017c (diff)
downloadedk2-9c733f0b90b31a7e3711f60da314f2a5cfe5fe8a.tar.gz
edk2-9c733f0b90b31a7e3711f60da314f2a5cfe5fe8a.tar.bz2
edk2-9c733f0b90b31a7e3711f60da314f2a5cfe5fe8a.zip
OvmfPkg: TdxDxe: Fix AsmRelocateApMailBoxLoop
In TDX, Application Processor busy-loops on Mailbox for OS to issue MpProtectedModeWakeupCommandWakeup command to UEFI. As the AP acking to it, it clears the command member according to ACPI spec 6.4, 5.2.12.19 Multiprocessor Wakeup Structure: "The application processor need clear the command to Noop(0) as the acknowledgement that the command is received." However, AsmRelocateApMailBoxLoop wrongly clears WakeupVector. Correctly clear command instead of WakeupVector. Without this patch, TD guest kernel fails to boot APs. Fixes: fae5c1464d ("OvmfPkg: Add TdxDxe driver") Cc: Min Xu <min.m.xu@intel.com> Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Min Xu <min.m.xu@intel.com>
Diffstat (limited to 'OvmfPkg/TdxDxe/X64')
-rw-r--r--OvmfPkg/TdxDxe/X64/ApRunLoop.nasm2
1 files changed, 1 insertions, 1 deletions
diff --git a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
index 49bd04415c..a859375fb8 100644
--- a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
+++ b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
@@ -69,7 +69,7 @@ MailBoxWakeUp:
mov rax, [rbx + WakeupVectorOffset]
; OS sends a wakeup command for a given APIC ID, firmware is supposed to reset
; the command field back to zero as acknowledgement.
- mov qword [rbx + WakeupVectorOffset], 0
+ mov qword [rbx + CommandOffset], 0
jmp rax
MailBoxSleep:
jmp $