[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Xen ARM - Exposing a PL011 to the guest
On Fri, Feb 3, 2017 at 2:53 PM, Bhupinder Thakur <bhupinder.thakur@xxxxxxxxxx> wrote: > Hi, > >>> Hi, >>> >>> I have done the changes for emulating pl011 in Xen. Currently, I have >>> verified the emulation code by manually reading/writing data to >>> /dev/ttyAMA0 which is the device file for pl011 device. The data is >>> flowing fine between xenconsoled and the guest domain. >>> >>> As a next step, I wanted to use /dev/ttyAMA0 as a console. >>> >>> For that I tried adding console=ttyAMA0 instead of console=hvc0 in the >>> "extra" directive in the domU configuration file. However, I do not >>> see the output on the console once I attached the console using "xl >>> console <domain_name>". I tried using "xl console -t serial >>> <domain_name>" also but that shows the tty1 console and not the >>> ttyAMA0 one. >> >> I would try to verify that when Linux uses the pl011 as a console (as >> opposed to just writing some characters into /dev/ttyAMA0), that it >> doesn't error out somewhere. So like Stefano suggests, make sure you >> check the guest kernel log after boot (assuming you can SSH or something >> into the box) and look at 'dmesg' to see if the pl011 driver failed. >> >> You could also try adding some log info in you Xen pl011 emulation code >> to see if the guest kernel driver prods the device in the sequence you >> expect, based on looking at the linux driver for the pl011. > > I tested with the following changes: > > 1. Compiled out CONFIG_HVC_XEN > 2. Specified "console=ttyAMA0" in the guest configuration > > With some more changes/fixes, the guest console is working partially > over ttyAMA0. I can see the guest boot prints on the console. However, > the prints stop just towards the end when the init scripts are > executed. > > So it seems that during boot, initially ttyAMA0 is used as a > write-only port, where the console driver keeps writing the output to > the port. Till this point, only tx has been enabled on ttyAMA0 (driver > probe() is called at this point). No irq/rx has been enabled yet. Just > as the init scripts are executed, the irq/rx is also enabled on > ttyAMA0 (driver startup() is called at this time which enables rx and > registers IRQ) and then the boot prints stop. > > Another observation is that unless you compile out HVC_XEN support, > the hvc0 console also keeps receiving the data even if the > console=ttyAMA0. > What's your guest distro and file system settings? This sounds to me like the console bringup job is hard-wired to /dev/hvc0 as opposed to using the console. I think most ubuntu versions prior to using systemd needs the right files in /etc/init. Check if you have /etc/init/hvc.conf or something like that and if you have /etc/init/ttyAMA0.conf. If you're using systemd or a different distro, figure out what the equivalent settings there are. -Christoffer _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |