On Mon, Apr 13, 2020 at 01:39:19PM +0300, Hannu Vuolasaho wrote:
> Hi!
> 
> I'm trying to set up testbench for software on different archs and I
> ran into few issues when trying to get openbsd to work.
> 
> Has anyone done full install and taken notes how to get OpenBSD to run
> on Qemu-system-ppc ?
> 
> My current wishlist is short:
> 1) OpenBSD running
> 2) network for it
> 
> Point 1) successed from install66.iso  but the installed system doesn't boot
> Trying hd,\\:tbxi...
> No valid state has been set by load or init-program
> 
> I've tried few boot hd,:ofwboot /bsd variations but I'm stuck.
> 
> I try to start Qemu 4.2.0 on AMD64 linux with:
> qemu-system-ppc -M mac99 -cpu g4 \
> -usb -device usb-kbd \
>  -hda obsd-ppc32.qcow
> If I add anything on command line considering network, OpenBSD hangs,
> panics or exits to firmware.
> 
> What am I missing?
> 
> Best regards,
> Hannu Vuolasaho
> 

Hi Hannu,

I tried getting this working on OpenBSD/amd64 and ran into a problem as well..
Here is the string I boot the installer with:

qemu-system-ppc -M mac99,via=pmu-adb,graphics=off \
        -cpu g4 -nographic -m 2048M -vga none  \
        -hda macppc.img \
        -nic none \
        -cdrom install66.iso -boot d

This way will panic the kernel on boot, so one needs to quickly get into the
kernel config by typign -c at the boot: and then disable the ohci with the
command "disable ohci" and then "quit".

This will take it to the installer but there is an openpic message that keeps
repeating saying something like:

qemu-system-ppc: openpic_iack: bad raised IRQ 47 ctpr 7 ivpr 0x4047002f
qemu-system-ppc: openpic_iack: bad raised IRQ 47 ctpr 7 ivpr 0x4047002f

It emanates from qemu so I installed a patch to squelch it becuase I'M unsure
how to do this inside qemu.


--- hw/intc/openpic.c.orig      Thu Dec 12 19:20:47 2019
+++ hw/intc/openpic.c   Mon Apr 13 17:53:02 2020
@@ -55,7 +55,7 @@
 //#define DEBUG_OPENPIC
 
 #ifdef DEBUG_OPENPIC
-static const int debug_openpic = 1;
+static const int debug_openpic = 0;
 #else
 static const int debug_openpic = 0;
 #endif
@@ -1068,8 +1068,10 @@
     src = &opp->src[irq];
     if (!(src->ivpr & IVPR_ACTIVITY_MASK) ||
             !(IVPR_PRIORITY(src->ivpr) > dst->ctpr)) {
+#if 0
         error_report("%s: bad raised IRQ %d ctpr %d ivpr 0x%08x",
                 __func__, irq, dst->ctpr, src->ivpr);
+#endif
         openpic_update_irq(opp, irq);
         retval = opp->spve;
     } else {

... and then recompile the port.

So then I was able to install OpenBSD/macppc on the disk wd0.  However it
doesn't boot (like you said)... I get the message:

Welcome to OpenBIOS v1.1 built on Oct 28 2019 17:09
Trying hd:,\\:tbxi...
>> Not a bootable ELF image

Anyhow after working with it on -current and then trying 6.6 I gave up on it
tonight.  Also... I get panics when I select any nic device.  That's where it
is I guess.  Hoping someone picks up on my work, or leaves it be.

Good night!
-peter

Reply via email to