From mboxrd@z Thu Jan 1 00:00:00 1970 From: bharat gohil Subject: Re: ARM:Booting xen on pine64 board Date: Wed, 5 Apr 2017 16:04:41 +0530 Message-ID: References: <8e29c986-07f9-daec-539c-5694d7b68c61@arm.com> <8cac58f0-74cd-574f-66ba-2764508f3b0a@arm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1498015799175952704==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cviGz-0004fC-6R for xen-devel@lists.xenproject.org; Wed, 05 Apr 2017 10:34:45 +0000 Received: by mail-lf0-f65.google.com with SMTP id n78so789500lfi.3 for ; Wed, 05 Apr 2017 03:34:43 -0700 (PDT) In-Reply-To: <8cac58f0-74cd-574f-66ba-2764508f3b0a@arm.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Julien Grall Cc: Andre Przywara , nd@arm.com, Stefano Stabellini , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org --===============1498015799175952704== Content-Type: multipart/alternative; boundary=001a113c3c6eb19c48054c68f04c --001a113c3c6eb19c48054c68f04c Content-Type: text/plain; charset=UTF-8 Thanks All I will try the patch suggested by Julien and update you. As of now I am running dom0(Linux 4.11-rc5) without early printk enabled in xen which is working absolutely fine. On Wed, Apr 5, 2017 at 2:32 AM, Julien Grall wrote: > Hi, > > On 04/04/2017 21:45, Stefano Stabellini wrote: > > On Tue, 4 Apr 2017, Andre Przywara wrote: > >> Hi, > >> > >> On 04/04/17 20:02, Stefano Stabellini wrote: > >>> Also CC'ing Andre that I think has a pine64. > >>> > >>> On Tue, 4 Apr 2017, Stefano Stabellini wrote: > >>>> On Sat, 1 Apr 2017, bharat gohil wrote: > >>>>> Hello > >>>> > >>>> Hello Bharat, thanks for your email. > >>>> > >>>> > >>>>> I am trying to boot xen(debug build) on pine64 ARM64 based board but > its hangs at following position, > >>>>> > >>>>> - UART enabled - > >>>>> - CPU 00000000 booting - > >>>>> - Current EL 00000008 - > >>>>> - Xen starting at EL2 - > >>>>> - Zero BSS - > >>>>> - Setting up control registers - > >>>>> - Turning on paging - > >>>>> - Ready - > >>>>> (XEN) Checking for initrd in /chosen > >>>>> (XEN) RAM: 0000000041000000 - 000000007fffffff > >>>>> (XEN) > >>>>> (XEN) MODULE[0]: 000000007e200000 - 000000007e202000 Device Tree > >>>>> (XEN) MODULE[1]: 000000007e400000 - 000000007ef46a00 Kernel > console=hvc0 ro root=/dev/mmcblk0p2 clk_ignore_unused rootwait > >>>>> (XEN) RESVD[0]: 000000007e200000 - 000000007e202000 > >>>>> (XEN) > >>>>> (XEN) Command line: dtuart=serial0 earlyprint loglvl=all conswitch=x > dom0_mem=128M > >>>>> (XEN) Placing Xen at 0x000000007fc00000-0x000000007fe00000 > >>>>> (XEN) Update BOOTMOD_XEN from 000000007fe00000-000000007fefad81 => > 000000007fc00000-000000007fcfad81 > >>>>> (XEN) Booting using Device Tree > >>>>> (XEN) Domain heap initialised > >>>>> (XEN) Platform: Generic System > >>>>> (XEN) Looking for dtuart at "serial0", options "" > >>>>> Xen 4.9-unstable > >>>>> (XEN) Xen version 4.9-unstable (bgohil@) (aarch64-linux-gnu-gcc > (Linaro GCC 6.2-2016.11) 6.2.1 20161016) debug=n Tue Mar 28 16:12:32 IST > 2017 > >>>>> (XEN) Latest ChangeSet: Fri Mar 24 14:19:47 2017 +0100 git:5b08f85 > >>>>> (XEN) Processor: 410fd034: "ARM Limited", variant: 0x0, part 0xd03, > rev 0x4 > >>>>> (XEN) 64-bit Execution: > >>>>> (XEN) Processor Features: 0000000000002222 0000000000000000 > >>>>> (XEN) Exception Levels: EL3:64+32 EL2:64+32 EL1:64+32 EL0:64+32 > >>>>> (XEN) Extensions: FloatingPoint AdvancedSIMD > >>>>> (XEN) Debug Features: 0000000010305106 0000000000000000 > >>>>> (XEN) Auxiliary Features: 0000000000000000 0000000000000000 > >>>>> (XEN) Memory Model Features: 0000000000001122 0000000000000000 > >>>>> (XEN) ISA Features: 0000000000011120 0000000000000000 > >>>>> (XEN) 32-bit Execution: > >>>>> (XEN) Processor Features: 00000131:00011011 > >>>>> (XEN) Instruction Sets: AArch32 A32 Thumb Thumb-2 Jazelle > >>>>> (XEN) Extensions: GenericTimer Security > >>>>> (XEN) Debug Features: 03010066 > >>>>> (XEN) Auxiliary Features: 00000000 > >>>>> (XEN) Memory Model Features: 10201105 40000000 01260000 02102211 > >>>>> (XEN) ISA Features: 02101110 13112111 21232042 01112131 00011142 > 00011121 > >>>>> (XEN) Using PSCI-0.2 for SMP bringup > >>>>> (XEN) SMP: Allowing 4 CPUs > >>>>> (XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 24000 KHz > >>>>> (XEN) GICv2 initialization: > >>>>> (XEN) gic_dist_addr=0000000001c81000 > >>>>> (XEN) gic_cpu_addr=0000000001c82000 > >>>>> (XEN) gic_hyp_addr=0000000001c84000 > >>>>> (XEN) gic_vcpu_addr=0000000001c86000 > >>>>> (XEN) gic_maintenance_irq=25 > >>>>> (XEN) GICv2: 224 lines, 4 cpus, secure (IID 0200143b). > >>>>> (XEN) Using scheduler: SMP Credit Scheduler (credit) > >>>>> > >>>>> but when I boot dtuart= say duart=xyz instead of > dtuart=serial0, xen booted successfully but Dom0 crash while probing > 'serial0' driver. > >>>>> > >>>>> If I remove 'serial0' node from device tree, Dom0 boot successfully > but unable to enter input into 'hvc' console. > >>>>> > >>>>> what could be wrong here or missing something? > >>>> > >>>> What is your dom0 command line? Are you passing console=hvc0? > >>>> > >>>> It looks like pine64 is using an allwinner sun50i-uart, for which we > >>>> don't have a proper driver in Xen yet. That is probably the reason why > >>>> you can see some output from Xen, but you cannot type anything in > later > >>>> in Dom0 (which is sent to Xen via the HVC console). Please send a > patch > >>>> to add a simple sun50i-uart driver (see xen/drivers/char/). Given that > >>>> both Xen and Linux are GPLv2, you can import code from Linux if you > find > >>>> it appropriate. > >> > >> The UART is exactly the same as in the other Allwinner SoCs, so there is > >> no need for a new UART driver. > >> Another issue inherited from the 32-bit Allwinner chips is that the > >> first four UARTs share a page, so they have to be blacklisted, as Xen > >> can't properly separate them. > >> You might want to look at xen/arch/arm/platforms/sunxi.c. Not sure if > >> this needs to be tied in arm64 somehow. > > > > No, it doesn't, it should work on arm64 out of the box. But the platform > > compatible string is different: "sun7i-a20" in sunxi.c and "sun50iw1p1" > > on the pine64 dts. If the board is exactly the same, then we only need > > to add "sun50iw1p1" to sunxi_dt_compat. > > > > What do you do to boot it with Xen? > > I played with the Pine64 and Xen last year. There are some work to do in > order to get Xen booting on the board. It is not fully complete as I lacked > of time. For instance the clock frequency has been hardcoded in the ns16550 > driver (the UART for pine64 is a derivation of ns16550)... > > Below the changes I had to made to get DOM0 booting. IIRC I was struggling > to get the input working. The UART is the same as the cubietruck, but > somehow it behaves differently (not sure why) and therefore there is some > missing pieces in the driver. > > I hope this helps. > > Cheers, > > diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S > index 5c28c20..af4db28 100644 > --- a/xen/arch/arm/arm64/head.S > +++ b/xen/arch/arm/arm64/head.S > @@ -115,7 +115,7 @@ efi_head: > add x13, x18, #0x16 > b real_start /* branch to kernel start */ > .quad 0x80000 /* Image load offset from start of > RAM */ > - .quad 0 /* reserved */ > + .quad _end - start /* reserved */ > .quad 0 /* reserved */ > .quad 0 /* reserved */ > .quad 0 /* reserved */ > diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/ > Makefile > index 3689eec..99d6ab1 100644 > --- a/xen/arch/arm/platforms/Makefile > +++ b/xen/arch/arm/platforms/Makefile > @@ -3,7 +3,7 @@ obj-$(CONFIG_ARM_32) += brcm.o > obj-$(CONFIG_ARM_32) += exynos5.o > obj-$(CONFIG_ARM_32) += midway.o > obj-$(CONFIG_ARM_32) += omap5.o > -obj-$(CONFIG_ARM_32) += sunxi.o > +obj-y += sunxi.o > obj-$(CONFIG_ARM_32) += rcar2.o > obj-$(CONFIG_ARM_64) += seattle.o > obj-$(CONFIG_ARM_64) += xgene-storm.o > diff --git a/xen/arch/arm/platforms/sunxi.c b/xen/arch/arm/platforms/ > sunxi.c > index 0ba7b3d..cee31c7 100644 > --- a/xen/arch/arm/platforms/sunxi.c > +++ b/xen/arch/arm/platforms/sunxi.c > @@ -52,6 +52,7 @@ static void sunxi_reset(void) > static const char * const sunxi_dt_compat[] __initconst = > { > "allwinner,sun7i-a20", > + "allwinner,sun50i-a64", > NULL > }; > > diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c > index b2b5f56..9933c7e 100644 > --- a/xen/drivers/char/ns16550.c > +++ b/xen/drivers/char/ns16550.c > @@ -461,6 +461,8 @@ static int ns16550_ioport_invalid(struct ns16550 *uart) > return ns_read_reg(uart, UART_IER) == 0xff; > } > > +#include > + > static void ns16550_interrupt( > int irq, void *dev_id, struct cpu_user_regs *regs) > { > @@ -476,7 +478,17 @@ static void ns16550_interrupt( > if ( (lsr & uart->lsr_mask) == uart->lsr_mask ) > serial_tx_interrupt(port, regs); > if ( lsr & UART_LSR_DR ) > + { > + early_puts("Receive data\n"); > serial_rx_interrupt(port, regs); > + } > + } > + > + if ( uart->dw_usr_bsy && > + (ns_read_reg(uart, UART_IIR) & UART_IIR_BSY) == UART_IIR_BSY) > + { > + ns_read_reg(uart, UART_USR); > + return; > } > } > > @@ -1217,7 +1229,7 @@ static int __init ns16550_uart_dt_init(struct > dt_device_node *dev, > > ns16550_init_common(uart); > > - uart->baud = BAUD_AUTO; > + uart->baud = 115200; > uart->data_bits = 8; > uart->parity = UART_PARITY_NONE; > uart->stop_bits = 1; > > > > > -- > Julien Grall > -- Regards, Bharat Gohil Sr.Software Engineer bharat.gohil@harman.com +919427054633 --001a113c3c6eb19c48054c68f04c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks All

