Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2233365rdh; Sun, 29 Oct 2023 06:47:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGTIPgGSAlhMuRB+Xyg619Al7gLdVENNx7zXSiIr8T+4LR4zarhKGea3qFJz83sg76TZq05 X-Received: by 2002:a17:90a:d998:b0:27d:5be:f218 with SMTP id d24-20020a17090ad99800b0027d05bef218mr5927173pjv.23.1698587229366; Sun, 29 Oct 2023 06:47:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698587229; cv=none; d=google.com; s=arc-20160816; b=PPr0LMQ97fSZyoK96L5jI7lCq8/Oj/lhfDzdLiyYj1j0zZ3v1r94J3Eic71dY+1wCd 6DG4POcPzrkHV/axcnPUQhyjcoMlav4wv4i62c+wbzfN+cdlxNUkLhPiV/smGRK6SBkk ynUGcXC7LMgHUxAA85edSjrBKJla8s6MQH+nke/r1dNrvYMyK7zZ44xvp9jwYqNglFoF 6z44lXJIYZ6RzItPMwgP2hY1FWMHn+9XxD/XygIZ8nBPCCzjZrB9cAaH/ficlZrMmdJH EJFvYr7qlOtXaNUWrs2yzbNgSXKAFE9AWFLTqk/X3U+ROhcprTdtT+uSokxzX+6pzl1O 1zsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:feedback-id:dkim-signature :dkim-signature; bh=jtPdlzGB01j+zIhuSpzNxxVPJdcsn8CG2BgqukBh1go=; fh=Dii/wXcZb/mJUCmsdlZbBl/o0XRcaQ9S/xOY9NGTLc4=; b=CWcPS1+JnKJpupT8wVp0JNLqqcc1yYiVL+c1cIcg1ywK/RZFWn1H12lB/8DgSnK+g0 ukG2Rsqgzx9nJiI1PblH7YirY/hQK4nAWuTOGBdQuQbcJtv7cxkBW5cvYrw99WPlDEm5 eGV5geyAcQrF0AGoMeoKJ/1VknKfs7rC7l4cKmmK2dRboOwO1NYp+CKZLvk+Hmn4vqLR ZkH09c7XDTvULvgrJpUUaeF/I2D3gF6DkO5egvoyKtcJ+KN3sQENGLnPMAHxQxvtwsbX nLIvVjHDEvJqt1+9B1uP5jmWC45nE/QFnJrBs0+vdOi4WRCgv9l3pK6hR0o4g1n5H9FY 8sfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=ND5yxJRP; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=XfkW8ZcZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id u23-20020a17090a0c5700b0028064db8826si169382pje.127.2023.10.29.06.47.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 06:47:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=ND5yxJRP; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=XfkW8ZcZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id D96B7807365A; Sun, 29 Oct 2023 06:46:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230129AbjJ2Np4 (ORCPT + 99 others); Sun, 29 Oct 2023 09:45:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbjJ2Npx (ORCPT ); Sun, 29 Oct 2023 09:45:53 -0400 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE5E3BF; Sun, 29 Oct 2023 06:45:50 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 1FF0A320027A; Sun, 29 Oct 2023 09:45:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 29 Oct 2023 09:45:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:message-id:mime-version:reply-to :sender:subject:subject:to:to; s=fm1; t=1698587147; x= 1698673547; bh=jtPdlzGB01j+zIhuSpzNxxVPJdcsn8CG2BgqukBh1go=; b=N D5yxJRP5opfVgZKtMKBoAihYpEsAlQF8+jFRodmy5WMW9X6XapO0DO0WWE1uzJSH Vi9eff7xlGmJbvmHc+TFxhiOxsBWEl3f1+ZWsYV9zwfEKFs2JwTxPxfd5+9oDMQ2 ivGvwPp+pQdTw4eEsSCKXUNNmmMFQCn9QfWh8fEc2T1QPR7Nb/uSprQFqCqYpAp5 xo3YK2pPSVUAeZQQvOFRvyFJSEk9LXxsdXIbQds91EECRV+WaqcULr/p2sJbLvZ+ IowKAk6fk6PuRfGQQCl/15YuWh1MHlKOVuVzB3krtvOkokgV29MkszKPs/gJD67j Fs0oAb7T+r3geroFQnJfA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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=1698587147; x=1698673547; bh=j tPdlzGB01j+zIhuSpzNxxVPJdcsn8CG2BgqukBh1go=; b=XfkW8ZcZy5CKQgjy6 BlTa7z54/h6yFwR0X3phR71tD32QMx6m0/S8rcR4py7jUAP2wfFtaWfVx7doC2NT xACVwd+JudeS1TQohvz10/sb1tfIG0+2UldF8cMhYnSTM9qg7GxO2iXRyfS+BiKK KdEFKnIm7tiOQ6HZjGJuOgchDQEYMnBT5miv31ZPwxikkV4OMGw4ThwXBsL+Uv3z gr6GObE9lpcU32yUU6DQENIY69xSY6oEbokxCwNajt6J9ao1G+O2ohVa2yhMyDS2 iyBMu/3hYFvnBe5JSvO1QnaPZ2CdC++bcy3tOBbG5h3lxOVD47zPFGmsUc7rhV1W ZkCbg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrleekgdehhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhufffkfggtgfgvfevofesthejredtredtjeenucfhrhhomheplfhirgiguhhn ucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqeenucggtf frrghtthgvrhhnpefgveffjeetgeejfeelgfekteelkefhuefggedvueeujeekjeetkeek vdffffefudenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhirgiguhhnrdihrghnghesfhhl hihgohgrthdrtghomh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 29 Oct 2023 09:45:46 -0400 (EDT) From: Jiaxun Yang Subject: [PATCH 0/8] MIPS: Unify low-level debugging functionalities Date: Sun, 29 Oct 2023 02:53:01 +0000 Message-Id: <20231029-mips_debug_ll-v1-0-d7a491e8c278@flygoat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAA3JPWUC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI2NDAyML3dzMguL4lNSk0vT4nBzd1DTL5ORUQzNzM/MkJaCegqLUtMwKsHn RsbW1AMsMQrtfAAAA To: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Jiaxun Yang X-Mailer: b4 0.12.4 X-Spam-Status: No, score=0.3 required=5.0 tests=DATE_IN_PAST_06_12,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Sun, 29 Oct 2023 06:46:35 -0700 (PDT) Hi all, This is a attempt to bring all low-level debugging print functions together and provide a arm-like low-level debugging interface and a further function to debug early exceptions. The plan is to elimiate platform specific early_printk and cps-vec-ns16550 by debug_ll and earlycon. cps-vec-ns16550 is leave unchanged for now due to pending patch[1]. Hope you'll find them handy :-) Happy hacking! Thanks Jiaxun [1]: https://lore.kernel.org/linux-mips/20231027221106.405666-6-jiaxun.yang@flygoat.com/ Signed-off-by: Jiaxun Yang --- Jiaxun Yang (8): MIPS: asm: Move strings to .rodata.str section MIPS: debug: Implement low-level debugging functions MIPS: debug: Hook up DEBUG_LL with early printk MIPS: debug: Provide an early exception vector for low-level debugging MIPS: debug_ll: Add Kconfig symbols for some 8250 uarts MIPS: debug_ll: Implement support for Alchemy uarts MIPS: debug_ll: Implement support for AR933X uarts MIPS: zboot: Convert to use debug_ll facilities arch/mips/Kconfig | 12 +- arch/mips/Kconfig.debug | 212 +++++++++++++++++++++++++++---- arch/mips/boot/compressed/Makefile | 9 +- arch/mips/boot/compressed/dbg.c | 37 ------ arch/mips/boot/compressed/debug-vec.S | 3 + arch/mips/boot/compressed/debug.S | 3 + arch/mips/boot/compressed/decompress.c | 6 +- arch/mips/boot/compressed/head.S | 6 + arch/mips/boot/compressed/uart-16550.c | 47 ------- arch/mips/boot/compressed/uart-alchemy.c | 7 - arch/mips/boot/compressed/uart-ath79.c | 2 - arch/mips/boot/compressed/uart-prom.c | 7 - arch/mips/include/asm/asm.h | 2 +- arch/mips/include/debug/8250.S | 60 +++++++++ arch/mips/include/debug/alchemy.S | 46 +++++++ arch/mips/include/debug/ar933x.S | 41 ++++++ arch/mips/include/debug/uhi.S | 48 +++++++ arch/mips/kernel/Makefile | 3 + arch/mips/kernel/debug-vec.S | 194 ++++++++++++++++++++++++++++ arch/mips/kernel/debug.S | 130 +++++++++++++++++++ arch/mips/kernel/early_printk.c | 19 +++ arch/mips/kernel/head.S | 4 + 22 files changed, 750 insertions(+), 148 deletions(-) --- base-commit: 66f1e1ea3548378ff6387b1ce0b40955d54e86aa change-id: 20231028-mips_debug_ll-ef9cce16767b Best regards, -- Jiaxun Yang