Hi Balaton,
On Tue, 25 Jan 2022 14:01:38 +0100 (CET) BALATON Zoltan balaton@eik.bme.hu wrote:
On Mon, 24 Jan 2022, Glenn Washburn wrote:
On Mon, 24 Jan 2022 08:04:07 +0000 Mark Cave-Ayland mark.cave-ayland@ilande.co.uk wrote:
On 20/01/2022 21:12, Glenn Washburn wrote:
Hi list,
I've gotten the qemu-ppc target to build correctly, however, I'm having issues with the qemu-ppc64 target. I'm using the 10.1.0 GCC ppc64 compiler distributed at kernel.org[1].
I'm doing the following: $ PATH=/home/user/cross/gcc-10.1.0-nolibc/powerpc64-linux/bin:$PATH $ ./config/scripts/switch-arch qemu-ppc64 $ make V=1
The make is fine until the forthstrap command, which has this output: ./forthstrap -I/home/user/openbios.git/forth/bootstrap/ -I/home/user/openbios.git/forth/bootstrap/ -I/home/user/openbios.git/forth/lib/ -I/home/user/openbios.git/forth/device/ -I/home/user/openbios.git/forth/debugging/ -I/home/user/openbios.git/forth/admin/ -I/home/user/openbios.git/forth/util/ -I/home/user/openbios.git/forth/packages/ -I/home/user/openbios.git/forth/system/ -I/home/user/openbios.git/libopenbios/ -I/home/user/openbios.git/packages/ -I/home/user/openbios.git/drivers/ -I/home/user/openbios.git/arch/ppc/ -I/home/user/openbios.git -I./forth -D bootstrap.dict -M bootstrap.dict.d -c bootstrap.dict-console.log forth/bootstrap/start.fs panic: segmentation violation at 0xa6dbc62c dict=0x7fa7a6dbc010 here=0x7fa7a6dbc638(dict+0x628) pc=0x0(dict+0x59243ff0) dstackcnt=0 rstackcnt=0 instruction=deadbeef dstack: 0x0 rstack: 0x0 Writing dictionary core file
Is anyone else seeing this? Can someone with forth experience help here?
Glenn
[1] https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/10.1.0/...
I haven't tried building with a powerpc64 compiler for a while as the output binary for ppc is always 32-bit. IIRC there is some runtime patching around rfi/rfid and management of the MSR_SF flag to allow things to work under both qemu-system-ppc and qemu-system-ppc64.
Can you get a backtrace from the above? You'll need to clear out any existing obj-* directories and tweak HOSTCFLAGS and CFLAGS in Makefile.target to specify -O0 -g before re-running switch-arch.
Here's backtrace output ia GDB.
Not sure what do you want to do with qemu-ppc64 but the only tested and working config is qemu-ppc which should also work with 64bit PPC but only used for qemu-system-ppc64 -M mac99 which is some G5 Mac like hardware (incomplete emulation of a G5 Mac with a U3 chipset) but still says PowerMac3,1 in the device tree which might confuse anything else than Linux.
Thank you for confirming that qemu-ppc64 is not working. My naive intent was to use the 64bit firmware for the 64bit PPC QEMU. The documentation leads one to believe that this is a valid build target. Perhaps it should be removed or at least documented that it does not work?
If the qemu-ppc64 target were to build successfully, would it also have the same restrictions of only being able to be used by the mac99 machine?
For further context, I'm doing this as a part of working on GRUB's testing. Checking again though, it looks like GRUB probably only runs in 32-bit mode on PPC64 anyway.
Glenn