From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC 6/6] xen/arm: Replace early_printk call to printk call Date: Thu, 20 Feb 2014 11:37:29 +0000 Message-ID: <5305E8F9.1020704@linaro.org> References: <1388957191-10337-1-git-send-email-julien.grall@linaro.org> <1388957191-10337-7-git-send-email-julien.grall@linaro.org> <1392808847.23084.138.camel@kazak.uk.xensource.com> <5304F058.6090503@linaro.org> <1392887074.22494.7.camel@kazak.uk.xensource.com> <5305E090.4030602@linaro.org> <1392894351.23342.22.camel@kazak.uk.xensource.com> <5305E388.2030609@linaro.org> <1392895205.23342.28.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WGRwb-0001yQ-CW for xen-devel@lists.xenproject.org; Thu, 20 Feb 2014 11:37:33 +0000 Received: by mail-wg0-f42.google.com with SMTP id k14so478308wgh.5 for ; Thu, 20 Feb 2014 03:37:31 -0800 (PST) In-Reply-To: <1392895205.23342.28.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xenproject.org, stefano.stabellini@eu.citrix.com, tim@xen.org, patches@linaro.org List-Id: xen-devel@lists.xenproject.org On 20/02/14 11:20, Ian Campbell wrote: > On Thu, 2014-02-20 at 11:14 +0000, Julien Grall wrote: >> >> On 20/02/14 11:05, Ian Campbell wrote: >>> On Thu, 2014-02-20 at 11:01 +0000, Julien Grall wrote: >>>> >>>> On 20/02/14 09:04, Ian Campbell wrote: >>>>> I was actually thinking more along the lines of a .word at a defined >>>>> offset which you could hex edit to a specific value to activate a >>>>> particular flavour of early printk handling. That would be sufficient >>>>> e.g. for osstest to activate the appropriate stuff for the specific >>>>> platform. >>>> >>>> I don't see useful use case to have a such early printk implementation >>>> in Xen. When the board is fully supported, failed at early stage (e.g >>>> before console is initialized) is very unlikely. At least if you don't >>>> play with memory. >>> >>> a) there are boards which aren't fully supported, getting some debug out >>> of a distro package might be useful >> >> Few months ago we have decided to allow early printk only when Xen is >> compiled with debug enabled. It seems a big mistake to ship distro with >> debug enabled :). > > This was because earlyprintk only supports a static single configuration > at compile time. If that restriction was lifted then there would be no > reason to limit earlyprintk to debug builds. > >>> b) even for boards which are fully supported there may still be bugs >>> which only appear under particular circumstances. >> >> I understand this use case. If I understand your previous mail the >> solution would me "Hex editing manually the Xen binary to set the early >> printk", right? If so, you are assuming that the distro (or anything >> else) is proving the zImage. Otherwise the developper has to: >> - unpack from the uImage >> - editing the zImage >> - recreate the uImage > > No distro would ship the actual uImage, it's too machine specific. > > I would expect this to be used by running: > xen-enable-early-printk /boot/xen midway > > where xen-enable-early-printk is a simple tool we provide. And a similar one to disable, I guess. > > Then if a uIamge is then required then this would be generated by > whatever distro tooling would have generated it in the non-early-printk > case, by rerunning that tool. Sounds good. Do you plan to work on it? It would be nice to have this item on the ARM todo page. -- Julien Grall