qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: BALATON Zoltan
Subject: Re: [Qemu-ppc] [OpenBIOS] MorphOS 4.x on QEMU
Date: Mon, 3 Mar 2014 14:05:53 +0100 (CET)
User-agent: Alpine 2.02 (LMD 1266 2009-07-14)

On Sun, 2 Mar 2014, Mark Cave-Ayland wrote:
Now the fact that nextprop returns -1 indicates that the following check has failed:

 \ verify that prev exists (overkill...)
 dup if
   2dup r@ get-package-property if
     r> 2drop 2drop -1 exit
   else
     2drop
   then
 then

This means that the client requested the next property after "name" but OpenBIOS's get-package-property couldn't find "name" and so returns -1 back to the caller as shown in your trace.

If I remove this check it returns 0 and an empty string. With debug nextprop (and the above check removed + Olivier's patch) I get the following:

finddevice("/cpus") = 0xfff4bba8
child(0xfff4bba8) = 0xfff51908
nextprop(0xfff51908, "", 0x07de7e30) =
: nextprop  ( 7de7e30 7de7e30 fff51908 )
fff4a06c: >r
R: ( fff49af0 fff49bec fff383a4 fff4aa8c fff3dba4 0 fff3db54 fffb4214 fff4cb08 0
 3 0 fff35164 fffb4214 fff38584 7c58522 100 0 15 16 fff38500 fff37dfc fffb4214 f
ff49224 fff448c0 fffb4214 fffb4214 fff4a8b0 fff4a7ac 0 4 c fff35164 fffb4214 )
 ( 7de7e30 7de7e30 )
fff4a070: dup  ( 7de7e30 7de7e30 7de7e30 )
fff4a074: 0=  ( 7de7e30 7de7e30 0 )
fff4a078: do?branch  ( 7de7e30 7de7e30 )
fff4a08c: dup  ( 7de7e30 7de7e30 7de7e30 )
fff4a090: cstrlen  ( 7de7e30 7de7e30 0 )
fff4a094: 0  ( 7de7e30 7de7e30 0 0 )
fff4a098: 3  ( 7de7e30 7de7e30 0 0 3 )
fff4a09c: pick  ( 7de7e30 7de7e30 0 0 7de7e30 )
fff4a0a0: c!  ( 7de7e30 7de7e30 0 )
fff4a0a4: r>  ( 7de7e30 7de7e30 0 fff51908 )
fff4a0a8: next-property-std  ( 7de7e30 fff5197c 4 ffffffff )
fff4a0ac: do?branch  ( 7de7e30 fff5197c 4 )
fff4a0b4: dup  ( 7de7e30 fff5197c 4 4 )
fff4a0b8: 1+  ( 7de7e30 fff5197c 4 5 )
fff4a0bc: -rot  ( 7de7e30 5 fff5197c 4 )
fff4a0c0: ci-strcpy  ( 4 )
fff4a0c4: drop  ( Empty )
fff4a0c8: 1  ( 1 )
fff4a0cc: dobranch  ( 1 )
fff4a0dc: (semis)
[ Finished nextprop ] 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) =
: nextprop  ( 7de7e30 7de7e30 fff51908 )
fff4a06c: >r
R: ( fff49af0 fff49bec fff383a4 fff4aa8c fff3dba4 0 fff3db54 fffb4214 fff4cb08 0
 3 0 fff35164 fffb4214 fff38584 7c58522 100 0 15 16 fff38500 fff37dfc fffb4214 f
ff49224 fff448c0 fffb4214 fffb4214 fff4a8b0 fff4a7ac 0 4 c fff35164 fffb4214 )
 ( 7de7e30 7de7e30 )
fff4a070: dup  ( 7de7e30 7de7e30 7de7e30 )
fff4a074: 0=  ( 7de7e30 7de7e30 0 )
fff4a078: do?branch  ( 7de7e30 7de7e30 )
fff4a08c: dup  ( 7de7e30 7de7e30 7de7e30 )
fff4a090: cstrlen  ( 7de7e30 7de7e30 4 )
fff4a094: 0  ( 7de7e30 7de7e30 4 0 )
fff4a098: 3  ( 7de7e30 7de7e30 4 0 3 )
fff4a09c: pick  ( 7de7e30 7de7e30 4 0 7de7e30 )
fff4a0a0: c!  ( 7de7e30 7de7e30 4 )
fff4a0a4: r>  ( 7de7e30 7de7e30 4 fff51908 )
fff4a0a8: next-property-std  ( 7de7e30 0 )
fff4a0ac: do?branch  ( 7de7e30 )
fff4a0d4: drop  ( Empty )
fff4a0d8: 0  ( 0 )
fff4a0dc: (semis)
[ Finished nextprop ] 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

You should find that OpenBIOS boots your image and then breaks on nextprop, allowing you to step through the function examining the stack (and input string) to see what is going wrong.

I hope the above make sense to you and helps finding why it does not work.

Regards,
BALATON Zoltan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]