From: Christoffer Dall <cdall@linaro.org>
To: Bhupinder Thakur <bhupinder.thakur@linaro.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
Steve Capper <Steve.Capper@arm.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Xen Devel <xen-devel@lists.xen.org>,
Julien Grall <julien.grall@arm.com>,
Jan Beulich <JBeulich@suse.com>
Subject: Re: Xen ARM - Exposing a PL011 to the guest
Date: Fri, 3 Feb 2017 15:15:00 +0100 [thread overview]
Message-ID: <CAMJs5B-4mn6vwnu2gcb+k22_oDw0SL_g+cWp0c+srDHfMHn91g@mail.gmail.com> (raw)
In-Reply-To: <CACtJ1JQYYgAzseCKyeHdEHmYvq2iQhFBHsg3Q81gaPtw24uMEg@mail.gmail.com>
On Fri, Feb 3, 2017 at 2:53 PM, Bhupinder Thakur
<bhupinder.thakur@linaro.org> 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@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-02-03 14:15 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 15:29 Xen ARM - Exposing a PL011 to the guest Julien Grall
2016-11-30 16:24 ` Christoffer Dall
2016-12-01 15:51 ` Julien Grall
2016-11-30 17:02 ` Volodymyr Babchuk
2016-11-30 22:26 ` Stefano Stabellini
2016-12-01 10:26 ` Christoffer Dall
2016-12-01 21:55 ` Stefano Stabellini
2016-12-16 10:06 ` Bhupinder Thakur
2016-12-16 17:03 ` Julien Grall
2016-12-19 12:20 ` Christoffer Dall
2016-12-19 20:24 ` Stefano Stabellini
2016-12-20 9:46 ` Bhupinder Thakur
2016-12-20 22:29 ` Stefano Stabellini
2016-12-20 12:32 ` Julien Grall
2016-12-20 19:53 ` Stefano Stabellini
2016-12-20 20:26 ` Stefano Stabellini
2016-12-21 19:19 ` Julien Grall
2016-12-21 22:12 ` Stefano Stabellini
2016-12-28 17:49 ` Julien Grall
2016-12-28 17:52 ` Julien Grall
2016-12-29 9:17 ` Bhupinder Thakur
2017-01-03 20:08 ` Stefano Stabellini
2017-01-06 10:18 ` Bhupinder Thakur
2017-01-06 21:54 ` Stefano Stabellini
2017-01-10 11:39 ` Bhupinder Thakur
2017-01-11 0:22 ` Stefano Stabellini
2017-01-17 14:01 ` Julien Grall
2017-01-17 13:31 ` Julien Grall
2017-01-17 19:27 ` Stefano Stabellini
2017-01-27 12:14 ` Bhupinder Thakur
2017-01-27 19:13 ` Stefano Stabellini
2017-01-29 11:06 ` Christoffer Dall
2017-02-03 13:53 ` Bhupinder Thakur
2017-02-03 14:08 ` Julien Grall
2017-02-08 12:39 ` Bhupinder Thakur
2017-02-09 0:10 ` Stefano Stabellini
2017-02-13 8:50 ` Bhupinder Thakur
2017-02-13 21:44 ` Stefano Stabellini
2017-02-15 8:15 ` Bhupinder Thakur
2017-02-15 8:24 ` Bhupinder Thakur
2017-02-15 21:21 ` Stefano Stabellini
2017-02-23 13:15 ` Bhupinder Thakur
2017-02-23 15:00 ` Wei Liu
2017-02-03 14:15 ` Christoffer Dall [this message]
2017-01-03 19:38 ` Stefano Stabellini
2016-12-20 12:47 ` Christoffer Dall
2016-12-20 21:33 ` Stefano Stabellini
2016-12-21 11:55 ` Christoffer Dall
2016-12-21 20:32 ` Julien Grall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMJs5B-4mn6vwnu2gcb+k22_oDw0SL_g+cWp0c+srDHfMHn91g@mail.gmail.com \
--to=cdall@linaro.org \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=Steve.Capper@arm.com \
--cc=andrew.cooper3@citrix.com \
--cc=bhupinder.thakur@linaro.org \
--cc=george.dunlap@eu.citrix.com \
--cc=julien.grall@arm.com \
--cc=sstabellini@kernel.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).