Skip to content

Commit d1cb5ed

Browse files
hskinnemoenpm215
authored andcommitted
roms: Add virtual Boot ROM for NPCM7xx SoCs
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é <[email protected]> Tested-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Havard Skinnemoen <[email protected]> Message-id: [email protected] Signed-off-by: Peter Maydell <[email protected]>
1 parent b773acf commit d1cb5ed

File tree

7 files changed

+20
-0
lines changed

7 files changed

+20
-0
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,6 @@
6161
[submodule "meson"]
6262
path = meson
6363
url = https://github.com/mesonbuild/meson/
64+
[submodule "roms/vbootrom"]
65+
path = roms/vbootrom
66+
url = https://github.com/google/vbootrom.git

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,8 @@ L: [email protected]
757757
S: Supported
758758
F: hw/*/npcm7xx*
759759
F: include/hw/*/npcm7xx*
760+
F: pc-bios/npcm7xx_bootrom.bin
761+
F: roms/vbootrom
760762

761763
nSeries
762764
M: Andrzej Zaborowski <[email protected]>

pc-bios/README

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,9 @@
7171
("Simplified BSD License" or "FreeBSD License", SPDX: BSD-2-Clause). OpenSBI
7272
source code also contains code reused from other projects desribed here:
7373
https://github.com/riscv/opensbi/blob/master/ThirdPartyNotices.md.
74+
75+
- npcm7xx_bootrom.bin is a simplified, free (Apache 2.0) boot ROM for Nuvoton
76+
NPCM7xx BMC devices. It currently implements the bare minimum to load, parse,
77+
initialize and run boot images stored in SPI flash, but may grow more
78+
features over time as needed. The source code is available at:
79+
https://github.com/google/vbootrom

pc-bios/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ blobs = files(
8181
'opensbi-riscv64-generic-fw_dynamic.bin',
8282
'opensbi-riscv32-generic-fw_dynamic.elf',
8383
'opensbi-riscv64-generic-fw_dynamic.elf',
84+
'npcm7xx_bootrom.bin',
8485
)
8586

8687
if install_blobs

pc-bios/npcm7xx_bootrom.bin

768 Bytes
Binary file not shown.

roms/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ find-cross-gcc = $(firstword $(wildcard $(patsubst %ld,%gcc,$(call find-cross-ld
3434
# finally strip off path + toolname so we get the prefix
3535
find-cross-prefix = $(subst gcc,,$(notdir $(call find-cross-gcc,$(1))))
3636

37+
arm_cross_prefix := $(call find-cross-prefix,arm)
3738
powerpc64_cross_prefix := $(call find-cross-prefix,powerpc64)
3839
powerpc_cross_prefix := $(call find-cross-prefix,powerpc)
3940
x86_64_cross_prefix := $(call find-cross-prefix,x86_64)
@@ -63,6 +64,7 @@ default help:
6364
@echo " skiboot -- update skiboot.lid"
6465
@echo " u-boot.e500 -- update u-boot.e500"
6566
@echo " u-boot.sam460 -- update u-boot.sam460"
67+
@echo " npcm7xx_bootrom -- update vbootrom for npcm7xx"
6668
@echo " efi -- update UEFI (edk2) platform firmware"
6769
@echo " opensbi32-generic -- update OpenSBI for 32-bit generic machine"
6870
@echo " opensbi64-generic -- update OpenSBI for 64-bit generic machine"
@@ -185,6 +187,10 @@ bios-microvm:
185187
$(MAKE) -C qboot
186188
cp qboot/bios.bin ../pc-bios/bios-microvm.bin
187189

190+
npcm7xx_bootrom:
191+
$(MAKE) -C vbootrom CROSS_COMPILE=$(arm_cross_prefix)
192+
cp vbootrom/npcm7xx_bootrom.bin ../pc-bios/npcm7xx_bootrom.bin
193+
188194
clean:
189195
rm -rf seabios/.config seabios/out seabios/builds
190196
$(MAKE) -C sgabios clean
@@ -198,3 +204,4 @@ clean:
198204
$(MAKE) -f Makefile.edk2 clean
199205
$(MAKE) -C opensbi clean
200206
$(MAKE) -C qboot clean
207+
$(MAKE) -C vbootrom clean

roms/vbootrom

Submodule vbootrom added at 0c37a43

0 commit comments

Comments
 (0)