I will try the patc= h suggested by Julien and update you.

As of now I am running d= om0(Linux 4.11-rc5) without early printk enabled in xen which is working ab= solutely fine.


On Wed, Apr 5, 2017 at 2:32 AM, Julien Grall <julien.g= rall@arm.com> wrote:
Hi,

On 04/04/2017 21:45, Stefano Stabellini wrote:
> On Tue, 4 Apr 2017, Andre Przywara wrote:
>> Hi,
>>
>> On 04/04/17 20:02, Stefano Stabellini wrote:
>>> Also CC'ing Andre that I think has a pine64.
>>>
>>> On Tue, 4 Apr 2017, Stefano Stabellini wrote:
>>>> On Sat, 1 Apr 2017, bharat gohil wrote:
>>>>> Hello
>>>>
>>>> Hello Bharat, thanks for your email.
>>>>
>>>>
>>>>> I am trying to boot xen(debug build) on pine64 ARM64 b= ased board but its hangs at following position,
>>>>>
>>>>> - UART enabled -
>>>>> - CPU 00000000 booting -
>>>>> - Current EL 00000008 -
>>>>> - Xen starting at EL2 -
>>>>> - Zero BSS -
>>>>> - Setting up control registers -
>>>>> - Turning on paging -
>>>>> - Ready -
>>>>> (XEN) Checking for initrd in /chosen
>>>>> (XEN) RAM: 0000000041000000 - 000000007fffffff
>>>>> (XEN)
>>>>> (XEN) MODULE[0]: 000000007e200000 - 000000007e202000 D= evice Tree
>>>>> (XEN) MODULE[1]: 000000007e400000 - 000000007ef46a00 K= ernel=C2=A0 =C2=A0 =C2=A0 =C2=A0console=3Dhvc0 ro root=3D/dev/mmcblk0p2 clk= _ignore_unused rootwait
>>>>> (XEN)=C2=A0 RESVD[0]: 000000007e200000 - 000000007e202= 000
>>>>> (XEN)
>>>>> (XEN) Command line: dtuart=3Dserial0 earlyprint loglvl= =3Dall conswitch=3Dx dom0_mem=3D128M
>>>>> (XEN) Placing Xen at 0x000000007fc00000-0x0000000= 07fe00000
>>>>> (XEN) Update BOOTMOD_XEN from 000000007fe00000-00= 0000007fefad81 =3D> 000000007fc00000-000000007fcfad81
>>>>> (XEN) Booting using Device Tree
>>>>> (XEN) Domain heap initialised
>>>>> (XEN) Platform: Generic System
>>>>> (XEN) Looking for dtuart at "serial0", optio= ns ""
>>>>>=C2=A0 Xen 4.9-unstable
>>>>> (XEN) Xen version 4.9-unstable (bgohil@) (aarch64-linu= x-gnu-gcc (Linaro GCC 6.2-2016.11) 6.2.1 20161016) debug=3Dn=C2=A0 Tue Mar = 28 16:12:32 IST 2017
>>>>> (XEN) Latest ChangeSet: Fri Mar 24 14:19:47 2017 +0100= git:5b08f85
>>>>> (XEN) Processor: 410fd034: "ARM Limited", va= riant: 0x0, part 0xd03, rev 0x4
>>>>> (XEN) 64-bit Execution:
>>>>> (XEN)=C2=A0 =C2=A0Processor Features: 0000000000002222= 0000000000000000
>>>>> (XEN)=C2=A0 =C2=A0 =C2=A0Exception Levels: EL3:64+32 E= L2:64+32 EL1:64+32 EL0:64+32
>>>>> (XEN)=C2=A0 =C2=A0 =C2=A0Extensions: FloatingPoint Adv= ancedSIMD
>>>>> (XEN)=C2=A0 =C2=A0Debug Features: 0000000010305106 000= 0000000000000
>>>>> (XEN)=C2=A0 =C2=A0Auxiliary Features: 0000000000000000= 0000000000000000
>>>>> (XEN)=C2=A0 =C2=A0Memory Model Features: 0000000000001= 122 0000000000000000
>>>>> (XEN)=C2=A0 =C2=A0ISA Features:=C2=A0 0000000000011120= 0000000000000000
>>>>> (XEN) 32-bit Execution:
>>>>> (XEN)=C2=A0 =C2=A0Processor Features: 00000131:0001101= 1
>>>>> (XEN)=C2=A0 =C2=A0 =C2=A0Instruction Sets: AArch32 A32= Thumb Thumb-2 Jazelle
>>>>> (XEN)=C2=A0 =C2=A0 =C2=A0Extensions: GenericTimer Secu= rity
>>>>> (XEN)=C2=A0 =C2=A0Debug Features: 03010066
>>>>> (XEN)=C2=A0 =C2=A0Auxiliary Features: 00000000
>>>>> (XEN)=C2=A0 =C2=A0Memory Model Features: 10201105 4000= 0000 01260000 02102211
>>>>> (XEN)=C2=A0 ISA Features: 02101110 13112111 21232042 0= 1112131 00011142 00011121
>>>>> (XEN) Using PSCI-0.2 for SMP bringup
>>>>> (XEN) SMP: Allowing 4 CPUs
>>>>> (XEN) Generic Timer IRQ: phys=3D30 hyp=3D26 virt=3D27 = Freq: 24000 KHz
>>>>> (XEN) GICv2 initialization:
>>>>> (XEN)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gic_dist_addr= =3D0000000001c81000
>>>>> (XEN)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gic_cpu_addr=3D= 0000000001c82000
>>>>> (XEN)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gic_hyp_addr=3D= 0000000001c84000
>>>>> (XEN)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gic_vcpu_addr= =3D0000000001c86000
>>>>> (XEN)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gic_maintenance= _irq=3D25
>>>>> (XEN) GICv2: 224 lines, 4 cpus, secure (IID 0200143b).=
>>>>> (XEN) Using scheduler: SMP Credit Scheduler (credit) >>>>>
>>>>> but when I boot dtuart=3D<unknown value> say dua= rt=3Dxyz instead of dtuart=3Dserial0, xen booted successfully but Dom0 cras= h while probing 'serial0' driver.
>>>>>
>>>>> If I remove 'serial0' node from device tree, D= om0 boot successfully but unable to enter input into 'hvc' console.=
>>>>>
>>>>> what could be wrong here or missing something?
>>>>
>>>> What is your dom0 command line? Are you passing console=3D= hvc0?
>>>>
>>>> It looks like pine64 is using an allwinner sun50i-uart, fo= r which we
>>>> don't have a proper driver in Xen yet. That is probabl= y the reason why
>>>> you can see some output from Xen, but you cannot type anyt= hing in later
>>>> in Dom0 (which is sent to Xen via the HVC console).=C2=A0 = Please send a patch
>>>> to add a simple sun50i-uart driver (see xen/drivers/char/)= . Given that
>>>> both Xen and Linux are GPLv2, you can import code from Lin= ux if you find
>>>> it appropriate.
>>
>> The UART is exactly the same as in the other Allwinner SoCs, so th= ere is
>> no need for a new UART driver.
>> Another issue inherited from the 32-bit Allwinner chips is that th= e
>> first four UARTs share a page, so they have to be blacklisted, as = Xen
>> can't properly separate them.
>> You might want to look at xen/arch/arm/platforms/sunxi.c. Not= sure if
>> this needs to be tied in arm64 somehow.
>
> No, it doesn't, it should work on arm64 out of the box. But the pl= atform
> compatible string is different: "sun7i-a20" in sunxi.c and &= quot;sun50iw1p1"
> on the pine64 dts. If the board is exactly the same, then we only need=
> to add "sun50iw1p1" to sunxi_dt_compat.
>
> What do you do to boot it with Xen?

