qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 4/4] ppc/pegasos2: Implement some RTAS functions with VOF
Date: Thu, 8 Jul 2021 14:37:28 +1000	[thread overview]
Message-ID: <YOaBCA4nZ0Lyz2SM@yekko> (raw)
In-Reply-To: <b4bf314d4edca0dd31f2859543601f815ed56187.1624811233.git.balaton@eik.bme.hu>

[-- Attachment #1: Type: text/plain, Size: 2370 bytes --]

On Sun, Jun 27, 2021 at 06:27:13PM +0200, BALATON Zoltan wrote:
> Linux uses RTAS functions to access PCI devices so we need to provide
> these with VOF. Implement some of the most important functions to
> allow booting Linux with VOF. With this the board is now usable
> without a binary ROM image and we can enable it by default as other
> boards.
> 
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>

Applied, but...

> @@ -687,6 +795,29 @@ static void *build_fdt(MachineState *machine, int *fdt_size)
>      qemu_fdt_setprop_string(fdt, "/failsafe", "device_type", "serial");
>      qemu_fdt_setprop_string(fdt, "/failsafe", "name", "failsafe");
>  
> +    qemu_fdt_add_subnode(fdt, "/rtas");
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "system-reboot", 20);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "hibernate", 19);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "suspend", 18);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "power-off", 17);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "set-indicator", 11);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "display-character", 10);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "write-pci-config", 9);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "read-pci-config", 8);
> +    /* Pegasos2 firmware misspells check-exception and guests use that */
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "check-execption", 7);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "event-scan", 6);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "set-time-of-day", 4);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "get-time-of-day", 3);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "nvram-store", 2);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "nvram-fetch", 1);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "restart-rtas", 0);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "rtas-error-log-max", 0);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "rtas-event-scan-rate", 0);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "rtas-display-device", 0);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "rtas-size", 20);
> +    qemu_fdt_setprop_cell(fdt, "/rtas", "rtas-version", 1);

..you really want to be using your symbolic names here as well.

-- 
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 --]

  reply	other threads:[~2021-07-08  4:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-27 16:27 [PATCH 0/4] ppc/Pegasos2: Firmware replacement using VOF BALATON Zoltan
2021-06-27 16:27 ` [PATCH 2/4] target/ppc: Allow virtual hypervisor on CPU without HV BALATON Zoltan
2021-07-08  2:48   ` David Gibson
2021-06-27 16:27 ` [PATCH 1/4] ppc/pegasos2: Introduce Pegasos2MachineState structure BALATON Zoltan
2021-07-08  2:47   ` David Gibson
2021-06-27 16:27 ` [PATCH 4/4] ppc/pegasos2: Implement some RTAS functions with VOF BALATON Zoltan
2021-07-08  4:37   ` David Gibson [this message]
2021-07-08 22:25     ` BALATON Zoltan
2021-06-27 16:27 ` [PATCH 3/4] ppc/pegasos2: Use Virtual Open Firmware as firmware replacement BALATON Zoltan
2021-07-01 11:35 ` [PATCH 0/4] ppc/Pegasos2: Firmware replacement using VOF BALATON Zoltan
2021-07-05 19:17   ` Philippe Mathieu-Daudé
2021-07-08  4:37 ` 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=YOaBCA4nZ0Lyz2SM@yekko \
    --to=david@gibson.dropbear.id.au \
    --cc=aik@ozlabs.ru \
    --cc=balaton@eik.bme.hu \
    --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).