Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3

2019-07-04 Thread Alistair Francis
On Thu, Jul 4, 2019 at 9:11 AM Stefan Hajnoczi  wrote:
>
> On Mon, Jul 01, 2019 at 07:01:12PM +0100, Peter Maydell wrote:
> > On Mon, 1 Jul 2019 at 18:50, Alistair Francis  
> > wrote:
> > >
> > > On Mon, 2019-07-01 at 17:54 +0100, Peter Maydell wrote:
> > > > On Thu, 27 Jun 2019 at 16:24, Palmer Dabbelt 
> > > > wrote:
> > > > > From: Alistair Francis 
> > > > Also, new git modules in .gitmodules should be qemu.org
> > > > URLs, not random external ones. (ie, we should set up
> > > > mirroring of any new external repo we start shipping
> > > > code and binaries for). We can set this up and fix up the
> > > > gitmodules file after the fact, but the ideal is to do
> > > > it in advance rather than afterwards.
> > >
> > > Ok, who can setup a git mirror for the QEMU repo?
> >
> > That would be Jeff or Stefan (cc'd).
>
> Please let me know when you're ready and I'll set up a git mirror.

I'm ready whenever. We have a long weekend here so I'll be back at
work on Monday and send the new version of the patch with version 0.4
of OpenSBI.

>
> Your commit can be merged as normal and then I'll send another one
> updating it to a git.qemu.org mirror.

Works for me. If the mirror is setup by Monday I will use it in the
first commit as well.

Thanks for helping with this Stefan

Alistair

>
> Stefan



Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3

2019-07-04 Thread Stefan Hajnoczi
On Mon, Jul 01, 2019 at 07:01:12PM +0100, Peter Maydell wrote:
> On Mon, 1 Jul 2019 at 18:50, Alistair Francis  
> wrote:
> >
> > On Mon, 2019-07-01 at 17:54 +0100, Peter Maydell wrote:
> > > On Thu, 27 Jun 2019 at 16:24, Palmer Dabbelt 
> > > wrote:
> > > > From: Alistair Francis 
> > > Also, new git modules in .gitmodules should be qemu.org
> > > URLs, not random external ones. (ie, we should set up
> > > mirroring of any new external repo we start shipping
> > > code and binaries for). We can set this up and fix up the
> > > gitmodules file after the fact, but the ideal is to do
> > > it in advance rather than afterwards.
> >
> > Ok, who can setup a git mirror for the QEMU repo?
> 
> That would be Jeff or Stefan (cc'd).

Please let me know when you're ready and I'll set up a git mirror.

Your commit can be merged as normal and then I'll send another one
updating it to a git.qemu.org mirror.

Stefan


signature.asc
Description: PGP signature


Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3

2019-07-02 Thread Alistair Francis
On Tue, Jul 2, 2019 at 3:34 AM Paolo Bonzini  wrote:
>
> On 02/07/19 06:12, Markus Armbruster wrote:
> >> Yeah, if we're not building the apache-2.0 parts then I think
> >> we're OK, and as you say there's the question of whether QEMU's
> >> GPL affects what we ship as mere bios blobs to run as guest
> >> code anyway. But it's sufficiently not a "really obviously ok"
> >> that I'd like a second opinion; cc'd some people who might have
> >> second opinions.
> >
> > You need an expert opinion.
> >
> > My non-expert opinion: we can't distribute anything that's not
> > compatible with GPLv2
>
> Guest code is not part of QEMU.  We don't say that SeaBIOS, SLOF, etc.
> are part of QEMU; it constitutes mere aggregation with the GPLv2 QEMU
> sources, so it _is_ possible to distribute APSL2 guest code with QEMU.
> IANAL, but I'm fairly sure about this.

This is my understanding as well. We aren't linking OpenSBI with QEMU
so we should be fine to release it with any license.

>
> However I agree that LICENSE needs to be updated, something like this:
>
> diff --git a/LICENSE b/LICENSE
> index 0e0b4b9553..81b9b3572d 100644
> --- a/LICENSE
> +++ b/LICENSE
> @@ -1,13 +1,18 @@
> -The following points clarify the QEMU license:
> +The QEMU distribution includes both the QEMU emulator and
> +various firmware files.  These are separate programs that are
> +distributed together for our users' convenience, and they have
> +separate license.
>
> -1) QEMU as a whole is released under the GNU General Public License,
> -version 2.
> +The following points clarify the license of the QEMU emulator:
>
> -2) Parts of QEMU have specific licenses which are compatible with the
> -GNU General Public License, version 2. Hence each source file contains
> -its own licensing information.  Source files with no licensing information
> -are released under the GNU General Public License, version 2 or (at your
> -option) any later version.
> +1) The QEMU emulator as a whole is released under the GNU General
> +Public License, version 2.
> +
> +2) Parts of the QEMU emulator have specific licenses which are compatible
> +with the GNU General Public License, version 2. Hence each source file
> +contains its own licensing information.  Source files with no licensing
> +information are released under the GNU General Public License, version
> +2 or (at your option) any later version.
>
>  As of July 2013, contributions under version 2 of the GNU General Public
>  License (and no later version) are only accepted for the following files

Ok, I'll update the QEMU LICENSE file in the next patch version.

Alistair

>
> Paolo
>



Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3

2019-07-02 Thread Paolo Bonzini
On 02/07/19 06:12, Markus Armbruster wrote:
>> Yeah, if we're not building the apache-2.0 parts then I think
>> we're OK, and as you say there's the question of whether QEMU's
>> GPL affects what we ship as mere bios blobs to run as guest
>> code anyway. But it's sufficiently not a "really obviously ok"
>> that I'd like a second opinion; cc'd some people who might have
>> second opinions.
> 
> You need an expert opinion.
> 
> My non-expert opinion: we can't distribute anything that's not
> compatible with GPLv2

Guest code is not part of QEMU.  We don't say that SeaBIOS, SLOF, etc. 
are part of QEMU; it constitutes mere aggregation with the GPLv2 QEMU 
sources, so it _is_ possible to distribute APSL2 guest code with QEMU.  
IANAL, but I'm fairly sure about this.

However I agree that LICENSE needs to be updated, something like this:

