diff mbox series

[v3,1/9] xen/arm: Print a 64-bit number in hex from early uart

Message ID 20220511014639.197825-2-wei.chen@arm.com (mailing list archive)
State Superseded
Headers show
Series Device tree based NUMA support for Arm - Part#1 | expand

Commit Message

Wei Chen May 11, 2022, 1:46 a.m. UTC
Current putn function that is using for early print
only can print low 32-bit of AArch64 register. This
will lose some important messages while debugging
with early console. For example:
(XEN) Bringing up CPU5
- CPU 0000000100000100 booting -
Will be truncated to
(XEN) Bringing up CPU5
- CPU 00000100 booting -

In this patch, we increased the print loops and shift
bits to make putn print 64-bit number.

Signed-off-by: Wei Chen <wei.chen@arm.com>
Tested-by: Jiamei Xie <jiamei.xie@arm.com>
Acked-by: Julien Grall <jgrall@amazon.com>
---
v2->v3:
Add Tb from Jiamei.
---
 xen/arch/arm/arm64/head.S | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

Comments

Julien Grall May 16, 2022, 5:14 p.m. UTC | #1
Hi,

On 11/05/2022 02:46, Wei Chen wrote:
> Current putn function that is using for early print
> only can print low 32-bit of AArch64 register. This
> will lose some important messages while debugging
> with early console. For example:
> (XEN) Bringing up CPU5
> - CPU 0000000100000100 booting -
> Will be truncated to
> (XEN) Bringing up CPU5
> - CPU 00000100 booting -
> 
> In this patch, we increased the print loops and shift
> bits to make putn print 64-bit number.
> 
> Signed-off-by: Wei Chen <wei.chen@arm.com>
> Tested-by: Jiamei Xie <jiamei.xie@arm.com>
> Acked-by: Julien Grall <jgrall@amazon.com>

I have committed this patch.

Patch #3 looks to be suitably acked but I am not sure whether it can be 
committed before #2. So I didn't commit it.

Please let me know if it can be.

Cheers,
Wei Chen May 17, 2022, 1:21 a.m. UTC | #2
Hi Julien,

> -----Original Message-----
> From: Julien Grall <julien@xen.org>
> Sent: 2022年5月17日 1:15
> To: Wei Chen <Wei.Chen@arm.com>; xen-devel@lists.xenproject.org
> Cc: nd <nd@arm.com>; Stefano Stabellini <sstabellini@kernel.org>; Bertrand
> Marquis <Bertrand.Marquis@arm.com>; Volodymyr Babchuk
> <Volodymyr_Babchuk@epam.com>; Jiamei Xie <Jiamei.Xie@arm.com>; Julien
> Grall <jgrall@amazon.com>
> Subject: Re: [PATCH v3 1/9] xen/arm: Print a 64-bit number in hex from
> early uart
> 
> Hi,
> 
> On 11/05/2022 02:46, Wei Chen wrote:
> > Current putn function that is using for early print
> > only can print low 32-bit of AArch64 register. This
> > will lose some important messages while debugging
> > with early console. For example:
> > (XEN) Bringing up CPU5
> > - CPU 0000000100000100 booting -
> > Will be truncated to
> > (XEN) Bringing up CPU5
> > - CPU 00000100 booting -
> >
> > In this patch, we increased the print loops and shift
> > bits to make putn print 64-bit number.
> >
> > Signed-off-by: Wei Chen <wei.chen@arm.com>
> > Tested-by: Jiamei Xie <jiamei.xie@arm.com>
> > Acked-by: Julien Grall <jgrall@amazon.com>
> 
> I have committed this patch.
> 
> Patch #3 looks to be suitably acked but I am not sure whether it can be
> committed before #2. So I didn't commit it.
> 

No, it depends on patch#2 to provide EFI stubs for Arm32, otherwise
Arm32 will be failed on building.

Cheers,
Wei Chen

