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

Re: [PATCH v1 4/8] xen/riscv: introduce sbi call to putchar to console


  • To: Julien Grall <julien@xxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Fri, 6 Jan 2023 15:19:07 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=9CdlP3hOQO0KgwM+w6gCU4wWB2bLJCigK1wKvCRZYcI=; b=n6uSIBEBAfbx8lNqmi+bRTuY8D5jTHX/1sWcIGB+YkD1bJYbrQCefIXMOjay/fsAtb1Dz+9rwcLwL6rkUv2ZShnozBQ4VK9w6BtbGbuWDg6KODmC0YiHtVWcrN0hDfMN0YRuTibBpouLJ71kKF8VZ1aSVatP+iohQvw9Zd4AOptjUPDs1ZPLWYME+Bf5HP2QCIeZL6I9O4zzBRIy1cxkPnirtJI8GP4FLEznHcOkkK4O2zYayxw/LFjVoc4+m0u4F8Hux/XQSqdjN7lkYyIiCdeb2nvEC3N7wOUk9d1czQeKwyji6xCOvvnFR00zYa8RjyUbAMfhRuYMptruRXHB/Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BL4fr2ItjcJz2gpyhd2NLktdrbNWJA6gxnzwGh5g1JdUp7nKcgViEGSKI5Rj5hG6xpiVPNqvbdEVBUoVgO+q5j/M3FGpnWV1nsCIKBO3XOsZ6UbALWQ/TA4B5X3tOI2+dzcm3Ysg2lZB0NDgSSwqSjTNNcUtasSb9C/GZLqYP6HHBEgRUUGDEHfifFiqbT9VgtO3rWBPiMxkeyQRkE5A3+NDrOc6/nwAQ5FeyBcMQBbhxjvd0vBD3RC/8eLkL4jADWbRC4h/hiK6PXszZtLpFlzbT1Iw4VJvHhK5ylQ+jhEHQL1sBr2Qr66hdzUsC4YBONvp+1TEAuYOD9F60+wcMA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Gianluca Guida <gianluca@xxxxxxxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>
  • Delivery-date: Fri, 06 Jan 2023 15:19:23 +0000
  • Ironport-data: A9a23:1JDpgqy2sFJpBAmL+PB6t+efxyrEfRIJ4+MujC+fZmUNrF6WrkVUy WBKUD+AP/uIMzaje9xzYY7goE0EvceEztZiSVBrriAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTbaeYUidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw//F+U0HUMja4mtC5QRnPa4T5jcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KWF15 9gyNzUcUhGgnOmX++u7RPdlgv12eaEHPKtH0p1h5RfwKK9/BLvkGuDN79Ie2yosjMdTG/qYf 9AedTdkcBXHZVtIJ0sTD5U92uyvgxETcRUB8A7T+fVxvjaVlVIhuFTuGIO9ltiibMNZhEuH4 EnB+Hz0GEoyP92D0zuVtHmrg4cjmAuqAN5JSuHip5aGhnXI7VMUKRMJUmHnhtuDjki/C/9yd mMLr39GQa8asRbDosPGdx+lpH+JuDYMVtwWFPc1gCmKzqfX+AeYQGsZVDlKaN8hnMAzTD0uk FSOmrvBFTFp9bGYV3+Z3rOVti+pfzgYK3cYYi0JRhdD5MPsyKkolQ7GRNtnFK+zj/X2FCv2z jTMqzIx750cjMcN07iw9HjdgiyrvZnPRUg+4QC/dmii5AloaZWlY4Gt4F7z4vNJLYLfRV6E1 FANn8mF8OkPF9eDjiWLS+QWNK6l7LCONzi0qVVoGZ8m9Tik5X+4VY9V6TB6YkxuN645lSTBZ UbSvUZa48ZVNX7zNKtvOdvvW4It0LTqEsnjWrbMdN1Sb5NtdQiBuiZzeUqX2GOrm08p+U0iB aqmnQ+XJS5yIcxaIPCeHY/xDZdDKvgC+F7u
  • Ironport-hdrordr: A9a23:b8K5na7+HwlcPJ/HqgPXwMvXdLJyesId70hD6qkRc203TiX8ra uTdZsgvyMc9wxhP03I9ertBED4ewK5yXcX2+ks1NWZMTUO0VHARL2Lh+DZsljd8kvFmdK1vp 0AT0ERMrPN5TUQt7eZ3DWF
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHZIdDaR/Z8ZObOWUu8wVolwH1ydK6RZVeAgAAbd4A=
  • Thread-topic: [PATCH v1 4/8] xen/riscv: introduce sbi call to putchar to console

On 06/01/2023 1:40 pm, Julien Grall wrote:
> Hi,
>
> On 06/01/2023 13:14, Oleksii Kurochko wrote:
>> The patch introduce sbi_putchar() SBI call which is necessary
>> to implement initial early_printk
>>
>> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
>> ---
>>   xen/arch/riscv/Makefile          |  1 +
>>   xen/arch/riscv/include/asm/sbi.h | 34 ++++++++++++++++++++++++
>>   xen/arch/riscv/sbi.c             | 44 ++++++++++++++++++++++++++++++++
>
> IMHO, it would be better to implement sbi.c in assembly so you can use
> print in the console before you jump to C world.

That was already requested not to happen.  Frankly, if I was an arm
maintainer I'd object to the how it's used there too, but RISCV is
massively more simple still.

Not even the pagetable setup, or the physical relocation (if even
necessary) needs doing in ASM.

I'm not completely ruling it out in the future, but someone is going to
have to come up with a very convincing argument for why they can't do
this piece of critical setup in C.

~Andrew

 


Rackspace

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