diff --git a/LICENSE b/LICENSE
index 0e0b4b9553..81b9b3572d 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,13 +1,18 @@
-The following points clarify the QEMU license:
+The QEMU distribution includes both the QEMU emulator and
+various firmware files.  These are separate programs that are
+distributed together for our users' convenience, and they have
+separate license.
 
-1) QEMU as a whole is released under the GNU General Public License,
-version 2.
+The following points clarify the license of the QEMU emulator:
 
-2) Parts of QEMU have specific licenses which are compatible with the
-GNU General Public License, version 2. Hence each source file contains
-its own licensing information.  Source files with no licensing information
-are released under the GNU General Public License, version 2 or (at your
-option) any later version.
+1) The QEMU emulator as a whole is released under the GNU General
+Public License, version 2.
+
+2) Parts of the QEMU emulator have specific licenses which are compatible
+with the GNU General Public License, version 2. Hence each source file
+contains its own licensing information.  Source files with no licensing
+information are released under the GNU General Public License, version
+2 or (at your option) any later version.
 
 As of July 2013, contributions under version 2 of the GNU General Public
 License (and no later version) are only accepted for the following files

Paolo



Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3

2019-07-01 Thread Markus Armbruster
Peter Maydell  writes:

> On Mon, 1 Jul 2019 at 18:50, Alistair Francis  
> wrote:
>>
>> On Mon, 2019-07-01 at 17:54 +0100, Peter Maydell wrote:
>> > On Thu, 27 Jun 2019 at 16:24, Palmer Dabbelt 
>> > wrote:
>> > > From: Alistair Francis 
>> > >
>> > > Add OpenSBI version 0.3 as a git submodule and as a prebult binary.
>> > >
>> > > Signed-off-by: Alistair Francis 
>> > > Reviewed-by: Bin Meng 
>> > > Tested-by: Bin Meng 
>> > > Signed-off-by: Palmer Dabbelt 
>> > > ---
>> > >  .gitmodules  |   3 ++
>> > >  Makefile |   5 +-
>> > >  pc-bios/opensbi-riscv32-virt-fw_jump.bin | Bin 0 -> 28848
>> > > bytes
>> > >  pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin | Bin 0 -> 28904
>> > > bytes
>> > >  pc-bios/opensbi-riscv64-virt-fw_jump.bin | Bin 0 -> 28904
>> > > bytes
>> > >  roms/Makefile|  48 ++-
>> > > 
>> > >  roms/opensbi |   1 +
>> > >  7 files changed, 44 insertions(+), 13 deletions(-)
>> > >  create mode 100644 pc-bios/opensbi-riscv32-virt-fw_jump.bin
>> > >  create mode 100644 pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin
>> > >  create mode 100644 pc-bios/opensbi-riscv64-virt-fw_jump.bin
>> > >  create mode 16 roms/opensbi
>> > >
>> > > diff --git a/.gitmodules b/.gitmodules
>> > > index 2857eec76377..7a10e72e09cd 100644
>> > > --- a/.gitmodules
>> > > +++ b/.gitmodules
>> > > @@ -55,3 +55,6 @@
>> > >  [submodule "slirp"]
>> > > path = slirp
>> > > url = https://git.qemu.org/git/libslirp.git
>> > > +[submodule "roms/opensbi"]
>> > > +   path = roms/opensbi
>> > > +   url = https://github.com/riscv/opensbi.git
>> >
>> > It would be nice to state the license for new blobs we're
>> > adding to the source tree... In particular, I find the
>> > readme at https://github.com/riscv/opensbi a bit confusing
>> > because it says it's 2-BSD but also that some parts are Apache-2.0;
>> > the latter is *not* GPL-2.0 compatible. That makes it not completely
>> > obvious to me that we can ship this with QEMU.
>>
>> Ah, I didn't realise there is Apache-2.0 code in there.
>>
>> In this case all of the code we are using (we aren't using the Kendryte
>> code with QEMU) is BSD-2-Clause. Even then though does it matter if it
>> is GPL compatible? This isn't being linked with QEMU it is just being
>> included with QEMU.
>
> Yeah, if we're not building the apache-2.0 parts then I think
> we're OK, and as you say there's the question of whether QEMU's
> GPL affects what we ship as mere bios blobs to run as guest
> code anyway. But it's sufficiently not a "really obviously ok"
> that I'd like a second opinion; cc'd some people who might have
> second opinions.

You need an expert opinion.

My non-expert opinion: we can't distribute anything that's not
compatible with GPLv2, at least as long as LICENSE makes the following
claims:

1) QEMU as a whole is released under the GNU General Public License,
version 2.

2) Parts of QEMU have specific licenses which are compatible with the
GNU General Public License, version 2. Hence each source file contains
its own licensing information.  Source files with no licensing information
are released under the GNU General Public License, version 2 or (at your
option) any later version.

As of July 2013, contributions under version 2 of the GNU General Public
License (and no later version) are only accepted for the following files
or directories: bsd-user/, linux-user/, hw/vfio/, hw/xen/xen_pt*.

3) The Tiny Code Generator (TCG) is released under the BSD license
   (see license headers in files).

Complicating things further just to distribute a firmware blob would be
a mistake.  Our licensing situation is already complex enough for me to
call it a mistake.

[...]



Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3

2019-07-01 Thread Peter Maydell
On Mon, 1 Jul 2019 at 19:09, Alistair Francis  wrote:
>
> On Mon, 2019-07-01 at 19:01 +0100, Peter Maydell wrote:
> > On Mon, 1 Jul 2019 at 18:50, Alistair Francis <
> > alistair.fran...@wdc.com> wrote:
> > > PS: It seems like there are still some issues with this patch so
> > > maybe
> > > it's worth dropping this patch from the PR so that we can get
> > > everything else merged.
> >
> > Yeah, that would be my suggestion.
>
> Can you do that when you merge it or does Palmer have to send the PR
> again?

Palmer needs to respin it -- pulls are signed and I can't
modify them, only either apply them or not. (Technically I
could in theory cherry-pick all the other commits out of them
but that would be a huge amount of manual labour.)

thanks
-- PMM



Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3

