hexagon roms: add H2 firmware
v2 cover hexagon roms: add H2 firmware
In v2:
- Got rid of the make macros in favor of easier-to-read variable substitution.
- Split into two commits: one for binaries, one for everything else. Replying to the thread becomes very unwieldy with the binaries.
v1: https://lore.kernel.org/qemu-devel/[email protected]/
Brian Cain (2):
roms: add H2 firmware support
pc-bios: add H2 firmware binaries
MAINTAINERS | 2 + docs/system/hexagon/cdsp.rst | 48 ++++++++++++++ .gitignore | 1 + .gitmodules | 3 + pc-bios/README | 7 ++ pc-bios/hexagon-hypervisor-license.txt | 26 ++++++++ pc-bios/hexagon_booter_qcs6490_cdsp | Bin 0 -> 285292 bytes pc-bios/hexagon_booter_sa8775p_cdsp | Bin 0 -> 281224 bytes pc-bios/hexagon_booter_sa8797p_nsp0 | Bin 0 -> 288904 bytes pc-bios/hexagon_booter_sc8480xp_nsp0 | Bin 0 -> 288908 bytes pc-bios/hexagon_booter_sm8975_nsp | Bin 0 -> 288900 bytes pc-bios/hexagon_loadlinux_qcs6490_cdsp | Bin 0 -> 200428 bytes pc-bios/hexagon_loadlinux_sa8775p_cdsp | Bin 0 -> 200456 bytes pc-bios/hexagon_loadlinux_sa8797p_nsp0 | Bin 0 -> 208136 bytes pc-bios/hexagon_loadlinux_sc8480xp_nsp0 | Bin 0 -> 208140 bytes pc-bios/hexagon_loadlinux_sm8975_nsp | Bin 0 -> 208132 bytes pc-bios/meson.build | 11 ++++ roms/Makefile | 83 ++++++++++++++++++++++++ roms/hexagon-hypervisor | 1 + 19 files changed, 182 insertions(+) create mode 100644 pc-bios/hexagon-hypervisor-license.txt create mode 100644 pc-bios/hexagon_booter_qcs6490_cdsp create mode 100644 pc-bios/hexagon_booter_sa8775p_cdsp create mode 100644 pc-bios/hexagon_booter_sa8797p_nsp0 create mode 100644 pc-bios/hexagon_booter_sc8480xp_nsp0 create mode 100644 pc-bios/hexagon_booter_sm8975_nsp create mode 100644 pc-bios/hexagon_loadlinux_qcs6490_cdsp create mode 100644 pc-bios/hexagon_loadlinux_sa8775p_cdsp create mode 100644 pc-bios/hexagon_loadlinux_sa8797p_nsp0 create mode 100644 pc-bios/hexagon_loadlinux_sc8480xp_nsp0 create mode 100644 pc-bios/hexagon_loadlinux_sm8975_nsp create mode 160000 roms/hexagon-hypervisor
Signature · 1 line
2.34.1
PATCH v2 1/2 roms: add H2 firmware support
--- MAINTAINERS | 2 + docs/system/hexagon/cdsp.rst | 48 +++++++++++++++ .gitignore | 1 + .gitmodules | 3 + pc-bios/README | 7 +++ pc-bios/hexagon-hypervisor-license.txt | 26 ++++++++ pc-bios/meson.build | 11 ++++ roms/Makefile | 83 ++++++++++++++++++++++++++ roms/hexagon-hypervisor | 1 + 9 files changed, 182 insertions(+) create mode 100644 pc-bios/hexagon-hypervisor-license.txt create mode 160000 roms/hexagon-hypervisor
MAINTAINERS +2 -0
@@ -1383,6 +1383,8 @@ F: configs/devices/hexagon-softmmu/default.mak F: docs/system/hexagon/ F: tests/functional/hexagon/ F: docs/devel/hexagon-sys.rst +F: pc-bios/hexagon* +F: roms/hexagon-hypervisor LoongArch Machines ------------------
docs/system/hexagon/cdsp.rst +48 -0
51 lines not on this page · raw message
.gitignore +1 -0
@@ -1,5 +1,6 @@ /GNUmakefile /build/ +/roms/hexagon-firmware-build/ /.cache/ /.vscode/ *.pyc
.gitmodules +3 -0
@@ -45,3 +45,6 @@ [submodule "tests/lcitool/libvirt-ci"] path = tests/lcitool/libvirt-ci url = https://gitlab.com/libvirt/libvirt-ci.git +[submodule "roms/hexagon-hypervisor"] + path = roms/hexagon-hypervisor + url = https://gitlab.com/qemu-project/hexagon-hypervisor.git
pc-bios/README +7 -0
@@ -1,6 +1,13 @@ - SeaBIOS (bios.bin) is the successor of pc bios. See http://www.seabios.org/ for more information. +- hexagon_booter_<machine> and hexagon_loadlinux_<machine> are the H2 + hypervisor firmware for the Hexagon machines. The sources are at + https://gitlab.com/qemu-project/hexagon-hypervisor, built from commit + 23d5bde4313c1e63ba64dd5d7f542b1055188ef8 with Hexagon SDK 6.7.0.0 + via "make -C roms hexagon-<machine>". H2 is distributed under the terms + given in "hexagon-hypervisor-license.txt". + - The VGA BIOS and the Cirrus VGA BIOS come from the LGPL VGA bios project (http://www.nongnu.org/vgabios/).
pc-bios/hexagon-hypervisor-license.txt new file +26 -0
@@ -0,0 +1,26 @@ +Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
pc-bios/meson.build +11 -0
@@ -73,6 +73,17 @@ blobs = [ 'edk2-licenses.txt', 'hppa-firmware.img', 'hppa-firmware64.img', + 'hexagon_booter_qcs6490_cdsp', + 'hexagon_loadlinux_qcs6490_cdsp', + 'hexagon_booter_sm8975_nsp', + 'hexagon_loadlinux_sm8975_nsp', + 'hexagon_booter_sa8775p_cdsp', + 'hexagon_loadlinux_sa8775p_cdsp', + 'hexagon_booter_sc8480xp_nsp0', + 'hexagon_loadlinux_sc8480xp_nsp0', + 'hexagon_booter_sa8797p_nsp0', + 'hexagon_loadlinux_sa8797p_nsp0', + 'hexagon-hypervisor-license.txt', 'opensbi-riscv32-generic-fw_dynamic.bin', 'opensbi-riscv64-generic-fw_dynamic.bin', 'npcm7xx_bootrom.bin',
roms/Makefile +83 -0
98 lines not on this page · raw message
roms/hexagon-hypervisor new file +1 -0
@@ -0,0 +1 @@ +Subproject commit 23d5bde4313c1e63ba64dd5d7f542b1055188ef8
Signature · 1 line
2.34.1
Re: [PATCH v2 1/2] roms: add H2 firmware support
Quoted 15 lines · Brian Cain
Signed-off-by Brian Cain <[email protected]>--- MAINTAINERS | 2 + docs/system/hexagon/cdsp.rst | 48 +++++++++++++++ .gitignore | 1 + .gitmodules | 3 + pc-bios/README | 7 +++ pc-bios/hexagon-hypervisor-license.txt | 26 ++++++++ pc-bios/meson.build | 11 ++++ roms/Makefile | 83 ++++++++++++++++++++++++++ roms/hexagon-hypervisor | 1 + 9 files changed, 182 insertions(+)create mode 100644
pc-bios/hexagon-hypervisor-license.txtcreate mode 160000 roms/hexagon-hypervisor
[...]
Quoted 5 lines
pc-bios/README +0
-0
pc-bios/README line 10
Quoted 10 lines
pc-bios/README +7
-0@@ -1,6 +1,13 @@ - SeaBIOS (bios.bin) is the successor of pc bios. See http://www.seabios.org/ for more information. +- hexagon_booter_<machine> and hexagon_loadlinux_<machine> are the H2 + hypervisor firmware for the Hexagon machines. The sources are at + https://gitlab.com/qemu-project/hexagon-hypervisor, built from commit + 23d5bde4313c1e63ba64dd5d7f542b1055188ef8 with Hexagon SDK 6.7.0.0 + via "make -C roms hexagon-<machine>". H2 is distributed under the terms + given in "hexagon-hypervisor-license.txt". +
Submodule already holds the SHA-1 tracked, so no need to repeat that in README. Also, at some point in future, 100% probability this will not be updated and become wrong information.
[...]
roms/hexagon-hypervisor line 1
Quoted 7 lines
roms/hexagon-hypervisor new file +1
-0@@ -0,0 +1 @@ +Subproject commit 23d5bde4313c1e63ba64dd5d7f542b1055188ef8
For the rest of the series (this patch and second one),
Regards,
Pierrick
Re: [PATCH v2 1/2] roms: add H2 firmware support
In reply to Brian CainQuoted 9 lines · Brian Cain
roms/Makefile +6
-0+# Needs Hexagon SDK on PATH. +hexagon_h2_build := hexagon-firmware-build +hexagon_h2_src := $(CURDIR)/hexagon-hypervisor +hexagon_h2_out = $(CURDIR)/$(hexagon_h2_build) +hexagon_h2_booters := hexagon-booter-qcs6490-cdsp \ + hexagon-booter-sm8975-nsp hexagon-booter-sa8775p-cdsp \
roms/Makefile hppa-firmware: · line 234
Quoted 10 lines
roms/Makefile +10
-0+ hexagon-booter-sc8480xp-nsp0 hexagon-booter-sa8797p-nsp0 +hexagon_h2_loadlinux := hexagon-loadlinux-qcs6490-cdsp \ + hexagon-loadlinux-sm8975-nsp hexagon-loadlinux-sa8775p-cdsp \ + hexagon-loadlinux-sc8480xp-nsp0 hexagon-loadlinux-sa8797p-nsp0 +hexagon_h2_common_flags = USE_PKW=0 TARGET=opt NULL_ANGEL_TRAP=1 \ + HMX_HLX_SUPPORT=1 \ + H2K_LOAD_ADDR=0x9b800000 H2K_GUEST_START=0xa2000000 \ + H2K_GIT_COMMIT=0x$(shell git -C hexagon-hypervisor rev-parse --short=8 HEAD) \ + H2K_GIT_COMMIT_LONG=0x$(shell git -C hexagon-hypervisor rev-parse HEAD) \ + JFLAG=-j$(shell nproc)
Can we get rid of the git thing here please?
When a user downloads tarball from qemu download area and extracts it, there's no git repository in there. So the above git rev-parse fails.
I dunno if there should be official releases for the hexagon firmware or we can create a file with some version string inside the subdir and use it if exists (as we've done previously for some other roms, for exactly the same reason). But the current version is not good :)
(Testing 11.2.0-rc0 as a tarball, and noticed this immediately ;)
Thanks,
/mjt
Re: [PATCH v2 1/2] roms: add H2 firmware support
Quoted 34 lines · Michael Tokarev
Quoted 17 lines · Brian Cain
roms/Makefile +14
-0+# Needs Hexagon SDK on PATH. +hexagon_h2_build := hexagon-firmware-build +hexagon_h2_src := $(CURDIR)/hexagon-hypervisor +hexagon_h2_out = $(CURDIR)/$(hexagon_h2_build) +hexagon_h2_booters := hexagon-booter-qcs6490-cdsp \ + hexagon-booter-sm8975-nsp hexagon-booter-sa8775p-cdsp \ + hexagon-booter-sc8480xp-nsp0 hexagon-booter-sa8797p-nsp0 +hexagon_h2_loadlinux := hexagon-loadlinux-qcs6490-cdsp \ + hexagon-loadlinux-sm8975-nsp hexagon-loadlinux-sa8775p-cdsp \ + hexagon-loadlinux-sc8480xp-nsp0 hexagon-loadlinux-sa8797p-nsp0 +hexagon_h2_common_flags = USE_PKW=0 TARGET=opt NULL_ANGEL_TRAP=1 \ + HMX_HLX_SUPPORT=1 \ + H2K_LOAD_ADDR=0x9b800000 H2K_GUEST_START=0xa2000000 \ + H2K_GIT_COMMIT=0x$(shell git -C hexagon-hypervisor rev-parse --Quoted 4 lines
short=8 HEAD) \
+ H2K_GIT_COMMIT_LONG=0x$(shell git -C hexagon-hypervisor rev-parse HEAD) \
+ JFLAG=-j$(shell nproc)Can we get rid of the git thing here please?
When a user downloads tarball from qemu download area and extracts it, there's no git repository in there. So the above
git rev-parsefails.I dunno if there should be official releases for the hexagon firmware or we can create a file with some version string inside the subdir and use it if exists (as we've done previously for some other roms, for exactly the same reason). But the current version is not good :)
Quoted 5 lines
(Testing 11.2.0-rc0 as a tarball, and noticed this immediately ;)
Thanks,
/mjt
Hi Michael,
What is the use case to build from roms if you don't have access to git submodules to get sources for the projects? Any other rom build will fail, simply because submodules are not present.
The difference in error message is subtly different (rev-parse failed vs 'no makefile found in subdir X'), but the result is the same: you can't build any rom that requires submodules.
If we want something that works with a tarball, Makefile should do explicit git clone per project and not rely on submodules.
Regards,
Pierrick
Re: [PATCH v2 1/2] roms: add H2 firmware support
Quoted 47 lines · Pierrick Bouvier
Quoted 34 lines · Michael Tokarev
Quoted 17 lines · Brian Cain
roms/Makefile +14
-0+# Needs Hexagon SDK on PATH. +hexagon_h2_build := hexagon-firmware-build +hexagon_h2_src := $(CURDIR)/hexagon-hypervisor +hexagon_h2_out = $(CURDIR)/$(hexagon_h2_build) +hexagon_h2_booters := hexagon-booter-qcs6490-cdsp \ + hexagon-booter-sm8975-nsp hexagon-booter-sa8775p-cdsp \ + hexagon-booter-sc8480xp-nsp0 hexagon-booter-sa8797p-nsp0 +hexagon_h2_loadlinux := hexagon-loadlinux-qcs6490-cdsp \ + hexagon-loadlinux-sm8975-nsp hexagon-loadlinux-sa8775p-cdsp \ + hexagon-loadlinux-sc8480xp-nsp0 hexagon-loadlinux-sa8797p-nsp0 +hexagon_h2_common_flags = USE_PKW=0 TARGET=opt NULL_ANGEL_TRAP=1 \ + HMX_HLX_SUPPORT=1 \ + H2K_LOAD_ADDR=0x9b800000 H2K_GUEST_START=0xa2000000 \ + H2K_GIT_COMMIT=0x$(shell git -C hexagon-hypervisor rev-parse --Quoted 4 lines
short=8 HEAD) \
+ H2K_GIT_COMMIT_LONG=0x$(shell git -C hexagon-hypervisor rev-parse HEAD) \
+ JFLAG=-j$(shell nproc)Can we get rid of the git thing here please?
When a user downloads tarball from qemu download area and extracts it, there's no git repository in there. So the above
git rev-parsefails.I dunno if there should be official releases for the hexagon firmware or we can create a file with some version string inside the subdir and use it if exists (as we've done previously for some other roms, for exactly the same reason). But the current version is not good :)
Quoted 5 lines
(Testing 11.2.0-rc0 as a tarball, and noticed this immediately ;)
Thanks,
/mjt
Hi Michael,
What is the use case to build from roms if you don't have access to git submodules to get sources for the projects? Any other rom build will fail, simply because submodules are not present.
Quoted 7 lines
The difference in error message is subtly different (rev-parse failed vs 'no makefile found in subdir X'), but the result is the same: you can't build any rom that requires submodules.
If we want something that works with a tarball,
Makefileshould do explicit git clone per project and not rely on submodules.
Oops, my bad. I missed the fact that we embed rom sources directly in our tarball, which I was not aware of. In this case, we indeed need to specify what is the commit built directly (with a check to make sure it stays updated if submodule is present and git rev-parse succeeds).
Quoted 2 lines
Regards,
Pierrick
Re: [PATCH v2 1/2] roms: add H2 firmware support
In reply to Michael TokarevQuoted 17 lines · Michael Tokarev
Quoted 15 lines · Brian Cain
roms/Makefile +12
-0+# Needs Hexagon SDK on PATH. +hexagon_h2_build := hexagon-firmware-build +hexagon_h2_src := $(CURDIR)/hexagon-hypervisor +hexagon_h2_out = $(CURDIR)/$(hexagon_h2_build) +hexagon_h2_booters := hexagon-booter-qcs6490-cdsp \ + hexagon-booter-sm8975-nsp hexagon-booter-sa8775p-cdsp \ + hexagon-booter-sc8480xp-nsp0 hexagon-booter-sa8797p-nsp0 +hexagon_h2_loadlinux := hexagon-loadlinux-qcs6490-cdsp \ + hexagon-loadlinux-sm8975-nsp hexagon-loadlinux-sa8775p-cdsp \ + hexagon-loadlinux-sc8480xp-nsp0 hexagon-loadlinux-sa8797p-nsp0 +hexagon_h2_common_flags = USE_PKW=0 TARGET=opt NULL_ANGEL_TRAP=1 \ + HMX_HLX_SUPPORT=1 \
Quoted 9 lines
Quoted 6 lines
+ H2K_LOAD_ADDR=0x9b800000 H2K_GUEST_START=0xa2000000 \
+ H2K_GIT_COMMIT=0x$(shell git -C hexagon-hypervisor rev-parse --short=8 HEAD) \
+ H2K_GIT_COMMIT_LONG=0x$(shell git -C hexagon-hypervisor rev-parse HEAD) \
+ JFLAG=-j$(shell nproc)Can we get rid of the git thing here please?
Sorry, I will fix it.
Quoted 13 lines
When a user downloads tarball from qemu download area and extracts it, there's no git repository in there. So the above
git rev-parsefails.I dunno if there should be official releases for the hexagon firmware or we can create a file with some version string inside the subdir and use it if exists (as we've done previously for some other roms, for exactly the same reason). But the current version is not good :)
(Testing 11.2.0-rc0 as a tarball, and noticed this immediately ;)
Thanks,
/mjt
PATCH v2 2/2 pc-bios: add H2 firmware binaries
In reply to Brian Cain--- pc-bios/hexagon_booter_qcs6490_cdsp | Bin 0 -> 285292 bytes pc-bios/hexagon_booter_sa8775p_cdsp | Bin 0 -> 281224 bytes pc-bios/hexagon_booter_sa8797p_nsp0 | Bin 0 -> 288904 bytes pc-bios/hexagon_booter_sc8480xp_nsp0 | Bin 0 -> 288908 bytes pc-bios/hexagon_booter_sm8975_nsp | Bin 0 -> 288900 bytes pc-bios/hexagon_loadlinux_qcs6490_cdsp | Bin 0 -> 200428 bytes pc-bios/hexagon_loadlinux_sa8775p_cdsp | Bin 0 -> 200456 bytes pc-bios/hexagon_loadlinux_sa8797p_nsp0 | Bin 0 -> 208136 bytes pc-bios/hexagon_loadlinux_sc8480xp_nsp0 | Bin 0 -> 208140 bytes pc-bios/hexagon_loadlinux_sm8975_nsp | Bin 0 -> 208132 bytes 10 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 pc-bios/hexagon_booter_qcs6490_cdsp create mode 100644 pc-bios/hexagon_booter_sa8775p_cdsp create mode 100644 pc-bios/hexagon_booter_sa8797p_nsp0 create mode 100644 pc-bios/hexagon_booter_sc8480xp_nsp0 create mode 100644 pc-bios/hexagon_booter_sm8975_nsp create mode 100644 pc-bios/hexagon_loadlinux_qcs6490_cdsp create mode 100644 pc-bios/hexagon_loadlinux_sa8775p_cdsp create mode 100644 pc-bios/hexagon_loadlinux_sa8797p_nsp0 create mode 100644 pc-bios/hexagon_loadlinux_sc8480xp_nsp0 create mode 100644 pc-bios/hexagon_loadlinux_sm8975_nsp
pc-bios/hexagon_booter_qcs6490_cdsp new file binary +0 -0
pc-bios/hexagon_booter_sa8775p_cdsp new file binary +0 -0
pc-bios/hexagon_booter_sa8797p_nsp0 new file binary +0 -0
pc-bios/hexagon_booter_sc8480xp_nsp0 new file binary +0 -0
pc-bios/hexagon_booter_sm8975_nsp new file binary +0 -0
pc-bios/hexagon_loadlinux_qcs6490_cdsp new file binary +0 -0
pc-bios/hexagon_loadlinux_sa8775p_cdsp new file binary +0 -0
pc-bios/hexagon_loadlinux_sa8797p_nsp0 new file binary +0 -0
pc-bios/hexagon_loadlinux_sc8480xp_nsp0 new file binary +0 -0
pc-bios/hexagon_loadlinux_sm8975_nsp new file binary +0 -0
Signature · 1 line
2.34.1