Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1532184lqb; Sun, 26 May 2024 05:44:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXSUBXWwvXtMYE4QhODN3mdJFOu0Xn17PUMqZQ0t/4wkevXon0h/4JwUSted6q50yJaIXQRckZ0BYYlP5OyunxWX2S3c3acZrT+H+VcBg== X-Google-Smtp-Source: AGHT+IFydJSZQzHPXsqvcIJVv9NX+0rLkdV1MtaKtSPJSD+quzAsbHkOraKDTwdemEWI0lhLiNJX X-Received: by 2002:a17:907:1b0a:b0:a62:b97b:b3bb with SMTP id a640c23a62f3a-a62b97bb496mr247566566b.74.1716727474789; Sun, 26 May 2024 05:44:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716727474; cv=pass; d=google.com; s=arc-20160816; b=0aDsmLqo7BeH0cd6lvnLqGTpHDVdWYawZeU145BASUmRVO9V94Pt1zqcxthT6/U7cX 0TGD43W1wkUalylTBtuKtx1UJMIDlblcrgb/n1vICt8NU/fmhNKTsgvhP4AeMFcaEnEJ 3Hk81quuEmxevVPKo8o2oRkRt5Hecn/ZdBZtkPvKHHkNlhLBQc2I0z5pmkp/2H/l9EjR i1+YIFHL5SUn0N1vdL8l3MvkOBp7np8uv5PSK+IR7K36rj2hSd0ZDEgVpYJZNEShOk2j EVa+FbNdCONDV/KR2+8lRlDdng9dl2WddSBs3OUKAcEP8Slgl4ykLWfoc1uLvN38J2UF M1Ig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date; bh=rowOPY6VAMYNEpDQbiFuw4YzcvJnMTKMoucKQs62rD0=; fh=Oq07JzmVYhXtN79efFxd6fyrtwa+0QKUY7pO+7slkJM=; b=G0YxsbaGTQ4N/Px6XU9/1F2dJFajh092VGHIhJjCRkuSv0umf8TS5sAn1MHwfOaRws W08KShPIq6/mWXabbIyN0CVp9wbuQA0aTLRXHgQ3YR0AOkkL0ayqyWNaIbadZZwyc2qT cEoXac1TTx8uiNUKuzZt5DH+LAwqgyzpSctBOL8O7PBYGP4aRgQAhsUMSLjRNd4XQBAx soRYJwoH0LetJBZgnv3e21JJLutoZrB5T6RT0X54ftvVUXM1Bf1BaEPa46OHsXTr9im0 hcJzM/FIDLJvCRfdAcBmyIOOuqsmYmn0wjPcxpxd6HTtWF5iCvIW89l3SW2YkirQo+o+ KuIg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-189738-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189738-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a626c800e41si295345866b.110.2024.05.26.05.44.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 05:44:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189738-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-189738-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189738-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7D5D71F2130D for ; Sun, 26 May 2024 12:44:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4F47111A3; Sun, 26 May 2024 12:44:19 +0000 (UTC) Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CF74E10A25; Sun, 26 May 2024 12:44:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.133.224.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716727459; cv=none; b=qmux1/89rbWOb1ZbQtwKBun3WByhjVLTMAFNdklgg1+y7X9NpPGj05vpngx8I4bMmPBeDHeqIan60ZALOCrmlIhxXkO+yungSwcHrImWtPohN9c/IsHMLIXHnrKknqcKs4EVHC+IhO/PeyGH2V1J07C/rZ7TFsQOTLqjSEyrq1k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716727459; c=relaxed/simple; bh=g6i85qqwj3MGax/kH7EXAdoQlIeb9sPfRzXZA92Ashg=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=pP4tyhj/fI3s0CP/ItwVo/huzLBwiXVNDLiH+XiuWdwhMNVFkb0EKk7DV2tYzD279RVDoxjTChs33ilm5BYQOsiXqRlIBtYcJrmOMr9mDgpxy0EeYpngawh/CgcSpbBJbzEdv4LGEljw8GenaQKnF/U3w1CeG7Lm1MQlW9ELs5U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk; spf=none smtp.mailfrom=orcam.me.uk; arc=none smtp.client-ip=78.133.224.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=orcam.me.uk Received: by angie.orcam.me.uk (Postfix, from userid 500) id DF3BA92009C; Sun, 26 May 2024 14:44:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id D17C992009B; Sun, 26 May 2024 13:44:07 +0100 (BST) Date: Sun, 26 May 2024 13:44:07 +0100 (BST) From: "Maciej W. Rozycki" To: Jiaxun Yang cc: Thomas Bogendoerfer , "linux-mips@vger.kernel.org" , linux-kernel@vger.kernel.org, =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= Subject: Re: [PATCH v3 0/9] MIPS: Unify low-level debugging functionalities In-Reply-To: Message-ID: References: <20240502-mips_debug_ll-v3-0-3b61f30e484c@flygoat.com> <3dcf3ac1-5494-482a-a80a-df4126e6ae59@app.fastmail.com> <3d6883ed-f8f4-44e5-a184-e5499c44f0f7@app.fastmail.com> <13aa508f-6830-4d52-87fd-5063f737c990@app.fastmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII On Wed, 22 May 2024, Jiaxun Yang wrote: > That being said, have you noticed that prom_putchar and early_printk is > a non-extant on generic mach, ingenic, ralink etc? That's because we > really don't want to introduce any platform specific UART code for > early debugging on new platforms. With DEBUG_LL introduced by Arm it's > only a Kconfig option to do the trick. IMHO that is however the logical thing to do. And then you need no magic options to fiddle with and say a distribution kernel will dump whatever it has to say if something wrong has happened early on. IOW just wire `prom_putchar' as required, using C code preferably. NB YAMON does have a `print' entry point for console output, so for the Malta platform you can trivially use just that, no need for messy ad hoc 8250 code. As to intercepting exceptions, it depends. Again YAMON does handle that and dumps the register state, so with the Malta you get the information required. For less capable ones it might make sense, but it ISTM like a candidate for an independent change, and then again I fail to see why the handler has to be written in the assembly language rather than C. Maciej