[OpenBIOS] [PATCH] ppc: [HACK] add some RTAS properties to make Mac OS 8.5 try to boot

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Wed Feb 3 23:23:19 CET 2016


On 03/02/16 22:06, Alyssa Milburn wrote:

> Just for entertainment value; with this applied, 8.5 will successfully
> get all the way to beyond quiesce(). I didn't think about whether this
> actually makes any sense at all (presumably not), beware.
> ---
>  arch/ppc/qemu/init.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c
> index 2b5b8e1..667eb6a 100644
> --- a/arch/ppc/qemu/init.c
> +++ b/arch/ppc/qemu/init.c
> @@ -912,6 +912,20 @@ arch_of_init(void)
>                  size *= 2;
>              set_property(ph, "rtas-size", (char*)&size, sizeof(size));
>              set_int_property(ph, "rtas-version", is_apple() ? 0x41 : 1);
> +            set_int_property(ph, "restart-rtas", 0xabcdef01);
> +            set_int_property(ph, "nvram-fetch", 0xabcdef02);
> +            set_int_property(ph, "nvram-store", 0xabcdef03);
> +            set_int_property(ph, "get-time-of-day", 0xabcdef04);
> +            set_int_property(ph, "set-time-of-day", 0xabcdef05);
> +            set_int_property(ph, "set-time-for-power-on", 0xabcdef06);
> +            set_int_property(ph, "event-scan", 0xabcdef07);
> +            set_int_property(ph, "check-exception", 0xabcdef08);
> +            set_int_property(ph, "read-pci-config", 0xabcdef09);
> +            set_int_property(ph, "write-pci-config", 0xabcdef0a);
> +            set_int_property(ph, "set-indicator", 0xabcdef0c);
> +            set_int_property(ph, "power-off", 0xabcdef12);
> +            set_int_property(ph, "system-reboot", 0xabcdef15);
> +            set_int_property(ph, "get-time-for-power-on", 0xabcdef1e);
>          }
>          break;
>      }

Ha cool - this is based on MOL's device tree, right? :)  There is
actually some RTAS code in OpenBIOS but it is disabled by default -
check out config/examples/ppc_config.xml and CONFIG_RTAS. I've no idea
if it was ever finished or is any good though.

Note that as this is a CONFIG option in order to test you'll need to
blow away your build tree, i.e.

rm -rf obj-ppc/
...
(enable CONFIG_RTAS in ppc_config.xml)
...
./config/scripts/switch-arch ppc
make


ATB,

Mark.




More information about the OpenBIOS mailing list