[coreboot-gerrit] Change in coreboot[master]: inlcude/cpu/x86: Add clflush inline function

Marshall Dawson (Code Review) gerrit at coreboot.org
Wed Dec 13 20:21:10 CET 2017


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 at 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

-- 
To view, visit https://review.coreboot.org/22848
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I74c5cc22f02302314ba010bc599051c1495a13cb
Gerrit-Change-Number: 22848
Gerrit-PatchSet: 1
Gerrit-Owner: Marshall Dawson <marshalldawson3rd at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171213/b6c5f12e/attachment-0001.html>


More information about the coreboot-gerrit mailing list