diff options
author | aqua <aqua@iserlohn-fortress.net> | 2023-10-08 19:50:00 +0300 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2023-11-27 21:02:22 +0200 |
commit | fc13fb2ba5993d06d9d6ae5e80bc337aebbdc119 (patch) | |
tree | 9607ab4d5f1d4069d4f761a0b25eada36088bd6b /i686/sys/io.h | |
parent | rules.mk: make include paths absolute (diff) | |
download | kernel-fc13fb2ba5993d06d9d6ae5e80bc337aebbdc119.tar.xz |
Use meson build system
Diffstat (limited to 'i686/sys/io.h')
-rw-r--r-- | i686/sys/io.h | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/i686/sys/io.h b/i686/sys/io.h deleted file mode 100644 index 4ff5d85..0000000 --- a/i686/sys/io.h +++ /dev/null @@ -1,92 +0,0 @@ -#pragma once - -/* port listings */ -enum UART { - COM1 = 0x3f8, - COM2 = 0x2f8, - COM3 = 0x3e8, - COM4 = 0x2e8, - COM5 = 0x5f8, - COM6 = 0x4f8, - COM7 = 0x5e8, - COM8 = 0x4e8 -}; - -static __inline__ void -outb(unsigned char val, unsigned short port) -{ - __asm__("outb %0,%1" : : "a"(val), "dN"(port)); -} - -static __inline__ void -outw(unsigned short val, unsigned short port) -{ - __asm__("outw %0,%1" : : "a"(val), "dN"(port)); -} - -static __inline__ void -outl(unsigned int val, unsigned short port) -{ - __asm__("outl %0,%1" : : "a"(val), "dN"(port)); -} - -static __inline__ unsigned char -inb(unsigned short port) -{ - unsigned char val; - __asm__("inb %1,%0" : "=a"(val) : "dN"(port)); - return val; -} - -static __inline__ unsigned short -inw(unsigned short port) -{ - unsigned short val; - __asm__("inw %1,%0" : "=a"(val) : "dN"(port)); - return val; -} - -static __inline__ unsigned int -inl(unsigned short port) -{ - unsigned int val; - __asm__("inl %1,%0" : "=a"(val) : "dN"(port)); - return val; -} - -static __inline__ void -outsb(unsigned short port, const void *__buf, unsigned long __n) -{ - __asm__("cld; rep; outsb" : "+S"(__buf), "+c"(__n) : "d"(port)); -} - -static __inline__ void -outsw(unsigned short port, const void *__buf, unsigned long __n) -{ - __asm__("cld; rep; outsw" : "+S"(__buf), "+c"(__n) : "d"(port)); -} - -static __inline__ void -outsl(unsigned short port, const void *__buf, unsigned long __n) -{ - __asm__("cld; rep; outsl" : "+S"(__buf), "+c"(__n) : "d"(port)); -} - -static __inline__ void -insb(unsigned short port, void *__buf, unsigned long __n) -{ - __asm__("cld; rep; insb" : "+D"(__buf), "+c"(__n) : "d"(port)); -} - -static __inline__ void -insw(unsigned short port, void *__buf, unsigned long __n) -{ - __asm__("cld; rep; insw" : "+D"(__buf), "+c"(__n) : "d"(port)); -} - -static __inline__ void -insl(unsigned short port, void *__buf, unsigned long __n) -{ - __asm__("cld; rep; insl" : "+D"(__buf), "+c"(__n) : "d"(port)); -} - |