summaryrefslogtreecommitdiff
path: root/src/arch/x86/exit_car.S
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/exit_car.S')
-rw-r--r--src/arch/x86/exit_car.S10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/arch/x86/exit_car.S b/src/arch/x86/exit_car.S
index 806dc9c069..dc356b2cf9 100644
--- a/src/arch/x86/exit_car.S
+++ b/src/arch/x86/exit_car.S
@@ -2,6 +2,7 @@
#include <cpu/x86/mtrr.h>
#include <cpu/x86/cr.h>
+#include <cpu/x86/cache.h>
.section ".module_parameters", "aw", @progbits
/* stack_top indicates the stack to pull MTRR information from. */
@@ -54,7 +55,14 @@ _start:
movl 4(%esp), %eax
movl %eax, _cbmem_top_ptr
#endif
-
+ /* Make sure _cbmem_top_ptr hits dram before invd */
+ movl $1, %eax
+ cpuid
+ btl $CPUID_FEATURE_CLFLUSH_BIT, %edx
+ jz skip_clflush
+ clflush _cbmem_top_ptr
+
+skip_clflush:
/* chipset_teardown_car() is expected to disable cache-as-ram. */
call chipset_teardown_car