diff options
author | Richard Henderson <rth@twiddle.net> | 2011-04-10 19:20:18 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2011-04-10 19:20:18 -0700 |
commit | 0c0f711f60fec844964c99b141508e7343a41501 (patch) | |
tree | 696a34d7ae26fe75c4d42415aea4e9697395fadb /io.h | |
parent | 0ea286dc681fe3690fc4bb8007144190e03b8d51 (diff) | |
download | qemu-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.h | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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 |