]> git.proxmox.com Git - mirror_qemu.git/commitdiff
roms: Add virtual Boot ROM for NPCM7xx SoCs
authorHavard Skinnemoen <hskinnemoen@google.com>
Fri, 11 Sep 2020 05:20:53 +0000 (22:20 -0700)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 14 Sep 2020 13:24:59 +0000 (14:24 +0100)
This is a minimalistic boot ROM written specifically for use with QEMU.
It supports loading the second-stage loader from SPI flash into RAM, SMP
boot, and not much else.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Havard Skinnemoen <hskinnemoen@google.com>
Message-id: 20200911052101.2602693-7-hskinnemoen@google.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
.gitmodules
MAINTAINERS
pc-bios/README
pc-bios/meson.build
pc-bios/npcm7xx_bootrom.bin [new file with mode: 0644]
roms/Makefile
roms/vbootrom [new submodule]

index ce979398a87e0bc16caac03933d3aea73629625c..9ffb9f3f4f30229912d394425672977eaa8ffa2f 100644 (file)
@@ -61,3 +61,6 @@
 [submodule "meson"]
        path = meson
        url = https://github.com/mesonbuild/meson/
+[submodule "roms/vbootrom"]
+       path = roms/vbootrom
+       url = https://github.com/google/vbootrom.git
index c95a00c12ddde123fd89ba4e02903df9b16763aa..3d17cad19aa0e1d6f4b3d424fcfec34d2f48a8e5 100644 (file)
@@ -757,6 +757,8 @@ L: qemu-arm@nongnu.org
 S: Supported
 F: hw/*/npcm7xx*
 F: include/hw/*/npcm7xx*
+F: pc-bios/npcm7xx_bootrom.bin
+F: roms/vbootrom
 
 nSeries
 M: Andrzej Zaborowski <balrogg@gmail.com>
index 2e49be607e02b03f6cd2a79d17f1156388e55f74..33f9754ad30ff579ba649c9dac3b7d189c121a74 100644 (file)
@@ -71,3 +71,9 @@
   ("Simplified BSD License" or "FreeBSD License", SPDX: BSD-2-Clause). OpenSBI
   source code also contains code reused from other projects desribed here:
   https://github.com/riscv/opensbi/blob/master/ThirdPartyNotices.md.
+
+- npcm7xx_bootrom.bin is a simplified, free (Apache 2.0) boot ROM for Nuvoton
+  NPCM7xx BMC devices. It currently implements the bare minimum to load, parse,
+  initialize and run boot images stored in SPI flash, but may grow more
+  features over time as needed. The source code is available at:
+  https://github.com/google/vbootrom
index 8087e5c0a7a18b9f728b5b384bf51414bdbb0628..182d5ebb35de1aa7e05aa6d0698b3689925680d9 100644 (file)
@@ -81,6 +81,7 @@ blobs = files(
   'opensbi-riscv64-generic-fw_dynamic.bin',
   'opensbi-riscv32-generic-fw_dynamic.elf',
   'opensbi-riscv64-generic-fw_dynamic.elf',
+  'npcm7xx_bootrom.bin',
 )
 
 if install_blobs
diff --git a/pc-bios/npcm7xx_bootrom.bin b/pc-bios/npcm7xx_bootrom.bin
new file mode 100644 (file)
index 0000000..38f89d1
Binary files /dev/null and b/pc-bios/npcm7xx_bootrom.bin differ
index d3a322835915b3fec69636826dd86a2e1d832b9d..3726f06fe7ebadccc797cb4b47227e33170b4849 100644 (file)
@@ -34,6 +34,7 @@ find-cross-gcc = $(firstword $(wildcard $(patsubst %ld,%gcc,$(call find-cross-ld
 # finally strip off path + toolname so we get the prefix
 find-cross-prefix = $(subst gcc,,$(notdir $(call find-cross-gcc,$(1))))
 
+arm_cross_prefix := $(call find-cross-prefix,arm)
 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)
@@ -63,6 +64,7 @@ default help:
        @echo "  skiboot            -- update skiboot.lid"
        @echo "  u-boot.e500        -- update u-boot.e500"
        @echo "  u-boot.sam460      -- update u-boot.sam460"
+       @echo "  npcm7xx_bootrom    -- update vbootrom for npcm7xx"
        @echo "  efi                -- update UEFI (edk2) platform firmware"
        @echo "  opensbi32-generic  -- update OpenSBI for 32-bit generic machine"
        @echo "  opensbi64-generic  -- update OpenSBI for 64-bit generic machine"
@@ -185,6 +187,10 @@ bios-microvm:
        $(MAKE) -C qboot
        cp qboot/bios.bin ../pc-bios/bios-microvm.bin
 
+npcm7xx_bootrom:
+       $(MAKE) -C vbootrom CROSS_COMPILE=$(arm_cross_prefix)
+       cp vbootrom/npcm7xx_bootrom.bin ../pc-bios/npcm7xx_bootrom.bin
+
 clean:
        rm -rf seabios/.config seabios/out seabios/builds
        $(MAKE) -C sgabios clean
@@ -198,3 +204,4 @@ clean:
        $(MAKE) -f Makefile.edk2 clean
        $(MAKE) -C opensbi clean
        $(MAKE) -C qboot clean
+       $(MAKE) -C vbootrom clean
diff --git a/roms/vbootrom b/roms/vbootrom
new file mode 160000 (submodule)
index 0000000..0c37a43
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 0c37a43527f0ee2b9584e7fb2fdc805e902635ac