roms/opensbi: Update to v1.7
cover roms/opensbi: Update to v1.7
Hi,
It has been awhile since we last updated OpenSBI - we're still running v1.5.1, updated almost a year ago. We're missing out a lot of fixes and goodies (including SBI 3.0) from v1.6 and v1.7.
This update didn't trigger any regressions in our opensbi tests so I would like to update the roms for 10.1 to avoid yet another release with OpenSBI v1.5.1.
Please download the roms from:
https://gitlab.com/danielhb/qemu/-/tree/opensbi_update
Daniel Henrique Barboza (1):
roms/opensbi: Update to v1.7
.../opensbi-riscv32-generic-fw_dynamic.bin | Bin 268312 -> 268752 bytes .../opensbi-riscv64-generic-fw_dynamic.bin | Bin 272504 -> 273048 bytes roms/opensbi | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.50.1
PATCH 1/1 roms/opensbi: Update to v1.7
Update OpenSBI and the pre-built opensbi32 and opensbi64 images to version 1.7.
It has been almost an year since we last updated OpenSBI (at the time, up to v1.5.1) and we're missing a lot of good stuff from both v1.6 and v1.7, including SBI 3.0 and RPMI 1.0.
The changelog is too large and tedious to post in the commit msg so I encourage referring to [1] and [2] to see the new features we're adding into the QEMU roms.
[1] https://github.com/riscv-software-src/opensbi/releases/tag/v1.6
[2] https://github.com/riscv-software-src/opensbi/releases/tag/v1.7
--- .../opensbi-riscv32-generic-fw_dynamic.bin | Bin 268312 -> 268752 bytes .../opensbi-riscv64-generic-fw_dynamic.bin | Bin 272504 -> 273048 bytes roms/opensbi | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-)
pc-bios/opensbi-riscv32-generic-fw_dynamic.bin binary +0 -0
pc-bios/opensbi-riscv64-generic-fw_dynamic.bin binary +0 -0
roms/opensbi +1 -1
@@ -1 +1 @@ -Subproject commit 43cace6c3671e5172d0df0a8963e552bb04b7b20 +Subproject commit a32a91069119e7a5aa31e6bc51d5e00860be3d80
Signature · 1 line
2.50.1
Quoted 8 lines · Daniel Henrique Barboza
Update OpenSBI and the pre-built opensbi32 and opensbi64 images to version 1.7.
It has been almost an year since we last updated OpenSBI (at the time, up to v1.5.1) and we're missing a lot of good stuff from both v1.6 and v1.7, including SBI 3.0 and RPMI 1.0.
Quoted 8 lines
The changelog is too large and tedious to post in the commit msg so I encourage referring to [1] and [2] to see the new features we're adding into the QEMU roms.
[1] https://github.com/riscv-software-src/opensbi/releases/tag/v1.6
[2] https://github.com/riscv-software-src/opensbi/releases/tag/v1.7Signed-off-by Daniel Henrique Barboza <[email protected]>
Alistair
Quoted 23 lines
--- .../opensbi-riscv32-generic-fw_dynamic.bin | Bin 268312 -> 268752 bytes .../opensbi-riscv64-generic-fw_dynamic.bin | Bin 272504 -> 273048 bytes roms/opensbi | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-)pc-bios/opensbi-riscv32-generic-fw_dynamic.bin binary +0
-0pc-bios/opensbi-riscv64-generic-fw_dynamic.bin binary +0
-0roms/opensbi +1
-2@@ -1 +1 @@ -Subproject commit 43cace6c3671e5172d0df0a8963e552bb04b7b20 +Subproject commit a32a91069119e7a5aa31e6bc51d5e00860be3d80 --2.50.1
Joel Stanley
Reviewed-byQuoted 15 lines · Alistair Francis
Quoted 12 lines · Daniel Henrique Barboza
Update OpenSBI and the pre-built opensbi32 and opensbi64 images to version 1.7.
It has been almost an year since we last updated OpenSBI (at the time, up to v1.5.1) and we're missing a lot of good stuff from both v1.6 and v1.7, including SBI 3.0 and RPMI 1.0.
The changelog is too large and tedious to post in the commit msg so I encourage referring to [1] and [2] to see the new features we're adding into the QEMU roms.
Quoted 6 lines
Quoted 4 lines
[1] https://github.com/riscv-software-src/opensbi/releases/tag/v1.6
[2] https://github.com/riscv-software-src/opensbi/releases/tag/v1.7Signed-off-by Daniel Henrique Barboza <[email protected]>Reviewed-by Alistair Francis <[email protected]>
I noticed we have .gitlab-ci.d/opensbi.yml and .gitlab-ci.d/opensbi/Dockerfile. It looks like they are unused? Certainly the docker file looks out of date:
#
# Docker image to cross-compile OpenSBI firmware binaries #
FROM ubuntu:18.04
...
RUN wget -O - \
https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.3.0/x86_64-gcc-8.3.0-nolibc-riscv32-linux.tar.xz\
| tar -C /opt -xJ
Cheers,
Joel
Quoted 33 lines · Daniel Henrique Barboza
Update OpenSBI and the pre-built opensbi32 and opensbi64 images to version 1.7.
It has been almost an year since we last updated OpenSBI (at the time, up to v1.5.1) and we're missing a lot of good stuff from both v1.6 and v1.7, including SBI 3.0 and RPMI 1.0.
The changelog is too large and tedious to post in the commit msg so I encourage referring to [1] and [2] to see the new features we're adding into the QEMU roms.
[1] https://github.com/riscv-software-src/opensbi/releases/tag/v1.6
[2] https://github.com/riscv-software-src/opensbi/releases/tag/v1.7Signed-off-by Daniel Henrique Barboza <[email protected]>--- .../opensbi-riscv32-generic-fw_dynamic.bin | Bin 268312 -> 268752 bytes .../opensbi-riscv64-generic-fw_dynamic.bin | Bin 272504 -> 273048 bytes roms/opensbi | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-)pc-bios/opensbi-riscv32-generic-fw_dynamic.bin binary +0
-0pc-bios/opensbi-riscv64-generic-fw_dynamic.bin binary +0
-0roms/opensbi +0
-0
roms/opensbi line 1
Quoted 2 lines
roms/opensbi +1
-1@@ -1 +1 @@ -Subproject commit 43cace6c3671e5172d0df0a8963e552bb04b7b20 +Subproject commit a32a91069119e7a5aa31e6bc51d5e00860be3d80
https://gitlab.com/qemu-project/opensbi needs to be updated, but I don't know how to do that...
Alistair
Quoted 4 lines
--
2.50.1
Quoted 24 lines · Alistair Francis
Quoted 22 lines · Daniel Henrique Barboza
Update OpenSBI and the pre-built opensbi32 and opensbi64 images to version 1.7.
It has been almost an year since we last updated OpenSBI (at the time, up to v1.5.1) and we're missing a lot of good stuff from both v1.6 and v1.7, including SBI 3.0 and RPMI 1.0.
The changelog is too large and tedious to post in the commit msg so I encourage referring to [1] and [2] to see the new features we're adding into the QEMU roms.
[1] https://github.com/riscv-software-src/opensbi/releases/tag/v1.6
[2] https://github.com/riscv-software-src/opensbi/releases/tag/v1.7Signed-off-by Daniel Henrique Barboza <[email protected]>--- .../opensbi-riscv32-generic-fw_dynamic.bin | Bin 268312 -> 268752 bytes .../opensbi-riscv64-generic-fw_dynamic.bin | Bin 272504 -> 273048 bytes roms/opensbi | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
roms/opensbi line 1
Quoted 13 lines
pc-bios/opensbi-riscv32-generic-fw_dynamic.bin binary +0
-0pc-bios/opensbi-riscv64-generic-fw_dynamic.bin binary +0
-0roms/opensbi +1
-1@@ -1 +1 @@ -Subproject commit 43cace6c3671e5172d0df0a8963e552bb04b7b20 +Subproject commit a32a91069119e7a5aa31e6bc51d5e00860be3d80https://gitlab.com/qemu-project/opensbi needs to be updated, but I don't know how to do that...
I don't think we need to do anything aside from upstreaming this patch. The roms/opensbi repo will just fetch the new subproject commit.
Note that this is a no-binary patch and can't be directly applied, so you'll need to cherry-pick from the repo I pointed in the commit msg. This is the commit:
https://gitlab.com/danielhb/qemu/-/commit/ad1292586b2ec3ceb836fb7e46982bfa19920d9f
And then:
$ git submodule update --init roms/opensbi Submodule 'roms/opensbi' (https://gitlab.com/qemu-project/opensbi.git) registered for path 'roms/opensbi' Submodule path 'roms/opensbi': checked out 'a32a91069119e7a5aa31e6bc51d5e00860be3d80' $ $ cd roms/opensbi/ $ ls CONTRIBUTORS.md COPYING.BSD docs firmware include Kconfig lib Makefile platform README.md scripts ThirdPartyNotices.md $ $ git log commit a32a91069119e7a5aa31e6bc51d5e00860be3d80 (HEAD, tag: v1.7) Author: Anup Patel <[email protected]> Date: Mon Jun 30 08:37:30 2025 +0530
include: Bump-up version to 1.7
Update the OpenSBI version to 1.7 as part of release preparation.
Note that 'git submodule' already used https://gitlab.com/qemu-project/opensbi.git to retrieve the commit we want. I don't think we need to do anything special w.r.t the submodule per se.
Thanks,
Daniel
Quoted 7 lines
Alistair
Quoted 4 lines
--
2.50.1
Hi Alistair,
I saw you requested access to the opensbi mirror repo on QEMU's GitLab project.
I went ahead and pushed the latest OpenSBI master branch to QEMU's mirror:
https://gitlab.com/qemu-project/opensbi/-/commits/master?ref_type=HEADS
The mirror got stuck because commit a2807646a858 ("include: Adjust Sscofpmf mhpmevent mask for upper 6 bits") is not present in the upstream repo. There was probably a force push upstream that replaced it with commit df997c6e55fe ("include: Adjust Sscofpmf mhpmevent mask for upper 8 bits"). The diff of the QEMU mirror commit and the upstream commit is:
include/sbi/riscv_encoding.h +1 -1
@@ -207,7 +207,7 @@#endif -#define MHPMEVENT_SSCOF_MASK _ULL(0xFC00000000000000) +#define MHPMEVENT_SSCOF_MASK _ULL(0xFF00000000000000)#define ENVCFG_STCE (_ULL(1) << 63)#define ENVCFG_PBMTE (_ULL(1) << 62)
I looked at the upstream discussion about the reserved bits and I guess that the author changed their mind and force pushed with an updated mask constant. I mention this because I came to the conclusion that there was nothing nefarious about the force push and that it's safe to update QEMU's mirror to follow upstream again.
Please let me know if you have any issues updating OpenSBI in QEMU and I can tweak the QEMU mirror repository as needed.
Thanks,
Stefan
Quoted 6 lines · Stefan Hajnoczi
Hi Alistair,
I saw you requested access to the opensbi mirror repo on QEMU's GitLab project.I went ahead and pushed the latest OpenSBI master branch to QEMU's mirror:
https://gitlab.com/qemu-project/opensbi/-/commits/master?ref_type=HEADS
Awesome! Thanks for that
Quoted 22 lines
The mirror got stuck because commit
a2807646a858("include: Adjust Sscofpmf mhpmevent mask for upper 6 bits") is not present in the upstream repo. There was probably a force push upstream that replaced it with commitdf997c6e55fe("include: Adjust Sscofpmf mhpmevent mask for upper 8 bits"). The diff of the QEMU mirror commit and the upstream commit is:include/sbi/riscv_encoding.h +1
-1@@ -207,7 +207,7 @@#endif -#define MHPMEVENT_SSCOF_MASK _ULL(0xFC00000000000000) +#define MHPMEVENT_SSCOF_MASK _ULL(0xFF00000000000000)#define ENVCFG_STCE (_ULL(1) << 63)#define ENVCFG_PBMTE (_ULL(1) << 62)
Quoted 5 lines
I looked at the upstream discussion about the reserved bits and I guess that the author changed their mind and force pushed with an updated mask constant. I mention this because I came to the conclusion that there was nothing nefarious about the force push and that it's safe to update QEMU's mirror to follow upstream again.
Thanks for digging into that, I agree that it seems like someone just wanted to correct a bit mask.
Alistair
Quoted 6 lines
Please let me know if you have any issues updating OpenSBI in QEMU and I can tweak the QEMU mirror repository as needed.
Thanks,
Stefan