Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/22848
Change subject: inlcude/cpu/x86: Add clflush inline function ......................................................................
inlcude/cpu/x86: Add clflush inline function
Change-Id: I74c5cc22f02302314ba010bc599051c1495a13cb Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- M src/include/cpu/x86/cache.h 1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/22848/1
diff --git a/src/include/cpu/x86/cache.h b/src/include/cpu/x86/cache.h index 2c8c44b..e0a3359 100644 --- a/src/include/cpu/x86/cache.h +++ b/src/include/cpu/x86/cache.h @@ -50,6 +50,11 @@ 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