summaryrefslogtreecommitdiff
path: root/io.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 /io.h
parent0ea286dc681fe3690fc4bb8007144190e03b8d51 (diff)
downloadqemu-palcode-0c0f711f60fec844964c99b141508e7343a41501.zip
qemu-palcode-0c0f711f60fec844964c99b141508e7343a41501.tar.gz
qemu-palcode-0c0f711f60fec844964c99b141508e7343a41501.tar.bz2
Add uart printing support.
Diffstat (limited to 'io.h')
-rw-r--r--io.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/io.h b/io.h
new file mode 100644
index 0000000..c58c271
--- /dev/null
+++ b/io.h
@@ -0,0 +1,18 @@
+#ifndef IO_H
+#define IO_H
+
+#include "cia.h"
+
+static inline unsigned long
+inb(unsigned long port)
+{
+ return *(volatile unsigned char *)(CIA_BW_IO + port);
+}
+
+static inline void
+outb(unsigned char val, unsigned long port)
+{
+ *(volatile unsigned char *)(CIA_BW_IO + port) = val;
+}
+
+#endif