From: David Gibson <david@gibson.dropbear.id.au>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH qemu v9] spapr: Implement Open Firmware client interface
Date: Thu, 16 Jul 2020 23:22:49 +1000 [thread overview]
Message-ID: <20200716132249.GB5607@umbus.fritz.box> (raw)
In-Reply-To: <86e79b6a-0032-56da-a066-9f02df361298@ozlabs.ru>
[-- Attachment #1: Type: text/plain, Size: 3606 bytes --]
On Thu, Jul 16, 2020 at 07:04:56PM +1000, Alexey Kardashevskiy wrote:
> Ping? I kinda realize it is not going to replace SLOF any time soon but
> still...
Yeah, I know. I just haven't had time to consider it. Priority
starvation.
> On 07/07/2020 10:34, Alexey Kardashevskiy wrote:
> > Ping?
> >
> >
> > On 24/06/2020 10:28, Alexey Kardashevskiy wrote:
> >> Ping?
> >>
> >> On 02/06/2020 21:40, Alexey Kardashevskiy wrote:
> >>> Ping?
> >>>
> >>> On 13/05/2020 13:58, Alexey Kardashevskiy wrote:
> >>>> The PAPR platform which describes an OS environment that's presented by
> >>>> a combination of a hypervisor and firmware. The features it specifies
> >>>> require collaboration between the firmware and the hypervisor.
> >>>>
> >>>> Since the beginning, the runtime component of the firmware (RTAS) has
> >>>> been implemented as a 20 byte shim which simply forwards it to
> >>>> a hypercall implemented in qemu. The boot time firmware component is
> >>>> SLOF - but a build that's specific to qemu, and has always needed to be
> >>>> updated in sync with it. Even though we've managed to limit the amount
> >>>> of runtime communication we need between qemu and SLOF, there's some,
> >>>> and it has become increasingly awkward to handle as we've implemented
> >>>> new features.
> >>>>
> >>>> This implements a boot time OF client interface (CI) which is
> >>>> enabled by a new "x-vof" pseries machine option (stands for "Virtual Open
> >>>> Firmware). When enabled, QEMU implements the custom H_OF_CLIENT hcall
> >>>> which implements Open Firmware Client Interface (OF CI). This allows
> >>>> using a smaller stateless firmware which does not have to manage
> >>>> the device tree.
> >>>>
> >>>> The new "vof.bin" firmware image is included with source code under
> >>>> pc-bios/. It also includes RTAS blob.
> >>>>
> >>>> This implements a handful of CI methods just to get -kernel/-initrd
> >>>> working. In particular, this implements the device tree fetching and
> >>>> simple memory allocator - "claim" (an OF CI memory allocator) and updates
> >>>> "/memory@0/available" to report the client about available memory.
> >>>>
> >>>> This implements changing some device tree properties which we know how
> >>>> to deal with, the rest is ignored. To allow changes, this skips
> >>>> fdt_pack() when x-vof=on as not packing the blob leaves some room for
> >>>> appending.
> >>>>
> >>>> In absence of SLOF, this assigns phandles to device tree nodes to make
> >>>> device tree traversing work.
> >>>>
> >>>> When x-vof=on, this adds "/chosen" every time QEMU (re)builds a tree.
> >>>>
> >>>> This adds basic instances support which are managed by a hash map
> >>>> ihandle -> [phandle].
> >>>>
> >>>> Before the guest started, the used memory is:
> >>>> 0..4000 - the initial firmware
> >>>> 10000..180000 - stack
> >>>>
> >>>> This OF CI does not implement "interpret".
> >>>>
> >>>> With this basic support, this can only boot into kernel directly.
> >>>> However this is just enough for the petitboot kernel and initradmdisk to
> >>>> boot from any possible source. Note this requires reasonably recent guest
> >>>> kernel with:
> >>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=df5be5be8735
> >>>>
> >>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> >>>> ---
> >>>>
>
>
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-07-16 22:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 3:58 [PATCH qemu v9] spapr: Implement Open Firmware client interface Alexey Kardashevskiy
2020-06-02 11:40 ` Alexey Kardashevskiy
2020-06-24 0:28 ` Alexey Kardashevskiy
2020-07-07 0:34 ` Alexey Kardashevskiy
2020-07-16 9:04 ` Alexey Kardashevskiy
2020-07-16 13:22 ` David Gibson [this message]
2020-09-29 10:35 ` Alexey Kardashevskiy
2020-10-12 1:06 ` Alexey Kardashevskiy
2020-10-12 11:40 ` BALATON Zoltan via
2020-10-12 11:51 ` Greg Kurz
2020-10-13 2:10 ` Alexey Kardashevskiy
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=20200716132249.GB5607@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=aik@ozlabs.ru \
--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).