> Please let me know if it can be.
> 
> Cheers,
> 
> --
> Julien Grall
Henry Wang June 17, 2022, 3:27 a.m. UTC | #3
Hi Julien,

> -----Original Message-----
> From: Xen-devel <xen-devel-bounces@lists.xenproject.org> On Behalf Of
> Julien Grall
> 
> Hi,
> 
> I have committed this patch.
> 
> Patch #3 looks to be suitably acked but I am not sure whether it can be
> committed before #2. So I didn't commit it.
> 
> Please let me know if it can be.

IIUC, the latest series (v6) [1] is properly acked and reviewed for the whole
series, so I think v6 of this series is ready to be merged. Sending this as a
gentle reminder :) 

[1] https://patchwork.kernel.org/project/xen-devel/list/?series=649092

Kind regards,
Henry

> 
> Cheers,
> 
> --
> Julien Grall
Julien Grall June 17, 2022, 8:41 a.m. UTC | #4
On 17/06/2022 04:27, Henry Wang wrote:
> Hi Julien,

Hi Henry,

>> -----Original Message-----
>> From: Xen-devel <xen-devel-bounces@lists.xenproject.org> On Behalf Of
>> Julien Grall
>>
>> Hi,
>>
>> I have committed this patch.
>>
>> Patch #3 looks to be suitably acked but I am not sure whether it can be
>> committed before #2. So I didn't commit it.
>>
>> Please let me know if it can be.
> 
> IIUC, the latest series (v6) [1] is properly acked and reviewed for the whole
> series, so I think v6 of this series is ready to be merged. Sending this as a
> gentle reminder :)

Thanks for the reminder. My comment above was specifically referring to 
patches in v3. If the patches are from a new version, can I suggest to 
ping on the exact version?

Cheers,
Henry Wang June 17, 2022, 9:10 a.m. UTC | #5
Hi Julien,

> -----Original Message-----
> From: Julien Grall <julien@xen.org>
> On 17/06/2022 04:27, Henry Wang wrote:
> > Hi Julien,
> Hi Henry,
> >>
> >> Hi,
> >>
> >> I have committed this patch.
> >>
> >> Patch #3 looks to be suitably acked but I am not sure whether it can be
> >> committed before #2. So I didn't commit it.
> >>
> >> Please let me know if it can be.
> >
> > IIUC, the latest series (v6) [1] is properly acked and reviewed for the
> whole
> > series, so I think v6 of this series is ready to be merged. Sending this as a
> > gentle reminder :)
> 
> Thanks for the reminder. My comment above was specifically referring to
> patches in v3. If the patches are from a new version, can I suggest to
> ping on the exact version?

Oh of course, my bad - I thought that email didn't received reply so I tried to
continue the discussion there. Thanks for the suggestion! I will keep that in
mind from now :))

Kind regards,
Henry

> 
> Cheers,
> 
> --
> Julien Grall
diff mbox series

Patch

diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index 1fd35a8390..109ae7de0c 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -872,17 +872,19 @@  puts:
         ret
 ENDPROC(puts)
 
-/* Print a 32-bit number in hex.  Specific to the PL011 UART.
+/*
+ * Print a 64-bit number in hex.
  * x0: Number to print.
  * x23: Early UART base address
- * Clobbers x0-x3 */
+ * Clobbers x0-x3
+ */
 putn:
         adr   x1, hex
-        mov   x3, #8
+        mov   x3, #16
 1:
         early_uart_ready x23, 2
-        and   x2, x0, #0xf0000000    /* Mask off the top nybble */
-        lsr   x2, x2, #28
+        and   x2, x0, #(0xf<<60)     /* Mask off the top nybble */
+        lsr   x2, x2, #60
         ldrb  w2, [x1, x2]           /* Convert to a char */
         early_uart_transmit x23, w2
         lsl   x0, x0, #4             /* Roll it through one nybble at a time */