Message ID | 20221123105729.194640-3-apatel@ventanamicro.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=nTSfb7XT; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=bm6vSnbz; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NHJ4v4vZCz23lT for <incoming@patchwork.ozlabs.org>; Wed, 23 Nov 2022 21:58:07 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TQz3ljpVcHk9S4Ctyi20w3m6dRcQDr7o0/jq2peyz6k=; b=nTSfb7XTcyyfx/ oiQy0TnsH7G9GVn1NzgvzUFdkqpChil7ogo4W828zCne3oLNDkMvfKv64+l7X0KNbFSqo2TJXq+CR xbnt/IdXaXdDjdE6b/+TqpadTg3IkoFUqtQc8YfvimgZw9COjFq+yMji8K27LjHfpVTcBFcalDoLz ZvNMsNNVM9FcFxgcIyhmAIv3mYfBoU21EG9C4EruKXg2oKuF/d2x490W32OEk8slpw0t/YlgygZT+ Zh0R8iafBzeiVSbtZcOX4r6IxzpKY9rBTS79UAJiDFqys1SwwcjTXDTJ05mOSG5DA07BIq5lnPLQG neWkgJkkBJEGDVAFLn9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxnRy-00GTyj-90; Wed, 23 Nov 2022 10:57:54 +0000 Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxnRv-00GTwm-6O for opensbi@lists.infradead.org; Wed, 23 Nov 2022 10:57:52 +0000 Received: by mail-qt1-x835.google.com with SMTP id z6so10960819qtv.5 for <opensbi@lists.infradead.org>; Wed, 23 Nov 2022 02:57:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=f7MXNUNfJPI60Mh9LQcPk7zRwgQTSSRUQBBqI4eiw08=; b=bm6vSnbzd8yxqr+fkXBLDBmbSfEOqzsuwJP+SmwQSZ+QdoIQ5oG6YdMxm1m8i3z0YW oLmCaqwmCfHanCqLvEpujtapc3Kuo72x2L2Qmm9+4LHk73EN23WXUzFvaqYkKZ50FLIP IWvrU55EHAytg1VDzY/Fd+CQ+SV3jV38OyZUneqpMDhHUhVhsK7OUZJ27PkihfusetyW y8pZRiPK2jwuhIitvZm2CdhHxcmXHTQhLYpIMo4irLOhr+lZzhQ/O9Go+1sO+vXDlt7C FKOMl8FWHdFkxwzuESuz3Xjquog/5PaR6VbmxyClhrOl145kfkZXA6Aq7eV4bfyp//Gl oQiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f7MXNUNfJPI60Mh9LQcPk7zRwgQTSSRUQBBqI4eiw08=; b=k+2fqx22FkfYA09Nk0lsUU7Qw8lBEST3jwIh0hlZJnQZESbGI8SoGRKxJyqRLvnnAe oI4QkwBYl0fLFStHAGWw290vIIOSbj0+qF4HdOiHy3b/uKVZnQdZL5bKUa2LOsOUtzaL uTxz5+ImaWybZFIrdXwpdFmYTRmLBEP1658BRBBFZriTerpit+vYCkV6eGs3SwwMmIUs Ik6M8b/7xOPyvSv7p+rVpyeMdhv7j2O4BB1gKhuA1FLmxeu1RvNAWldhIX5CpzJviJ0J CNALeuuWAnB1TZ/j3kzs9dcXZw4IO/Qe9iMFLisqSyBKuN8mFqfhFfM28FlFtvPxG+xn 5Chw== X-Gm-Message-State: ANoB5pmdx0ttSentZ9m4VXDu5mACMxpvkkNw+9lXSZFYar7MlkveyGAz 40Enm7S/3blSozt2c1hfHW8Vog== X-Google-Smtp-Source: AA0mqf45TcpJNdEuE0ccr/PGTU2V7VuFyQGf4kARKFLthaFpXXl4putJRZQmlVy4oV/qvSyF+GZB5w== X-Received: by 2002:a05:622a:429a:b0:3a1:e533:23a7 with SMTP id cr26-20020a05622a429a00b003a1e53323a7mr25076396qtb.197.1669201069063; Wed, 23 Nov 2022 02:57:49 -0800 (PST) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id y11-20020a37f60b000000b006ce1bfbd603sm11538849qkj.124.2022.11.23.02.57.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 02:57:48 -0800 (PST) From: Anup Patel <apatel@ventanamicro.com> To: Atish Patra <atishp@atishpatra.org>, Alistair Francis <Alistair.Francis@wdc.com> Cc: Anup Patel <anup@brainfault.org>, opensbi@lists.infradead.org, Anup Patel <apatel@ventanamicro.com>, Atish Patra <atishp@rivosinc.com>, Bin Meng <bmeng@tinylab.org>, Xiang W <wxjstz@126.com> Subject: [PATCH v2 2/6] lib: sbi: Add sbi_nputs() function Date: Wed, 23 Nov 2022 16:27:25 +0530 Message-Id: <20221123105729.194640-3-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221123105729.194640-1-apatel@ventanamicro.com> References: <20221123105729.194640-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221123_025751_252763_8EB220E1 X-CRM114-Status: UNSURE ( 8.56 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: We add new sbi_nputs() which help us print a fixed number of characters from a physical memory location. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Xiang W <wxjstz@126.com> --- include/sbi/sbi_c [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:835 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <opensbi.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/opensbi>, <mailto:opensbi-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/opensbi/> List-Post: <mailto:opensbi@lists.infradead.org> List-Help: <mailto:opensbi-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/opensbi>, <mailto:opensbi-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "opensbi" <opensbi-bounces@lists.infradead.org> Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
OpenSBI debug console support
|
expand
|
diff --git a/include/sbi/sbi_console.h b/include/sbi/sbi_console.h index e15b55d..1bdeeb9 100644 --- a/include/sbi/sbi_console.h +++ b/include/sbi/sbi_console.h @@ -33,6 +33,8 @@ void sbi_putc(char ch); void sbi_puts(const char *str); +void sbi_nputs(const char *str, unsigned long len); + void sbi_gets(char *s, int maxwidth, char endchar); int __printf(2, 3) sbi_sprintf(char *out, const char *format, ...); diff --git a/lib/sbi/sbi_console.c b/lib/sbi/sbi_console.c index cfef2f8..a975708 100644 --- a/lib/sbi/sbi_console.c +++ b/lib/sbi/sbi_console.c @@ -51,6 +51,16 @@ void sbi_puts(const char *str) spin_unlock(&console_out_lock); } +void sbi_nputs(const char *str, unsigned long len) +{ + unsigned long i; + + spin_lock(&console_out_lock); + for (i = 0; i < len; i++) + sbi_putc(str[i]); + spin_unlock(&console_out_lock); +} + void sbi_gets(char *s, int maxwidth, char endchar) { int ch;