[coreboot-gerrit] New patch to review for coreboot: 2efa224 libpayload: add memory clobber to ins{b, w, l}

Gerd Hoffmann (kraxel@redhat.com) gerrit at coreboot.org
Fri Nov 8 10:49:15 CET 2013


Gerd Hoffmann (kraxel at redhat.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4034

-gerrit

commit 2efa224b764ff95cee21dfdcd5e2400fb6b4f049
Author: Gerd Hoffmann <kraxel at redhat.com>
Date:   Fri Nov 8 10:46:57 2013 +0100

    libpayload: add memory clobber to ins{b,w,l}
    
    Change-Id: I3c4b8a9eeb6c4b2bcc58ccff091b4c997b2da923
    Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
 payloads/libpayload/include/x86/arch/io.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/payloads/libpayload/include/x86/arch/io.h b/payloads/libpayload/include/x86/arch/io.h
index 31a8f88..bcfd307 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



More information about the coreboot-gerrit mailing list