-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
virtio/serial: initial CONSOLE support #12760
Conversation
23b6632
to
6fde32a
Compare
@yf13 please include Documentation/ |
@acassis, it seems that I've found the way to use virtio-serial as normal console now, so it is no longer output only. I still need time to clean up the conf and then update the |
@yf13 are you using busy await reading (like the LWL console) ? We need to find a way to avoid it, because it eats too much processing time. |
@yf13 suggestion: instead nsh_aux why don't you use virt_nsh ? |
@acassis config renamed to But it seems imx9-sdimage.img has been leaked from |
@anchao, thanks for your comments! I am wondering that serial devices like |
@yf13 Your changes are correct, I missed that the tty device is also registered in this driver, please ignore my comments |
5924193
to
6dbe79a
Compare
@anchao, thanks for all the in-line comments! I've updated them, |
This adds DRIVERS_VIRTIO_SERIAL_CONSOLE config and related logic to virtio serial so that it can be used as console device. Note that due to its dependency on OS services, this console is available late so it is not proper for debugging too early booting issues. Signed-off-by: Yanfeng Liu <[email protected]>
This guards the uses for u16550 serial initialization, just in case that no u16550 is configured. Signed-off-by: Yanfeng Liu <[email protected]>
This allows virtio devices to be probed upon board_early_init, thus making virito-serial ready earlier for console use. Signed-off-by: Yanfeng Liu <[email protected]>
#ifdef CONFIG_DRIVERS_VIRTIO_SERIAL_CONSOLE | ||
if (g_virtio_console == NULL) | ||
{ | ||
DEBUGVERIFY(uart_register("/dev/console", &priv->udev)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better to drop this change and utilize this general approach: #12764
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's reuse #12764
You are 100% right! "Release early, release often!" I think we need to respect individual contributor and respect the order the PRs are created. This one here has priority, please apply this here and ask your developer to adapt his PR later |
@yf13 please take a look:
|
##[debug]Dropping file value '/home/runner/work/nuttx/nuttx/fpu.c'. Path does not exist |
This adds `rv-virt:virt_nsh` config w/ docs for using virtio serial as NuttX console. Signed-off-by: Yanfeng Liu <[email protected]>
Summary
This adds initial support to allow virtio serial device being used as console on QEMU
rv-virt
device. It includes the following changes:VIRTIO_SERIAL_CONSOLE
Kconfig and support.HAVE_16550_CONSOLE
.Impacts
None
Testing
rv-virt