Hello list! A few days ago I found this openfirmware and the forth in it and wanted to try it out in a project for powerpc (64 bit).
My openbios version is latest from git (master), last patch from 2016-10-09 (1dc4f162efc0f00a36126cab8e7b906335f6b706).
I used this because the version 1.1 has two bugs I stumbled upon.
I am cross-compiling on amd64 (host with debian) for ppc64 target and therefore call the script "switch-arch qemu-ppc64".
The settings in the generated files under obj-ppc64 look OK to me.
But (there is allways this "but") I have a compile error:
moew@debhost:~/OpenFirmware/openbios# make GEN bootstrap.dict panic: segmentation violation at 0xdf1ec62c dict=0x7f0edf1ec010 here=0x7f0edf1ec638(dict+0x628) pc=0x0(dict+0x20e13ff0) dstackcnt=0 rstackcnt=0 instruction=deadbeef dstack: 0x0 rstack: 0x0 Writing dictionary core file rules.mak:68: recipe for target 'bootstrap.dict' failed make: *** [bootstrap.dict] Error 1
It seems that the generating of the forth dictionary fails? Where can I get more information? The logs contain not much more info.
When I compile the same sources for target amd64, then it builds and works.
Thank you for reading (and maybe for helping)!
Michael
On 18/11/16 07:33, Michael wrote:
Hi Michael,
Hello list! A few days ago I found this openfirmware and the forth in it and wanted to try it out in a project for powerpc (64 bit).
My openbios version is latest from git (master), last patch from 2016-10-09 (1dc4f162efc0f00a36126cab8e7b906335f6b706).
I used this because the version 1.1 has two bugs I stumbled upon.
I am cross-compiling on amd64 (host with debian) for ppc64 target and therefore call the script "switch-arch qemu-ppc64".
Currently the QEMU build is pretty much the default, or at least it is miles ahead of the code for original hardware since I'm not sure anyone has tried to run it on real PPC hardware in years...
Anyhow to answer your question you should be able to just do:
./config/scripts/switch-arch ppc64
The settings in the generated files under obj-ppc64 look OK to me.
But (there is allways this "but") I have a compile error:
moew@debhost:~/OpenFirmware/openbios# make GEN bootstrap.dict panic: segmentation violation at 0xdf1ec62c dict=0x7f0edf1ec010 here=0x7f0edf1ec638(dict+0x628) pc=0x0(dict+0x20e13ff0) dstackcnt=0 rstackcnt=0 instruction=deadbeef dstack: 0x0 rstack: 0x0 Writing dictionary core file rules.mak:68: recipe for target 'bootstrap.dict' failed make: *** [bootstrap.dict] Error 1
It seems that the generating of the forth dictionary fails? Where can I get more information? The logs contain not much more info.
When I compile the same sources for target amd64, then it builds and works.
You can get more verbose output by running "make V=1" which should also be logged in obj-ppc64/build.log.
If you are getting errors building one of the Forth dictionaries e.g. syntax errors in Forth then the Forth compiler outputs per dictionary can be found in the obj-ppc64/*-console.log files.
ATB,
Mark.
On Fri, Nov 18, 2016 at 10:49:31AM +0000, Mark Cave-Ayland wrote:
moew@debhost:~/OpenFirmware/openbios# make GEN bootstrap.dict panic: segmentation violation at 0xdf1ec62c
It is using the low 32 bits of a pointer as a pointer by itself. That unsurprisingly does not end well.
dict=0x7f0edf1ec010 here=0x7f0edf1ec638(dict+0x628) pc=0x0(dict+0x20e13ff0)
That "dict+" is printed as (and probably computed as) 32 bits as well.
I never got it to build on powerpc64 either, fwiw.
Segher
On Nov 18, 2016, at 2:33 AM, Michael wrote:
Hello list! A few days ago I found this openfirmware and the forth in it and wanted to try it out in a project for powerpc (64 bit).
My openbios version is latest from git (master), last patch from 2016-10-09 (1dc4f162efc0f00a36126cab8e7b906335f6b706).
I used this because the version 1.1 has two bugs I stumbled upon.
I am cross-compiling on amd64 (host with debian) for ppc64 target and therefore call the script "switch-arch qemu-ppc64".
The settings in the generated files under obj-ppc64 look OK to me.
But (there is allways this "but") I have a compile error:
moew@debhost:~/OpenFirmware/openbios# make GEN bootstrap.dict panic: segmentation violation at 0xdf1ec62c dict=0x7f0edf1ec010 here=0x7f0edf1ec638(dict+0x628) pc=0x0(dict +0x20e13ff0) dstackcnt=0 rstackcnt=0 instruction=deadbeef dstack: 0x0 rstack: 0x0 Writing dictionary core file rules.mak:68: recipe for target 'bootstrap.dict' failed make: *** [bootstrap.dict] Error 1
It seems that the generating of the forth dictionary fails? Where can I get more information? The logs contain not much more info.
When I compile the same sources for target amd64, then it builds and works.
Thank you for reading (and maybe for helping)!
Michael
Hello, could you try adding this to your command-line options, then try to compile again and see what happens: HOSTARCH=amd64 ./switch-arch ppc64
I never seen qemu-ppc64 before, so I suggest trying ppc64 and see if that changes anything.
Hy,
On Fri, Nov 18, 2016 at 11:02:18AM -0500, G 3 wrote:
... Hello, could you try adding this to your command-line options, then try to compile again and see what happens: HOSTARCH=amd64 ./switch-arch ppc64
I never seen qemu-ppc64 before, so I suggest trying ppc64 and see if that changes anything.
Thank you, but I tried both options (HOSTARCH & ppc64) a few days ago without luck.
Greetings Michael
On Nov 18, 2016, at 12:08 PM, Michael wrote:
Hy,
On Fri, Nov 18, 2016 at 11:02:18AM -0500, G 3 wrote:
... Hello, could you try adding this to your command-line options, then try to compile again and see what happens: HOSTARCH=amd64 ./switch-arch ppc64
I never seen qemu-ppc64 before, so I suggest trying ppc64 and see if that changes anything.
Thank you, but I tried both options (HOSTARCH & ppc64) a few days ago without luck.
Greetings Michael
I do remember another person saying that building the ppc64 target does not work. It is a broken target. Are you able to use ppc instead?
Hello,
On Fri, Nov 18, 2016 at 12:21:46PM -0500, G 3 wrote:
... I do remember another person saying that building the ppc64 target does not work. It is a broken target. Are you able to use ppc instead?
Yes, the ppc did compile and loads under qemu.
On Nov 20, 2016, at 1:49 PM, Michael wrote:
Hello,
On Fri, Nov 18, 2016 at 12:21:46PM -0500, G 3 wrote:
... I do remember another person saying that building the ppc64 target does not work. It is a broken target. Are you able to use ppc instead?
Yes, the ppc did compile and loads under qemu.
I think a major obstacle standing in the way of fixing the ppc64 target is that the ppc target works, and is good enough. Is there a situation where the ppc64 target is absolutely needed?
On Sun, Nov 20, 2016 at 01:54:13PM -0500, G 3 wrote:
... that the ppc target works, and is good enough. Is there a situation where the ppc64 target is absolutely needed?
If I can I boot a PowerPC CELL CPU (like in Sony PS3) with ppc (not ppc64) and later load /switch to ppc64, then ppc will be enough I think.
Greetings, Michael
On Nov 20, 2016, at 2:41 PM, Michael wrote:
On Sun, Nov 20, 2016 at 01:54:13PM -0500, G 3 wrote:
... that the ppc target works, and is good enough. Is there a situation where the ppc64 target is absolutely needed?
If I can I boot a PowerPC CELL CPU (like in Sony PS3) with ppc (not ppc64) and later load /switch to ppc64, then ppc will be enough I think.
Greetings, Michael
You are certain you can't use ppc only? What negative consequences are there to using ppc?
On Sun, Nov 20, 2016 at 03:21:41PM -0500, G 3 wrote:
... You are certain you can't use ppc only? What negative consequences are there to using ppc?
In the bootcode maybe no negative konsequences, but I am not certain. The code must have e.g. access to all CPU registers.
On Nov 20, 2016, at 5:33 PM, Michael wrote:
On Sun, Nov 20, 2016 at 03:21:41PM -0500, G 3 wrote:
... You are certain you can't use ppc only? What negative consequences are there to using ppc?
In the bootcode maybe no negative konsequences, but I am not certain. The code must have e.g. access to all CPU registers.
If you don't mind me asking, what is it that you hope to do with OpenBIOS? It is to serve as a boot-loader for another program?
The code you talk about, are you able to show it to us? We might be able to help you with it.
Hey list,
On Sun, Nov 20, 2016 at 05:52:13PM -0500, G 3 wrote:
... If you don't mind me asking, what is it that you hope to do with OpenBIOS? It is to serve as a boot-loader for another program? ...
It should enable debugging over a serial console and load the kernel.
The code you talk about, are you able to show it to us? We might be able to help you with it. ...
Thank you! There is not much code now, maybe in two weeks.
On 18/11/16 17:08, Michael wrote:
Hy,
On Fri, Nov 18, 2016 at 11:02:18AM -0500, G 3 wrote:
... Hello, could you try adding this to your command-line options, then try to compile again and see what happens: HOSTARCH=amd64 ./switch-arch ppc64
I never seen qemu-ppc64 before, so I suggest trying ppc64 and see if that changes anything.
Thank you, but I tried both options (HOSTARCH & ppc64) a few days ago without luck.
I don't have access to PPC64 hardware, but are you able to post a backtrace by running under gdb at all that we can use to search for clues?
ATB,
Mark.
On Sat, Nov 19, 2016 at 01:00:06PM +0000, Mark Cave-Ayland wrote:
... ... I don't have access to PPC64 hardware, but are you able to post a backtrace by running under gdb at all that we can use to search for clues?
Yes I will try that in the next days. I also did not try it on real hardware until now, but will need it soon therefore. It is not only powerpc64, but a CELL CPU too, like the one in the old Sony PS3. So I will test it on this hardware soon.
ATB,
What is ATB?
Greetings, Michael