summaryrefslogtreecommitdiff
path: root/uart.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2011-04-10 19:20:18 -0700
committerRichard Henderson <rth@twiddle.net>2011-04-10 19:20:18 -0700
commit0c0f711f60fec844964c99b141508e7343a41501 (patch)
tree696a34d7ae26fe75c4d42415aea4e9697395fadb /uart.h
parent0ea286dc681fe3690fc4bb8007144190e03b8d51 (diff)
downloadqemu-palcode-0c0f711f60fec844964c99b141508e7343a41501.zip
qemu-palcode-0c0f711f60fec844964c99b141508e7343a41501.tar.gz
qemu-palcode-0c0f711f60fec844964c99b141508e7343a41501.tar.bz2
Add uart printing support.
Diffstat (limited to 'uart.h')
-rw-r--r--uart.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/uart.h b/uart.h
new file mode 100644
index 0000000..b5f018d
--- /dev/null
+++ b/uart.h
@@ -0,0 +1,62 @@
+#ifndef __UART_H_LOADED
+#define __UART_H_LOADED
+/*****************************************************************************
+
+ Copyright © 1993, 1994 Digital Equipment Corporation,
+ Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted, provided
+that the copyright notice and this permission notice appear in all copies
+of software and supporting documentation, and that the name of Digital not
+be used in advertising or publicity pertaining to distribution of the software
+without specific, written prior permission. Digital grants this permission
+provided that you prominently mark, as not part of the original, any
+modifications made to this software or documentation.
+
+Digital Equipment Corporation disclaims all warranties and/or guarantees
+with regard to this software, including all implied warranties of fitness for
+a particular purpose and merchantability, and makes no representations
+regarding the use of, or the results of the use of, the software and
+documentation in terms of correctness, accuracy, reliability, currentness or
+otherwise; and you rely on the software, documentation and results solely at
+your own risk.
+
+******************************************************************************/
+
+#define com1Rbr 0x3f8
+#define com1Thr 0x3f8
+#define com1Ier 0x3f9
+#define com1Iir 0x3fa
+#define com1Lcr 0x3fb
+#define com1Mcr 0x3fc
+#define com1Lsr 0x3fd
+#define com1Msr 0x3fe
+#define com1Scr 0x3ff
+#define com1Dll 0x3f8
+#define com1Dlm 0x3f9
+
+#define com2Rbr 0x2f8
+#define com2Thr 0x2f8
+#define com2Ier 0x2f9
+#define com2Iir 0x2fa
+#define com2Lcr 0x2fb
+#define com2Mcr 0x2fc
+#define com2Lsr 0x2fd
+#define com2Msr 0x2fe
+#define com2Scr 0x2ff
+#define com2Dll 0x2f8
+#define com2Dlm 0x2f9
+
+#define COM1 (com1Rbr - com2Rbr)
+#define COM2 0
+
+extern int uart_charav(int port);
+extern int uart_getchar(int port);
+extern void uart_putchar(int port, char c);
+extern void uart_puts(int port, const char *s);
+extern void uart_init(void);
+
+#endif /* __UART_H_LOADED */