Date: Wed, 11 Feb 2009 00:21:45 +0100 (CET) From: Juergen Lock <nox@jelal.kn-bremen.de> To: bms@incunabulum.net Cc: freebsd-current@freebsd.org Subject: Re: uart(4) not working in QEMU Message-ID: <200902102321.n1ANLjG2014508@saturn.kn-bremen.de> In-Reply-To: <49910C3D.90709@incunabulum.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <49910C3D.90709@incunabulum.net> you write: >Hi, > >I have been trying to test my kernel code in QEMU as it saves a lot of >time and effort. >However, I have noticed since returning to my current project, that >sio(4) was deprecated in favour of uart(4). > >Whilst I updated my kernel configs to reflect this, I've noticed a lot >of problems with I/O and QEMU -- in particular, the kernel will log >messages over uart(4) just fine, but when the kernel runs init, I can't >get any I/O out of the uart(4) at all, apart from a single 'c' or 'F' >character. > >The kernel continues to log messages OK to the uart0/ttyu0 device >regardless of what's going on in userland. > >If I configure ttyv0 in the QEMU virtual machine up via /etc/ttys to run >a getty there, I can get in, and see that the getty for ttyu0 is >running. However, echo'ing or cat'ing data to /dev/ttyu0 won't work, >even if I kill the getty process first. I just don't see anything >appearing in my QEMU serial console. > >I've tried a lot of combinations of 3wire.115200 vs std.9600, >boot.config options, loader.conf options, none of which have solved the >problem (mostly working from the threads on this list from when the >changes were made). > >I have also tried other bindings for the QEMU serial device -- e.g. tcp >ports, nmdm(4), and always see the same effects. I do have INVARIANTS >enabled -- could this be an issue? I dunno if INVARIANTS changes the behaviour of the uart driver (my guess is it doesn't), but I see there have been commits to qemu's hw/serial.c since the versions in ports so you could try a more recent svn snapshot like the one posted here: http://lists.freebsd.org/pipermail/freebsd-emulation/2009-February/005650.html If that doesn't help and you feel like debugging this maybe uncommenting the DEBUG_SERIAL #define in hw/serial.c helps... Good luck, Juergen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902102321.n1ANLjG2014508>