diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2011-11-29 11:49:46 +1100 |
---|---|---|
committer | Thomas Huth <thuth@linux.vnet.ibm.com> | 2011-12-20 17:56:48 +0100 |
commit | f7504aec1b10c7baef1092d6ba8d3f0a8c035827 (patch) | |
tree | da07426ab674a9b978559be1fab890453283af9a /lib/libhvcall/hvcall.code | |
parent | 33bb95bab24d2dca03ee9e641d0e98d9fbd86fdd (diff) | |
download | SLOF-f7504aec1b10c7baef1092d6ba8d3f0a8c035827.zip SLOF-f7504aec1b10c7baef1092d6ba8d3f0a8c035827.tar.gz SLOF-f7504aec1b10c7baef1092d6ba8d3f0a8c035827.tar.bz2 |
hvterm: Update hvterm routines to take the termno as an argument
Currently the hvterm routines always use termno=0. This works because
QEMU has code that recognies termno=0 and chooses a "default" vty.
It would be more correct if the hvterm routines took the termno as an
argument. That way if we open a vty other than the default the output
will correctly go to that vty.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Diffstat (limited to 'lib/libhvcall/hvcall.code')
-rw-r--r-- | lib/libhvcall/hvcall.code | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/libhvcall/hvcall.code b/lib/libhvcall/hvcall.code index 2fb9b3a..e07a2ef 100644 --- a/lib/libhvcall/hvcall.code +++ b/lib/libhvcall/hvcall.code @@ -14,22 +14,21 @@ #include <virtio.h> #include <virtio-blk.h> -// : hv-putchar ( char -- ) +// : hv-putchar ( hvtermno char -- ) PRIM(hv_X2d_putchar) char c = TOS.n; POP; - hv_putchar(c); + int hvtermno = TOS.n; POP; + hv_putchar(c, hvtermno); MIRP -// : hv-getchar ( -- char ) +// : hv-getchar ( hvtermno -- char ) PRIM(hv_X2d_getchar) - PUSH; - TOS.n = hv_getchar(); + TOS.n = hv_getchar(TOS.n); MIRP -// : hv-haschar ( -- res ) +// : hv-haschar ( hvtermno -- res ) PRIM(hv_X2d_haschar) - PUSH; - TOS.n = hv_haschar(); + TOS.n = hv_haschar(TOS.n); MIRP // : hv-reg-crq ( unit qaddr qsize -- res ) |