summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/cpu/x86/cache.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/cpu/x86/cache.h b/src/include/cpu/x86/cache.h
index 2c8c44b531..e0a335971b 100644
--- a/src/include/cpu/x86/cache.h
+++ b/src/include/cpu/x86/cache.h
@@ -50,6 +50,11 @@ static inline void invd(void)
asm volatile("invd" ::: "memory");
}
+static inline void clflush(void *addr)
+{
+ asm volatile ("clflush (%0)"::"r" (addr));
+}
+
/* The following functions require the always_inline due to AMD
* function STOP_CAR_AND_CPU that disables cache as
* RAM, the cache as RAM stack can no longer be used. Called