All of lore.kernel.org
 help / color / mirror / Atom feed
From: Havard Skinnemoen <hskinnemoen@google.com>
To: qemu-devel@nongnu.org, qemu-arm@nongnu.org
Cc: Avi.Fishman@nuvoton.com, kfting@nuvoton.com,
	 Havard Skinnemoen <hskinnemoen@google.com>
Subject: [PATCH v6 06/13] roms: Add virtual Boot ROM for NPCM7xx SoCs
Date: Thu, 16 Jul 2020 23:02:51 -0700	[thread overview]
Message-ID: <20200717060258.1602319-7-hskinnemoen@google.com> (raw)
In-Reply-To: <20200717060258.1602319-1-hskinnemoen@google.com>

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.

Signed-off-by: Havard Skinnemoen <hskinnemoen@google.com>
---
 Makefile                    |   1 +
 .gitmodules                 |   3 +++
 pc-bios/npcm7xx_bootrom.bin | Bin 0 -> 768 bytes
 roms/Makefile               |   7 +++++++
 roms/vbootrom               |   1 +
 5 files changed, 12 insertions(+)
 create mode 100644 pc-bios/npcm7xx_bootrom.bin
 create mode 160000 roms/vbootrom

diff --git a/Makefile b/Makefile
index 32345c610e..56473c788d 100644
--- a/Makefile
+++ b/Makefile
@@ -838,6 +838,7 @@ s390-ccw.img s390-netboot.img \
 slof.bin skiboot.lid \
 palcode-clipper \
 u-boot.e500 u-boot-sam460-20100605.bin \
+npcm7xx_bootrom.bin \
 qemu_vga.ndrv \
 edk2-licenses.txt \
 hppa-firmware.img \
diff --git a/.gitmodules b/.gitmodules
index 9c0501a4d4..c95eaf8284 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -58,3 +58,6 @@
 [submodule "roms/qboot"]
 	path = roms/qboot
 	url = https://github.com/bonzini/qboot
+[submodule "roms/vbootrom"]
+	path = roms/vbootrom
+	url = https://github.com/google/vbootrom.git
diff --git a/pc-bios/npcm7xx_bootrom.bin b/pc-bios/npcm7xx_bootrom.bin
new file mode 100644
index 0000000000000000000000000000000000000000..38f89d1b97b0c2e133af2a9fbed0521be132065b
GIT binary patch
literal 768
zcmd5)JxClu6n-<aczPbVhZYusb8wKx;7TklHfmuZdYT9pDRLwd1p_t-DFpWpyA+8(
zwKtZg3J4a0aCM3_X(ZL&4g;46VVk5e$K;z;L99|b@aE%v^S$rQ8)h(Vm@cB9IYc+2
z2SHd4^NwTIGE%w>9S05p1#kf90Sj5Z(jG8}+)IZIp~iXK=T&)dL`%d-q*8aR#mq{7
z9`=6;Dr(H0ACe72R5x?!)^86Qj-X%{+!K9iZNA@*wkBAV&iZ(l^I9?!Gz=S2I_*1d
zr+tTQDHjvyzKnw(hu00yX`u!Fv<!~XVcX?@kr#<B0(gGU?$W{gSsQa}CF^8Cfzp2X
z@P}yDV-bci(K9XL$FU!som2C`c)?Uc&294s^}Wzumap{hg1X^jN|V25M5tQZ=<9lN
z%(zKz#t-qCwHKb;HygOCpvCNL_4@1tXV1YGf^XUE_$zr{g8zWh-6gz-teI(eibtxo
z?0OZI4%rU0741PgUD`2xq@H|*4=+Rs?%N)Ox5G+q>C;DilBe_YlkeSUVHA-crNk+k
jtiF_MudA<CB(}8|fqYwCf3re&=&@_s761P#-ID$TwgmBa

literal 0
HcmV?d00001

diff --git a/roms/Makefile b/roms/Makefile
index f9acf39954..97e54fedeb 100644
--- a/roms/Makefile
+++ b/roms/Makefile
@@ -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-virt     -- update OpenSBI for 32-bit virt machine"
 	@echo "  opensbi64-virt     -- update OpenSBI for 64-bit virt machine"
@@ -198,6 +200,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
@@ -211,3 +217,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
index 0000000000..0c37a43527
--- /dev/null
+++ b/roms/vbootrom
@@ -0,0 +1 @@
+Subproject commit 0c37a43527f0ee2b9584e7fb2fdc805e902635ac
-- 
2.28.0.rc0.105.gf9edc3c819-goog



  parent reply	other threads:[~2020-07-17  6:10 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17  6:02 [PATCH v6 00/13] Add Nuvoton NPCM730/NPCM750 SoCs and two BMC machines Havard Skinnemoen
2020-07-17  6:02 ` [PATCH v6 01/13] hw/misc: Add NPCM7xx System Global Control Registers device model Havard Skinnemoen
2020-07-17  7:59   ` Philippe Mathieu-Daudé
2020-07-17  6:02 ` [PATCH v6 02/13] hw/misc: Add NPCM7xx Clock Controller " Havard Skinnemoen
2020-07-17  6:02 ` [PATCH v6 03/13] hw/timer: Add NPCM7xx Timer " Havard Skinnemoen
2020-07-17  8:05   ` Philippe Mathieu-Daudé
2020-07-17  8:10   ` Philippe Mathieu-Daudé
2020-07-17  6:02 ` [PATCH v6 04/13] hw/arm: Add NPCM730 and NPCM750 SoC models Havard Skinnemoen
2020-07-17 12:20   ` Cédric Le Goater
2020-07-17 16:59     ` Havard Skinnemoen
2020-07-18  6:38       ` Philippe Mathieu-Daudé
2020-07-17  6:02 ` [PATCH v6 05/13] hw/arm: Add two NPCM7xx-based machines Havard Skinnemoen
2020-07-17  6:02 ` Havard Skinnemoen [this message]
2020-07-17 12:26   ` [PATCH v6 06/13] roms: Add virtual Boot ROM for NPCM7xx SoCs Cédric Le Goater
2020-07-17  6:02 ` [PATCH v6 07/13] hw/arm: Load -bios image as a boot ROM for npcm7xx Havard Skinnemoen
2020-07-17 12:14   ` Cédric Le Goater
2020-07-17  6:02 ` [PATCH v6 08/13] hw/nvram: NPCM7xx OTP device model Havard Skinnemoen
2020-07-17  6:02 ` [PATCH v6 09/13] hw/mem: Stubbed out NPCM7xx Memory Controller model Havard Skinnemoen
2020-07-17  6:02 ` [PATCH v6 10/13] hw/ssi: NPCM7xx Flash Interface Unit device model Havard Skinnemoen
2020-07-17  6:02 ` [PATCH v6 11/13] hw/arm: Wire up BMC boot flash for npcm750-evb and quanta-gsj Havard Skinnemoen
2020-07-17  6:02 ` [PATCH v6 12/13] docs/system: Add Nuvoton machine documentation Havard Skinnemoen
2020-07-17  6:02 ` [PATCH v6 13/13] tests/acceptance: console boot tests for quanta-gsj Havard Skinnemoen
2020-07-17 12:33   ` Cédric Le Goater
2020-07-20  8:22     ` Joel Stanley
2020-07-20  9:49       ` Philippe Mathieu-Daudé
2020-07-17 20:32 ` [PATCH v6 00/13] Add Nuvoton NPCM730/NPCM750 SoCs and two BMC machines Cédric Le Goater
2020-07-18  2:17   ` Havard Skinnemoen
2020-08-03 19:08 ` Philippe Mathieu-Daudé
2020-08-03 20:37   ` Havard Skinnemoen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200717060258.1602319-7-hskinnemoen@google.com \
    --to=hskinnemoen@google.com \
    --cc=Avi.Fishman@nuvoton.com \
    --cc=kfting@nuvoton.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.