[SLOF] [PATCH RFC v0 3/3] Add virtio-serial device support
Nikunj A Dadhania
nikunj at linux.vnet.ibm.com
Mon Oct 10 21:11:40 AEDT 2016
Alexey Kardashevskiy <aik at ozlabs.ru> writes:
> On 10/10/16 19:27, Nikunj A Dadhania wrote:
>> Alexey Kardashevskiy <aik at ozlabs.ru> writes:
>>
>>> On 10/10/16 03:09, Nikunj A Dadhania wrote:
>>>> Add support for virtio serial device to be used as a console device.
>>>> Currently, SLOF only supports spapr-vty device. With this addition
>>>> virtio console can be used during boot.
>>>
>>>
>>> Cool, good job, works fine!
>>
>> Thanks for testing. Did you see kernel logs as well, as I could get
>> login prompt, but not messages from kernel after quiesce
>
> Same here, I do not remember why is this though, I remember hacking the
> guest kernel to see the full log... Still, cool.
>
>>
>>>>
>>>> Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
>>>> ---
>>>> board-qemu/slof/Makefile | 3 +
>>>> board-qemu/slof/OF.fs | 24 +++-
>>>> board-qemu/slof/pci-device_1af4_1003.fs | 25 ++++
>>>> board-qemu/slof/pci-device_1af4_1043.fs | 15 +++
>>>> board-qemu/slof/virtio-serial.fs | 95 +++++++++++++++
>>>> lib/libvirtio/Makefile | 2 +-
>>>> lib/libvirtio/virtio-serial.c | 202 ++++++++++++++++++++++++++++++++
>>>> lib/libvirtio/virtio-serial.h | 28 +++++
>>>> lib/libvirtio/virtio.code | 33 ++++++
>>>> lib/libvirtio/virtio.in | 6 +
>>>> 10 files changed, 426 insertions(+), 7 deletions(-)
>>>> create mode 100644 board-qemu/slof/pci-device_1af4_1003.fs
>>>> create mode 100644 board-qemu/slof/pci-device_1af4_1043.fs
>>>> create mode 100644 board-qemu/slof/virtio-serial.fs
>>>> create mode 100644 lib/libvirtio/virtio-serial.c
>>>> create mode 100644 lib/libvirtio/virtio-serial.h
>>>>
>>>> diff --git a/board-qemu/slof/Makefile b/board-qemu/slof/Makefile
>>>> index 940a15a..cf57f16 100644
>>>> --- a/board-qemu/slof/Makefile
>>>> +++ b/board-qemu/slof/Makefile
>>>> @@ -69,6 +69,8 @@ VIO_FFS_FILES = \
>>>> $(SLOFBRDDIR)/pci-device_1af4_1041.fs \
>>>> $(SLOFBRDDIR)/pci-device_1af4_1001.fs \
>>>> $(SLOFBRDDIR)/pci-device_1af4_1042.fs \
>>>> + $(SLOFBRDDIR)/pci-device_1af4_1003.fs \
>>>> + $(SLOFBRDDIR)/pci-device_1af4_1043.fs \
>>>> $(SLOFBRDDIR)/pci-device_1af4_1004.fs \
>>>> $(SLOFBRDDIR)/pci-device_1af4_1048.fs \
>>>> $(SLOFBRDDIR)/pci-device_1af4_1009.fs \
>>>> @@ -79,6 +81,7 @@ VIO_FFS_FILES = \
>>>> $(SLOFBRDDIR)/vio-veth.fs \
>>>> $(SLOFBRDDIR)/rtas-nvram.fs \
>>>> $(SLOFBRDDIR)/virtio-net.fs \
>>>> + $(SLOFBRDDIR)/virtio-serial.fs \
>>>> $(SLOFBRDDIR)/virtio-block.fs \
>>>> $(SLOFBRDDIR)/virtio-fs.fs \
>>>> $(SLOFBRDDIR)/dev-null.fs \
>>>> diff --git a/board-qemu/slof/OF.fs b/board-qemu/slof/OF.fs
>>>> index c8df9ca..6b13e03 100644
>>>> --- a/board-qemu/slof/OF.fs
>>>> +++ b/board-qemu/slof/OF.fs
>>>> @@ -162,6 +162,10 @@ CREATE version-str 10 ALLOT
>>>> : dump-display-write
>>>> s" screen" find-alias IF
>>>> drop terminal-write drop
>>>> + ELSE
>>>> + s" vsterm" find-alias IF
>>>> + drop type
>>>> + THEN
>>>
>>>
>>> Why new alias, not usual "screen"? "screen" and "vsterm" cannot work
>>> simultaneously any way.
>>
>> "screen" is for vga display, so did not want to override, and is used in
>> different context.
>
> When is the context different?
First problem is there in set-default-console:
" screen" find-alias dup IF nip THEN
" keyboard" find-alias dup IF nip THEN
AND IF
." using screen & keyboard" cr
" screen" output
" keyboard" input
If " screen" is there, it looks for " keyboard" i.e. usb-keyboard.
Only if " screen" is not set, we start looking for hvterm and now with
this vsterm
Regards
Nikunj
More information about the SLOF
mailing list