diff options
author | Richard Henderson <rth@twiddle.net> | 2011-05-05 13:06:24 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2011-05-05 13:12:49 -0700 |
commit | 369d1d9a68527fe2659f4a21dc4c0aa52533dbc3 (patch) | |
tree | e348726a048cecbb036ba7b9a80cd1bf7bfcff21 /uart.c | |
parent | 9e75c89f005e07e059c80317904fefaffe6fde7f (diff) | |
download | qemu-palcode-369d1d9a68527fe2659f4a21dc4c0aa52533dbc3.tar.gz |
Beginnings of the SRM console prompt.
Diffstat (limited to 'uart.c')
-rw-r--r-- | uart.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -46,8 +46,17 @@ uart_charav(int offset) int uart_getchar(int offset) { - while (!uart_charav(offset)) - continue; + /* If interrupts are enabled, use wtint assuming that either the + device itself will wake us, or that a clock interrupt will. */ + if ((rdps() & 7) == 0) { + while (!uart_charav(offset)) { + wtint(0); + } + } else { + while (!uart_charav(offset)) + continue; + } + return inb(com2Rbr + offset); } |