X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fgeekos%2Fio.c;fp=palacios%2Fsrc%2Fgeekos%2Fio.c;h=0000000000000000000000000000000000000000;hp=313273305b367b7951310edc34c57fec7eb8f1a6;hb=ddc16b0737cf58f7aa90a69c6652cdf4090aec51;hpb=626595465a2c6987606a6bc697df65130ad8c2d3 diff --git a/palacios/src/geekos/io.c b/palacios/src/geekos/io.c deleted file mode 100644 index 3132733..0000000 --- a/palacios/src/geekos/io.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * x86 port IO routines - * Copyright (c) 2001, David H. Hovemeyer - * $Revision: 1.1 $ - * - * This is free software. You are permitted to use, - * redistribute, and modify it as specified in the file "COPYING". - */ - -#include - -/* - * Write a byte to an I/O port. - */ -void Out_Byte(ushort_t port, uchar_t value) -{ - __asm__ __volatile__ ( - "outb %b0, %w1" - : - : "a" (value), "Nd" (port) - ); -} - -/* - * Read a byte from an I/O port. - */ -uchar_t In_Byte(ushort_t port) -{ - uchar_t value; - - __asm__ __volatile__ ( - "inb %w1, %b0" - : "=a" (value) - : "Nd" (port) - ); - - return value; -} - -/* - * Write a word to an I/O port. - */ -void Out_Word(ushort_t port, ushort_t value) -{ - __asm__ __volatile__ ( - "outw %w0, %w1" - : - : "a" (value), "Nd" (port) - ); -} - -/* - * Read a byte from an I/O port. - */ -ushort_t In_Word(ushort_t port) -{ - ushort_t value; - - __asm__ __volatile__ ( - "inw %w1, %w0" - : "=a" (value) - : "Nd" (port) - ); - - return value; -} - -/* - * Short delay. May be needed when talking to some - * (slow) I/O devices. - */ -void IO_Delay(void) -{ - uchar_t value = 0; - __asm__ __volatile__ ( - "outb %0, $0x80" - : - : "a" (value) - ); -}