[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH v2 01/10] xen/arm: Print a 64-bit number in hex from early uart


  • To: Wei Chen <Wei.Chen@xxxxxxx>, "--to=xen-devel@xxxxxxxxxxxxxxxxxxxx" <--to=xen-devel@xxxxxxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jiamei Xie <Jiamei.Xie@xxxxxxx>
  • Date: Tue, 19 Apr 2022 09:13:31 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=P9P+xp+IcnKE4O658EWQd+dMh+/cBd1SJHXG0Om9Rng=; b=Pjh1Ld9hOp1gj14kPlW6hwY1nHsB926m5QnJX9hKeUt4npTyLK8oSOqY8LhEZ5vD5cXWYqs+MgP6XBEQo+S+GjcyEMVM+2JkQKjBql9RvgxzartUj39Nle2wtG7QAQgfFzvEzb6RbYWIBrj04zcNQU+9aS5Ix6IaXleMJrvp9RKrm+SgsV/efeuo1a8BL8ddZyiP81YhEq4SdOxj7+t9mcaCEBq7fIdCkB9eVY9aICuUk8hsy/1scaxFlt5GhAnjQAJjzsdrBTV8onZcHjtEyA18RHmUEB18aJPCdnE8A+KIexvd+vMMX/zV5yYhb2zTrbVibFqwLiSl6x0lwT2Vnw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kbUxTDmFIe0x8POLehPbH6k2e2gsvnSsvAn2WBFnyWK85Fbu5c/DNoz7x0J4lUiUnEPiHLwMsRdUVHfrRLTiWvYp/LfeZgasc2+Z5wMRe2ziZQsdvPnuvufo6DiuxiZ0wXbZecLV9wfqMEIKDMBmGgp9UtSG+0TAN/ewK5tBAsc6fzRMsw03aUbiX442sBAFo5MNg3/QenktovPzCSyWZq1j+taDLWPXETyyqUWYtzrtdClN4TQN0oUZbiN24zlaQYtz7P5KUbWqySx+2ZoByIzzFvKRXFidf87rWIFoWYWBDzbaxU5dDSlzHcR/Pyjxj0D34bTBuNzmSYftQ+svcA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: nd <nd@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>
  • Delivery-date: Tue, 19 Apr 2022 09:13:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYUwQRz8pnnvd0IkKIsXaKM40+fqz28iGQ
  • Thread-topic: [PATCH v2 01/10] xen/arm: Print a 64-bit number in hex from early uart

Hi Wei,

> -----Original Message-----
> From: Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of
> Wei Chen
> Sent: 2022年4月18日 17:07
> To: --to=xen-devel@xxxxxxxxxxxxxxxxxxxx; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: nd <nd@xxxxxxx>; Wei Chen <Wei.Chen@xxxxxxx>; Stefano Stabellini
> <sstabellini@xxxxxxxxxx>; Julien Grall <julien@xxxxxxx>; Bertrand Marquis
> <Bertrand.Marquis@xxxxxxx>; Volodymyr Babchuk
> <Volodymyr_Babchuk@xxxxxxxx>; Julien Grall <jgrall@xxxxxxxxxx>
> Subject: [PATCH v2 01/10] xen/arm: Print a 64-bit number in hex from early
> uart
> 
> 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@xxxxxxx>
> Acked-by: Julien Grall <jgrall@xxxxxxxxxx>
> ---
>  xen/arch/arm/arm64/head.S | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
> index e62c48ec1c..2bb7906f69 100644
> --- a/xen/arch/arm/arm64/head.S
> +++ b/xen/arch/arm/arm64/head.S
> @@ -866,17 +866,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 
> */
> --
> 2.25.1
> 

I have tested the whole patch series on Armv8A(config without NUMA) and 
X86(config with NUMA), both can enter Dom0 successfully and the X86 NUMA works 
normally.

Tested-by: Jiamei Xie <jiamei.xie@xxxxxxx> 

Regards,
Jiamei Xie



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.