[OpenBIOS] [Qemu-ppc] MorphOS 4.x on QEMU

BALATON Zoltan balaton at eik.bme.hu
Sun Mar 2 13:25:39 CET 2014


Hello,

On Sun, 2 Mar 2014, Olivier Danet wrote:
> It is possible to invoke manually "nextprop" from the OpenBIOS prompt :
>
> -------------------------------------------------------------------
> cd /cpus/PowerPC,G4
>
> \ Empty string : Returns 1 "name"= first property
> " mmmmmmmmmmmm" drop dup " "(00)" drop ?active-package
> " nextprop" client-call-iface .
> cr . dup cstrlen cr type cr
>
> \ Nonexistant : Returns -1 ""
> " mmmmmmmmmmmm" drop dup " mmmmm"(00)" drop ?active-package
> " nextprop" client-call-iface .
> cr . dup cstrlen cr type cr
>
> \ Property : Returns 1 and the following one : "device_type"
> " mmmmmmmmmmmm" drop dup " name"(00)" drop ?active-package
> " nextprop" client-call-iface .
> cr . dup cstrlen cr type cr
>
> \ Last  : Returns 0 ""
> " mmmmmmmmmmmm" drop dup " translations"(00)" drop ?active-package
> " nextprop" client-call-iface .
> cr . dup cstrlen cr type cr
>
> -------------------------------------------------------------------
> ... and it works!

These commands work but when called by the boot loader it fails.

> Maybe you could try this :
> -        memdump(arg2pointer(pb->args[2]), pb->args[pb->nargs]);
> +        memdump(arg2pointer(pb->args[2]), 32);

With this patch it shows that it returns -1 and an empty string:

>> finddevice("/cpus") = 0xfff4bbe8
>> child(0xfff4bbe8) = 0xfff51948
>> nextprop(0xfff51948, "", 0x07de7e30) = 1
>> 0x07de7e30  6e 61 6d 65 00 00 00 00 00 00 00 00 00 00 00 00  name............
>> 0x07de7e40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>> getprop(0xfff51948, "name", 0x07de7df0, 64) = 11
>> 0x07de7df0  50 6f 77 65 72 50 43 2c 47 34 00 __ __ __ __ __  PowerPC,G4.
>> nextprop(0xfff51948, "name", 0x07de7e30) = -1
>> 0x07de7e30  00 61 6d 65 00 00 00 00 00 00 00 00 00 00 00 00  .ame............
>> 0x07de7e40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>> child(0xfff51948) = 0x00000000


> Finally, you can also try this  :
>
> Index: forth/system/ciface.fs
> ===================================================================
> --- forth/system/ciface.fs    (révision 1269)
> +++ forth/system/ciface.fs    (copie de travail)
> @@ -110,18 +110,7 @@
>   ( buf prev prev_len )
>   0 3 pick c!
>
> -  \ verify that prev exists (overkill...)
> -  dup if
> -    2dup r@ get-package-property if
> -      r> 2drop 2drop -1 exit
> -    else
> -      2drop
> -    then
> -  then
> -
> -  ( buf prev prev_len )
> -
> -  r> next-property if
> +  r> next-property if
>     ( buf name name_len )
>     dup 1+ -rot ci-strcpy drop 1
>   else
> ===================================================================
> (or next-property-std above if you applied my previous patch)
>
> Maybe it will change something.

It only changes that now it returns 0 but still an empty string:

>> finddevice("/cpus") = 0xfff4bba8
>> child(0xfff4bba8) = 0xfff51908
>> nextprop(0xfff51908, "", 0x07de7e30) = 1
>> 0x07de7e30  6e 61 6d 65 00 00 00 00 00 00 00 00 00 00 00 00  name............
>> 0x07de7e40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>> getprop(0xfff51908, "name", 0x07de7df0, 64) = 11
>> 0x07de7df0  50 6f 77 65 72 50 43 2c 47 34 00 __ __ __ __ __  PowerPC,G4.
>> nextprop(0xfff51908, "name", 0x07de7e30) = 0
>> 0x07de7e30  00 61 6d 65 00 00 00 00 00 00 00 00 00 00 00 00  .ame............
>> 0x07de7e40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>> child(0xfff51908) = 0x00000000

Any more ideas?

Thanks,
BALATON Zoltan


More information about the OpenBIOS mailing list