From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54EBFC3A59F for ; Thu, 29 Aug 2019 10:59:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2AD6F20828 for ; Thu, 29 Aug 2019 10:59:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="tOnffQYN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727602AbfH2K7X (ORCPT ); Thu, 29 Aug 2019 06:59:23 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:40792 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbfH2K7X (ORCPT ); Thu, 29 Aug 2019 06:59:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=x0XZgx3t1UzfCJFBHVabtWw2MvCtyqf//s0QXH54R5M=; b=tOnffQYNciYRiqyeAqE5jtn7c uAlj5rotHDwY8R7Mb4Z5UbWvoPZOlCTYdIwV04ObchSlBVue1FWGtnjtbQQgdyBP9pTlS2mtuTnVD T92n6hh8q9gQpLV5J6VOcsmC+C6qTB4ws1wJMCSdmEovc2PVjg6HamYApJBpByUXd8PxlVCHaaKlP xMVrHxpYYjl5alLD4cT4tz98Y1PEQ+3T8oti1KvBYNJ1NzgRLXAP2CT7Tznt9bn1i4DuYG/XUu4IN qOdE3GtKdzv9tUDjY4yf9XvLQO5ibDYhhg8V4D7jZDthxoDsGQSLKVU+fnTpUj5UX8B91DpqbLi2L nqeo/dYVw==; Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1i3I99-0002ot-RM; Thu, 29 Aug 2019 10:59:19 +0000 Date: Thu, 29 Aug 2019 03:59:19 -0700 From: "hch@infradead.org" To: Atish Patra Cc: "hch@infradead.org" , "aou@eecs.berkeley.edu" , "alankao@andestech.com" , "gregkh@linuxfoundation.org" , "anup@brainfault.org" , "palmer@sifive.com" , "linux-kernel@vger.kernel.org" , "rppt@linux.ibm.com" , "alexios.zavras@intel.com" , "gary@garyguo.net" , "paul.walmsley@sifive.com" , "linux-riscv@lists.infradead.org" , "tglx@linutronix.de" Subject: Re: [RFC PATCH 0/2] Add support for SBI version to 0.2 Message-ID: <20190829105919.GB8968@infradead.org> References: <20190826233256.32383-1-atish.patra@wdc.com> <20190827144624.GA18535@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 27, 2019 at 10:19:42PM +0000, Atish Patra wrote: > I did not understand this part. All the legacy SBI calls are defined as > a separate extension ID not single extension. How did it break the > backward compatibility ? Yes, sorry I mistead this. The way is is defined is rather non-intuitive, but actually backwards compatible. > I think the confusion is because of legacy renaming. They are not > single legacy extension. They are all separate extensions. The spec > just called all those extensions as collectively as legacy. So I just > tried to make the patch sync with the spec. > > If that's the source of confusion, I can rename it to sbi_0.1_x in > stead of legacy. I think we actually need to fix the spec instead, even if it just the naming and not the mechanism. > > (1) actually board specific and have not place in a cpu abstraction > > layer: getchar/putchar, these should just never be advertised in > > a > > non-legacy setup, and the drivers using them should not probe > > on a sbi 0.2+ system > > In that case, we have to update the drivers(earlycon-riscv-sbi & > hvc_riscv_sbi) in kernel as well. Once these patches are merged, nobody > will be able to use earlycon=sbi feature in mainline kernel. > > Personally, I am fine with it. But there were some interest during > RISC-V workshop in keeping these for now for easy debugging and early > bringup. The getchar/putchar calls unfortunately are fundamentally flawed, as they mean the sbi can still access the console after the host has taken it over using its own drivers. Which will lead to bugs sooner or later. And if you can bring up a console driver in opensbi it should be just as trivial to bring up the kernel version. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7BFEC3A59F for ; Thu, 29 Aug 2019 10:59:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A7D5E20828 for ; Thu, 29 Aug 2019 10:59:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VbRlbmX4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7D5E20828 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FOo2dIIM8ew4MbzqzG+iVa/p0YRcbTrpgvX4BiGcIs0=; b=VbRlbmX4a8YISs hYNpg0mZfiRqIWnknF1qrfyXgk0JeU2G3XFckgnDTs9irWMndHvPLVo6briMSoWGnthyJ/rBvCzC0 A4f3pqU0gNMrv9z32Zt4dD0/Lo2VfPQj3QT8ztTO0lekkyaQOXABbL8POuLFUMyiXIFtJVDh/ZGIF DJ7RSl3RNuFQ8Q/LS10W4eMISpVpyoRh5asxyVu9vO/8nHOuYcGxToCjuypI40mmy1hw5o4JoFV/5 PMaFa7TBmOHuBy3jy/hNshP7B7am9WjQ/dhzvZU6VzSvX5ccv38W+AEPFrqJc0by/kWCPUbUfY7ln M/hksRP3XUS0L7tsprSg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i3I9B-0002pF-E7; Thu, 29 Aug 2019 10:59:21 +0000 Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1i3I99-0002ot-RM; Thu, 29 Aug 2019 10:59:19 +0000 Date: Thu, 29 Aug 2019 03:59:19 -0700 From: "hch@infradead.org" To: Atish Patra Subject: Re: [RFC PATCH 0/2] Add support for SBI version to 0.2 Message-ID: <20190829105919.GB8968@infradead.org> References: <20190826233256.32383-1-atish.patra@wdc.com> <20190827144624.GA18535@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "aou@eecs.berkeley.edu" , "alankao@andestech.com" , "gregkh@linuxfoundation.org" , "palmer@sifive.com" , "linux-kernel@vger.kernel.org" , "rppt@linux.ibm.com" , "hch@infradead.org" , "alexios.zavras@intel.com" , "gary@garyguo.net" , "anup@brainfault.org" , "paul.walmsley@sifive.com" , "linux-riscv@lists.infradead.org" , "tglx@linutronix.de" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org On Tue, Aug 27, 2019 at 10:19:42PM +0000, Atish Patra wrote: > I did not understand this part. All the legacy SBI calls are defined as > a separate extension ID not single extension. How did it break the > backward compatibility ? Yes, sorry I mistead this. The way is is defined is rather non-intuitive, but actually backwards compatible. > I think the confusion is because of legacy renaming. They are not > single legacy extension. They are all separate extensions. The spec > just called all those extensions as collectively as legacy. So I just > tried to make the patch sync with the spec. > > If that's the source of confusion, I can rename it to sbi_0.1_x in > stead of legacy. I think we actually need to fix the spec instead, even if it just the naming and not the mechanism. > > (1) actually board specific and have not place in a cpu abstraction > > layer: getchar/putchar, these should just never be advertised in > > a > > non-legacy setup, and the drivers using them should not probe > > on a sbi 0.2+ system > > In that case, we have to update the drivers(earlycon-riscv-sbi & > hvc_riscv_sbi) in kernel as well. Once these patches are merged, nobody > will be able to use earlycon=sbi feature in mainline kernel. > > Personally, I am fine with it. But there were some interest during > RISC-V workshop in keeping these for now for easy debugging and early > bringup. The getchar/putchar calls unfortunately are fundamentally flawed, as they mean the sbi can still access the console after the host has taken it over using its own drivers. Which will lead to bugs sooner or later. And if you can bring up a console driver in opensbi it should be just as trivial to bring up the kernel version. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv