[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 2/4] xen/riscv: introduce sbi call to putchar to console
- To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Date: Tue, 17 Jan 2023 23:32:20 +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=G2i3daRfa0oeNdufIOpYLdInNUCQHAwX6/3DupdRhMo=; b=U8eF4pcnwlgcimHwKFUfY7hhf9qqJ/k9jYaA/C3Ub/B9/40u9reypbb9+S7Gy1eUrj1iOEUNJtrFUoz1Dsa1t2ck50+0MMBNabsT9QoGn6Yr3hXYTjTnGreNcXlYHBEnqJwxWqvepOhCzRTXVdqwnE33iA3MO/+S4C32xF90+nnVxFwAQqF0oJd/rpfeHWGxreRTEjmNdO8S/kB0Vdn+LYYe/YE7Tte6YNk601nW0bE4cgcm6KUhVdSjrLPcAARJyM5mz+uZUHLJjBfh8J2iIwhnDZSQgtz+6AaOTCs3z8wDo3s/T0mR/i9hviBEc5+P3ZDsnOkPpvWPQhW+0ovyfg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P/7kbe3nw2mwrPD/UmZn753YOIH4khQrYkUjVpIweDEIAC0P/9s+txZbZTY7viqExsLICr2//kKOISpKC19sUU6Boa0vI8dGuKOQgK9E2IA3TQcONI2Jc6nXuSga9h43TKZ/vpW+s9PwLuw1HEFAUZ12wwb57vx61C9KO6yVZrLbKEPfsLB6ZZmX5ifwPAB+Qef89+IQzxz0pfBH2Fe4akmYBy/tYNiuKo5L9iqrr4dtxpKLNsmlXSmwyjf/q9FgLN3oc1NAfhiysTvv7QIS+KnasEb+ABNKJbIn4k8VAPdFCediqF6JtBk2ZuOFub+A28h7bDWp/RQDd3dvcb3LMQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Gianluca Guida <gianluca@xxxxxxxxxxxx>, Bobby Eshleman <bobby.eshleman@xxxxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>
- Delivery-date: Tue, 17 Jan 2023 23:32:52 +0000
- Ironport-data: A9a23:tB2qDKDx8H21zhVW/3Xjw5YqxClBgxIJ4kV8jS/XYbTApGshhmEAn GVOUTrXa/yMM2egfNl3Po2+oU9Tu5fQzIRiQQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8nk/nNHuCnYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbyRFtMpvlDs15K6p4GpB4QRkDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3kW0aZuoNcrLZUj2CA6IoKvn3bEmp1T4E8K0YIw3utqPjBw6 8IiDxdKQgiDiOSd3LGaVbw57igjBJGD0II3nFhFlGucKMl8BJfJTuPN+MNS2yo2ioZWB/HCa sEFaD1pKhPdfxlIPVRRA5U79AuqriCnL3sE9xTL++xruwA/zyQouFTpGPPTdsaHWoN+mUGAq 3id12/4HgsbJJqUzj/tHneE17WSx3KqBNN6+LuQz+FOw3a84HwqEhA1VXiaq9KdkGC/RIcKQ 6AT0m90xUQoz2SsStT+RBy55n2ZpBkXW9lXO+I/4QCJjKHT5m6xFmUCCzJMdtEinMs3XiAxk E+EmcvzAj5iu6HTTmiSnp+Wpz6vPSkeLUcZeDQJCwAC5rHLopw3jx/JZsZuFuiylNKdMSrr3 zmAoSw6hrMSpc0GzaO2+RbAmT3EjpfIRwgx+w7ednik8ARiZYiuIYev7DDz5/FKJpffQ0KBu HUBks624+UHDJXLnyuIKM0HG7uj9vueMDnRhFdpN5Yk/jWpvXWkeOh46TV/P1tgM9xCdyXgZ kTSoitO6JQVN3yvBYd8ZIS3DMYmxLbhDvzqU/nVapxFZZ0ZSeOc1CRnZErV2n+3lkEpyPs7I c3DLZ7qCmsGA6N6yjbwX/0azbIg2iE5wyXUWIz/yBOkl7GZYRZ5VIs4DbdHVchhhIvsnekf2 4w32xeio/mHbNDDXw==
- Ironport-hdrordr: A9a23:7UDfka2S/JJWjt7CE3kHVQqjBI8kLtp133Aq2lEZdPU1SL36qy nKpp8mPHDP6Qr5NEtPpTniAsa9qBHnhPtICOAqVN/JMWXbUQOTXeNfBODZowEIdReOkNJ15O NNdLV/Fc21LXUSt7eC3OHye+xQpOVvKZrY4tvj8w==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHZKbhhqgcYVfmmBkmkfqhgFJ6YQ66jRHCA
- Thread-topic: [PATCH v4 2/4] xen/riscv: introduce sbi call to putchar to console
On 16/01/2023 2:39 pm, Oleksii Kurochko wrote:
> diff --git a/xen/arch/riscv/sbi.c b/xen/arch/riscv/sbi.c
> new file mode 100644
> index 0000000000..dc0eb44bc6
> --- /dev/null
> +++ b/xen/arch/riscv/sbi.c
> @@ -0,0 +1,45 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +/*
> + * Taken and modified from the xvisor project with the copyright Copyright
> (c)
> + * 2019 Western Digital Corporation or its affiliates and author Anup Patel
> + * (anup.patel@xxxxxxx).
> + *
> + * Modified by Bobby Eshleman (bobby.eshleman@xxxxxxxxx).
> + *
> + * Copyright (c) 2019 Western Digital Corporation or its affiliates.
> + * Copyright (c) 2021-2023 Vates SAS.
> + */
> +
> +#include <xen/errno.h>
Unused header. All this file needs (in this form at least) is asm/sbi.h
> +#include <asm/sbi.h>
> +
> +struct sbiret sbi_ecall(unsigned long ext, unsigned long fid,
> + unsigned long arg0, unsigned long arg1,
> + unsigned long arg2, unsigned long arg3,
> + unsigned long arg4, unsigned long arg5)
> +{
> + struct sbiret ret;
> +
> + register unsigned long a0 asm ("a0") = arg0;
> + register unsigned long a1 asm ("a1") = arg1;
> + register unsigned long a2 asm ("a2") = arg2;
> + register unsigned long a3 asm ("a3") = arg3;
> + register unsigned long a4 asm ("a4") = arg4;
> + register unsigned long a5 asm ("a5") = arg5;
> + register unsigned long a6 asm ("a6") = fid;
> + register unsigned long a7 asm ("a7") = ext;
> +
> + asm volatile ("ecall"
> + : "+r" (a0), "+r" (a1)
> + : "r" (a2), "r" (a3), "r" (a4), "r" (a5), "r" (a6), "r" (a7)
> + : "memory");
Indentation. Each colon wants 4 more spaces in front of it.
Both can be fixed on commit.
~Andrew
|