[OpenBIOS] [PATCH] Use exception vectors from ROM instead of copying them to page zero

BALATON Zoltan balaton at eik.bme.hu
Wed May 28 22:28:50 CEST 2014


On Wed, 28 May 2014, Mark Cave-Ayland wrote:
> Just download the latest FreeBSD/NetBSD PPC ISO releases from their 
> respective websites and try and boot them under QEMU with -M mac99 :) For one

OK, I've tried FreeBSD and it paniced because it has found an ide 
controller in the device tree with interrupts set but no interrupt parent. 
Since QEMU only emulates 2 ata ports of the three the third one should not 
be there in the device tree. With just this patch:

diff --git a/openbios-devel/drivers/macio.c 
b/openbios-devel/drivers/macio.c
index 00d7149..fc08c30 100644
--- a/openbios-devel/drivers/macio.c
+++ b/openbios-devel/drivers/macio.c
@@ -311,7 +312,7 @@ ob_macio_keylargo_init(const char *path, phys_addr_t 
addr)
          /* The NewWorld NVRAM is not located in the MacIO device */
          macio_nvram_init("", 0);
          escc_init(path, addr);
-        macio_ide_init(path, addr, 3);
+        macio_ide_init(path, addr, 2);
          openpic_init(path, addr);
         ob_unin_init();
  }

it probably goes further (I have some more ide patches in my tree too that 
I'll submit later some of which may also be needed) but then crashed when 
starting to use the VGA card. With -vga none -nographic it goes up to 
finding its CD but not very useful without a display. (Also QEMU 
segfaulted with -vga none but without -nographic but I did not investigate 
that either.) This image seems to break wherever I touch it so using it as 
a test case would cause more problems than it would help so I gave up on 
it. I think I'm better off fixing the keyboard under Finnix and use that 
as that seems to work better on QEMU already.

> You may find the following thread helpful here: 
> http://comments.gmane.org/gmane.comp.bios.openbios/4992. But again, you 
> should be able to cross-check with the *BSD sources exactly how the 
> interrupts are being routed to the CPU in QEMU based upon these properties 
> which will make life much easier.

I've hoped someone already understands these and can explain it so I don't 
have to dig up sources.

> And don't forget to make yourself familiar with the IEEE1275 PCI bindings 
> too: http://www.openfirmware.org/1275/bindings/pci/pci2_1.pdf.

I've already read that document but probably not enough times so I still 
don't get all of this.

Regards,
BALATON Zoltan



More information about the OpenBIOS mailing list