2019-07-01 Thread Alistair Francis
On Mon, 2019-07-01 at 19:01 +0100, Peter Maydell wrote:
> On Mon, 1 Jul 2019 at 18:50, Alistair Francis <
> alistair.fran...@wdc.com> wrote:
> > On Mon, 2019-07-01 at 17:54 +0100, Peter Maydell wrote:
> > > On Thu, 27 Jun 2019 at 16:24, Palmer Dabbelt 
> > > wrote:
> > > > From: Alistair Francis 
> > > > 
> > > > Add OpenSBI version 0.3 as a git submodule and as a prebult
> > > > binary.
> > > > 
> > > > Signed-off-by: Alistair Francis 
> > > > Reviewed-by: Bin Meng 
> > > > Tested-by: Bin Meng 
> > > > Signed-off-by: Palmer Dabbelt 
> > > > ---
> > > >  .gitmodules  |   3 ++
> > > >  Makefile |   5 +-
> > > >  pc-bios/opensbi-riscv32-virt-fw_jump.bin | Bin 0 -> 28848
> > > > bytes
> > > >  pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin | Bin 0 -> 28904
> > > > bytes
> > > >  pc-bios/opensbi-riscv64-virt-fw_jump.bin | Bin 0 -> 28904
> > > > bytes
> > > >  roms/Makefile|  48
> > > > ++-
> > > > 
> > > >  roms/opensbi |   1 +
> > > >  7 files changed, 44 insertions(+), 13 deletions(-)
> > > >  create mode 100644 pc-bios/opensbi-riscv32-virt-fw_jump.bin
> > > >  create mode 100644 pc-bios/opensbi-riscv64-sifive_u-
> > > > fw_jump.bin
> > > >  create mode 100644 pc-bios/opensbi-riscv64-virt-fw_jump.bin
> > > >  create mode 16 roms/opensbi
> > > > 
> > > > diff --git a/.gitmodules b/.gitmodules
> > > > index 2857eec76377..7a10e72e09cd 100644
> > > > --- a/.gitmodules
> > > > +++ b/.gitmodules
> > > > @@ -55,3 +55,6 @@
> > > >  [submodule "slirp"]
> > > > path = slirp
> > > > url = https://git.qemu.org/git/libslirp.git
> > > > +[submodule "roms/opensbi"]
> > > > +   path = roms/opensbi
> > > > +   url = https://github.com/riscv/opensbi.git
> > > 
> > > It would be nice to state the license for new blobs we're
> > > adding to the source tree... In particular, I find the
> > > readme at https://github.com/riscv/opensbi a bit confusing
> > > because it says it's 2-BSD but also that some parts are Apache-
> > > 2.0;
> > > the latter is *not* GPL-2.0 compatible. That makes it not
> > > completely
> > > obvious to me that we can ship this with QEMU.
> > 
> > Ah, I didn't realise there is Apache-2.0 code in there.
> > 
> > In this case all of the code we are using (we aren't using the
> > Kendryte
> > code with QEMU) is BSD-2-Clause. Even then though does it matter if
> > it
> > is GPL compatible? This isn't being linked with QEMU it is just
> > being
> > included with QEMU.
> 
> Yeah, if we're not building the apache-2.0 parts then I think
> we're OK, and as you say there's the question of whether QEMU's
> GPL affects what we ship as mere bios blobs to run as guest
> code anyway. But it's sufficiently not a "really obviously ok"
> that I'd like a second opinion; cc'd some people who might have
> second opinions.
> 
> > I can add details of the license in the source tree, where should
> > it be
> > added?
> 
> I was thinking in the commit message. We also seem to
> have human-readable information in pc-bios/README for
> the various blobs, which seems to be a good place for a brief
> one-para summary of what OpenSBI is, a URL for its upstream,
> and a brief note of the license.

Ok, I'll add that.

