summaryrefslogtreecommitdiffstats
path: root/io.h
diff options
context:
space:
mode:
authorSimon Rettberg2020-06-02 14:24:54 +0200
committerSimon Rettberg2020-06-02 14:24:54 +0200
commitf3323265685498207f1013de3bf22d193c37aa10 (patch)
treeae8790dc8cf273038dbf442b3f700d81b1ba8ca7 /io.h
parent[build] Fix compilation with newer versions of gcc (diff)
parent[import] Import version 5.31b (diff)
downloadmemtest86-pxe531b.tar.gz
memtest86-pxe531b.tar.xz
memtest86-pxe531b.zip
Merge branch 'master' into pxe531bpxe531b
Diffstat (limited to 'io.h')
-rw-r--r--io.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/io.h b/io.h
index a38f92e..ae70dcf 100644
--- a/io.h
+++ b/io.h
@@ -116,3 +116,18 @@ __OUTS(l)
__inlc(port) : \
__inl(port))
#endif
+
+static __inline void
+outb_p (unsigned char __value, unsigned short int __port )
+{
+ __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
+ "Nd" (__port));
+}
+
+static __inline unsigned char
+inb_p (unsigned short int __port)
+{
+ unsigned char _v;
+ __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
+ return _v;
+} \ No newline at end of file