Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mikeylam

macrumors newbie
Jul 12, 2013
7
0
Thanks for this. It's more complicated than I would like but lets see how this works.

Michael

I assume the 1950XT would work, assuming Openbios has all the words used in the FCode ROM.

First you have to setup vfio.pci so it's working with qemu-system-ppc, then you need to load the FCode ROM from a disk and execute it on the propert device node in Openbios.

Something like:

Code:
dev /pci/@f <---assumes your 1950 is the device @f
load hd:,\ppc\1950XT.fcode <<--- assumes you have the fcode ROM on the first qemu hd in the foler /ppc
" /pci/@f" open-dev to my-self
4000040 1 byte-load <--assumes you haven't monkeyed with the load-base address.

If you don't get an error, you should be golden, then just boot hd:,\\:tbxi.

If you do get an error you'll need to turn on ?Fcode debug and Fcode Verbose, and detok the FCode ROM and find the words that Openbios is hanging on, likely because they are unimplemented.

If you find unimplemented words, you'll have to implement them, and rebuild Openbios.
 

mikeylam

macrumors newbie
Jul 12, 2013
7
0
I am more familiar with the x86 kvm gpu passthrough process where one needs to supply the GPU vbios. I would imagine the FCode rom you mentioned is similar. How do I dump the FCode rom though for a PPC video card?

I assume the 1950XT would work, assuming Openbios has all the words used in the FCode ROM.

First you have to setup vfio.pci so it's working with qemu-system-ppc, then you need to load the FCode ROM from a disk and execute it on the propert device node in Openbios.

Something like:

Code:
dev /pci/@f <---assumes your 1950 is the device @f
load hd:,\ppc\1950XT.fcode <<--- assumes you have the fcode ROM on the first qemu hd in the foler /ppc
" /pci/@f" open-dev to my-self
4000040 1 byte-load <--assumes you haven't monkeyed with the load-base address.

If you don't get an error, you should be golden, then just boot hd:,\\:tbxi.

If you do get an error you'll need to turn on ?Fcode debug and Fcode Verbose, and detok the FCode ROM and find the words that Openbios is hanging on, likely because they are unimplemented.

If you find unimplemented words, you'll have to implement them, and rebuild Openbios.
 

Jubadub

macrumors 6502
Original poster
Nov 1, 2017
341
425
FCode ROM = GPU BIOS = GPU ROM? If so, it's like dumping the BIOS/ROM of any other GPU. Well, in the case of ATI/AMD, ATIFlash on DOS takes good care of it, to put it simply.

Many such ROMs may also be downloaded from Techpowerup.
 

DearthnVader

macrumors 68000
Dec 17, 2015
1,969
6,325
Red Springs, NC
I am more familiar with the x86 kvm gpu passthrough process where one needs to supply the GPU vbios. I would imagine the FCode rom you mentioned is similar. How do I dump the FCode rom though for a PPC video card?

http://thomas.perrier.name/graphiccelerator.html

There is a ATI ROM Dump tool in that.

Also, you can pass the ROM from a file in linux, with the ,romfile=, same as with qemu-system-x86. HOWEVER, openbios does not probe for option ROM's, nor will it execute them.

You have to do that manually as I stated.
 

cdoublejj

macrumors member
Jan 21, 2015
35
5
USA, MO
what PCI GPUs would work? or PCIe? i may have some. just not Mac/Apple specific the only mac cardi have is that weird agp express thing.

EDIT: work with osx / os9
 
Last edited:

LightBulbFun

macrumors 68030
Nov 17, 2013
2,808
3,125
London UK
I did try and PCI Passthrough with a Radeon 9200 PCI in a PCI-E to PCI bridge, however my PC wold not boot at all with that card installed, wouldn't even power on.

I wonder what 9200 did you try exactly? :) and by not even power on do you mean as in not past POST or the PSU itself would not even come on?

if it was a Mac edition card it might be the Fcode Option ROM that the PC BIOS does not like for some reason

since your loading the option rom from the virtual HDD in OpenBIOS, you could flash the Mac card with an appropriate PC Option ROM just so the PC can post with the card in place :) (although im not sure how the Mac OS drivers would react to that)

I do know for a fact the Radeon 9200 Mac edition is a Universal 3.3V and 5V card as i have used it in both 3.3V and 5V Macintoshes