> 
> > > Also, new git modules in .gitmodules should be qemu.org
> > > URLs, not random external ones. (ie, we should set up
> > > mirroring of any new external repo we start shipping
> > > code and binaries for). We can set this up and fix up the
> > > gitmodules file after the fact, but the ideal is to do
> > > it in advance rather than afterwards.
> > 
> > Ok, who can setup a git mirror for the QEMU repo?
> 
> That would be Jeff or Stefan (cc'd).
> 
> > PS: It seems like there are still some issues with this patch so
> > maybe
> > it's worth dropping this patch from the PR so that we can get
> > everything else merged.
> 
> Yeah, that would be my suggestion.

Can you do that when you merge it or does Palmer have to send the PR
again?

Alistair

> 
> thanks
> -- PMM


Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3

2019-07-01 Thread Peter Maydell
On Mon, 1 Jul 2019 at 18:50, Alistair Francis  wrote:
>
> On Mon, 2019-07-01 at 17:54 +0100, Peter Maydell wrote:
> > On Thu, 27 Jun 2019 at 16:24, Palmer Dabbelt 
> > wrote:
> > > From: Alistair Francis 
> > >
> > > Add OpenSBI version 0.3 as a git submodule and as a prebult binary.
> > >
> > > Signed-off-by: Alistair Francis 
> > > Reviewed-by: Bin Meng 
> > > Tested-by: Bin Meng 
> > > Signed-off-by: Palmer Dabbelt 
> > > ---
> > >  .gitmodules  |   3 ++
> > >  Makefile |   5 +-
> > >  pc-bios/opensbi-riscv32-virt-fw_jump.bin | Bin 0 -> 28848
> > > bytes
> > >  pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin | Bin 0 -> 28904
> > > bytes
> > >  pc-bios/opensbi-riscv64-virt-fw_jump.bin | Bin 0 -> 28904
> > > bytes
> > >  roms/Makefile|  48 ++-
> > > 
> > >  roms/opensbi |   1 +
> > >  7 files changed, 44 insertions(+), 13 deletions(-)
> > >  create mode 100644 pc-bios/opensbi-riscv32-virt-fw_jump.bin
> > >  create mode 100644 pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin
> > >  create mode 100644 pc-bios/opensbi-riscv64-virt-fw_jump.bin
> > >  create mode 16 roms/opensbi
> > >
> > > diff --git a/.gitmodules b/.gitmodules
> > > index 2857eec76377..7a10e72e09cd 100644
> > > --- a/.gitmodules
> > > +++ b/.gitmodules
> > > @@ -55,3 +55,6 @@
> > >  [submodule "slirp"]
> > > path = slirp
> > > url = https://git.qemu.org/git/libslirp.git
> > > +[submodule "roms/opensbi"]
> > > +   path = roms/opensbi
> > > +   url = https://github.com/riscv/opensbi.git
> >
> > It would be nice to state the license for new blobs we're
> > adding to the source tree... In particular, I find the
> > readme at https://github.com/riscv/opensbi a bit confusing
> > because it says it's 2-BSD but also that some parts are Apache-2.0;
> > the latter is *not* GPL-2.0 compatible. That makes it not completely
> > obvious to me that we can ship this with QEMU.
>
> Ah, I didn't realise there is Apache-2.0 code in there.
>
> In this case all of the code we are using (we aren't using the Kendryte
> code with QEMU) is BSD-2-Clause. Even then though does it matter if it
> is GPL compatible? This isn't being linked with QEMU it is just being
> included with QEMU.

Yeah, if we're not building the apache-2.0 parts then I think
we're OK, and as you say there's the question of whether QEMU's
GPL affects what we ship as mere bios blobs to run as guest
code anyway. But it's sufficiently not a "really obviously ok"
that I'd like a second opinion; cc'd some people who might have
second opinions.

> I can add details of the license in the source tree, where should it be
> added?

I was thinking in the commit message. We also seem to
have human-readable information in pc-bios/README for
the various blobs, which seems to be a good place for a brief
one-para summary of what OpenSBI is, a URL for its upstream,
and a brief note of the license.

> >
> > Also, new git modules in .gitmodules should be qemu.org
> > URLs, not random external ones. (ie, we should set up
> > mirroring of any new external repo we start shipping
> > code and binaries for). We can set this up and fix up the
> > gitmodules file after the fact, but the ideal is to do
> > it in advance rather than afterwards.
>
> Ok, who can setup a git mirror for the QEMU repo?

That would be Jeff or Stefan (cc'd).

> PS: It seems like there are still some issues with this patch so maybe
> it's worth dropping this patch from the PR so that we can get
> everything else merged.

Yeah, that would be my suggestion.

thanks
-- PMM



Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3

2019-07-01 Thread Peter Maydell
On Thu, 27 Jun 2019 at 16:24, Palmer Dabbelt  wrote:
>
> From: Alistair Francis 
>
> Add OpenSBI version 0.3 as a git submodule and as a prebult binary.
>
> Signed-off-by: Alistair Francis 
> Reviewed-by: Bin Meng 
> Tested-by: Bin Meng 
> Signed-off-by: Palmer Dabbelt 
> ---
>  .gitmodules  |   3 ++
>  Makefile |   5 +-
>  pc-bios/opensbi-riscv32-virt-fw_jump.bin | Bin 0 -> 28848 bytes
>  pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin | Bin 0 -> 28904 bytes
>  pc-bios/opensbi-riscv64-virt-fw_jump.bin | Bin 0 -> 28904 bytes
>  roms/Makefile|  48 ++-
>  roms/opensbi |   1 +
>  7 files changed, 44 insertions(+), 13 deletions(-)
>  create mode 100644 pc-bios/opensbi-riscv32-virt-fw_jump.bin
>  create mode 100644 pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin
>  create mode 100644 pc-bios/opensbi-riscv64-virt-fw_jump.bin
>  create mode 16 roms/opensbi
>
> diff --git a/.gitmodules b/.gitmodules
> index 2857eec76377..7a10e72e09cd 100644
> --- a/.gitmodules
> +++ b/.gitmodules
> @@ -55,3 +55,6 @@
>  [submodule "slirp"]
> path = slirp
> url = https://git.qemu.org/git/libslirp.git
> +[submodule "roms/opensbi"]
> +   path = roms/opensbi
> +   url = https://github.com/riscv/opensbi.git

It would be nice to state the license for new blobs we're
adding to the source tree... In particular, I find the
readme at https://github.com/riscv/opensbi a bit confusing
because it says it's 2-BSD but also that some parts are Apache-2.0;
the latter is *not* GPL-2.0 compatible. That makes it not completely
obvious to me that we can ship this with QEMU.

Also, new git modules in .gitmodules should be qemu.org
URLs, not random external ones. (ie, we should set up
mirroring of any new external repo we start shipping
code and binaries for). We can set this up and fix up the
gitmodules file after the fact, but the ideal is to do
it in advance rather than afterwards.

thanks
-- PMM



Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3

2019-07-01 Thread Alistair Francis
On Mon, 2019-07-01 at 17:54 +0100, Peter Maydell wrote:
> On Thu, 27 Jun 2019 at 16:24, Palmer Dabbelt 
> wrote:
> > From: Alistair Francis 
> > 
> > Add OpenSBI version 0.3 as a git submodule and as a prebult binary.
> > 
> > Signed-off-by: Alistair Francis 
> > Reviewed-by: Bin Meng 
> > Tested-by: Bin Meng 
> > Signed-off-by: Palmer Dabbelt 
> > ---
> >  .gitmodules  |   3 ++
> >  Makefile |   5 +-
> >  pc-bios/opensbi-riscv32-virt-fw_jump.bin | Bin 0 -> 28848
> > bytes
> >  pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin | Bin 0 -> 28904
> > bytes
> >  pc-bios/opensbi-riscv64-virt-fw_jump.bin | Bin 0 -> 28904
> > bytes
> >  roms/Makefile|  48 ++-
> > 
> >  roms/opensbi |   1 +
> >  7 files changed, 44 insertions(+), 13 deletions(-)
> >  create mode 100644 pc-bios/opensbi-riscv32-virt-fw_jump.bin
> >  create mode 100644 pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin
> >  create mode 100644 pc-bios/opensbi-riscv64-virt-fw_jump.bin
> >  create mode 16 roms/opensbi
> > 
> > diff --git a/.gitmodules b/.gitmodules
> > index 2857eec76377..7a10e72e09cd 100644
> > --- a/.gitmodules
> > +++ b/.gitmodules
> > @@ -55,3 +55,6 @@
> >  [submodule "slirp"]
> > path = slirp
> > url = https://git.qemu.org/git/libslirp.git
> > +[submodule "roms/opensbi"]
> > +   path = roms/opensbi
> > +   url = https://github.com/riscv/opensbi.git
> 
> It would be nice to state the license for new blobs we're
> adding to the source tree... In particular, I find the
> readme at https://github.com/riscv/opensbi a bit confusing
> because it says it's 2-BSD but also that some parts are Apache-2.0;
> the latter is *not* GPL-2.0 compatible. That makes it not completely
> obvious to me that we can ship this with QEMU.

Ah, I didn't realise there is Apache-2.0 code in there.

In this case all of the code we are using (we aren't using the Kendryte
code with QEMU) is BSD-2-Clause. Even then though does it matter if it
is GPL compatible? This isn't being linked with QEMU it is just being
included with QEMU.

I can add details of the license in the source tree, where should it be
added?

> 
> Also, new git modules in .gitmodules should be qemu.org
> URLs, not random external ones. (ie, we should set up
> mirroring of any new external repo we start shipping
> code and binaries for). We can set this up and fix up the
> gitmodules file after the fact, but the ideal is to do
> it in advance rather than afterwards.

Ok, who can setup a git mirror for the QEMU repo?

PS: It seems like there are still some issues with this patch so maybe
it's worth dropping this patch from the PR so that we can get
everything else merged.

Alistair

> 
> thanks
> -- PMM


Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3

2019-07-01 Thread Alistair Francis
On Mon, 2019-07-01 at 19:13 +0100, Peter Maydell wrote:
> On Mon, 1 Jul 2019 at 19:09, Alistair Francis <
> alistair.fran...@wdc.com> wrote:
> > On Mon, 2019-07-01 at 19:01 +0100, Peter Maydell wrote:
> > > On Mon, 1 Jul 2019 at 18:50, Alistair Francis <
> > > alistair.fran...@wdc.com> wrote:
> > > > PS: It seems like there are still some issues with this patch
> > > > so
> > > > maybe
> > > > it's worth dropping this patch from the PR so that we can get
> > > > everything else merged.
> > > 
> > > Yeah, that would be my suggestion.
> > 
> > Can you do that when you merge it or does Palmer have to send the
> > PR
> > again?
> 
> Palmer needs to respin it -- pulls are signed and I can't
> modify them, only either apply them or not. (Technically I
> could in theory cherry-pick all the other commits out of them
> but that would be a huge amount of manual labour.)

No worries.

@Palmer can you please drop these two patches from this PR?

hw/riscv: Load OpenSBI as the default firmware
roms: Add OpenSBI version 0.3

Sorry for the all the last minute changes. I'll wait until OpenSBI 0.4
to respin those two patches.

Alistair

> 
> thanks
> -- PMM


Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3

2019-07-01 Thread Jonathan Cameron
On Fri, 28 Jun 2019 09:12:45 -0700
Alistair Francis  wrote:

> On Fri, Jun 28, 2019 at 2:47 AM Jonathan Cameron
>  wrote:
> >
> > On Thu, 27 Jun 2019 08:20:10 -0700
> > Palmer Dabbelt  wrote:
> >  
> > > From: Alistair Francis 
> > >
> > > Add OpenSBI version 0.3 as a git submodule and as a prebult binary.
> > >
> > > Signed-off-by: Alistair Francis 
> > > Reviewed-by: Bin Meng 
> > > Tested-by: Bin Meng 
> > > Signed-off-by: Palmer Dabbelt   
> >
> > I sent a late bug report on this one.. Hence posting here as well
> > to make sure it doesn't fall through the cracks!
> >
> > Right now you can't actually build the opensbi64-virt firmware
> > due to cut and paste error in the Makefile.  
> 
> Ah, thanks for the bug report.
> 
> @Palmer Dabbelt I'm just going to send you a fixup commit. Can you
> apply it to your tree and send a PRv2?
> 
> >
> > As a side note, I hit this because OpenSBI 0.3 is resulting in a login
> > loop on a debian test image and the current upstream isn't.  I haven't
> > debugged yet, but someone else may hit that problem.  
> 
> Unfortunately OpenSBI 0.3 is a little old now, in saying that I didn't
> know there are bugs in it? Which kernel are you using?

Mainline 5.2.0-rc5.

Just in case I also checked 5.2.0-rc7

I tried doing an odd git bisect with good and bad reversed to figure out
what fixed the problem, but boot wedged at "Run /sbin/init as init process."

The wedge was bisected to:

4e2cd47820 ("lib: Flush everything when remote TLB flush range is too large")

Which the patch correctly identifies as a problem introduced this kernel cycle.
5.2-rc1.

So on that basis alone I'd suggest we want to move to a more recent openSBI
asap, after all the 5.2 kernel will be out in a week or so.

I'm a bit short on time (flight to catch), so haven't pushed that fix that
far back in the tree yet in order to figure what is causing the login loop.
Won't have access to relevant build machines until Wednesday.

That patch cherry-picked on lib: Optimize TLB flush IPIs
seems fine, so it is before that point...

Passing that point would require real effort though as the two patches
are changing the same code.

So I had a go from the other end (0.3) to see if it was fixed quickly.
Ran out of time, but at 
"firmware: Reset all registers and flush the icache" it superficially all
seems to be working with no TLB related hang, or login loop.

The login loop is present in firmware: Add a barrier instruction for wait for 
boot hart.

Will see if I can pin it down fully later in the week.

Thanks,

Jonathan





> 
> Alistair
> 
> >
> > Thanks,
> >
> > Jonathan
> >  
> > > diff --git a/roms/Makefile b/roms/Makefile
> > > index 078d3fb70563..562ed726fd6b 100644
> > > --- a/roms/Makefile
> > > +++ b/roms/Makefile
> > > @@ -37,6 +37,8 @@ find-cross-prefix = $(subst gcc,,$(notdir $(call 
> > > find-cross-gcc,$(1
> > >  powerpc64_cross_prefix := $(call find-cross-prefix,powerpc64)
> > >  powerpc_cross_prefix := $(call find-cross-prefix,powerpc)
> > >  x86_64_cross_prefix := $(call find-cross-prefix,x86_64)
> > > +riscv32_cross_prefix := $(call find-cross-prefix,riscv32)
> > > +riscv64_cross_prefix := $(call find-cross-prefix,riscv64)
> > >
> > >  # tag our seabios builds
> > >  SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
> > > @@ -52,18 +54,21 @@ EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom
> > >  default:
> > >   @echo "nothing is build by default"
> > >   @echo "available build targets:"
> > > - @echo "  bios   -- update bios.bin (seabios)"
> > > - @echo "  vgabios-- update vgabios binaries (seabios)"
> > > - @echo "  sgabios-- update sgabios binaries"
> > > - @echo "  pxerom -- update nic roms (bios only)"
> > > - @echo "  efirom -- update nic roms (bios+efi)"
> > > - @echo "  slof   -- update slof.bin"
> > > - @echo "  skiboot-- update skiboot.lid"
> > > - @echo "  u-boot.e500-- update u-boot.e500"
> > > - @echo "  u-boot.sam460  -- update u-boot.sam460"
> > > - @echo "  efi-- update UEFI (edk2) platform firmware"
> > > - @echo "  clean  -- delete the files generated by the 
> > > previous" \
> > > -   "build targets"
> > > + @echo "  bios   -- update bios.bin (seabios)"
> > > + @echo "  vgabios-- update vgabios binaries (seabios)"
> > > + @echo "  sgabios-- update sgabios binaries"
> > > + @echo "  pxerom -- update nic roms (bios only)"
> > > + @echo "  efirom -- update nic roms (bios+efi)"
> > > + @echo "  slof   -- update slof.bin"
> > > + @echo "  skiboot-- update skiboot.lid"
> > > + @echo "  u-boot.e500-- update u-boot.e500"
> > > + @echo "  u-boot.sam460  -- update u-boot.sam460"
> > > + @echo "  efi-- update UEFI (edk2) platform firmware"
> > > + @echo "  opensbi32-virt -- update O

Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3

2019-06-28 Thread Alistair Francis
On Fri, Jun 28, 2019 at 2:47 AM Jonathan Cameron
 wrote:
>
> On Thu, 27 Jun 2019 08:20:10 -0700
> Palmer Dabbelt  wrote:
>
> > From: Alistair Francis 
> >
> > Add OpenSBI version 0.3 as a git submodule and as a prebult binary.
> >
> > Signed-off-by: Alistair Francis 
> > Reviewed-by: Bin Meng 
> > Tested-by: Bin Meng 
> > Signed-off-by: Palmer Dabbelt 
>
> I sent a late bug report on this one.. Hence posting here as well
> to make sure it doesn't fall through the cracks!
>
> Right now you can't actually build the opensbi64-virt firmware
> due to cut and paste error in the Makefile.

Ah, thanks for the bug report.

@Palmer Dabbelt I'm just going to send you a fixup commit. Can you
apply it to your tree and send a PRv2?

>
> As a side note, I hit this because OpenSBI 0.3 is resulting in a login
> loop on a debian test image and the current upstream isn't.  I haven't
> debugged yet, but someone else may hit that problem.

Unfortunately OpenSBI 0.3 is a little old now, in saying that I didn't
know there are bugs in it? Which kernel are you using?

Alistair

>
> Thanks,
>
> Jonathan
>
> > diff --git a/roms/Makefile b/roms/Makefile
> > index 078d3fb70563..562ed726fd6b 100644
> > --- a/roms/Makefile
> > +++ b/roms/Makefile
> > @@ -37,6 +37,8 @@ find-cross-prefix = $(subst gcc,,$(notdir $(call 
> > find-cross-gcc,$(1
> >  powerpc64_cross_prefix := $(call find-cross-prefix,powerpc64)
> >  powerpc_cross_prefix := $(call find-cross-prefix,powerpc)
> >  x86_64_cross_prefix := $(call find-cross-prefix,x86_64)
> > +riscv32_cross_prefix := $(call find-cross-prefix,riscv32)
> > +riscv64_cross_prefix := $(call find-cross-prefix,riscv64)
> >
> >  # tag our seabios builds
> >  SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
> > @@ -52,18 +54,21 @@ EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom
> >  default:
> >   @echo "nothing is build by default"
> >   @echo "available build targets:"
> > - @echo "  bios   -- update bios.bin (seabios)"
> > - @echo "  vgabios-- update vgabios binaries (seabios)"
> > - @echo "  sgabios-- update sgabios binaries"
> > - @echo "  pxerom -- update nic roms (bios only)"
> > - @echo "  efirom -- update nic roms (bios+efi)"
> > - @echo "  slof   -- update slof.bin"
> > - @echo "  skiboot-- update skiboot.lid"
> > - @echo "  u-boot.e500-- update u-boot.e500"
> > - @echo "  u-boot.sam460  -- update u-boot.sam460"
> > - @echo "  efi-- update UEFI (edk2) platform firmware"
> > - @echo "  clean  -- delete the files generated by the 
> > previous" \
> > -   "build targets"
> > + @echo "  bios   -- update bios.bin (seabios)"
> > + @echo "  vgabios-- update vgabios binaries (seabios)"
> > + @echo "  sgabios-- update sgabios binaries"
> > + @echo "  pxerom -- update nic roms (bios only)"
> > + @echo "  efirom -- update nic roms (bios+efi)"
> > + @echo "  slof   -- update slof.bin"
> > + @echo "  skiboot-- update skiboot.lid"
> > + @echo "  u-boot.e500-- update u-boot.e500"
> > + @echo "  u-boot.sam460  -- update u-boot.sam460"
> > + @echo "  efi-- update UEFI (edk2) platform firmware"
> > + @echo "  opensbi32-virt -- update OpenSBI for 32-bit virt machine"
> > + @echo "  opensbi64-virt -- update OpenSBI for 64-bit virt machine"
> > + @echo "  opensbi64-sifive_u -- update OpenSBI for 64-bit sifive_u 
> > machine"
> > + @echo "  clean  -- delete the files generated by the 
> > previous" \
> > +   "build targets"
> >
> >  bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k
> >   cp seabios/builds/seabios-128k/bios.bin ../pc-bios/bios.bin
> > @@ -162,6 +167,24 @@ skiboot:
> >  efi: edk2-basetools
> >   $(MAKE) -f Makefile.edk2
> >
> > +opensbi32-virt:
> > + $(MAKE) -C opensbi \
> > + CROSS_COMPILE=$(riscv32_cross_prefix) \
> > + PLATFORM="qemu/virt"
> > + cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin 
> > ../pc-bios/opensbi-riscv32-virt-fw_jump.bin
> > +
> > +opensbi64-virt:
> > + $(MAKE) -C opensbi \
> > + CROSS_COMPILE=$(riscv64_cross_prefix) \
> > + PLATFORM="qemu/virt"
> > + cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin 
> > ../pc-bios/opensbi-riscv64-virt-fw_jump.bin
> > +
> > +opensbi64-virt:
>
> Cut and paste buglet.  opensbi64-sifive_u
>
> > + $(MAKE) -C opensbi \
> > + CROSS_COMPILE=$(riscv64_cross_prefix) \
> > + PLATFORM="qemu/sifive_u"
> > + cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin 
> > ../pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin
> > +
> >  clean:
> >   rm -rf seabios/.config seabios/out seabios/builds
> >   $(MAKE) -C sgabios clean
> > @@ -173,3 +196,4 

Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3

2019-06-28 Thread Palmer Dabbelt

On Fri, 28 Jun 2019 09:12:45 PDT (-0700), alistai...@gmail.com wrote:

On Fri, Jun 28, 2019 at 2:47 AM Jonathan Cameron
 wrote:


On Thu, 27 Jun 2019 08:20:10 -0700
Palmer Dabbelt  wrote:

> From: Alistair Francis 
>
> Add OpenSBI version 0.3 as a git submodule and as a prebult binary.
>
> Signed-off-by: Alistair Francis 
> Reviewed-by: Bin Meng 
> Tested-by: Bin Meng 
> Signed-off-by: Palmer Dabbelt 

I sent a late bug report on this one.. Hence posting here as well
to make sure it doesn't fall through the cracks!

Right now you can't actually build the opensbi64-virt firmware
due to cut and paste error in the Makefile.


Ah, thanks for the bug report.

@Palmer Dabbelt I'm just going to send you a fixup commit. Can you
apply it to your tree and send a PRv2?


WFM.





As a side note, I hit this because OpenSBI 0.3 is resulting in a login
loop on a debian test image and the current upstream isn't.  I haven't
debugged yet, but someone else may hit that problem.


Unfortunately OpenSBI 0.3 is a little old now, in saying that I didn't
know there are bugs in it? Which kernel are you using?

Alistair



Thanks,

Jonathan

> diff --git a/roms/Makefile b/roms/Makefile
> index 078d3fb70563..562ed726fd6b 100644
> --- a/roms/Makefile
> +++ b/roms/Makefile
> @@ -37,6 +37,8 @@ find-cross-prefix = $(subst gcc,,$(notdir $(call 
find-cross-gcc,$(1
>  powerpc64_cross_prefix := $(call find-cross-prefix,powerpc64)
>  powerpc_cross_prefix := $(call find-cross-prefix,powerpc)
>  x86_64_cross_prefix := $(call find-cross-prefix,x86_64)
> +riscv32_cross_prefix := $(call find-cross-prefix,riscv32)
> +riscv64_cross_prefix := $(call find-cross-prefix,riscv64)
>
>  # tag our seabios builds
>  SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
> @@ -52,18 +54,21 @@ EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom
>  default:
>   @echo "nothing is build by default"
>   @echo "available build targets:"
> - @echo "  bios   -- update bios.bin (seabios)"
> - @echo "  vgabios-- update vgabios binaries (seabios)"
> - @echo "  sgabios-- update sgabios binaries"
> - @echo "  pxerom -- update nic roms (bios only)"
> - @echo "  efirom -- update nic roms (bios+efi)"
> - @echo "  slof   -- update slof.bin"
> - @echo "  skiboot-- update skiboot.lid"
> - @echo "  u-boot.e500-- update u-boot.e500"
> - @echo "  u-boot.sam460  -- update u-boot.sam460"
> - @echo "  efi-- update UEFI (edk2) platform firmware"
> - @echo "  clean  -- delete the files generated by the previous" \
> -   "build targets"
> + @echo "  bios   -- update bios.bin (seabios)"
> + @echo "  vgabios-- update vgabios binaries (seabios)"
> + @echo "  sgabios-- update sgabios binaries"
> + @echo "  pxerom -- update nic roms (bios only)"
> + @echo "  efirom -- update nic roms (bios+efi)"
> + @echo "  slof   -- update slof.bin"
> + @echo "  skiboot-- update skiboot.lid"
> + @echo "  u-boot.e500-- update u-boot.e500"
> + @echo "  u-boot.sam460  -- update u-boot.sam460"
> + @echo "  efi-- update UEFI (edk2) platform firmware"
> + @echo "  opensbi32-virt -- update OpenSBI for 32-bit virt machine"
> + @echo "  opensbi64-virt -- update OpenSBI for 64-bit virt machine"
> + @echo "  opensbi64-sifive_u -- update OpenSBI for 64-bit sifive_u 
machine"
> + @echo "  clean  -- delete the files generated by the 
previous" \
> +   "build targets"
>
>  bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k
>   cp seabios/builds/seabios-128k/bios.bin ../pc-bios/bios.bin
> @@ -162,6 +167,24 @@ skiboot:
>  efi: edk2-basetools
>   $(MAKE) -f Makefile.edk2
>
> +opensbi32-virt:
> + $(MAKE) -C opensbi \
> + CROSS_COMPILE=$(riscv32_cross_prefix) \
> + PLATFORM="qemu/virt"
> + cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin 
../pc-bios/opensbi-riscv32-virt-fw_jump.bin
> +
> +opensbi64-virt:
> + $(MAKE) -C opensbi \
> + CROSS_COMPILE=$(riscv64_cross_prefix) \
> + PLATFORM="qemu/virt"
> + cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin 
../pc-bios/opensbi-riscv64-virt-fw_jump.bin
> +
> +opensbi64-virt:

Cut and paste buglet.  opensbi64-sifive_u

> + $(MAKE) -C opensbi \
> + CROSS_COMPILE=$(riscv64_cross_prefix) \
> + PLATFORM="qemu/sifive_u"
> + cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin 
../pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin
> +
>  clean:
>   rm -rf seabios/.config seabios/out seabios/builds
>   $(MAKE) -C sgabios clean
> @@ -173,3 +196,4 @@ clean:
>   $(MAKE) -C u-boot-sam460ex distclean
>   $(MAKE) -C skiboot clean
>   $(MAKE) -f Makefile.edk2 clean
> + $(MA

Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3

2019-06-28 Thread Jonathan Cameron
On Thu, 27 Jun 2019 08:20:10 -0700
Palmer Dabbelt  wrote:

> From: Alistair Francis 
> 
> Add OpenSBI version 0.3 as a git submodule and as a prebult binary.
> 
> Signed-off-by: Alistair Francis 
> Reviewed-by: Bin Meng 
> Tested-by: Bin Meng 
> Signed-off-by: Palmer Dabbelt 

I sent a late bug report on this one.. Hence posting here as well
to make sure it doesn't fall through the cracks!

Right now you can't actually build the opensbi64-virt firmware
due to cut and paste error in the Makefile.

As a side note, I hit this because OpenSBI 0.3 is resulting in a login
loop on a debian test image and the current upstream isn't.  I haven't
debugged yet, but someone else may hit that problem.

Thanks,

Jonathan

> diff --git a/roms/Makefile b/roms/Makefile
> index 078d3fb70563..562ed726fd6b 100644
> --- a/roms/Makefile
> +++ b/roms/Makefile
> @@ -37,6 +37,8 @@ find-cross-prefix = $(subst gcc,,$(notdir $(call 
> find-cross-gcc,$(1
>  powerpc64_cross_prefix := $(call find-cross-prefix,powerpc64)
>  powerpc_cross_prefix := $(call find-cross-prefix,powerpc)
>  x86_64_cross_prefix := $(call find-cross-prefix,x86_64)
> +riscv32_cross_prefix := $(call find-cross-prefix,riscv32)
> +riscv64_cross_prefix := $(call find-cross-prefix,riscv64)
>  
>  # tag our seabios builds
>  SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
> @@ -52,18 +54,21 @@ EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom
>  default:
>   @echo "nothing is build by default"
>   @echo "available build targets:"
> - @echo "  bios   -- update bios.bin (seabios)"
> - @echo "  vgabios-- update vgabios binaries (seabios)"
> - @echo "  sgabios-- update sgabios binaries"
> - @echo "  pxerom -- update nic roms (bios only)"
> - @echo "  efirom -- update nic roms (bios+efi)"
> - @echo "  slof   -- update slof.bin"
> - @echo "  skiboot-- update skiboot.lid"
> - @echo "  u-boot.e500-- update u-boot.e500"
> - @echo "  u-boot.sam460  -- update u-boot.sam460"
> - @echo "  efi-- update UEFI (edk2) platform firmware"
> - @echo "  clean  -- delete the files generated by the previous" \
> -   "build targets"
> + @echo "  bios   -- update bios.bin (seabios)"
> + @echo "  vgabios-- update vgabios binaries (seabios)"
> + @echo "  sgabios-- update sgabios binaries"
> + @echo "  pxerom -- update nic roms (bios only)"
> + @echo "  efirom -- update nic roms (bios+efi)"
> + @echo "  slof   -- update slof.bin"
> + @echo "  skiboot-- update skiboot.lid"
> + @echo "  u-boot.e500-- update u-boot.e500"
> + @echo "  u-boot.sam460  -- update u-boot.sam460"
> + @echo "  efi-- update UEFI (edk2) platform firmware"
> + @echo "  opensbi32-virt -- update OpenSBI for 32-bit virt machine"
> + @echo "  opensbi64-virt -- update OpenSBI for 64-bit virt machine"
> + @echo "  opensbi64-sifive_u -- update OpenSBI for 64-bit sifive_u 
> machine"
> + @echo "  clean  -- delete the files generated by the 
> previous" \
> +   "build targets"
>  
>  bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k
>   cp seabios/builds/seabios-128k/bios.bin ../pc-bios/bios.bin
> @@ -162,6 +167,24 @@ skiboot:
>  efi: edk2-basetools
>   $(MAKE) -f Makefile.edk2
>  
> +opensbi32-virt:
> + $(MAKE) -C opensbi \
> + CROSS_COMPILE=$(riscv32_cross_prefix) \
> + PLATFORM="qemu/virt"
> + cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin 
> ../pc-bios/opensbi-riscv32-virt-fw_jump.bin
> +
> +opensbi64-virt:
> + $(MAKE) -C opensbi \
> + CROSS_COMPILE=$(riscv64_cross_prefix) \
> + PLATFORM="qemu/virt"
> + cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin 
> ../pc-bios/opensbi-riscv64-virt-fw_jump.bin
> +
> +opensbi64-virt:

Cut and paste buglet.  opensbi64-sifive_u

> + $(MAKE) -C opensbi \
> + CROSS_COMPILE=$(riscv64_cross_prefix) \
> + PLATFORM="qemu/sifive_u"
> + cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin 
> ../pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin
> +
>  clean:
>   rm -rf seabios/.config seabios/out seabios/builds
>   $(MAKE) -C sgabios clean
> @@ -173,3 +196,4 @@ clean:
>   $(MAKE) -C u-boot-sam460ex distclean
>   $(MAKE) -C skiboot clean
>   $(MAKE) -f Makefile.edk2 clean
> + $(MAKE) -C opensbi clean
> diff --git a/roms/opensbi b/roms/opensbi
> new file mode 16
> index ..ca20ac0cd4c0
> --- /dev/null
> +++ b/roms/opensbi
> @@ -0,0 +1 @@
> +Subproject commit ca20ac0cd4c099006d4eea4d9ac7bd7b58e2ae0f