From e1539ba93185931f970f0fdf7d008cbaaf9d234f Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 8 Nov 2013 10:46:57 +0100 Subject: libpayload: add memory clobber to ins{b,w,l} Change-Id: I3c4b8a9eeb6c4b2bcc58ccff091b4c997b2da923 Signed-off-by: Gerd Hoffmann Reviewed-on: http://review.coreboot.org/4034 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- payloads/libpayload/include/x86/arch/io.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'payloads/libpayload/include') diff --git a/payloads/libpayload/include/x86/arch/io.h b/payloads/libpayload/include/x86/arch/io.h index 31a8f88410..bcfd30771e 100644 --- a/payloads/libpayload/include/x86/arch/io.h +++ b/payloads/libpayload/include/x86/arch/io.h @@ -92,17 +92,20 @@ static inline void outsb(int port, const void *addr, unsigned long count) static inline void insl(int port, void *addr, unsigned long count) { - __asm__ __volatile__("rep; insl" : "+D"(addr), "+c"(count) : "d"(port)); + __asm__ __volatile__("rep; insl" : "+D"(addr), "+c"(count) : "d"(port) + : "memory"); } static inline void insw(int port, void *addr, unsigned long count) { - __asm__ __volatile__("rep; insw" : "+D"(addr), "+c"(count) : "d"(port)); + __asm__ __volatile__("rep; insw" : "+D"(addr), "+c"(count) : "d"(port) + : "memory"); } static inline void insb(int port, void *addr, unsigned long count) { - __asm__ __volatile__("rep; insb" : "+D"(addr), "+c"(count) : "d"(port)); + __asm__ __volatile__("rep; insb" : "+D"(addr), "+c"(count) : "d"(port) + : "memory"); } #endif -- cgit v1.2.3