OvmfPkg/ResetVector: Fix assembler bit test flag check
Commit63c50d3ff2
changed the check that is used to determine if SEV-ES is active. Originally, a CMP instruction with a supporting JZ instruction was used for the check. It was changed to use the BT instruction but not JZ instruction. The result of a BT instruction changes the the carry flag (CF) and not the zero flag (ZF). As a result, the wrong condition is being checked. Update the JZ to a JNC to properly detect if SEV-ES is active. Fixes:63c50d3ff2
("OvmfPkg/ResetVector: cache the SEV status MSR...") Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
This commit is contained in:
parent
ff3382a51c
commit
e674096acc
|
@ -44,7 +44,7 @@ Transition32FlatTo64Flat:
|
||||||
|
|
||||||
mov ecx, 1
|
mov ecx, 1
|
||||||
bt [SEV_ES_WORK_AREA_STATUS_MSR], ecx
|
bt [SEV_ES_WORK_AREA_STATUS_MSR], ecx
|
||||||
jz EnablePaging
|
jnc EnablePaging
|
||||||
|
|
||||||
;
|
;
|
||||||
; SEV-ES is active, perform a quick sanity check against the reported
|
; SEV-ES is active, perform a quick sanity check against the reported
|
||||||
|
|
Loading…
Reference in New Issue