Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3
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
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
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
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
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
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
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
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
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
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
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
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
[Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3
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 diff --git a/Makefile b/Makefile index cfb18f152544..c74e5ba91402 100644 --- a/Makefile +++ b/Makefile @@ -761,7 +761,10 @@ palcode-clipper \ u-boot.e500 u-boot-sam460-20100605.bin \ qemu_vga.ndrv \ edk2-licenses.txt \ -hppa-firmware.img +hppa-firmware.img \ +opensbi-riscv32-virt-fw_jump.bin \ +opensbi-riscv64-sifive_u-fw_jump.bin opensbi-riscv64-virt-fw_jump.bin + DESCS=50-edk2-i386-secure.json 50-edk2-x86_64-secure.json \ 60-edk2-aarch64.json 60-edk2-arm.json 60-edk2-i386.json 60-edk2-x86_64.json diff --git a/pc-bios/opensbi-riscv32-virt-fw_jump.bin b/pc-bios/opensbi-riscv32-virt-fw_jump.bin new file mode 100644 index ..c3e2aaa5148930754d3f88dcc9c6efdb961774d8 GIT binary patch literal 28848 zcmeHv4OkRMwrF+tboUG@3^p)eG>eRYvWY=PCF;iIZy3Pn8Wjm{)L=UhcGV<~#+bw` zIP?sN{Fn}mcs1)!l<2#0v(D-yzH1Pa0Zk;v1W-2`BLXqIic$Gh;GLT85ionRd*A)u zd*Amy;j2Df)m3$V>QwcqbE?NQKI%t4360QL5#m^DzYU;hW&5>(Eb?ZXW_R}K6g0Bu z&}jV=I*LX*T7m3>0`Uq8*=Y)$s;pedvA4Y3wW7xjsYOzZ&h!pF`$7F-TWP zA#RB$p?mu#3i7l=PP|-*?0q*;m8Y(VLb^Y+p=Dm;S7yR~rwQ4cP7wB{uOKxM+eChm z2~h`0qzyblY$3g=rX*9JhQ*Y(BEc~F#Dtv){y0cdskMJ}Z0}!9>Zou?lTE*j`cbnE z*Jgh-|I(_Uo~TjaGJeUMBQzVKoZQ%Ex8_qb-?6hRC>?n_N@S55Lz9}EEcKXiLy}PI z-|ZXosZv{6kv8xu(gxi|sX^LtyHQ$@He@%V4chTn-86J*!{FY9*Lq$1guA?k)J}w! zfh4I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;0cmND#fZ-Hi$O8=50mFX4&}`=S zGI4w$-G_g)ys^dkFS% zw_dhCj6<>
Re: [Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3
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
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
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
[Qemu-devel] [PULL 33/34] roms: Add OpenSBI version 0.3
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 diff --git a/Makefile b/Makefile index cfb18f152544..c74e5ba91402 100644 --- a/Makefile +++ b/Makefile @@ -761,7 +761,10 @@ palcode-clipper \ u-boot.e500 u-boot-sam460-20100605.bin \ qemu_vga.ndrv \ edk2-licenses.txt \ -hppa-firmware.img +hppa-firmware.img \ +opensbi-riscv32-virt-fw_jump.bin \ +opensbi-riscv64-sifive_u-fw_jump.bin opensbi-riscv64-virt-fw_jump.bin + DESCS=50-edk2-i386-secure.json 50-edk2-x86_64-secure.json \ 60-edk2-aarch64.json 60-edk2-arm.json 60-edk2-i386.json 60-edk2-x86_64.json diff --git a/pc-bios/opensbi-riscv32-virt-fw_jump.bin b/pc-bios/opensbi-riscv32-virt-fw_jump.bin new file mode 100644 index ..c3e2aaa5148930754d3f88dcc9c6efdb961774d8 GIT binary patch literal 28848 zcmeHv4OkRMwrF+tboUG@3^p)eG>eRYvWY=PCF;iIZy3Pn8Wjm{)L=UhcGV<~#+bw` zIP?sN{Fn}mcs1)!l<2#0v(D-yzH1Pa0Zk;v1W-2`BLXqIic$Gh;GLT85ionRd*A)u zd*Amy;j2Df)m3$V>QwcqbE?NQKI%t4360QL5#m^DzYU;hW&5>(Eb?ZXW_R}K6g0Bu z&}jV=I*LX*T7m3>0`Uq8*=Y)$s;pedvA4Y3wW7xjsYOzZ&h!pF`$7F-TWP zA#RB$p?mu#3i7l=PP|-*?0q*;m8Y(VLb^Y+p=Dm;S7yR~rwQ4cP7wB{uOKxM+eChm z2~h`0qzyblY$3g=rX*9JhQ*Y(BEc~F#Dtv){y0cdskMJ}Z0}!9>Zou?lTE*j`cbnE z*Jgh-|I(_Uo~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