summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/io.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
new file mode 100644
index 0000000..02009d5
--- /dev/null
+++ b/arch/x86/include/asm/io.h
@@ -0,0 +1,15 @@
+#ifndef ASM_X86_IO_H
+#define ASM_X86_IO_H
+
+#include <stdint.h>
+
+static inline void outb(uint16_t port, uint8_t data)
+{
+ asm volatile (
+ "out %0,%1"
+ : /* no output */
+ : "a" (data), "d" (port)
+ );
+}
+
+#endif /* ASM_X86_IO_H */