linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: abner.chang@hpe.com (Chang, Abner (HPS SW/FW Technologist))
To: linux-riscv@lists.infradead.org
Subject: SBI extension proposal
Date: Fri, 2 Nov 2018 04:29:08 +0000	[thread overview]
Message-ID: <TU4PR8401MB09584566CCE279C368CFC145FFCF0@TU4PR8401MB0958.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CAAhSdy3ZX=BqMS-MYnTHNZ9hxkJbt8i5nf5rOTf41FJ6rUpWpA@mail.gmail.com>

> -----Original Message-----
> From: Anup Patel [mailto:anup at brainfault.org]
> Sent: Friday, November 02, 2018 11:27 AM
> To: Palmer Dabbelt <palmer@sifive.com>
> Cc: merker at debian.org; rjones at redhat.com; Mark Rutland
> <mark.rutland@arm.com>; Christoph Hellwig <hch@infradead.org>; Damien
> Le Moal <Damien.LeMoal@wdc.com>; Olof Johansson
> <olof.johansson@gmail.com>; Andrew Waterman <andrew@sifive.com>;
> alankao at andestech.com; philipp at hug.cx; Zong Li <zong@andestech.com>;
> Atish Patra <atish.patra@wdc.com>; Michael Clark <mjc@sifive.com>; Arnd
> Bergmann <arnd@arndb.de>; paul.walmsley at sifive.com; linux-
> riscv at lists.infradead.org; Chang, Abner (HPS SW/FW Technologist)
> <abner.chang@hpe.com>; vincentc at andestech.com;
> David.Abdurachmanov at cern.ch
> Subject: Re: SBI extension proposal
> 
> On Fri, Nov 2, 2018 at 8:19 AM Palmer Dabbelt <palmer@sifive.com> wrote:
> >
> > On Thu, 01 Nov 2018 09:42:05 PDT (-0700), merker at debian.org wrote:
> > > On Thu, Nov 01, 2018 at 09:46:09AM +0000, Richard W.M. Jones wrote:
> > >> On Thu, Nov 01, 2018 at 03:05:51PM +0530, Anup Patel wrote:
> > > [...]
> > >> > > How about putting the version information into device tree and
> > >> > > use the compatible string?  This seems more reliable than
> > >> > > probing.
> > >> > > e.g.
> > >> > > firmware {
> > >> > >         sbi {
> > >> > >                 compatible = "riscv,sbi-r0p1", "riscv,sbi-r0p2";
> > >> > >         };
> > >> > > };
> > >> >
> > >> > If it was just DT then I think having this information in DT
> > >> > makes sense. In future, we might definitely see some ACPI support
> > >> > in RISC-V too (just like ARM64 world).
> > >>
> > >> I agree.  Please try not to make things that depend on DT, as it's
> > >> a Linux-only description which isn't suitable for other OSes and
> > >> has a poorly defined ABI.
> > >
> > > the notion that DT is a "Linux-only" description and not suitable
> > > for other operating systems isn't correct.  Besides being used by
> > > Linux, device-tree is also used by at least U-Boot, FreeBSD and
> > > NetBSD.  Based on issues in the early days of DT one can surely
> > > discuss about device-tree ABI stability, but since then a lot of
> > > effort has been put into making DT ABI-stable, and in my experience
> > > this effort has been successful.  On the other hand I have
> > > experienced way more ACPI issues on x86-64 hardware than I would
> > > like to remember, so I tend to assume that in the ACPI world also
> > > not everything is nice and shining.
> >
> > I'm treating device tree as a stable interface, at least once it's
> > written down as a spec (like all our other interfaces).  At SiFive
> > we're treating it as the standard interface for static device
> > discovery, so interface breaks will be a huge pain.
> 
> DT is a great HW description style (my opinion) but then there are ACPI fans
> too.
> 
> I think SBI spec should be independent of DT or ACPI or any other HW
> description style. In fact, a simple bare-metal programs (without DT or ACPI
> support) should also be able to make complete use of SBI. This will allow us
> to develop baremetal test suit for SBI calls.
> 
Agree.
Please also consider EFI firmware code base. There is no DT in UEFI spec for H/W devices or other information. We would like to leverage SBI spec as well, and implement SBI in EFI firmware. Having SBI version in SBI spec makes more sense to different FW frameworks.

> Regards,
> Anup

