From a4d749210d4a628552717e9d3fe3ebf7ed84f1f0 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Mon, 30 Aug 2021 12:37:38 +0000 Subject: move the arch specific code for port IO to the correct place --- arch/x86/include/asm/io.h | 15 +++++++++++++++ kernel/i386.h | 13 ------------- 2 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 arch/x86/include/asm/io.h delete mode 100644 kernel/i386.h 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 + +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 */ diff --git a/kernel/i386.h b/kernel/i386.h deleted file mode 100644 index 14f89b7..0000000 --- a/kernel/i386.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef KERNEL_I386 -#define KERNEL_I386 - -static inline void outb(uint16_t port, uint8_t data) -{ - asm volatile ( - "out %0,%1" - : /* no output */ - : "a" (data), "d" (port) - ); -} - -#endif /* KERNEL_I386 */ -- cgit v1.2.3-18-g5258