[SLOF] [PATCH v7 0/2] Fix output word
lvivier at redhat.com
Thu May 17 23:16:02 AEST 2018
This patch fixes the output word, and allow to select the console.
It updates input word in the same way.
For the moment it works well while we don't mix serial port console
with VGA console or virtio-console (there is a special case for VGA
console that overwrite without condition the emit word, see
9b89b28 "Add support for qemu standard VGA". Im' working on this).
You can test it with:
qemu-system-ppc64 -nodefaults -nographic \
-chardev socket,id=serial_id_serial0,host=localhost,port=4441,telnet,server,wait \
-device spapr-vty,chardev=serial_id_serial0 \
-chardev socket,id=serial_id_serial1,host=localhost,port=4442,telnet,server,wait \
-device spapr-vty,chardev=serial_id_serial1 \
Connect on the two ports with "telnet localhost 4441" and "telnet 4442".
Once it is done you will see on the first console the SLOF logs.
Then, in the first console:
" /vdevice/vty at 71000002" input
Now what you write on second console is written on the first one.
To send the characters to the second one, we should use:
" /vdevice/vty at 71000002" output
but it doesn't work and this patch fixes that.
A shortcut for these two commands is:
" /vdevice/vty at 71000002" io
- replace "[ ' key behavior compile, ]" and
"[ ' emit behavior compile, ]" by serial-key
- don't change indentation for readability
- don't change error case handling,
let "[ ' key behavior compile, ]"
and use "[ ' emit behavior compile, ]" as
I don't know how to manage this correctly.
It could be fixed by a future patch.
- close previous ihandle in set-stdin and set-stdout
- use variables to store stdin and stdout ihandle (rename them)
- introduce set-stdin and set-stdout
- update error message
- code cleanup and re-order
- store ihandle and xt handle for input too
- resolve ihandle and xt handle in the output command to
speed up emit function
milliseconds 2000 0 do 41 emit loop milliseconds swap - cr .d cr
Laurent Vivier (2):
Fix output word
resolve ihandle and xt handle in the input command (like for the
slof/fs/term-io.fs | 76 +++++++++++++++++++++++++++++++++++++++---------------
1 file changed, 55 insertions(+), 21 deletions(-)
More information about the SLOF