summaryrefslogtreecommitdiff
path: root/dev/console.hh
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2003-12-22 17:51:14 -0500
committerNathan Binkert <binkertn@umich.edu>2003-12-22 17:51:14 -0500
commit318e0c93edd23aec24cfc16a1bf5e4119253b5f7 (patch)
tree0a3de3e6107b04dd437bb6892204e6d8ebff2a46 /dev/console.hh
parentc3ba166e65b0f2c0ac4a92fedddd86d071e21640 (diff)
downloadgem5-318e0c93edd23aec24cfc16a1bf5e4119253b5f7.tar.xz
add support for simple character input via the system console
dev/alpha_access.h: - use our standard types instead of this extra typedef - advance the ALPHA_ACCESS version since the interface has changed. *this means you need a new console binary* - shuffle a couple things around to pack the data structure a bit better - add a placeholder for character input dev/alpha_console.cc: Clean up the read code path a bit and add support for character input via the console Clean up the write path and use a switch instead of a bunch of if statements --HG-- extra : convert_revision : a1a5bc8fed9ec9c4c46548fdf79604661668b81a
Diffstat (limited to 'dev/console.hh')
-rw-r--r--dev/console.hh12
1 files changed, 10 insertions, 2 deletions
diff --git a/dev/console.hh b/dev/console.hh
index f443afe4f..9913fe379 100644
--- a/dev/console.hh
+++ b/dev/console.hh
@@ -109,9 +109,17 @@ class SimConsole : public SimObject
// OS interface
// Get a character from the console.
- // return of -1 means there is no character pending.
+ // the return value corresponds to the console GETC return value:
+ // retval<63:61>
+ // 000: success: character received
+ // 001: success: character received, more pending
+ // 100: failure: no character ready
+ // 110: failure: character received with error
+ // 111: failure: character received with error, more pending
+ // retval<31:0>
+ // character read from console
// Interrupts are cleared when the buffer is empty.
- int in();
+ uint64_t in();
// Send a character to the console
void out(char c, bool raise_int = true);