summaryrefslogtreecommitdiff
path: root/src/cpu/x86
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/x86')
-rw-r--r--src/cpu/x86/entry16.S14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cpu/x86/entry16.S b/src/cpu/x86/entry16.S
index e1bfbf145d..147906fe4d 100644
--- a/src/cpu/x86/entry16.S
+++ b/src/cpu/x86/entry16.S
@@ -115,10 +115,24 @@ _start16bit:
subw %ax, %bx
lgdtl %cs:(%bx)
+#if CONFIG(INTEL_CBNT_SUPPORT)
+#include <cpu/intel/msr.h>
+ movl $MSR_BOOT_GUARD_SACM_INFO, %ecx
+ rdmsr
+ andl $B_BOOT_GUARD_SACM_INFO_NEM_ENABLED, %eax
+ jz 1f
+ movl %cr0, %eax
+ andl $0x7FFAFFD1, %eax /* PG,AM,WP,NE,TS,EM,MP = 0 */
+ orl $0x01, %eax /* PE = 1 */
+ movl %eax, %cr0
+ jmp 2f
+#endif
+1:
movl %cr0, %eax
andl $0x7FFAFFD1, %eax /* PG,AM,WP,NE,TS,EM,MP = 0 */
orl $0x60000001, %eax /* CD, NW, PE = 1 */
movl %eax, %cr0
+2:
/* Restore BIST to %eax */
movl %ebp, %eax