(from my 9600 to my G5s)
 

DearthnVader

macrumors 68000
Dec 17, 2015
1,969
6,325
Red Springs, NC
I wonder what 9200 did you try exactly? :) and by not even power on do you mean as in not past POST or the PSU itself would not even come on?

if it was a Mac edition card it might be the Fcode Option ROM that the PC BIOS does not like for some reason

since your loading the option rom from the virtual HDD in OpenBIOS, you could flash the Mac card with an appropriate PC Option ROM just so the PC can post with the card in place :) (although im not sure how the Mac OS drivers would react to that)

I do know for a fact the Radeon 9200 Mac edition is a Universal 3.3V and 5V card as i have used it in both 3.3V and 5V Macintoshes

(from my 9600 to my G5s)
It was just a cheap PC Radeon 9200, made by ATI with only a VGA output.

It was band new, and the PC wouldn't even power on.
 
  • Like
Reactions: LightBulbFun

DearthnVader

macrumors 68000
Dec 17, 2015
1,969
6,325
Red Springs, NC
Just an update, I was able to use PCIPassthough on a Rage128 Mac Edition Orion card and was able to get it to work with Mac OS X Tiger PPC in Qemu on an X86 host. Everything worked VGA/2D acceleration/3D acceleration.

I ran the benchmark in JKII and Q3, and played them some without issue.

Sadly OS 9 would hang on boot for some unknown reason I couldn't debug with this combo.

Does anyone know if IBM's Power 6/7/8/9 systems support PCIPassthough under Linux PPC64?

Last I checked vfio-pci had not being ported to Linux PPC/64.
 

Project Alice

macrumors 68020
Jul 13, 2008
2,019
2,089
Post Falls, ID
Just an update, I was able to use PCIPassthough on a Rage128 Mac Edition Orion card and was able to get it to work with Mac OS X Tiger PPC in Qemu on an X86 host. Everything worked VGA/2D acceleration/3D acceleration.
This is super cool. I wasn't aware qemu was even capable of this. What was the host and how would you configure that? It'd be cool to try it on a better card, something with QE/CI perhaps.
 

LightBulbFun

macrumors 68030
Nov 17, 2013
2,808
3,125
London UK
Just an update, I was able to use PCIPassthough on a Rage128 Mac Edition Orion card and was able to get it to work with Mac OS X Tiger PPC in Qemu on an X86 host. Everything worked VGA/2D acceleration/3D acceleration.

I ran the benchmark in JKII and Q3, and played them some without issue.

Sadly OS 9 would hang on boot for some unknown reason I couldn't debug with this combo.

Does anyone know if IBM's Power 6/7/8/9 systems support PCIPassthough under Linux PPC64?

Last I checked vfio-pci had not being ported to Linux PPC/64.

thats pretty cool! did you have to use a Custom OpenBIOS or is what is included with QEMU now able to load OptionROMs from PCI devices now?

(on a similar note I wonder how the work with getting a G3 beige ROM working in QEMU is going and further from that I wonder given the similarities in hardware if it would be possible to get a G3 BW ROM working too)
 
  • Like
Reactions: Amethyst1

DearthnVader

macrumors 68000
Dec 17, 2015
1,969
6,325
Red Springs, NC
This is super cool. I wasn't aware qemu was even capable of this. What was the host and how would you configure that? It'd be cool to try it on a better card, something with QE/CI perhaps.
Sadly Openbios doesn't support some of the needed words for PCI-E cards, but support could be added. I did get a Mac Gefroce 6600 PCI-E card to work with PCI Passthrough on the IBM Pseries machine in Qemu using SLOF.
thats pretty cool! did you have to use a Custom OpenBIOS or is what is included with QEMU now able to load OptionROMs from PCI devices now?

(on a similar note I wonder how the work with getting a G3 beige ROM working in QEMU is going and further from that I wonder given the similarities in hardware if it would be possible to get a G3 BW ROM working too)
It's a custom build of Openbios.

I used PCI passthrough on the Beige G3 Bootrom and it did probe, find and execute the PCI Option ROM for the SiL SATA card I used, but it would not find any disks. That's the state of the G3 bootrom in Qemu, it boot chimes and enters Open Firmware with some help, but there is no media to boot the Mac OS from.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.