X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=geekos%2Finclude%2Fgeekos%2Fserial.h;fp=geekos%2Finclude%2Fgeekos%2Fserial.h;h=f531c0ce841adb7ebf65ff846f17cb780456f6f5;hp=0000000000000000000000000000000000000000;hb=ddc16b0737cf58f7aa90a69c6652cdf4090aec51;hpb=626595465a2c6987606a6bc697df65130ad8c2d3 diff --git a/geekos/include/geekos/serial.h b/geekos/include/geekos/serial.h new file mode 100644 index 0000000..f531c0c --- /dev/null +++ b/geekos/include/geekos/serial.h @@ -0,0 +1,54 @@ +/* + * This file is part of the Palacios Virtual Machine Monitor developed + * by the V3VEE Project with funding from the United States National + * Science Foundation and the Department of Energy. + * + * The V3VEE Project is a joint project between Northwestern University + * and the University of New Mexico. You can find out more at + * http://www.v3vee.org + * + * Copyright (c) 2008, Peter Dinda + * Copyright (c) 2008, Jack Lange + * Copyright (c) 2008, The V3VEE Project + * All rights reserved. + * + * Author: Peter Dinda + * Author: Jack Lange + * + * This is free software. You are permitted to use, + * redistribute, and modify it as specified in the file "V3VEE_LICENSE". + */ + +#ifndef SERIAL_H +#define SERIAL_H + +#include +#include +#include +#include + +#define COM1_IRQ 4 +#define DEFAULT_SERIAL_ADDR 0x3F8 + + +#ifndef SERIAL_PRINT_DEBUG_LEVEL +#define SERIAL_PRINT_DEBUG_LEVEL 10 +#endif + +void SerialPutChar(unsigned char c); + +void SerialPrint(const char * format, ...); +void SerialPrintLevel(int level, const char * format, ...); +void SerialPrintList(const char * format, va_list ap); + +void SerialPutLine(char * line); +void SerialPutLineN(char * line, int len); + + +void SerialPrintHex(unsigned char x); +void SerialMemDump(unsigned char *start, int n); + +void Init_Serial(); +void InitSerialAddr(unsigned short io_addr); + +#endif