From patchwork Thu Oct 15 04:25:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 317753 Delivered-To: patch@linaro.org Received: by 2002:a92:d603:0:0:0:0:0 with SMTP id w3csp122753ilm; Wed, 14 Oct 2020 21:26:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjm6dsuf9EZSGqqKi1TEqcJiMpe2EiTXytlDSpYlQ34PAXxZD35Y97PgHdgcuvu0nr0zl1 X-Received: by 2002:a17:906:4a4c:: with SMTP id a12mr2416570ejv.392.1602735968393; Wed, 14 Oct 2020 21:26:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602735968; cv=none; d=google.com; s=arc-20160816; b=QX3ceSMoupPv/3MkgfvKA4VDAfe46/hFlQ0oqcU3jTIVOPXQk4KBdaCTkR1YbI9lQz UOQHIfrVWGFQ2tIsY2r32AWEGHPtC6jvnacQ/n+e3OqHWCEoKecTc0wI3YwCDjBF+qwH cqJwDBp8ZTK4OheE2uB9UGsAK80e5oyJ5sHDdCiXHx16id9/qAj0Hu+eLAPLrv1ZG1zh JKKeWa3QThQKLOd38OkuD3P8+XSQfgr0DMV72eV+FEP/G5t+XGjlEQeOtTFDlkT1L58i S/KRgrtil66udDAFvvoAL97hDDLLZ/ESVH4g8jG3NCDSMibH8DxW0qIyTCnOseddrJwm Gp9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=m+jkdY0w9G7q7VHLMvAWHWscZRaBIokj+lachCA92T4=; b=eYmFTvYQDBd59yqjATE1KyjiFhWNA5RcMrmcmuBNjWXLiIsmU/YUK5vu5HefLvJIFD 3n5SXNLKRaU3cQbca45pr3FojfhcYux5+33Gc22WlXoVJ5SlJHTI3J/ZvixUoWmBe0tM D5/5xo4nFuELTtr+3xQXeuP20kl7e2wng1UQpo9EMY+FkFHU4B9NdK794ZY2joPG7sdZ xuAzk38wweCjfmVqtUimK9W3f5ZW/B2VyTk7fyP049sIigb+C2VptcN7Rpn4ePVTwm9c 49yfuOE8hrjSu/J2K9/FjXa/keQbm/aRgg803Kwkixra/FtCCxQSYJoHv2XFd5RjpCzi dc6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uqnqO+0g; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id cc20si1308022edb.341.2020.10.14.21.26.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 21:26:08 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uqnqO+0g; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CC82A8235E; Thu, 15 Oct 2020 06:25:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="uqnqO+0g"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D6AED8235E; Thu, 15 Oct 2020 06:25:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2A9D182367 for ; Thu, 15 Oct 2020 06:25:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pl1-x644.google.com with SMTP id o9so883312plx.10 for ; Wed, 14 Oct 2020 21:25:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=m+jkdY0w9G7q7VHLMvAWHWscZRaBIokj+lachCA92T4=; b=uqnqO+0gCCqe01RRotpOTGav1dectvBl0+vkUGSdsVhilz+wENfwIgntc/r1BrH49s pv+HnKCyf2oRLe/f7vyLp7laWUPq0P9HBtBaFB5UF4tpYLl5B08FG5pwfECAMs4l7zmq JvF/+L9a2bF5HnLNpaf6edjpUicQoqMaskr1GLUsm+sPCxUwBd1/1PdtPruNw8UeCgdP sr5fcBxCBV85lnq/XvcsmfzacERSobScqhR9qIcfoCquEgcb72DNng9sBwLyjwLuEI8X aPjUtkFMMf+mugiJjyufel4zGIg9dQr9MMrtsOxz0Qiv9jSemQ3xQlLjXLS8Ciowk+Ar oxLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=m+jkdY0w9G7q7VHLMvAWHWscZRaBIokj+lachCA92T4=; b=rHbDPV6stRJPlujTo4DKZ+JfcW/+Qv6ZtaHwlsJQUMcGJhu8YP15kbjil46TkvhyBz Fle4yXj3NQOP6yJSJW/hrGRB756XLdxgS4Tn0e/Pmusd4wK3SdOsk36HeSqmZXKiW2qR lG6YUHLTL92COGnb6OZEmvqbcCixBSaRZ8pNQkRK4EGHg48wmTr97EZjKAjcVKL0JyAv k6igRaqHm3WFJcCvTQoINLnbyzW0FJB6LsXORMs16T4jqFCrOxcsaFAf8FpbJT0j0uKt XHnY0N5UqmO6RHpWtFAxMOhrdL2s/NbbzXyAMz8wBUVvnPd+xJdmNPNiFTTjVxOXB97D bSgw== X-Gm-Message-State: AOAM532E3m0N9jk6hY4Yv0Z3Z/LBpzGHBQkptNhbpzyD4RKBsApwLU1Y 0yJMEHY2z+0AHQMzcIZFhwSh/w== X-Received: by 2002:a17:902:8547:b029:d4:e2c7:1a32 with SMTP id d7-20020a1709028547b02900d4e2c71a32mr2165247plo.38.1602735946521; Wed, 14 Oct 2020 21:25:46 -0700 (PDT) Received: from localhost.localdomain (p784a66b9.tkyea130.ap.so-net.ne.jp. [120.74.102.185]) by smtp.gmail.com with ESMTPSA id w17sm1306489pga.16.2020.10.14.21.25.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 21:25:45 -0700 (PDT) From: AKASHI Takahiro To: anastasiia_lukianenko@epam.com, oleksandr_andrushchenko@epam.com Cc: u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH 2/4] arch: arm/xen: add putc() for debugging Date: Thu, 15 Oct 2020 13:25:14 +0900 Message-Id: <20201015042516.41197-3-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201015042516.41197-1-takahiro.akashi@linaro.org> References: <20201015042516.41197-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This new function, xen_debug_putc(), is intended to be used to enable CONFIG_DEBUG_UART on xen guest. Please note that the underlying functionality in Xen is available only when Xen is configured with !NDEBUG but is much simpler than a generic HYPERVISOR_console_io(). Signed-off-by: AKASHI Takahiro --- arch/arm/include/asm/xen/hypercall.h | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.28.0 Reviewed-by: Peng Fan diff --git a/arch/arm/include/asm/xen/hypercall.h b/arch/arm/include/asm/xen/hypercall.h index a4fd077079a9..121ccfcc608f 100644 --- a/arch/arm/include/asm/xen/hypercall.h +++ b/arch/arm/include/asm/xen/hypercall.h @@ -19,4 +19,10 @@ int HYPERVISOR_sched_op(int cmd, void *arg); int HYPERVISOR_event_channel_op(int cmd, void *arg); unsigned long HYPERVISOR_hvm_op(int op, void *arg); int HYPERVISOR_memory_op(unsigned int cmd, void *arg); + +static inline void xen_debug_putc(int c) +{ + register int v __asm__ ("x0") = c; + __asm__ __volatile__("hvc 0xfffe" : "=r" (v) : "0" (v)); +} #endif /* _ASM_ARM_XEN_HYPERCALL_H */