From patchwork Wed Oct 25 04:30:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiang W X-Patchwork-Id: 1854707 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=1vZfaDbd; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=UMCLypqb; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SFbcC2MQ6z23jn for ; Wed, 25 Oct 2023 15:31:55 +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=EchUdQDzeuFJlX4k4TMEKmK23nfu6zN5aU9XdLaq6rQ=; b=1vZfaDbd9Nq+Jy XpHKbPkRdltmQ8oHlyCfodxlgfyL+tH4UI8f7+FLiGKfeCJ4ibZK6Zy2LfWadmeGT3v5hMZN68sB5 0QfkD5sFlI1Ozw96wG6jnIPAaRsSFr+fY6/HqbA37TpIZ0h1PSVHSba6PWjb++RV4JoNP9nbIsf2F gfegmpBFFCfpTbRu7hkPN49fafPe9EJFCJFi6pGNzcWzj8/4ZoQA5/oPiWMBXowj/4r3yGT11rbII OShp/g5mPohnryYhPUXx4caTDk0AWKS1oH+UtzmvXj/lNz4O0JoXvK/bKL1397Rxxx71ln+FO+OXO Ew3h2BqQXIKj4c0p7tNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvVYR-00BKUN-2X; Wed, 25 Oct 2023 04:31:39 +0000 Received: from m126.mail.126.com ([220.181.12.27]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvVYN-00BKTl-1U for opensbi@lists.infradead.org; Wed, 25 Oct 2023 04:31:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=RwTa9 vhnwbggHuxMoKizcbbNaXEa4fXMYDAncrPEcZo=; b=UMCLypqbxK8QyQ8G4O7+X wmQNnMF1dkfw6MhLeR8Sesjs1j2VsyWRpRM8d1s5H3TXciODDKUc8XVe7JWheOrh POAeS1NnAvu+W4UQNVno7q59EMOtyXEvwvHVE7hjjyrcItev3QtYCbntAgFsnPNv qkVXElvSi/sO+cBc1cqyBA= Received: from T490.lan (unknown [112.83.183.252]) by zwqz-smtp-mta-g3-1 (Coremail) with SMTP id _____wD3P6cMmjhluxuFCA--.41107S3; Wed, 25 Oct 2023 12:31:13 +0800 (CST) From: Xiang W To: opensbi@lists.infradead.org, cp0613@linux.alibaba.com, guoren@kernel.org, apatel@ventanamicro.com Cc: Xiang W Subject: [PATCH 2/2] lib: utils/serial: remove semihosting_putc Date: Wed, 25 Oct 2023 12:30:57 +0800 Message-ID: <20231025043104.748104-2-wxjstz@126.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231025043104.748104-1-wxjstz@126.com> References: <20231025043104.748104-1-wxjstz@126.com> MIME-Version: 1.0 X-CM-TRANSID: _____wD3P6cMmjhluxuFCA--.41107S3 X-Coremail-Antispam: 1Uf129KBjvJXoWrtF45ur13Gw43Ar1fCFWfZrb_yoW8JF45pa 4Fkan7tF4rGryfX3ykJrZFqryjgFnayFy2gayjgw1xXFyUX3WxXwsxGay5Xr15Wry5AFyj yF4ktr1rCw18J3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0pEE_MxUUUUU= X-Originating-IP: [112.83.183.252] X-CM-SenderInfo: pz0m23b26rjloofrz/xtbBdBIUOmSdLgxCbAAAs9 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231024_213136_405043_6BC30060 X-CRM114-Status: UNSURE ( 7.73 ) 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: For some debuggers that do not implement SYSWRITEC and SYSREADC operations, we can use SYSWRITE and SYSREAD instead like the implementation of semihosting_putc(). This makes semihosting_putc/semihosti [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [wxjstz[at]126.com] -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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org For some debuggers that do not implement SYSWRITEC and SYSREADC operations, we can use SYSWRITE and SYSREAD instead like the implementation of semihosting_putc(). This makes semihosting_putc/semihosting_puts similar. Since console_putc/console_puts are now interchangeable, removing the semihosting_putc. Signed-off-by: Chen Pei Signed-off-by: Xiang W Reviewed-by: Guo Ren --- lib/utils/serial/semihosting.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/utils/serial/semihosting.c b/lib/utils/serial/semihosting.c index ce65887..19ebaa0 100644 --- a/lib/utils/serial/semihosting.c +++ b/lib/utils/serial/semihosting.c @@ -160,11 +160,6 @@ static long semihosting_write(long fd, const void *memp, size_t len) /* clang-format on */ -static void semihosting_putc(char ch) -{ - semihosting_trap(SYSWRITEC, &ch); -} - static unsigned long semihosting_puts(const char *str, unsigned long len) { char ch; @@ -199,7 +194,6 @@ static int semihosting_getc(void) static struct sbi_console_device semihosting_console = { .name = "semihosting", - .console_putc = semihosting_putc, .console_puts = semihosting_puts, .console_getc = semihosting_getc };