; Get pte bit position to enable memory encryption\r
; CPUID Fn8000_001F[EBX] - Bits 5:0\r
;\r
+ and ebx, 0x3f\r
mov eax, ebx\r
- and eax, 0x3f\r
- jmp SevExit\r
+\r
+ ; The encryption bit position is always above 31\r
+ sub ebx, 32\r
+ jns SevExit\r
+\r
+ ; Encryption bit was reported as 31 or below, enter a HLT loop\r
+SevEncBitLowHlt:\r
+ cli\r
+ hlt\r
+ jmp SevEncBitLowHlt\r
\r
NoSev:\r
xor eax, eax\r