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: 1382447 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=uqnqO+0g; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CBbnZ5H5wz9sTL for ; Thu, 15 Oct 2020 15:26:10 +1100 (AEDT) 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-Google-Smtp-Source: ABdhPJzKdgMSkEMgj8OGGIXnCECh9jBkvr2nk9fIYQmrSnOY7OYiqwGJARJc+/+jdAHuM+nHKxnbPw== 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 Reviewed-by: Peng Fan --- arch/arm/include/asm/xen/hypercall.h | 6 ++++++ 1 file changed, 6 insertions(+) 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 */