From patchwork Fri Oct 27 18:26:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 15986 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp806445vqb; Fri, 27 Oct 2023 11:33:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGN0hpyHCBuGaFg4EzqUEmQiTtEL8cO1EBng5r/7699ScQjHVkPsS5ZaZ0QVYREBdb23Fem X-Received: by 2002:a25:d0f:0:b0:da0:4109:ad63 with SMTP id 15-20020a250d0f000000b00da04109ad63mr3519573ybn.21.1698431601407; Fri, 27 Oct 2023 11:33:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698431601; cv=none; d=google.com; s=arc-20160816; b=n9Lbe37XqDfQIBasqxdYFVW3Bi41xEfjXhl/yjAueOEyMaoK8TKM0npdJgVmxiBRWC Eq4EwDHDkUfBp0ncYcU3/a76acRx19A1G1gbe8gvzHkz2zJHpaDyz7pk6lnYOjmA376+ dGXW+DGe2Cwrj+QpJieW523pRmXXEkyrJlB9akSQfwEjbWKadXltMN/tn06x5HQmq7zX 0+YIuAu9uxzk87XrhEw27X8Ey9BxOrs/NqTL44Ae34DDTjKa1VmjwbwJZOKkRkcbMoDl /cXCzaZCTB9te+5bnLjLc5MdN+jYfhTbYxxGFs95XWjSMLBsytMN41j5CblnRoqXwwIV wA6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:feedback-id:dkim-signature :dkim-signature; bh=SX5fl+EhwuJvuJSgszNvKWpCysGddZbGyxPGegx2anM=; fh=2THP7SIVSTHYjaZ+qoFRou3s/8abGq7E8rX+Q6jzkpQ=; b=YS9rkaa4gXwqfJ9wTfXuFihz3ZoQI1NjRQSQ0JKZiOqJdaCHurOwlQHj6HDZxKgpp3 VRCAPgT58lLyhx7k66qwaYEMOjWz/e4ohdCaKjTyPM4D5Y7bVrqTuRilSNptv1N/n9Bx 2cLzFFFtyrr1Z5LQfvioBczcwCVI1soPf6Meo9ORGqRSOFTCRq0WimKcXYjKxMtB4Rjm D+5/TyEdPl3z7cOQFZ6iE2XMgmB9Z9DZhL7+QRz/WCUZS9BiZ7wFUCmYif6zQmgzcfOb dBqd+Exp58FXAeNmY+Jw4c5BSoJ4npbj0p1X8E22GAlw4KS9IoqEK8hxWVW0EruvSuTc LdCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=03IfJ58i; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=HpPOfN2d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id c186-20020a254ec3000000b00da039dcb644si3005168ybb.237.2023.10.27.11.33.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 11:33:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=03IfJ58i; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=HpPOfN2d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 19A17808BDB7; Fri, 27 Oct 2023 11:32:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346401AbjJ0Sch (ORCPT + 25 others); Fri, 27 Oct 2023 14:32:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346378AbjJ0ScR (ORCPT ); Fri, 27 Oct 2023 14:32:17 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9052847BC; Fri, 27 Oct 2023 11:29:54 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 74DBA32007F1; Fri, 27 Oct 2023 14:26:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 27 Oct 2023 14:27:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm1; t=1698431218; x=1698517618; bh=SX5fl+Ehwu JvuJSgszNvKWpCysGddZbGyxPGegx2anM=; b=03IfJ58iQg6kqNHZAjKDSOW9WC dyWo/vU4NUtyJZoGGkJLC0j3MXU84+1hpXAwShK4fBfDwFhVygwT1FszYi/sSr6O v25Bs5xNplaNbpsvUou2carBJpqhvzps4kTmR82hVy/GapjEkSX+HIW7KeCBNOxD 4cVb0UYzyN7vuC/G7/7DlJNl3+hYozXf7PDOIq9tuzMvTkqiXlMed+3AWsOqOkX0 mzuABIydFwpTZrCn5EXiAe8aSPQFhEU4Er/BhjMcdfRqx3ja5Nx3fJFqFBnu0MhY fqPka0WW4bE9zRlwSM0iPvmNvPnZLrr/BE5CrflqZgU62+HzHOSea2RKHq7w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1698431218; x=1698517618; bh=SX5fl+EhwuJvu JSgszNvKWpCysGddZbGyxPGegx2anM=; b=HpPOfN2dlfROpP3t8TrgZNgJAQA6n M8ZpKN93bsaQrh1sRVjyH6WKIhjCzvJ0LCPqBt9m4opxgekG1hrijcZ/VXkQowR0 nUh3DmzkJSjULI35unYyQ7L3uwwXbdSzY1TfCN3Vnw6JmjIFO/nQrjdwiAXjuO+J L/hnUDWmNptkycwjjeY0cHZ5Z4JKGZ6eCUcJKPDvjyiCqWYj5dmVBwF4TN7MpJEZ LdBW0v7Lzd6LSN4QcACuMsW6hJBlZ2OP1m4gXTSNYzSlfP+xfVBE96ypUoK1mmmR exOXZHXrIRw9ImvfKgPjO3MwqRWjB1iZZYw8wkQJroBm24q2BzzqdjEwg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrleeggdduvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpeflihgrgihunhcujggrnhhguceojhhirgiguhhnrdihrghnghes fhhlhihgohgrthdrtghomheqnecuggftrfgrthhtvghrnhephfetuddtudevieeljeejte ffheeujeduhefgffejudfhueelleduffefgfffveeknecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgoh grthdrtghomh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Oct 2023 14:26:57 -0400 (EDT) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, tsbogend@alpha.franken.de, gregkh@linuxfoundation.org, jirislaby@kernel.org, Jiaxun Yang Subject: [PATCH 0/3] serial, MIPS: Add MIPS UHI semihosting support Date: Fri, 27 Oct 2023 19:26:43 +0100 Message-Id: <20231027182650.281405-1-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 27 Oct 2023 11:32:46 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780934536703509131 X-GMAIL-MSGID: 1780934614966486099 Hi all, This patchset adds support for MIPS UHI semihosting. It has been implemented on many debugers such as MIPS CodeScape debugger and OpenOCD. It is also supported by QEMU's -semihosting option. I didn't add MAINTAINERS entry for this driver because I find other simple earlycon drivers don't have one either. Do let me know if it should be added. Thanks Jiaxun Jiaxun Yang (3): MIPS: Add header for UHI semihosting defines MIPS: zboot: Add UHI semihosting debug print support serial: Add an earlycon driver for MIPS UHI semihosting arch/mips/Kconfig.debug | 11 + arch/mips/boot/compressed/Makefile | 1 + arch/mips/boot/compressed/dbg-uhi.c | 11 + arch/mips/boot/compressed/dbg.c | 4 +- arch/mips/boot/compressed/decompress.c | 4 + arch/mips/include/asm/uhi.h | 309 +++++++++++++++++++++++++ drivers/tty/serial/Kconfig | 13 ++ drivers/tty/serial/Makefile | 1 + drivers/tty/serial/earlycon-mips-uhi.c | 85 +++++++ 9 files changed, 437 insertions(+), 2 deletions(-) create mode 100644 arch/mips/boot/compressed/dbg-uhi.c create mode 100644 arch/mips/include/asm/uhi.h create mode 100644 drivers/tty/serial/earlycon-mips-uhi.c