I played with the Pine64 and Xen last year. There are some work= to do in
order to get Xen booting on the board. It is not fully complete as I lacked=
of time. For instance the clock frequency has been hardcoded in the ns16550=
driver (the UART for pine64 is a derivation of ns16550)...

Below the changes I had to made to get DOM0 booting. IIRC I was struggling<= br> to get the input working. The UART is the same as the cubietruck, but
somehow it behaves differently (not sure why) and therefore there is some missing pieces in the driver.

I hope this helps.

Cheers,

diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index 5c28c20..af4db28 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -115,7 +115,7 @@ efi_head:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0add=C2=A0 =C2=A0 =C2=A0x13, x18, #0x16 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0b=C2=A0 =C2=A0 =C2=A0 =C2=A0real_start=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* branch to kernel start */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.quad=C2=A0 =C2=A00x80000=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Image load offset from start of RAM *= /
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 .quad=C2=A0 =C2=A00=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* reserved */
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 .quad=C2=A0 =C2=A0_end - start=C2=A0 =C2=A0 = =C2=A0 =C2=A0 /* reserved */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.quad=C2=A0 =C2=A00=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* reserved */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.quad=C2=A0 =C2=A00=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* reserved */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.quad=C2=A0 =C2=A00=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* reserved */
diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/= Makefile
index 3689eec..99d6ab1 100644
--- a/xen/arch/arm/platforms/Makefile
+++ b/xen/arch/arm/platforms/Makefile
@@ -3,7 +3,7 @@ obj-$(CONFIG_ARM_32) +=3D brcm.o
=C2=A0obj-$(CONFIG_ARM_32) +=3D exynos5.o
=C2=A0obj-$(CONFIG_ARM_32) +=3D midway.o
=C2=A0obj-$(CONFIG_ARM_32) +=3D omap5.o
-obj-$(CONFIG_ARM_32) +=3D sunxi.o
+obj-y +=3D sunxi.o
=C2=A0obj-$(CONFIG_ARM_32) +=3D rcar2.o
=C2=A0obj-$(CONFIG_ARM_64) +=3D seattle.o
=C2=A0obj-$(CONFIG_ARM_64) +=3D xgene-storm.o
diff --git a/xen/arch/arm/platforms/sunxi.c b/xen/arch/arm/platforms/<= wbr>sunxi.c
index 0ba7b3d..cee31c7 100644
--- a/xen/arch/arm/platforms/sunxi.c
+++ b/xen/arch/arm/platforms/sunxi.c
@@ -52,6 +52,7 @@ static void sunxi_reset(void)
=C2=A0static const char * const sunxi_dt_compat[] __initconst =3D
=C2=A0{
=C2=A0 =C2=A0 =C2=A0"allwinner,sun7i-a20",
+=C2=A0 =C2=A0 "allwinner,sun50i-a64",
=C2=A0 =C2=A0 =C2=A0NULL
=C2=A0};

diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index b2b5f56..9933c7e 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -461,6 +461,8 @@ static int ns16550_ioport_invalid(struct ns16550 *uart)=
=C2=A0 =C2=A0 =C2=A0return ns_read_reg(uart, UART_IER) =3D=3D 0xff;
=C2=A0}

+#include <xen/early_printk.h>
+
=C2=A0static void ns16550_interrupt(
=C2=A0 =C2=A0 =C2=A0int irq, void *dev_id, struct cpu_user_regs *regs)
=C2=A0{
@@ -476,7 +478,17 @@ static void ns16550_interrupt(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ( (lsr & uart->lsr_mask) =3D=3D= uart->lsr_mask )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0serial_tx_interrupt(port, r= egs);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ( lsr & UART_LSR_DR )
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 early_puts("Receive data\n&= quot;);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0serial_rx_interrupt(port, r= egs);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 }
+=C2=A0 =C2=A0 }
+
+=C2=A0 =C2=A0 if ( uart->dw_usr_bsy &&
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(ns_read_reg(uart, UART_IIR) & UART_= IIR_BSY) =3D=3D UART_IIR_BSY)
+=C2=A0 =C2=A0 {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 ns_read_reg(uart, UART_USR);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 return;
=C2=A0 =C2=A0 =C2=A0}
=C2=A0}

@@ -1217,7 +1229,7 @@ static int __init ns16550_uart_dt_init(struct dt_devi= ce_node *dev,

=C2=A0 =C2=A0 =C2=A0ns16550_init_common(uart);

-=C2=A0 =C2=A0 uart->baud=C2=A0 =C2=A0 =C2=A0 =3D BAUD_AUTO;
+=C2=A0 =C2=A0 uart->baud=C2=A0 =C2=A0 =C2=A0 =3D 115200;
=C2=A0 =C2=A0 =C2=A0uart->data_bits =3D 8;
=C2=A0 =C2=A0 =C2=A0uart->parity=C2=A0 =C2=A0 =3D UART_PARITY_NONE;
=C2=A0 =C2=A0 =C2=A0uart->stop_bits =3D 1;

>

--
Julien Grall



--
<= div>
Regards,
Bharat Gohil
Sr.Software Engineer
=
+919427054633
--001a113c3c6eb19c48054c68f04c-- --===============1498015799175952704== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============1498015799175952704==--