From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: [kvm-unit-tests PATCH v4 10/17] powerpc/ppc64: add a boot rom Date: Wed, 17 Feb 2016 12:50:13 +1100 Message-ID: <20160217015013.GC5239@voom.redhat.com> References: <1455544166-19766-1-git-send-email-drjones@redhat.com> <1455544166-19766-11-git-send-email-drjones@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="B4IIlcmfBL/1gGOG" Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, thuth@redhat.com, dgibson@redhat.com, agraf@suse.de, lvivier@redhat.com, pbonzini@redhat.com To: Andrew Jones Return-path: Received: from ozlabs.org ([103.22.144.67]:56016 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756598AbcBQGuW (ORCPT ); Wed, 17 Feb 2016 01:50:22 -0500 Content-Disposition: inline In-Reply-To: <1455544166-19766-11-git-send-email-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: --B4IIlcmfBL/1gGOG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 15, 2016 at 02:49:19PM +0100, Andrew Jones wrote: > Make a one line replacement for SLOF. This bootloader just > jumps to 0x400000, because we know the kernel will be there. >=20 > Signed-off-by: Andrew Jones > Reviewed-by: Thomas Huth > Tested-by: Laurent Vivier Reviewed-by: David Gibson > --- > powerpc/.gitignore | 1 + > powerpc/Makefile.common | 11 +++++++++-- > powerpc/boot_rom.S | 5 +++++ > 3 files changed, 15 insertions(+), 2 deletions(-) > create mode 100644 powerpc/.gitignore > create mode 100644 powerpc/boot_rom.S >=20 > diff --git a/powerpc/.gitignore b/powerpc/.gitignore > new file mode 100644 > index 0000000000000..2f017a8e61d4b > --- /dev/null > +++ b/powerpc/.gitignore > @@ -0,0 +1 @@ > +boot_rom.bin > diff --git a/powerpc/Makefile.common b/powerpc/Makefile.common > index 13b828ab171d6..0c3eaba0d3aab 100644 > --- a/powerpc/Makefile.common > +++ b/powerpc/Makefile.common > @@ -11,7 +11,7 @@ endif > tests-common =3D \ > $(TEST_DIR)/selftest.elf > =20 > -all: test_cases > +all: $(TEST_DIR)/boot_rom.bin test_cases > =20 > ################################################################## > phys_base =3D $(LOADADDR) > @@ -40,8 +40,15 @@ FLATLIBS =3D $(libcflat) $(LIBFDT_archive) $(libgcc) > -Wl,-T,powerpc/flat.lds,--build-id=3Dnone,-Ttext=3D$(start_addr) \ > $(filter %.o, $^) $(FLATLIBS) > =20 > +$(TEST_DIR)/boot_rom.bin: $(TEST_DIR)/boot_rom.elf > + dd if=3D/dev/zero of=3D$@ bs=3D256 count=3D1 > + $(OBJCOPY) -O binary $^ >(cat - >>$@) > + > +$(TEST_DIR)/boot_rom.elf: $(TEST_DIR)/boot_rom.o > + $(LD) -nostdlib -Ttext=3D0x100 --entry=3Dstart --build-id=3Dnone -o $@ = $< > + > powerpc_clean: libfdt_clean asm_offsets_clean > - $(RM) $(TEST_DIR)/*.{o,elf} \ > + $(RM) $(TEST_DIR)/*.{o,elf} $(TEST_DIR)/boot_rom.bin \ > $(TEST_DIR)/.*.d lib/powerpc/.*.d > =20 > ################################################################## > diff --git a/powerpc/boot_rom.S b/powerpc/boot_rom.S > new file mode 100644 > index 0000000000000..ae2c08ddce3c1 > --- /dev/null > +++ b/powerpc/boot_rom.S > @@ -0,0 +1,5 @@ > +#define SPAPR_KERNEL_LOAD_ADDR 0x400000 > +.text > +.globl start > +start: > + b SPAPR_KERNEL_LOAD_ADDR - 0x100 --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --B4IIlcmfBL/1gGOG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWw9HUAAoJEGw4ysog2bOSq0YQANc/yoVyvQH2KSpGhdMq1T8v odVqJuNm2bBnLER0yVwKLqFUZpJfX7USB7VLUekFQf2ckVeed3Afrw+OWEXWqatM Y239eOB128R484lIt7NtcxnnGe3muctlCFqHZgc0fyUxwJXNdDiZbe1FzfS8jDr2 mIYbIxDqG7BFqlX4EyTTXcEpqCnCerbpn17LqsQzS/OjY3+Pwo/ogg7a5FwQGA1n 2F9+EtE6g0oojFU32qCaigSZeSzwcAZyCdEQMWJEf1zRNbP3gofNG4SRZ5Ozs/Wq FFiydu9lip9b4ptSnm1qlmEx+76DJw8HD7Aj0rGLgByfXyZ9IOPIYJnoW7Gi7HtZ nc9YkDwab9moCKg51kQRcRRKsKhqd+g+Jigu5eAOj+htyK3vY4nJWmlRjY1vM3am sPICBa0d9a3bdiEnWcL0PspxPRf5Z+ALBJ6mth+iqwbeL0rHi9neoWYEnWpoC3vi MCmc6iFfEF+zvvjXQXufRZZvUsJVidUbuTqjw/YlR/q1xe+5pR5tIgnaDfuagiKT YZ13w+l/jL+Va1/wrPEQh71sM+E8Hr5GpXWClGlyFnrzcENcAhBW9Z2piasKHe63 omM1cUV7H/pcmgtySXc6Vk+eVSMKC0FEYxNSDrZoIB4cDF0ayoF3HiJj1QPWvBvU aDD27sDKzinH6vVnzV/E =Vbpu -----END PGP SIGNATURE----- --B4IIlcmfBL/1gGOG--