WARNING: multiple messages have this Message-ID (diff)
From: "Chang, Abner (HPS SW/FW Technologist)" <abner.chang@hpe.com>
To: Anup Patel <anup@brainfault.org>, Palmer Dabbelt <palmer@sifive.com>
Cc: Mark Rutland <mark.rutland@arm.com>, Zong Li <zong@andestech.com>,
	Damien Le Moal <Damien.LeMoal@wdc.com>,
	Olof Johansson <olof.johansson@gmail.com>,
	Andrew Waterman <andrew@sifive.com>,
	"alankao@andestech.com" <alankao@andestech.com>,
	"Chen, Gilbert" <gilbert.chen@hpe.com>,
	"philipp@hug.cx" <philipp@hug.cx>,
	"vincentc@andestech.com" <vincentc@andestech.com>,
	"rjones@redhat.com" <rjones@redhat.com>,
	Christoph Hellwig <hch@infradead.org>,
	Atish Patra <atish.patra@wdc.com>, Michael Clark <mjc@sifive.com>,
	Arnd Bergmann <arnd@arndb.de>,
	"paul.walmsley@sifive.com" <paul.walmsley@sifive.com>,
	"merker@debian.org" <merker@debian.org>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	"David.Abdurachmanov@cern.ch" <David.Abdurachmanov@cern.ch>
Subject: RE: SBI extension proposal
Date: Fri, 2 Nov 2018 04:29:08 +0000	[thread overview]
Message-ID: <TU4PR8401MB09584566CCE279C368CFC145FFCF0@TU4PR8401MB0958.NAMPRD84.PROD.OUTLOOK.COM> (raw)
Message-ID: <20181102042908.SCCJ-rHNJwqFSbdrYf8FcaWL8T66rO1vG9QkC7Lzdds@z> (raw)
In-Reply-To: <CAAhSdy3ZX=BqMS-MYnTHNZ9hxkJbt8i5nf5rOTf41FJ6rUpWpA@mail.gmail.com>

> -----Original Message-----
> From: Anup Patel [mailto:anup@brainfault.org]
> Sent: Friday, November 02, 2018 11:27 AM
> To: Palmer Dabbelt <palmer@sifive.com>
> Cc: merker@debian.org; rjones@redhat.com; Mark Rutland
> <mark.rutland@arm.com>; Christoph Hellwig <hch@infradead.org>; Damien
> Le Moal <Damien.LeMoal@wdc.com>; Olof Johansson
> <olof.johansson@gmail.com>; Andrew Waterman <andrew@sifive.com>;
> alankao@andestech.com; philipp@hug.cx; Zong Li <zong@andestech.com>;
> Atish Patra <atish.patra@wdc.com>; Michael Clark <mjc@sifive.com>; Arnd
> Bergmann <arnd@arndb.de>; paul.walmsley@sifive.com; linux-
> riscv@lists.infradead.org; Chang, Abner (HPS SW/FW Technologist)
> <abner.chang@hpe.com>; vincentc@andestech.com;
> David.Abdurachmanov@cern.ch
> Subject: Re: SBI extension proposal
> 
> On Fri, Nov 2, 2018 at 8:19 AM Palmer Dabbelt <palmer@sifive.com> wrote:
> >
> > On Thu, 01 Nov 2018 09:42:05 PDT (-0700), merker@debian.org wrote:
> > > On Thu, Nov 01, 2018 at 09:46:09AM +0000, Richard W.M. Jones wrote:
> > >> On Thu, Nov 01, 2018 at 03:05:51PM +0530, Anup Patel wrote:
> > > [...]
> > >> > > How about putting the version information into device tree and
> > >> > > use the compatible string?  This seems more reliable than
> > >> > > probing.
> > >> > > e.g.
> > >> > > firmware {
> > >> > >         sbi {
> > >> > >                 compatible = "riscv,sbi-r0p1", "riscv,sbi-r0p2";
> > >> > >         };
> > >> > > };
> > >> >
> > >> > If it was just DT then I think having this information in DT
> > >> > makes sense. In future, we might definitely see some ACPI support
> > >> > in RISC-V too (just like ARM64 world).
> > >>
> > >> I agree.  Please try not to make things that depend on DT, as it's
> > >> a Linux-only description which isn't suitable for other OSes and
> > >> has a poorly defined ABI.
> > >
> > > the notion that DT is a "Linux-only" description and not suitable
> > > for other operating systems isn't correct.  Besides being used by
> > > Linux, device-tree is also used by at least U-Boot, FreeBSD and
> > > NetBSD.  Based on issues in the early days of DT one can surely
> > > discuss about device-tree ABI stability, but since then a lot of
> > > effort has been put into making DT ABI-stable, and in my experience
> > > this effort has been successful.  On the other hand I have
> > > experienced way more ACPI issues on x86-64 hardware than I would
> > > like to remember, so I tend to assume that in the ACPI world also
> > > not everything is nice and shining.
> >
> > I'm treating device tree as a stable interface, at least once it's
> > written down as a spec (like all our other interfaces).  At SiFive
> > we're treating it as the standard interface for static device
> > discovery, so interface breaks will be a huge pain.
> 
> DT is a great HW description style (my opinion) but then there are ACPI fans
> too.
> 
> I think SBI spec should be independent of DT or ACPI or any other HW
> description style. In fact, a simple bare-metal programs (without DT or ACPI
> support) should also be able to make complete use of SBI. This will allow us
> to develop baremetal test suit for SBI calls.
> 
Agree.
Please also consider EFI firmware code base. There is no DT in UEFI spec for H/W devices or other information. We would like to leverage SBI spec as well, and implement SBI in EFI firmware. Having SBI version in SBI spec makes more sense to different FW frameworks.

