Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59766 )
Change subject: [RFC]cpu/x86/mp.h: Guard mfence on pre SSE2 platforms ......................................................................
[RFC]cpu/x86/mp.h: Guard mfence on pre SSE2 platforms
Is this a good idea??
Change-Id: I376f86f4d7992344dd68374ba67ad3580070f4d8 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/include/cpu/x86/mp.h 1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/66/59766/1
diff --git a/src/include/cpu/x86/mp.h b/src/include/cpu/x86/mp.h index 934d217..f318277 100644 --- a/src/include/cpu/x86/mp.h +++ b/src/include/cpu/x86/mp.h @@ -13,7 +13,9 @@
static inline void mfence(void) { - __asm__ __volatile__("mfence\t\n": : :"memory"); + /* mfence came with the introduction of SSE2. */ + if (CONFIG(SSE2)) + __asm__ __volatile__("mfence\t\n": : :"memory"); }
/* The sequence of the callbacks are in calling order. */