[SLOF] [PATCH 1/3] virtio-serial: Don't override some words

Greg Kurz groug at kaod.org
Tue Mar 10 09:43:06 AEDT 2020

term-io.fs already overrides "emit", "key" and "key?" with its own version:

- "term-io-emit" calls the "write" method of the "stdout" instance, which
  then calls "virtio-serial-putchar"

- "term-io-key" calls the "read" method of the "stdout" instance, which then
  calls "virtio-serial-getchar"

- "term-io-key?" calls "serial-key?" if the device is a serial device, which
   is the case here and we already override "serial-key?" with

It thus looks weird to rely on these shortcuts. Especially, when IOMMU is
enabled, we need a valid instance in "dmap-map-in" and going through
"term-io-emit" buys us that.

Signed-off-by: Greg Kurz <groug at kaod.org>
 board-qemu/slof/virtio-serial.fs |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/board-qemu/slof/virtio-serial.fs b/board-qemu/slof/virtio-serial.fs
index 42ab3e2ccc9c..a99293f6ef77 100644
--- a/board-qemu/slof/virtio-serial.fs
+++ b/board-qemu/slof/virtio-serial.fs
@@ -39,9 +39,6 @@ virtio-setup-vd VALUE virtiodev
 : init  ( -- )
 virtiodev virtio-serial-init drop
     TRUE to initialized?
-    ['] virtio-serial-term-emit to emit
-    ['] virtio-serial-term-key  to key
-    ['] virtio-serial-term-key? to key?
     ['] shutdown add-quiesce-xt

More information about the SLOF mailing list