> Regards,
> Anup
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2018-11-02  4:29 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31 18:23 SBI extension proposal Atish Patra
2018-10-31 18:23 ` Atish Patra
     [not found] ` <CAK-hmcQeiGa3BwnzEVB_dyhFiC7rXHFN-wTsJomg-jAo7a+v3Q@mail.gmail.com>
2018-10-31 19:11   ` Olof Johansson
2018-10-31 19:11     ` Olof Johansson
2018-10-31 20:37     ` Atish Patra
2018-10-31 20:37       ` Atish Patra
2018-11-02  6:31       ` Chang, Abner (HPS SW/FW Technologist)
2018-11-02  6:31         ` Chang, Abner (HPS SW/FW Technologist)
2018-11-02 22:31         ` Atish Patra
2018-11-02 22:31           ` Atish Patra
2018-11-04 14:36           ` Chang, Abner (HPS SW/FW Technologist)
2018-11-04 14:36             ` Chang, Abner (HPS SW/FW Technologist)
     [not found] ` <CA+h06zgcyWz7WMbzQxjyc9V5S3CokqSoO1mGOaynJE3uJE5QSg@mail.gmail.com>
2018-11-01  9:35   ` Anup Patel
2018-11-01  9:35     ` Anup Patel
2018-11-01  9:46     ` Richard W.M. Jones
2018-11-01  9:46       ` Richard W.M. Jones
2018-11-01 11:03       ` Philipp Hug
2018-11-01 11:03         ` Philipp Hug
2018-11-01 11:25         ` Richard W.M. Jones
2018-11-01 11:25           ` Richard W.M. Jones
2018-11-01 15:09           ` Atish Patra
2018-11-01 15:09             ` Atish Patra
2018-11-02  3:17             ` Olof Johansson
2018-11-02  3:17               ` Olof Johansson
2018-11-01 16:42       ` Karsten Merker
2018-11-02  2:49         ` Palmer Dabbelt
2018-11-02  2:49           ` Palmer Dabbelt
2018-11-02  3:27           ` Anup Patel
2018-11-02  3:27             ` Anup Patel
2018-11-02  4:29             ` Chang, Abner (HPS SW/FW Technologist) [this message]
2018-11-02  4:29               ` Chang, Abner (HPS SW/FW Technologist)
2018-11-02 15:24 ` Nick Kossifidis
2018-11-02 15:24   ` Nick Kossifidis
2018-11-02 23:12   ` Atish Patra
2018-11-02 23:12     ` Atish Patra
2018-11-02 23:45     ` Nick Kossifidis
2018-11-02 23:45       ` Nick Kossifidis
2018-11-03  0:00       ` Atish Patra
2018-11-03  0:00         ` Atish Patra
2018-11-05 13:50         ` Nick Kossifidis
2018-11-05 13:50           ` Nick Kossifidis
2018-11-05 18:51           ` Atish Patra
2018-11-05 18:51             ` Atish Patra
2018-11-06  1:55             ` Zong Li
2018-11-06  1:55               ` Zong Li
2018-11-09 21:47               ` Atish Patra
2018-11-09 21:47                 ` Atish Patra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=TU4PR8401MB09584566CCE279C368CFC145FFCF0@TU4PR8401MB0958.NAMPRD84.PROD.OUTLOOK.COM \
    --to=abner.chang@hpe.com \
    --cc=linux-riscv@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).