OvmfPkg/ResetVector: Fix SNP CPUID table processing results for ECX/EDX
The current support within the boot SNP CPUID table processing mistakenly
swaps the ECX and EDX results. It does not have an effect at this time
because current CPUID results checking does not check ECX or EDX. However,
any future CPUID checks that need to check ECX or EDX may have erroneous
behavior.
Fix the assembler code to save ECX and EDX to the proper locations.
Fixes: 34819f2cac
("OvmfPkg/ResetVector: use SEV-SNP-validated CPUID values")
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Michael Roth <michael.roth@amd.com>
This commit is contained in:
committed by
mergify[bot]
parent
a1b98c8f84
commit
cd6f215223
@@ -395,9 +395,9 @@ SnpCpuidEntryFound:
|
||||
mov [esp + VC_CPUID_RESULT_EAX], eax
|
||||
mov eax, [ecx + SNP_CPUID_ENTRY_EBX]
|
||||
mov [esp + VC_CPUID_RESULT_EBX], eax
|
||||
mov eax, [ecx + SNP_CPUID_ENTRY_EDX]
|
||||
mov [esp + VC_CPUID_RESULT_ECX], eax
|
||||
mov eax, [ecx + SNP_CPUID_ENTRY_ECX]
|
||||
mov [esp + VC_CPUID_RESULT_ECX], eax
|
||||
mov eax, [ecx + SNP_CPUID_ENTRY_EDX]
|
||||
mov [esp + VC_CPUID_RESULT_EDX], eax
|
||||
jmp VmmDoneSnpCpuid
|
||||
|
||||
|
Reference in New Issue
Block a user