[OpenBIOS] PIC Passthough( VGA )
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Mon Dec 11 22:47:02 CET 2017
On 09/12/17 12:37, Jd Lyons wrote:
> I was hoping I could use PCI Passthrough with an old Apple OEM Geforce
> 6600 PCI-E card, as the display device, but I’m not having any luck.
Wow that's certainly an interesting project! There are, of course a few
things that need to be done first in order make this work...
> Openbios seems to have an error” Can not manage “VGA controller’ PCI
> device type ‘display’
> 10de 141 ( 3 0 0 )
This is just a warning - you will still be able to see the device node
in OpenBIOS, it just won't have a "friendly" node name.
> I’m assuming that Openbios is not reading the Option Rom of the card,
> but I’m not sure why.
Well... at the moment we actually cheat ;) Instead of reading the VGA
FCode ROM from the virtual display adapter, OpenBIOS embeds its own copy
of the FCode ROM and executes it unconditionally when it detects a VGA
display device. I must admit I hadn't considered that someone would be
interested in legacy device passthough to enable a device that isn't the
standard QEMU display adapter.
> I’m having trouble checking to see if Openbios can read the Rom of the
> card, I’m, sure I’m not doing it right, could someone offer a little
> guidance?
>
> http://mirror.informatimago.com/next/developer.apple.com/technotes/tn/tn2000.html
>
> >dev / ls
> >dev pci
> >dev @10
> >.properties
> >” ..” find-device open
> >.
>
> This is where, I think it should return ffffffff, however it returns -1.
>
> I was thinking “-1” was 0xffffffff?
Yes that's correct as qemu-system-ppc uses 32-bit numbers so -1 is equal
to 0xffffffff in this case.
> Here is where I’m getting stuck:
>
> >1180e config-b@ config-b@ undefined word.
>
> Can anyone offer what I’m doing wrong, should I have another value for
> “1180e”?
A couple of things here: 1180e is the address of the PCI device in
configuration space which you can derive from the "reg" property so
you'll need to check to make sure it is correct in OpenBIOS.
The main problem with config-b@ is that OpenBIOS's PCI routines are all
written in C rather than Forth and so you'd need to work out which Forth
words are required in order to execute your FCode ROM and write
appropriate wrappers for them.
As a starting point I'd suggest that if you still have the old hardware
lying around, you can use the article above to extract the ROM from a
real Mac and then run the resulting code through fcode-utils detok which
effectively "decompiles" the ROM and therefore give us an idea as to how
many Forth words need to be implemented.
ATB,
Mark.
More information about the OpenBIOS
mailing list