summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-11-08 10:46:57 +0100
committerPatrick Georgi <patrick@georgi-clan.de>2013-11-10 20:41:05 +0100
commite1539ba93185931f970f0fdf7d008cbaaf9d234f (patch)
treeb422f401c87ce93fe8d8442efd74261d9528a30c
parent04134a52b2077d0a77819ea12ee9646050e8edc0 (diff)
downloadcoreboot-e1539ba93185931f970f0fdf7d008cbaaf9d234f.tar.xz
libpayload: add memory clobber to ins{b,w,l}
Change-Id: I3c4b8a9eeb6c4b2bcc58ccff091b4c997b2da923 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-on: http://review.coreboot.org/4034 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
-rw-r--r--payloads/libpayload/include/x86/arch/io.h9
1 files changed, 6 insertions, 3 deletions
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