Received: by 10.223.164.202 with SMTP id h10csp5433948wrb; Tue, 21 Nov 2017 09:37:52 -0800 (PST) X-Google-Smtp-Source: AGs4zMZwfr+Vt2LMy83F5gzIIDZ6LGC+/oOhU5HnF79iOJbhsSncwp7KoROMFYmrsFlzsi6Cn5Gl X-Received: by 10.84.130.67 with SMTP id 61mr18039982plc.368.1511285872700; Tue, 21 Nov 2017 09:37:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511285872; cv=none; d=google.com; s=arc-20160816; b=vcA0H7UViity+yWV/ls+IgsZ0qPnn7DH2aqH7Lxefalmys/noCdnkrvo3ixFK5CMRJ qnTltBOhb9+w+41xyri40DiYY+gkauCDVlxrVXCyAxYXeibbogiMRb8fKYiPdKtJm5+H TkDFg8FRGCRdQPGoH1Eb0u6bmkmt67scbcd5qtJlajY0aPnESw9jqS302Aht+M3eJIoi ocxJCBHMo9Etc4mfvAGzpv1D32W+K6h7pFZfsYMqc5MhqcEOgqdvseGvrb7FUOM5FloR rfPRtgSpjGeUrM+qx0evEIyFocTUrYKNIkWz8D5Ag6LXcf9a0yU876h3lAn41sUt6JPJ ILBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date :arc-authentication-results; bh=DEekRCxFtadnAz0f7pglGlARJ83upL0GkkBtRNjijq4=; b=MceGc2B2w+td4q1zkRlEMmZN5XZCTMqBOSX4abe8yUBXgQ+F19qvmrXkmdsPu6PIw4 MpYKbsvn8JiVgM/vcDnybsg8sD2FDbYLrU/yayj5D1lZDT6O7DcHEYvB21WDF6Rx6gWl kMXRB+WCK4FxCUQsQQlLodX985EF/fzgsyDE4kf89YWZfWIO9gUwYIy0uqDP0YZMkS9K HUjzTDMavq5/w5oZ7/QNUJOqX5MZY2x+llXOZUzbeU1nXWIBBH8lEzNbopHI7XcvAPpz ot9qoV0TvbHaAMVgxqXv3ppa/3tY8fNMmQXaOJz/OKOnh5/CaU0wKpGSpyUmlpAAuH5u NYoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6si7732799pgo.89.2017.11.21.09.37.41; Tue, 21 Nov 2017 09:37:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751309AbdKURhF (ORCPT + 75 others); Tue, 21 Nov 2017 12:37:05 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:43123 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751191AbdKURhD (ORCPT ); Tue, 21 Nov 2017 12:37:03 -0500 Received: by mail-pf0-f194.google.com with SMTP id r68so4167417pfe.10 for ; Tue, 21 Nov 2017 09:37:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=DEekRCxFtadnAz0f7pglGlARJ83upL0GkkBtRNjijq4=; b=Ly5iLJGYxBInSVRYWYz2grd5AJmerP5sb9m7OdvkwktefD6A5vjrIKIcoasS6uxqpp 1kAiH0fPh5pv/BIvj70pN2nO4QqE2hsxtdwlKMXhUsqKCDecYvUdCTk29o+ZTKZvzufl 9bRizr8DQ20lHgS0QveTg45ARJgo6SjwscZuJ/o+kwsp5cNpp2YO67UwFTJD4YcNn0GQ fiDSAPXMQvRPtZxrNUoEGDe2UhMiwoGLD9CUNvCmbtzMZNLkbaO2wIFdw9YtRs8PJBIl jZffjcASGft36bqbgG0768rsWSAFrsD/USUF32XsWzfbi4uyea8r3leQjpC1Qe9YBDJG cepQ== X-Gm-Message-State: AJaThX4R4xqlX/55l+Kg4Ts7fbVV6C8M76KhHJzQXhCt9gUiKmVvfDaC nFd2SfJNGoJ2FOQTjdjqh5daOg== X-Received: by 10.159.207.134 with SMTP id z6mr17951724plo.272.1511285823204; Tue, 21 Nov 2017 09:37:03 -0800 (PST) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id 76sm25869193pfn.179.2017.11.21.09.37.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Nov 2017 09:37:02 -0800 (PST) Date: Tue, 21 Nov 2017 09:37:02 -0800 (PST) X-Google-Original-Date: Tue, 21 Nov 2017 09:36:57 PST (-0800) Subject: Re: [patches] Re: [PATCH] dt-bindings: Add a RISC-V SBI firmware node In-Reply-To: <20171120214520.dcaqvyncojwefmgt@rob-hp-laptop> CC: mark.rutland@arm.com, devicetree@vger.kernel.org, patches@groups.riscv.org, linux-kernel@vger.kernel.org From: Palmer Dabbelt To: robh@kernel.org, j.neuschaefer@gmx.net Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 20 Nov 2017 13:45:20 PST (-0800), robh@kernel.org wrote: > On Mon, Nov 20, 2017 at 11:50:00AM -0800, Palmer Dabbelt wrote: >> The RISC-V privileged ISA mandates the presence of an SBI, but there's >> no reason not to put it in the device tree. This would allow us to >> possibly remove the SBI later. > > If it is mandatory, then it should not be in DT. DT is not a driver > instantiation mechanism. > > If your ISA can vary, I'd recommend you make that discoverable. DT is > for what we failed to make discoverable. OK, that makes sense. Since this the presence of an SBI is mandated by the ISA there's no way to discover it (just like there's no way to discover a load instruction). For extensibility reasons you can, of course, determine which SBI calls are implemented, but this mechanism assumes you have something running to catch the SBI calls on the other end (SBI calls are just system calls from the Linux). I think the original goal here was to avoid an SBI entirely, which isn't something the ISA is designed for. This isn't really a big deal to me, as I'm only interested in RISC-V systems, but there's been some pushback on the concept of an SBI so it seemed like a simple way to allow people to build non-SBI (and there for not really RISC-V) systems. One option that wouldn't require a device tree node would be to have Linux boot in machine mode (where the SBI implementation lives on systems without a hypervisor, if you've got a hypervisor then I assume the SBI isn't a problem) and then provide its own SBI implementation. This wouldn't impose any additional burden: if there's no SBI then Linux will need to start in machine mode because that's where you need to be in order to do the things the SBI implementation needs to go. This will be awkward to implement, but having a device tree entry won't help with any of that. I think the right thing to do here is just not define a device tree entry. From 1584672129508343654@xxx Tue Nov 21 10:45:09 +0000 2017 X-GM-THRID: 1584615981624343565 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread