qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Peter Maydell" <peter.maydell@linaro.org>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Alexey Kardashevskiy" <aik@ozlabs.ru>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
	qemu-ppc <qemu-ppc@nongnu.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [PATCH qemu v2] spapr: Kill SLOF
Date: Mon, 6 Jan 2020 19:56:04 +0100	[thread overview]
Message-ID: <b67cd7f5-b8ca-631a-f349-234789b9df12@redhat.com> (raw)
In-Reply-To: <CAFEAcA9ZrTgPBxBq1rBo0u4z2SB=YHpWx_WUuycXK6pahARuXg@mail.gmail.com>

On 1/6/20 6:25 PM, Peter Maydell wrote:
> On Mon, 6 Jan 2020 at 17:09, Cédric Le Goater <clg@kaod.org> wrote:
>> ARM bootloaders are also embedded in QEMU's code. See hw/arm/boot.c.
>> You could improve a bit the definition though.
> 
> Given an opportunity to restart from scratch I don't know
> that I'd do things the way hw/arm/boot.c does. The initial
> idea was really simple and straightforward: 3 or 4 insns
> which just set some registers and jumped to the kernel.
> Fast-forward a decade or two, and the complexity has
> significantly increased as we added extra tweaks to deal
> with SMP systems, the GIC interrupt controller, boards
> which need to do some extra odd stuff, CPUs which start
> in Secure state, 64-bit CPUs, mangling the DTB, booting
> multiple flavours of image file format, implementing
> various 'firmware' functionality and APIs, and so on and on.

:S

> Insisting from the start that QEMU emulates what bare metal
> hardware does, and doesn't get into the business of faking
> up the behaviour of firmware would have been a neater
> separation of concerns in the long run.
> 
> To the narrower concern, yeah, on the arm side we
> just embed hand-assembled hex values in the C file;
> this is mostly to avoid needing a cross-compiler setup at
> QEMU build time, but it also lets us hand-patch the
> binary blob at runtime to fill in addresses and so on.

This was also before we provide a handy docker image with cross compiler 
for about all architectures supported.

Maybe the cross-build-guest-tests target from tests/tcg/Makefile.qemu 
can be reused to build spapr-rtas.S?



  reply	other threads:[~2020-01-06 19:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-05 23:42 [PATCH qemu v2] spapr: Kill SLOF Alexey Kardashevskiy
2020-01-06  4:19 ` David Gibson
2020-01-06  6:28   ` Alexey Kardashevskiy
2020-01-06  8:50     ` David Gibson
2020-01-06 12:34       ` Alexey Kardashevskiy
2020-01-06 17:09         ` Cédric Le Goater
2020-01-06 17:25           ` Peter Maydell
2020-01-06 18:56             ` Philippe Mathieu-Daudé [this message]
2020-01-07  1:44             ` Alexey Kardashevskiy
2020-01-07  5:26         ` David Gibson
2020-01-08  4:07           ` Alexey Kardashevskiy
2020-01-09  4:07             ` David Gibson
2020-01-09  6:31               ` Alexey Kardashevskiy
2020-01-13  3:32                 ` David Gibson
2020-01-06 13:39   ` Alexey Kardashevskiy
2020-01-06 23:56     ` David Gibson
2020-01-07  4:44   ` Alexey Kardashevskiy
2020-01-07  5:54     ` David Gibson
2020-01-08  4:20       ` Alexey Kardashevskiy
2020-01-08  5:53         ` Alexey Kardashevskiy
2020-01-09  4:25           ` David Gibson
2020-01-09  4:18         ` David Gibson

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=b67cd7f5-b8ca-631a-f349-234789b9df12@redhat.com \
    --to=philmd@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=alex.bennee@linaro.org \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).